diff --git a/disclaimers.json b/disclaimers.json index 26cd855c69f..2cfdf64ce1e 100644 --- a/disclaimers.json +++ b/disclaimers.json @@ -11,6 +11,14 @@ "api": "notebooks", "package": "@google-cloud/notebooks" }, + { + "api": "apigateway", + "package": "@google-cloud/api-gateway" + }, + { + "api": "appengine", + "package": "@google-cloud/appengine-admin" + }, { "api": "area120tables", "package": "@google/area120-tables" @@ -291,10 +299,18 @@ "api": "securitycenter", "package": "@google-cloud/security-center" }, + { + "api": "servicecontrol", + "package": "" + }, { "api": "servicedirectory", "package": "@google-cloud/service-directory" }, + { + "api": "servicemanagement", + "package": "" + }, { "api": "spanner", "package": "@google-cloud/spanner" diff --git a/discovery/accessapproval-v1.json b/discovery/accessapproval-v1.json index f519a317478..754d90934e5 100644 --- a/discovery/accessapproval-v1.json +++ b/discovery/accessapproval-v1.json @@ -286,7 +286,7 @@ ], "parameters": { "filter": { - "description": "A filter on the type of approval requests to retrieve. Must be one of the following values: * [not set]: Requests that are pending or have active approvals. * ALL: All requests. * PENDING: Only pending requests. * ACTIVE: Only active (i.e. currently approved) requests. * DISMISSED: Only requests that have been dismissed, or requests that . are not approved and past expiration. * EXPIRED: Only requests that have been approved, and the approval has expired. * HISTORY: Active, dismissed and expired requests.", + "description": "A filter on the type of approval requests to retrieve. Must be one of the following values: * [not set]: Requests that are pending or have active approvals. * ALL: All requests. * PENDING: Only pending requests. * ACTIVE: Only active (i.e. currently approved) requests. * DISMISSED: Only requests that have been dismissed, or requests that are not approved and past expiration. * EXPIRED: Only requests that have been approved, and the approval has expired. * HISTORY: Active, dismissed and expired requests.", "location": "query", "type": "string" }, @@ -502,7 +502,7 @@ ], "parameters": { "filter": { - "description": "A filter on the type of approval requests to retrieve. Must be one of the following values: * [not set]: Requests that are pending or have active approvals. * ALL: All requests. * PENDING: Only pending requests. * ACTIVE: Only active (i.e. currently approved) requests. * DISMISSED: Only requests that have been dismissed, or requests that . are not approved and past expiration. * EXPIRED: Only requests that have been approved, and the approval has expired. * HISTORY: Active, dismissed and expired requests.", + "description": "A filter on the type of approval requests to retrieve. Must be one of the following values: * [not set]: Requests that are pending or have active approvals. * ALL: All requests. * PENDING: Only pending requests. * ACTIVE: Only active (i.e. currently approved) requests. * DISMISSED: Only requests that have been dismissed, or requests that are not approved and past expiration. * EXPIRED: Only requests that have been approved, and the approval has expired. * HISTORY: Active, dismissed and expired requests.", "location": "query", "type": "string" }, @@ -718,7 +718,7 @@ ], "parameters": { "filter": { - "description": "A filter on the type of approval requests to retrieve. Must be one of the following values: * [not set]: Requests that are pending or have active approvals. * ALL: All requests. * PENDING: Only pending requests. * ACTIVE: Only active (i.e. currently approved) requests. * DISMISSED: Only requests that have been dismissed, or requests that . are not approved and past expiration. * EXPIRED: Only requests that have been approved, and the approval has expired. * HISTORY: Active, dismissed and expired requests.", + "description": "A filter on the type of approval requests to retrieve. Must be one of the following values: * [not set]: Requests that are pending or have active approvals. * ALL: All requests. * PENDING: Only pending requests. * ACTIVE: Only active (i.e. currently approved) requests. * DISMISSED: Only requests that have been dismissed, or requests that are not approved and past expiration. * EXPIRED: Only requests that have been approved, and the approval has expired. * HISTORY: Active, dismissed and expired requests.", "location": "query", "type": "string" }, @@ -754,7 +754,7 @@ } } }, - "revision": "20201030", + "revision": "20210318", "rootUrl": "https://accessapproval.googleapis.com/", "schemas": { "AccessApprovalSettings": { @@ -935,7 +935,7 @@ "id": "EnrolledService", "properties": { "cloudProduct": { - "description": "The product for which Access Approval will be enrolled. Allowed values are listed below (case-sensitive): * all * App Engine * BigQuery * Cloud Bigtable * Cloud Key Management Service * Compute Engine * Cloud Dataflow * Cloud Identity and Access Management * Cloud Pub/Sub * Cloud Storage * Persistent Disk Note: These values are supported as input for legacy purposes, but will not be returned from the API. * all * appengine.googleapis.com * bigquery.googleapis.com * bigtable.googleapis.com * cloudkms.googleapis.com * compute.googleapis.com * dataflow.googleapis.com * iam.googleapis.com * pubsub.googleapis.com * storage.googleapis.com Calls to UpdateAccessApprovalSettings using 'all' or any of the XXX.googleapis.com will be translated to the associated product name ('all', 'App Engine', etc.). Note: 'all' will enroll the resource in all products supported at both 'GA' and 'Preview' levels. More information about levels of support is available at https://cloud.google.com/access-approval/docs/supported-services", + "description": "The product for which Access Approval will be enrolled. Allowed values are listed below (case-sensitive): * all * App Engine * BigQuery * Cloud Bigtable * Cloud Key Management Service * Compute Engine * Cloud Dataflow * Cloud Identity and Access Management * Cloud Logging * Cloud Pub/Sub * Cloud Spanner * Cloud Storage * Persistent Disk Note: These values are supported as input for legacy purposes, but will not be returned from the API. * all * appengine.googleapis.com * bigquery.googleapis.com * bigtable.googleapis.com * cloudkms.googleapis.com * compute.googleapis.com * dataflow.googleapis.com * iam.googleapis.com * logging.googleapis.com * pubsub.googleapis.com * spanner.googleapis.com * storage.googleapis.com Calls to UpdateAccessApprovalSettings using 'all' or any of the XXX.googleapis.com will be translated to the associated product name ('all', 'App Engine', etc.). Note: 'all' will enroll the resource in all products supported at both 'GA' and 'Preview' levels. More information about levels of support is available at https://cloud.google.com/access-approval/docs/supported-services", "type": "string" }, "enrollmentLevel": { diff --git a/discovery/admin-directory_v1.json b/discovery/admin-directory_v1.json index 247ee729dc3..abcf0813086 100644 --- a/discovery/admin-directory_v1.json +++ b/discovery/admin-directory_v1.json @@ -2,6 +2,12 @@ "auth": { "oauth2": { "scopes": { + "https://www.googleapis.com/auth/admin.chrome.printers": { + "description": "See, add, edit, and permanently delete the printers that your organization can use with Chrome" + }, + "https://www.googleapis.com/auth/admin.chrome.printers.readonly": { + "description": "See the printers that your organization can use with Chrome" + }, "https://www.googleapis.com/auth/admin.directory.customer": { "description": "View and manage customer related information" }, @@ -81,7 +87,7 @@ "description": "View user schemas on your domain" }, "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" } } } @@ -354,12 +360,10 @@ "projection": { "description": "Determines whether the response contains the full list of properties or only a subset.", "enum": [ - "PROJECTION_UNDEFINED", "BASIC", "FULL" ], "enumDescriptions": [ - "", "Includes only the basic metadata fields (e.g., deviceId, serialNumber, status, and user)", "Includes all metadata fields" ], @@ -402,7 +406,6 @@ "orderBy": { "description": "Device property to use for sorting results.", "enum": [ - "orderByUndefined", "annotatedLocation", "annotatedUser", "lastSync", @@ -412,7 +415,6 @@ "supportEndDate" ], "enumDescriptions": [ - "", "Chrome device location as annotated by the administrator.", "Chromebook user as annotated by administrator.", "The date and time the Chrome device was last synchronized with the policy settings in the Admin console.", @@ -437,12 +439,10 @@ "projection": { "description": "Restrict information returned to a set of selected fields.", "enum": [ - "PROJECTION_UNDEFINED", "BASIC", "FULL" ], "enumDescriptions": [ - "", "Includes only the basic metadata fields (e.g., deviceId, serialNumber, status, and user)", "Includes all metadata fields" ], @@ -457,12 +457,10 @@ "sortOrder": { "description": "Whether to return results in ascending or descending order. Must be used with the `orderBy` parameter.", "enum": [ - "SORT_ORDER_UNDEFINED", "ASCENDING", "DESCENDING" ], "enumDescriptions": [ - "", "Ascending order.", "Descending order." ], @@ -535,12 +533,10 @@ "projection": { "description": "Restrict information returned to a set of selected fields.", "enum": [ - "PROJECTION_UNDEFINED", "BASIC", "FULL" ], "enumDescriptions": [ - "", "Includes only the basic metadata fields (e.g., deviceId, serialNumber, status, and user)", "Includes all metadata fields" ], @@ -584,12 +580,10 @@ "projection": { "description": "Restrict information returned to a set of selected fields.", "enum": [ - "PROJECTION_UNDEFINED", "BASIC", "FULL" ], "enumDescriptions": [ - "", "Includes only the basic metadata fields (e.g., deviceId, serialNumber, status, and user)", "Includes all metadata fields" ], @@ -783,6 +777,280 @@ "https://www.googleapis.com/auth/admin.directory.customer" ] } + }, + "resources": { + "chrome": { + "resources": { + "printers": { + "methods": { + "batchCreatePrinters": { + "description": "Creates printers under given Organization Unit.", + "flatPath": "admin/directory/v1/customers/{customersId}/chrome/printers:batchCreatePrinters", + "httpMethod": "POST", + "id": "admin.customers.chrome.printers.batchCreatePrinters", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The name of the customer. Format: customers/{customer_id}", + "location": "path", + "pattern": "^customers/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "admin/directory/v1/{+parent}/chrome/printers:batchCreatePrinters", + "request": { + "$ref": "BatchCreatePrintersRequest" + }, + "response": { + "$ref": "BatchCreatePrintersResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.chrome.printers" + ] + }, + "batchDeletePrinters": { + "description": "Deletes printers in batch.", + "flatPath": "admin/directory/v1/customers/{customersId}/chrome/printers:batchDeletePrinters", + "httpMethod": "POST", + "id": "admin.customers.chrome.printers.batchDeletePrinters", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The name of the customer. Format: customers/{customer_id}", + "location": "path", + "pattern": "^customers/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "admin/directory/v1/{+parent}/chrome/printers:batchDeletePrinters", + "request": { + "$ref": "BatchDeletePrintersRequest" + }, + "response": { + "$ref": "BatchDeletePrintersResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.chrome.printers" + ] + }, + "create": { + "description": "Creates a printer under given Organization Unit.", + "flatPath": "admin/directory/v1/customers/{customersId}/chrome/printers", + "httpMethod": "POST", + "id": "admin.customers.chrome.printers.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The name of the customer. Format: customers/{customer_id}", + "location": "path", + "pattern": "^customers/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "admin/directory/v1/{+parent}/chrome/printers", + "request": { + "$ref": "Printer" + }, + "response": { + "$ref": "Printer" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.chrome.printers" + ] + }, + "delete": { + "description": "Deletes a `Printer`.", + "flatPath": "admin/directory/v1/customers/{customersId}/chrome/printers/{printersId}", + "httpMethod": "DELETE", + "id": "admin.customers.chrome.printers.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the printer to be updated. Format: customers/{customer_id}/chrome/printers/{printer_id}", + "location": "path", + "pattern": "^customers/[^/]+/chrome/printers/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "admin/directory/v1/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.chrome.printers" + ] + }, + "get": { + "description": "Returns a `Printer` resource (printer's config).", + "flatPath": "admin/directory/v1/customers/{customersId}/chrome/printers/{printersId}", + "httpMethod": "GET", + "id": "admin.customers.chrome.printers.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the printer to retrieve. Format: customers/{customer_id}/chrome/printers/{printer_id}", + "location": "path", + "pattern": "^customers/[^/]+/chrome/printers/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "admin/directory/v1/{+name}", + "response": { + "$ref": "Printer" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.chrome.printers", + "https://www.googleapis.com/auth/admin.chrome.printers.readonly" + ] + }, + "list": { + "description": "List printers configs.", + "flatPath": "admin/directory/v1/customers/{customersId}/chrome/printers", + "httpMethod": "GET", + "id": "admin.customers.chrome.printers.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Search query. Search syntax is shared between this api and Admin Console printers pages.", + "location": "query", + "type": "string" + }, + "orgUnitId": { + "description": "Organization Unit that we want to list the printers for. When org_unit is not present in the request then all printers of the customer are returned (or filtered). When org_unit is present in the request then only printers available to this OU will be returned (owned or inherited). You may see if printer is owned or inherited for this OU by looking at Printer.org_unit_id.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "The maximum number of objects to return. The service may return fewer than this value.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous call.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The name of the customer who owns this collection of printers. Format: customers/{customer_id}", + "location": "path", + "pattern": "^customers/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "admin/directory/v1/{+parent}/chrome/printers", + "response": { + "$ref": "ListPrintersResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.chrome.printers", + "https://www.googleapis.com/auth/admin.chrome.printers.readonly" + ] + }, + "listPrinterModels": { + "description": "Lists the supported printer models.", + "flatPath": "admin/directory/v1/customers/{customersId}/chrome/printers:listPrinterModels", + "httpMethod": "GET", + "id": "admin.customers.chrome.printers.listPrinterModels", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Filer to list only models by a given manufacturer in format: \"manufacturer:Brother\". Search syntax is shared between this api and Admin Console printers pages.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "The maximum number of objects to return. The service may return fewer than this value.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous call.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The name of the customer who owns this collection of printers. Format: customers/{customer_id}", + "location": "path", + "pattern": "^customers/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "admin/directory/v1/{+parent}/chrome/printers:listPrinterModels", + "response": { + "$ref": "ListPrinterModelsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.chrome.printers", + "https://www.googleapis.com/auth/admin.chrome.printers.readonly" + ] + }, + "patch": { + "description": "Updates a `Printer` resource.", + "flatPath": "admin/directory/v1/customers/{customersId}/chrome/printers/{printersId}", + "httpMethod": "PATCH", + "id": "admin.customers.chrome.printers.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "clearMask": { + "description": "The list of fields to be cleared. Note, some of the fields are read only and cannot be updated. Values for not specified fields will be patched.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + }, + "name": { + "description": "The resource name of the Printer object, in the format customers/{customer-id}/printers/{printer-id} (During printer creation leave empty)", + "location": "path", + "pattern": "^customers/[^/]+/chrome/printers/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "The list of fields to be updated. Note, some of the fields are read only and cannot be updated. Values for not specified fields will be patched.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "admin/directory/v1/{+name}", + "request": { + "$ref": "Printer" + }, + "response": { + "$ref": "Printer" + }, + "scopes": [ + "https://www.googleapis.com/auth/admin.chrome.printers" + ] + } + } + } + } + } } }, "domainAliases": { @@ -1116,11 +1384,9 @@ "orderBy": { "description": "Column to use for sorting results", "enum": [ - "orderByUndefined", "email" ], "enumDescriptions": [ - "", "Email of the group." ], "location": "query", @@ -1139,12 +1405,10 @@ "sortOrder": { "description": "Whether to return results in ascending or descending order. Only of use when orderBy is also used", "enum": [ - "SORT_ORDER_UNDEFINED", "ASCENDING", "DESCENDING" ], "enumDescriptions": [ - "", "Ascending order.", "Descending order." ], @@ -1638,12 +1902,10 @@ "projection": { "description": "Restrict information returned to a set of selected fields.", "enum": [ - "PROJECTION_UNDEFINED", "BASIC", "FULL" ], "enumDescriptions": [ - "", "Includes only the basic metadata fields (e.g., deviceId, model, status, type, and status)", "Includes all metadata fields" ], @@ -1694,7 +1956,6 @@ "orderBy": { "description": "Device property to use for sorting results.", "enum": [ - "orderByUndefined", "deviceId", "email", "lastSync", @@ -1705,7 +1966,6 @@ "type" ], "enumDescriptions": [ - "", "The serial number for a Google Sync mobile device. For Android devices, this is a software generated unique identifier.", "The device owner's email address.", "Last policy settings sync date time of the device.", @@ -1726,12 +1986,10 @@ "projection": { "description": "Restrict information returned to a set of selected fields.", "enum": [ - "PROJECTION_UNDEFINED", "BASIC", "FULL" ], "enumDescriptions": [ - "", "Includes only the basic metadata fields (e.g., deviceId, model, status, type, and status)", "Includes all metadata fields" ], @@ -1746,12 +2004,10 @@ "sortOrder": { "description": "Whether to return results in ascending or descending order. Must be used with the `orderBy` parameter.", "enum": [ - "SORT_ORDER_UNDEFINED", "ASCENDING", "DESCENDING" ], "enumDescriptions": [ - "", "Ascending order.", "Descending order." ], @@ -1896,12 +2152,10 @@ "type": { "description": "Whether to return all sub-organizations or just immediate children.", "enum": [ - "typeUndefined", "all", "children" ], "enumDescriptions": [ - "", "All sub-organizational units.", "Immediate children only (default)." ], @@ -2106,13 +2360,11 @@ "default": "SOURCE_UNSPECIFIED", "description": "Source from which Building.coordinates are derived.", "enum": [ - "COORDINATES_SOURCE_UNDEFINED", "CLIENT_SPECIFIED", "RESOLVED_FROM_ADDRESS", "SOURCE_UNSPECIFIED" ], "enumDescriptions": [ - "", "Building.coordinates are set to the coordinates included in the request.", "Building.coordinates are automatically populated based on the postal address.", "Defaults to `RESOLVED_FROM_ADDRESS` if postal address is provided. Otherwise, defaults to `CLIENT_SPECIFIED` if coordinates are provided." @@ -2196,13 +2448,11 @@ "default": "SOURCE_UNSPECIFIED", "description": "Source from which Building.coordinates are derived.", "enum": [ - "COORDINATES_SOURCE_UNDEFINED", "CLIENT_SPECIFIED", "RESOLVED_FROM_ADDRESS", "SOURCE_UNSPECIFIED" ], "enumDescriptions": [ - "", "Building.coordinates are set to the coordinates included in the request.", "Building.coordinates are automatically populated based on the postal address.", "Defaults to `RESOLVED_FROM_ADDRESS` if postal address is provided. Otherwise, defaults to `CLIENT_SPECIFIED` if coordinates are provided." @@ -2248,13 +2498,11 @@ "default": "SOURCE_UNSPECIFIED", "description": "Source from which Building.coordinates are derived.", "enum": [ - "COORDINATES_SOURCE_UNDEFINED", "CLIENT_SPECIFIED", "RESOLVED_FROM_ADDRESS", "SOURCE_UNSPECIFIED" ], "enumDescriptions": [ - "", "Building.coordinates are set to the coordinates included in the request.", "Building.coordinates are automatically populated based on the postal address.", "Defaults to `RESOLVED_FROM_ADDRESS` if postal address is provided. Otherwise, defaults to `CLIENT_SPECIFIED` if coordinates are provided." @@ -3392,13 +3640,11 @@ "default": "basic", "description": "What subset of fields to fetch for this user.", "enum": [ - "projectionUndefined", "basic", "custom", "full" ], "enumDescriptions": [ - "", "Do not include any custom fields for the user.", "Include custom fields from schemas requested in `customFieldMask`.", "Include all fields associated with this user." @@ -3416,12 +3662,10 @@ "default": "admin_view", "description": "Whether to fetch the administrator-only or domain-wide public view of the user. For more information, see [Retrieve a user as a non-administrator](/admin-sdk/directory/v1/guides/manage-users#retrieve_users_non_admin).", "enum": [ - "view_type_undefined", "admin_view", "domain_public" ], "enumDescriptions": [ - "", "Results include both administrator-only and domain-public fields for the user.", "Results only include fields for the user that are publicly visible to other users in the domain." ], @@ -3481,7 +3725,6 @@ "event": { "description": "Event on which subscription is intended (if subscribing)", "enum": [ - "eventUndefined", "add", "delete", "makeAdmin", @@ -3489,7 +3732,6 @@ "update" ], "enumDescriptions": [ - "", "User Created Event", "User Deleted Event", "User Admin Status Change Event", @@ -3511,13 +3753,11 @@ "orderBy": { "description": "Property to use for sorting results.", "enum": [ - "orderByUndefined", "email", "familyName", "givenName" ], "enumDescriptions": [ - "", "Primary email of the user.", "User's family name.", "User's given name." @@ -3534,13 +3774,11 @@ "default": "basic", "description": "What subset of fields to fetch for this user.", "enum": [ - "projectionUndefined", "basic", "custom", "full" ], "enumDescriptions": [ - "", "Do not include any custom fields for the user.", "Include custom fields from schemas requested in `customFieldMask`.", "Include all fields associated with this user." @@ -3561,12 +3799,10 @@ "sortOrder": { "description": "Whether to return results in ascending or descending order.", "enum": [ - "SORT_ORDER_UNDEFINED", "ASCENDING", "DESCENDING" ], "enumDescriptions": [ - "", "Ascending order.", "Descending order." ], @@ -3577,12 +3813,10 @@ "default": "admin_view", "description": "Whether to fetch the administrator-only or domain-wide public view of the user. For more information, see [Retrieve a user as a non-administrator](/admin-sdk/directory/v1/guides/manage-users#retrieve_users_non_admin).", "enum": [ - "view_type_undefined", "admin_view", "domain_public" ], "enumDescriptions": [ - "", "Results include both administrator-only and domain-public fields for the user.", "Results only include fields for the user that are publicly visible to other users in the domain." ], @@ -3748,7 +3982,6 @@ "event": { "description": "Events to watch for.", "enum": [ - "eventTypeUnspecified", "add", "delete", "makeAdmin", @@ -3756,7 +3989,6 @@ "update" ], "enumDescriptions": [ - "", "User Created Event", "User Deleted Event", "User Admin Status Change Event", @@ -3778,13 +4010,11 @@ "orderBy": { "description": "Column to use for sorting results", "enum": [ - "orderByUnspecified", "email", "familyName", "givenName" ], "enumDescriptions": [ - "", "Primary email of the user.", "User's family name.", "User's given name." @@ -3801,13 +4031,11 @@ "default": "basic", "description": "What subset of fields to fetch for this user.", "enum": [ - "projectionUnspecified", "basic", "custom", "full" ], "enumDescriptions": [ - "", "Do not include any custom fields for the user.", "Include custom fields from schemas mentioned in customFieldMask.", "Include all fields associated with this user." @@ -3828,12 +4056,10 @@ "sortOrder": { "description": "Whether to return results in ascending or descending order.", "enum": [ - "sortOrderUnspecified", "ASCENDING", "DESCENDING" ], "enumDescriptions": [ - "", "Ascending order.", "Descending order." ], @@ -3968,12 +4194,10 @@ "event": { "description": "Events to watch for.", "enum": [ - "eventUndefined", "add", "delete" ], "enumDescriptions": [ - "", "Alias Created Event", "Alias Deleted Event" ], @@ -4180,7 +4404,7 @@ } } }, - "revision": "20210302", + "revision": "20210323", "rootUrl": "https://admin.googleapis.com/", "schemas": { "Alias": { @@ -4287,6 +4511,108 @@ }, "type": "object" }, + "AuxiliaryMessage": { + "description": "Auxiliary message about issues with printers or settings. Example: {message_type:AUXILIARY_MESSAGE_WARNING, field_mask:make_and_model, message:\"Given printer is invalid or no longer supported.\"}", + "id": "AuxiliaryMessage", + "properties": { + "auxiliaryMessage": { + "description": "Human readable message in English. Example: \"Given printer is invalid or no longer supported.\"", + "type": "string" + }, + "fieldMask": { + "description": "Field that this message concerns.", + "format": "google-fieldmask", + "type": "string" + }, + "severity": { + "description": "Message severity", + "enum": [ + "SEVERITY_UNSPECIFIED", + "SEVERITY_INFO", + "SEVERITY_WARNING", + "SEVERITY_ERROR" + ], + "enumDescriptions": [ + "Message type unspecified.", + "Message of severity: info.", + "Message of severity: warning.", + "Message of severity: error." + ], + "type": "string" + } + }, + "type": "object" + }, + "BatchCreatePrintersRequest": { + "description": "Request for adding new printers in batch.", + "id": "BatchCreatePrintersRequest", + "properties": { + "requests": { + "description": "A list of Printers to be created. Max 50 at a time.", + "items": { + "$ref": "CreatePrinterRequest" + }, + "type": "array" + } + }, + "type": "object" + }, + "BatchCreatePrintersResponse": { + "description": "Response for adding new printers in batch.", + "id": "BatchCreatePrintersResponse", + "properties": { + "failures": { + "description": "A list of create failures. Printer IDs are not populated, as printer were not created.", + "items": { + "$ref": "FailureInfo" + }, + "type": "array" + }, + "printers": { + "description": "A list of successfully created printers with their IDs populated.", + "items": { + "$ref": "Printer" + }, + "type": "array" + } + }, + "type": "object" + }, + "BatchDeletePrintersRequest": { + "description": "Request for deleting existing printers in batch.", + "id": "BatchDeletePrintersRequest", + "properties": { + "printerIds": { + "description": "A list of Printer.id that should be deleted. Max 100 at a time.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "BatchDeletePrintersResponse": { + "description": "Response for deleting existing printers in batch.", + "id": "BatchDeletePrintersResponse", + "properties": { + "failedPrinters": { + "description": "A list of update failures.", + "items": { + "$ref": "FailureInfo" + }, + "type": "array" + }, + "printerIds": { + "description": "A list of Printer.id that were successfully deleted.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "Building": { "description": "Public API: Resources.buildings", "id": "Building", @@ -4811,6 +5137,32 @@ }, "type": "array" }, + "screenshotFiles": { + "description": "List of screenshot files to download. Type is always \"SCREENSHOT_FILE\". (Read-only)", + "items": { + "properties": { + "createTime": { + "description": "Date and time the file was created", + "format": "date-time", + "type": "string" + }, + "downloadUrl": { + "description": "File download URL", + "type": "string" + }, + "name": { + "description": "File name", + "type": "string" + }, + "type": { + "description": "File type", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, "serialNumber": { "description": "The Chrome device serial number entered when the device was enabled. This value is the same as the Admin console's *Serial Number* in the *Chrome OS Devices* tab.", "type": "string" @@ -4950,6 +5302,21 @@ }, "type": "object" }, + "CreatePrinterRequest": { + "description": "Request for adding a new printer.", + "id": "CreatePrinterRequest", + "properties": { + "parent": { + "description": "Required. The name of the customer. Format: customers/{customer_id}", + "type": "string" + }, + "printer": { + "$ref": "Printer", + "description": "Required. A printer to create. If you want to place the printer under particular OU then populate printer.org_unit_id filed. Otherwise the printer will be placed under root OU." + } + }, + "type": "object" + }, "Customer": { "id": "Customer", "properties": { @@ -5308,6 +5675,73 @@ }, "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "id": "Empty", + "properties": {}, + "type": "object" + }, + "FailureInfo": { + "description": "Info about failures", + "id": "FailureInfo", + "properties": { + "errorCode": { + "description": "Canonical code for why the update failed to apply.", + "enum": [ + "OK", + "CANCELLED", + "UNKNOWN", + "INVALID_ARGUMENT", + "DEADLINE_EXCEEDED", + "NOT_FOUND", + "ALREADY_EXISTS", + "PERMISSION_DENIED", + "UNAUTHENTICATED", + "RESOURCE_EXHAUSTED", + "FAILED_PRECONDITION", + "ABORTED", + "OUT_OF_RANGE", + "UNIMPLEMENTED", + "INTERNAL", + "UNAVAILABLE", + "DATA_LOSS" + ], + "enumDescriptions": [ + "Not an error; returned on success HTTP Mapping: 200 OK", + "The operation was cancelled, typically by the caller. HTTP Mapping: 499 Client Closed Request", + "Unknown error. For example, this error may be returned when a `Status` value received from another address space belongs to an error space that is not known in this address space. Also errors raised by APIs that do not return enough error information may be converted to this error. HTTP Mapping: 500 Internal Server Error", + "The client specified an invalid argument. Note that this differs from `FAILED_PRECONDITION`. `INVALID_ARGUMENT` indicates arguments that are problematic regardless of the state of the system (e.g., a malformed file name). HTTP Mapping: 400 Bad Request", + "The deadline expired before the operation could complete. For operations that change the state of the system, this error may be returned even if the operation has completed successfully. For example, a successful response from a server could have been delayed long enough for the deadline to expire. HTTP Mapping: 504 Gateway Timeout", + "Some requested entity (e.g., file or directory) was not found. Note to server developers: if a request is denied for an entire class of users, such as gradual feature rollout or undocumented allowlist, `NOT_FOUND` may be used. If a request is denied for some users within a class of users, such as user-based access control, `PERMISSION_DENIED` must be used. HTTP Mapping: 404 Not Found", + "The entity that a client attempted to create (e.g., file or directory) already exists. HTTP Mapping: 409 Conflict", + "The caller does not have permission to execute the specified operation. `PERMISSION_DENIED` must not be used for rejections caused by exhausting some resource (use `RESOURCE_EXHAUSTED` instead for those errors). `PERMISSION_DENIED` must not be used if the caller can not be identified (use `UNAUTHENTICATED` instead for those errors). This error code does not imply the request is valid or the requested entity exists or satisfies other pre-conditions. HTTP Mapping: 403 Forbidden", + "The request does not have valid authentication credentials for the operation. HTTP Mapping: 401 Unauthorized", + "Some resource has been exhausted, perhaps a per-user quota, or perhaps the entire file system is out of space. HTTP Mapping: 429 Too Many Requests", + "The operation was rejected because the system is not in a state required for the operation's execution. For example, the directory to be deleted is non-empty, an rmdir operation is applied to a non-directory, etc. Service implementors can use the following guidelines to decide between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`: (a) Use `UNAVAILABLE` if the client can retry just the failing call. (b) Use `ABORTED` if the client should retry at a higher level (e.g., when a client-specified test-and-set fails, indicating the client should restart a read-modify-write sequence). (c) Use `FAILED_PRECONDITION` if the client should not retry until the system state has been explicitly fixed. E.g., if an \"rmdir\" fails because the directory is non-empty, `FAILED_PRECONDITION` should be returned since the client should not retry unless the files are deleted from the directory. HTTP Mapping: 400 Bad Request", + "The operation was aborted, typically due to a concurrency issue such as a sequencer check failure or transaction abort. See the guidelines above for deciding between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`. HTTP Mapping: 409 Conflict", + "The operation was attempted past the valid range. E.g., seeking or reading past end-of-file. Unlike `INVALID_ARGUMENT`, this error indicates a problem that may be fixed if the system state changes. For example, a 32-bit file system will generate `INVALID_ARGUMENT` if asked to read at an offset that is not in the range [0,2^32-1], but it will generate `OUT_OF_RANGE` if asked to read from an offset past the current file size. There is a fair bit of overlap between `FAILED_PRECONDITION` and `OUT_OF_RANGE`. We recommend using `OUT_OF_RANGE` (the more specific error) when it applies so that callers who are iterating through a space can easily look for an `OUT_OF_RANGE` error to detect when they are done. HTTP Mapping: 400 Bad Request", + "The operation is not implemented or is not supported/enabled in this service. HTTP Mapping: 501 Not Implemented", + "Internal errors. This means that some invariants expected by the underlying system have been broken. This error code is reserved for serious errors. HTTP Mapping: 500 Internal Server Error", + "The service is currently unavailable. This is most likely a transient condition, which can be corrected by retrying with a backoff. Note that it is not always safe to retry non-idempotent operations. See the guidelines above for deciding between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`. HTTP Mapping: 503 Service Unavailable", + "Unrecoverable data loss or corruption. HTTP Mapping: 500 Internal Server Error" + ], + "type": "string" + }, + "errorMessage": { + "description": "Failure reason message.", + "type": "string" + }, + "printer": { + "$ref": "Printer", + "description": "Failed printer." + }, + "printerId": { + "description": "Id of a failed printer.", + "type": "string" + } + }, + "type": "object" + }, "Feature": { "description": "JSON template for Feature object in Directory API.", "id": "Feature", @@ -5472,6 +5906,42 @@ }, "type": "object" }, + "ListPrinterModelsResponse": { + "description": "Response for listing allowed printer models.", + "id": "ListPrinterModelsResponse", + "properties": { + "nextPageToken": { + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + }, + "printerModels": { + "description": "Printer models that are currently allowed to be configured for ChromeOs. Some printers may be added or removed over time.", + "items": { + "$ref": "PrinterModel" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListPrintersResponse": { + "description": "Response for listing printers.", + "id": "ListPrintersResponse", + "properties": { + "nextPageToken": { + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + }, + "printers": { + "description": "List of printers. If `org_unit_id` was given in the request, then only printers visible for this OU will be returned. If `org_unit_id` was given in the request, then all printers will be returned.", + "items": { + "$ref": "Printer" + }, + "type": "array" + } + }, + "type": "object" + }, "Member": { "description": "A Google Groups member can be a user or another group. This member can be inside or outside of your account's domains. For more information about common group member tasks, see the [Developer's Guide](/admin-sdk/directory/v1/guides/manage-group-members).", "id": "Member", @@ -5871,6 +6341,78 @@ }, "type": "object" }, + "Printer": { + "description": "Printer configuration.", + "id": "Printer", + "properties": { + "auxiliaryMessages": { + "description": "Output only. Auxiliary messages about issues with the printer configuration if any.", + "items": { + "$ref": "AuxiliaryMessage" + }, + "readOnly": true, + "type": "array" + }, + "createTime": { + "description": "Output only. Time when printer was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Editable. Description of printer.", + "type": "string" + }, + "displayName": { + "description": "Editable. Name of printer.", + "type": "string" + }, + "id": { + "description": "Id of the printer. (During printer creation leave empty)", + "type": "string" + }, + "makeAndModel": { + "description": "Editable. Make and model of printer. e.g. Lexmark MS610de Value must be in format as seen in ListPrinterModels response.", + "type": "string" + }, + "name": { + "description": "The resource name of the Printer object, in the format customers/{customer-id}/printers/{printer-id} (During printer creation leave empty)", + "type": "string" + }, + "orgUnitId": { + "description": "Organization Unit that owns this printer (Only can be set during Printer creation)", + "type": "string" + }, + "uri": { + "description": "Editable. Printer URI.", + "type": "string" + }, + "useDriverlessConfig": { + "description": "Editable. flag to use driverless configuration or not. If it's set to be true, make_and_model can be ignored", + "type": "boolean" + } + }, + "type": "object" + }, + "PrinterModel": { + "description": "Printer manufacturer and model", + "id": "PrinterModel", + "properties": { + "displayName": { + "description": "Display name. eq. \"Brother MFC-8840D\"", + "type": "string" + }, + "makeAndModel": { + "description": "Make and model as represented in \"make_and_model\" field in Printer object. eq. \"brother mfc-8840d\"", + "type": "string" + }, + "manufacturer": { + "description": "Manufacturer. eq. \"Brother\"", + "type": "string" + } + }, + "type": "object" + }, "Privilege": { "id": "Privilege", "properties": { diff --git a/discovery/analyticsadmin-v1alpha.json b/discovery/analyticsadmin-v1alpha.json index 119b6fee3ab..66632d11785 100644 --- a/discovery/analyticsadmin-v1alpha.json +++ b/discovery/analyticsadmin-v1alpha.json @@ -1890,7 +1890,7 @@ } } }, - "revision": "20210307", + "revision": "20210322", "rootUrl": "https://analyticsadmin.googleapis.com/", "schemas": { "GoogleAnalyticsAdminV1alphaAccount": { @@ -2773,7 +2773,7 @@ "type": "string" }, "timeZone": { - "description": "Reporting Time Zone, used as the day boundary for reports, regardless of where the data originates. If the time zone honors DST, Analytics will automatically adjust for the changes. NOTE: Changing the time zone only affects data going forward, and is not applied retroactively. Format: https://www.iana.org/time-zones Example: \"America/Los_Angeles\"", + "description": "Required. Reporting Time Zone, used as the day boundary for reports, regardless of where the data originates. If the time zone honors DST, Analytics will automatically adjust for the changes. NOTE: Changing the time zone only affects data going forward, and is not applied retroactively. Format: https://www.iana.org/time-zones Example: \"America/Los_Angeles\"", "type": "string" }, "updateTime": { diff --git a/discovery/analyticsdata-v1beta.json b/discovery/analyticsdata-v1beta.json new file mode 100644 index 00000000000..dfba33fc0e5 --- /dev/null +++ b/discovery/analyticsdata-v1beta.json @@ -0,0 +1,1588 @@ +{ + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/analytics": { + "description": "View and manage your Google Analytics data" + }, + "https://www.googleapis.com/auth/analytics.readonly": { + "description": "See and download your Google Analytics data" + } + } + } + }, + "basePath": "", + "baseUrl": "https://analyticsdata.googleapis.com/", + "batchPath": "batch", + "canonicalName": "AnalyticsData", + "description": "Accesses report data in Google Analytics.", + "discoveryVersion": "v1", + "documentationLink": "https://developers.google.com/analytics/devguides/reporting/data/v1/", + "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": "analyticsdata:v1beta", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://analyticsdata.mtls.googleapis.com/", + "name": "analyticsdata", + "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": { + "properties": { + "methods": { + "batchRunPivotReports": { + "description": "Returns multiple pivot reports in a batch. All reports must be for the same GA4 Property.", + "flatPath": "v1beta/properties/{propertiesId}:batchRunPivotReports", + "httpMethod": "POST", + "id": "analyticsdata.properties.batchRunPivotReports", + "parameterOrder": [ + "property" + ], + "parameters": { + "property": { + "description": "A Google Analytics GA4 property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). This property must be specified for the batch. The property within RunPivotReportRequest may either be unspecified or consistent with this property. Example: properties/1234", + "location": "path", + "pattern": "^properties/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+property}:batchRunPivotReports", + "request": { + "$ref": "BatchRunPivotReportsRequest" + }, + "response": { + "$ref": "BatchRunPivotReportsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/analytics", + "https://www.googleapis.com/auth/analytics.readonly" + ] + }, + "batchRunReports": { + "description": "Returns multiple reports in a batch. All reports must be for the same GA4 Property.", + "flatPath": "v1beta/properties/{propertiesId}:batchRunReports", + "httpMethod": "POST", + "id": "analyticsdata.properties.batchRunReports", + "parameterOrder": [ + "property" + ], + "parameters": { + "property": { + "description": "A Google Analytics GA4 property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). This property must be specified for the batch. The property within RunReportRequest may either be unspecified or consistent with this property. Example: properties/1234", + "location": "path", + "pattern": "^properties/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+property}:batchRunReports", + "request": { + "$ref": "BatchRunReportsRequest" + }, + "response": { + "$ref": "BatchRunReportsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/analytics", + "https://www.googleapis.com/auth/analytics.readonly" + ] + }, + "getMetadata": { + "description": "Returns metadata for dimensions and metrics available in reporting methods. Used to explore the dimensions and metrics. In this method, a Google Analytics GA4 Property Identifier is specified in the request, and the metadata response includes Custom dimensions and metrics as well as Universal metadata. For example if a custom metric with parameter name `levels_unlocked` is registered to a property, the Metadata response will contain `customEvent:levels_unlocked`. Universal metadata are dimensions and metrics applicable to any property such as `country` and `totalUsers`.", + "flatPath": "v1beta/properties/{propertiesId}/metadata", + "httpMethod": "GET", + "id": "analyticsdata.properties.getMetadata", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the metadata to retrieve. This name field is specified in the URL path and not URL parameters. Property is a numeric Google Analytics GA4 Property identifier. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). Example: properties/1234/metadata Set the Property ID to 0 for dimensions and metrics common to all properties. In this special mode, this method will not return custom dimensions and metrics.", + "location": "path", + "pattern": "^properties/[^/]+/metadata$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "Metadata" + }, + "scopes": [ + "https://www.googleapis.com/auth/analytics", + "https://www.googleapis.com/auth/analytics.readonly" + ] + }, + "runPivotReport": { + "description": "Returns a customized pivot report of your Google Analytics event data. Pivot reports are more advanced and expressive formats than regular reports. In a pivot report, dimensions are only visible if they are included in a pivot. Multiple pivots can be specified to further dissect your data.", + "flatPath": "v1beta/properties/{propertiesId}:runPivotReport", + "httpMethod": "POST", + "id": "analyticsdata.properties.runPivotReport", + "parameterOrder": [ + "property" + ], + "parameters": { + "property": { + "description": "A Google Analytics GA4 property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). Within a batch request, this property should either be unspecified or consistent with the batch-level property. Example: properties/1234", + "location": "path", + "pattern": "^properties/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+property}:runPivotReport", + "request": { + "$ref": "RunPivotReportRequest" + }, + "response": { + "$ref": "RunPivotReportResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/analytics", + "https://www.googleapis.com/auth/analytics.readonly" + ] + }, + "runRealtimeReport": { + "description": "The Google Analytics Realtime API returns a customized report of realtime event data for your property. These reports show events and usage from the last 30 minutes.", + "flatPath": "v1beta/properties/{propertiesId}:runRealtimeReport", + "httpMethod": "POST", + "id": "analyticsdata.properties.runRealtimeReport", + "parameterOrder": [ + "property" + ], + "parameters": { + "property": { + "description": "A Google Analytics GA4 property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). Example: properties/1234", + "location": "path", + "pattern": "^properties/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+property}:runRealtimeReport", + "request": { + "$ref": "RunRealtimeReportRequest" + }, + "response": { + "$ref": "RunRealtimeReportResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/analytics", + "https://www.googleapis.com/auth/analytics.readonly" + ] + }, + "runReport": { + "description": "Returns a customized report of your Google Analytics event data. Reports contain statistics derived from data collected by the Google Analytics tracking code. The data returned from the API is as a table with columns for the requested dimensions and metrics. Metrics are individual measurements of user activity on your property, such as active users or event count. Dimensions break down metrics across some common criteria, such as country or event name.", + "flatPath": "v1beta/properties/{propertiesId}:runReport", + "httpMethod": "POST", + "id": "analyticsdata.properties.runReport", + "parameterOrder": [ + "property" + ], + "parameters": { + "property": { + "description": "A Google Analytics GA4 property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). Within a batch request, this property should either be unspecified or consistent with the batch-level property. Example: properties/1234", + "location": "path", + "pattern": "^properties/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+property}:runReport", + "request": { + "$ref": "RunReportRequest" + }, + "response": { + "$ref": "RunReportResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/analytics", + "https://www.googleapis.com/auth/analytics.readonly" + ] + } + } + } + }, + "revision": "20210320", + "rootUrl": "https://analyticsdata.googleapis.com/", + "schemas": { + "BatchRunPivotReportsRequest": { + "description": "The batch request containing multiple pivot report requests.", + "id": "BatchRunPivotReportsRequest", + "properties": { + "requests": { + "description": "Individual requests. Each request has a separate pivot report response. Each batch request is allowed up to 5 requests.", + "items": { + "$ref": "RunPivotReportRequest" + }, + "type": "array" + } + }, + "type": "object" + }, + "BatchRunPivotReportsResponse": { + "description": "The batch response containing multiple pivot reports.", + "id": "BatchRunPivotReportsResponse", + "properties": { + "kind": { + "description": "Identifies what kind of resource this message is. This `kind` is always the fixed string \"analyticsData#batchRunPivotReports\". Useful to distinguish between response types in JSON.", + "type": "string" + }, + "pivotReports": { + "description": "Individual responses. Each response has a separate pivot report request.", + "items": { + "$ref": "RunPivotReportResponse" + }, + "type": "array" + } + }, + "type": "object" + }, + "BatchRunReportsRequest": { + "description": "The batch request containing multiple report requests.", + "id": "BatchRunReportsRequest", + "properties": { + "requests": { + "description": "Individual requests. Each request has a separate report response. Each batch request is allowed up to 5 requests.", + "items": { + "$ref": "RunReportRequest" + }, + "type": "array" + } + }, + "type": "object" + }, + "BatchRunReportsResponse": { + "description": "The batch response containing multiple reports.", + "id": "BatchRunReportsResponse", + "properties": { + "kind": { + "description": "Identifies what kind of resource this message is. This `kind` is always the fixed string \"analyticsData#batchRunReports\". Useful to distinguish between response types in JSON.", + "type": "string" + }, + "reports": { + "description": "Individual responses. Each response has a separate report request.", + "items": { + "$ref": "RunReportResponse" + }, + "type": "array" + } + }, + "type": "object" + }, + "BetweenFilter": { + "description": "To express that the result needs to be between two numbers (inclusive).", + "id": "BetweenFilter", + "properties": { + "fromValue": { + "$ref": "NumericValue", + "description": "Begins with this number." + }, + "toValue": { + "$ref": "NumericValue", + "description": "Ends with this number." + } + }, + "type": "object" + }, + "CaseExpression": { + "description": "Used to convert a dimension value to a single case.", + "id": "CaseExpression", + "properties": { + "dimensionName": { + "description": "Name of a dimension. The name must refer back to a name in dimensions field of the request.", + "type": "string" + } + }, + "type": "object" + }, + "Cohort": { + "description": "Defines a cohort selection criteria. A cohort is a group of users who share a common characteristic. For example, users with the same `firstSessionDate` belong to the same cohort.", + "id": "Cohort", + "properties": { + "dateRange": { + "$ref": "DateRange", + "description": "The cohort selects users whose first touch date is between start date and end date defined in the `dateRange`. This `dateRange` does not specify the full date range of event data that is present in a cohort report. In a cohort report, this `dateRange` is extended by the granularity and offset present in the `cohortsRange`; event data for the extended reporting date range is present in a cohort report. In a cohort request, this `dateRange` is required and the `dateRanges` in the `RunReportRequest` or `RunPivotReportRequest` must be unspecified. This `dateRange` should generally be aligned with the cohort's granularity. If `CohortsRange` uses daily granularity, this `dateRange` can be a single day. If `CohortsRange` uses weekly granularity, this `dateRange` can be aligned to a week boundary, starting at Sunday and ending Saturday. If `CohortsRange` uses monthly granularity, this `dateRange` can be aligned to a month, starting at the first and ending on the last day of the month." + }, + "dimension": { + "description": "Dimension used by the cohort. Required and only supports `firstSessionDate`.", + "type": "string" + }, + "name": { + "description": "Assigns a name to this cohort. The dimension `cohort` is valued to this name in a report response. If set, cannot begin with `cohort_` or `RESERVED_`. If not set, cohorts are named by their zero based index `cohort_0`, `cohort_1`, etc.", + "type": "string" + } + }, + "type": "object" + }, + "CohortReportSettings": { + "description": "Optional settings of a cohort report.", + "id": "CohortReportSettings", + "properties": { + "accumulate": { + "description": "If true, accumulates the result from first touch day to the end day. Not supported in `RunReportRequest`.", + "type": "boolean" + } + }, + "type": "object" + }, + "CohortSpec": { + "description": "The specification of cohorts for a cohort report. Cohort reports create a time series of user retention for the cohort. For example, you could select the cohort of users that were acquired in the first week of September and follow that cohort for the next six weeks. Selecting the users acquired in the first week of September cohort is specified in the `cohort` object. Following that cohort for the next six weeks is specified in the `cohortsRange` object. For examples, see [Cohort Report Examples](https://developers.google.com/analytics/devguides/reporting/data/v1/advanced#cohort_report_examples). The report response could show a weekly time series where say your app has retained 60% of this cohort after three weeks and 25% of this cohort after six weeks. These two percentages can be calculated by the metric `cohortActiveUsers/cohortTotalUsers` and will be separate rows in the report.", + "id": "CohortSpec", + "properties": { + "cohortReportSettings": { + "$ref": "CohortReportSettings", + "description": "Optional settings for a cohort report." + }, + "cohorts": { + "description": "Defines the selection criteria to group users into cohorts. Most cohort reports define only a single cohort. If multiple cohorts are specified, each cohort can be recognized in the report by their name.", + "items": { + "$ref": "Cohort" + }, + "type": "array" + }, + "cohortsRange": { + "$ref": "CohortsRange", + "description": "Cohort reports follow cohorts over an extended reporting date range. This range specifies an offset duration to follow the cohorts over." + } + }, + "type": "object" + }, + "CohortsRange": { + "description": "Configures the extended reporting date range for a cohort report. Specifies an offset duration to follow the cohorts over.", + "id": "CohortsRange", + "properties": { + "endOffset": { + "description": "Required. `endOffset` specifies the end date of the extended reporting date range for a cohort report. `endOffset` can be any positive integer but is commonly set to 5 to 10 so that reports contain data on the cohort for the next several granularity time periods. If `granularity` is `DAILY`, the `endDate` of the extended reporting date range is `endDate` of the cohort plus `endOffset` days. If `granularity` is `WEEKLY`, the `endDate` of the extended reporting date range is `endDate` of the cohort plus `endOffset * 7` days. If `granularity` is `MONTHLY`, the `endDate` of the extended reporting date range is `endDate` of the cohort plus `endOffset * 30` days.", + "format": "int32", + "type": "integer" + }, + "granularity": { + "description": "Required. The granularity used to interpret the `startOffset` and `endOffset` for the extended reporting date range for a cohort report.", + "enum": [ + "GRANULARITY_UNSPECIFIED", + "DAILY", + "WEEKLY", + "MONTHLY" + ], + "enumDescriptions": [ + "Should never be specified.", + "Daily granularity. Commonly used if the cohort's `dateRange` is a single day and the request contains `cohortNthDay`.", + "Weekly granularity. Commonly used if the cohort's `dateRange` is a week in duration (starting on Sunday and ending on Saturday) and the request contains `cohortNthWeek`.", + "Monthly granularity. Commonly used if the cohort's `dateRange` is a month in duration and the request contains `cohortNthMonth`." + ], + "type": "string" + }, + "startOffset": { + "description": "`startOffset` specifies the start date of the extended reporting date range for a cohort report. `startOffset` is commonly set to 0 so that reports contain data from the acquisition of the cohort forward. If `granularity` is `DAILY`, the `startDate` of the extended reporting date range is `startDate` of the cohort plus `startOffset` days. If `granularity` is `WEEKLY`, the `startDate` of the extended reporting date range is `startDate` of the cohort plus `startOffset * 7` days. If `granularity` is `MONTHLY`, the `startDate` of the extended reporting date range is `startDate` of the cohort plus `startOffset * 30` days.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "ConcatenateExpression": { + "description": "Used to combine dimension values to a single dimension.", + "id": "ConcatenateExpression", + "properties": { + "delimiter": { + "description": "The delimiter placed between dimension names. Delimiters are often single characters such as \"|\" or \",\" but can be longer strings. If a dimension value contains the delimiter, both will be present in response with no distinction. For example if dimension 1 value = \"US,FR\", dimension 2 value = \"JP\", and delimiter = \",\", then the response will contain \"US,FR,JP\".", + "type": "string" + }, + "dimensionNames": { + "description": "Names of dimensions. The names must refer back to names in the dimensions field of the request.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "DateRange": { + "description": "A contiguous set of days: startDate, startDate + 1, ..., endDate. Requests are allowed up to 4 date ranges.", + "id": "DateRange", + "properties": { + "endDate": { + "description": "The inclusive end date for the query in the format `YYYY-MM-DD`. Cannot be before `start_date`. The format `NdaysAgo`, `yesterday`, or `today` is also accepted, and in that case, the date is inferred based on the property's reporting time zone.", + "type": "string" + }, + "name": { + "description": "Assigns a name to this date range. The dimension `dateRange` is valued to this name in a report response. If set, cannot begin with `date_range_` or `RESERVED_`. If not set, date ranges are named by their zero based index in the request: `date_range_0`, `date_range_1`, etc.", + "type": "string" + }, + "startDate": { + "description": "The inclusive start date for the query in the format `YYYY-MM-DD`. Cannot be after `end_date`. The format `NdaysAgo`, `yesterday`, or `today` is also accepted, and in that case, the date is inferred based on the property's reporting time zone.", + "type": "string" + } + }, + "type": "object" + }, + "Dimension": { + "description": "Dimensions are attributes of your data. For example, the dimension city indicates the city from which an event originates. Dimension values in report responses are strings; for example, city could be \"Paris\" or \"New York\". Requests are allowed up to 8 dimensions.", + "id": "Dimension", + "properties": { + "dimensionExpression": { + "$ref": "DimensionExpression", + "description": "One dimension can be the result of an expression of multiple dimensions. For example, dimension \"country, city\": concatenate(country, \", \", city)." + }, + "name": { + "description": "The name of the dimension. See the [API Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#dimensions) for the list of dimension names. If `dimensionExpression` is specified, `name` can be any string that you would like within the allowed character set. For example if a `dimensionExpression` concatenates `country` and `city`, you could call that dimension `countryAndCity`. Dimension names that you choose must match the regular expression \"^[a-zA-Z0-9_]$\". Dimensions are referenced by `name` in `dimensionFilter`, `orderBys`, `dimensionExpression`, and `pivots`.", + "type": "string" + } + }, + "type": "object" + }, + "DimensionExpression": { + "description": "Used to express a dimension which is the result of a formula of multiple dimensions. Example usages: 1) lower_case(dimension) 2) concatenate(dimension1, symbol, dimension2).", + "id": "DimensionExpression", + "properties": { + "concatenate": { + "$ref": "ConcatenateExpression", + "description": "Used to combine dimension values to a single dimension. For example, dimension \"country, city\": concatenate(country, \", \", city)." + }, + "lowerCase": { + "$ref": "CaseExpression", + "description": "Used to convert a dimension value to lower case." + }, + "upperCase": { + "$ref": "CaseExpression", + "description": "Used to convert a dimension value to upper case." + } + }, + "type": "object" + }, + "DimensionHeader": { + "description": "Describes a dimension column in the report. Dimensions requested in a report produce column entries within rows and DimensionHeaders. However, dimensions used exclusively within filters or expressions do not produce columns in a report; correspondingly, those dimensions do not produce headers.", + "id": "DimensionHeader", + "properties": { + "name": { + "description": "The dimension's name.", + "type": "string" + } + }, + "type": "object" + }, + "DimensionMetadata": { + "description": "Explains a dimension.", + "id": "DimensionMetadata", + "properties": { + "apiName": { + "description": "This dimension's name. Useable in [Dimension](#Dimension)'s `name`. For example, `eventName`.", + "type": "string" + }, + "customDefinition": { + "description": "True if the dimension is a custom dimension for this property.", + "type": "boolean" + }, + "deprecatedApiNames": { + "description": "Still usable but deprecated names for this dimension. If populated, this dimension is available by either `apiName` or one of `deprecatedApiNames` for a period of time. After the deprecation period, the dimension will be available only by `apiName`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "description": { + "description": "Description of how this dimension is used and calculated.", + "type": "string" + }, + "uiName": { + "description": "This dimension's name within the Google Analytics user interface. For example, `Event name`.", + "type": "string" + } + }, + "type": "object" + }, + "DimensionOrderBy": { + "description": "Sorts by dimension values.", + "id": "DimensionOrderBy", + "properties": { + "dimensionName": { + "description": "A dimension name in the request to order by.", + "type": "string" + }, + "orderType": { + "description": "Controls the rule for dimension value ordering.", + "enum": [ + "ORDER_TYPE_UNSPECIFIED", + "ALPHANUMERIC", + "CASE_INSENSITIVE_ALPHANUMERIC", + "NUMERIC" + ], + "enumDescriptions": [ + "Unspecified.", + "Alphanumeric sort by Unicode code point. For example, \"2\" < \"A\" < \"X\" < \"b\" < \"z\".", + "Case insensitive alphanumeric sort by lower case Unicode code point. For example, \"2\" < \"A\" < \"b\" < \"X\" < \"z\".", + "Dimension values are converted to numbers before sorting. For example in NUMERIC sort, \"25\" < \"100\", and in `ALPHANUMERIC` sort, \"100\" < \"25\". Non-numeric dimension values all have equal ordering value below all numeric values." + ], + "type": "string" + } + }, + "type": "object" + }, + "DimensionValue": { + "description": "The value of a dimension.", + "id": "DimensionValue", + "properties": { + "value": { + "description": "Value as a string if the dimension type is a string.", + "type": "string" + } + }, + "type": "object" + }, + "Filter": { + "description": "An expression to filter dimension or metric values.", + "id": "Filter", + "properties": { + "betweenFilter": { + "$ref": "BetweenFilter", + "description": "A filter for two values." + }, + "fieldName": { + "description": "The dimension name or metric name. Must be a name defined in dimensions or metrics.", + "type": "string" + }, + "inListFilter": { + "$ref": "InListFilter", + "description": "A filter for in list values." + }, + "numericFilter": { + "$ref": "NumericFilter", + "description": "A filter for numeric or date values." + }, + "stringFilter": { + "$ref": "StringFilter", + "description": "Strings related filter." + } + }, + "type": "object" + }, + "FilterExpression": { + "description": "To express dimension or metric filters. The fields in the same FilterExpression need to be either all dimensions or all metrics.", + "id": "FilterExpression", + "properties": { + "andGroup": { + "$ref": "FilterExpressionList", + "description": "The FilterExpressions in and_group have an AND relationship." + }, + "filter": { + "$ref": "Filter", + "description": "A primitive filter. All fields in filter in same FilterExpression needs to be either all dimensions or metrics." + }, + "notExpression": { + "$ref": "FilterExpression", + "description": "The FilterExpression is NOT of not_expression." + }, + "orGroup": { + "$ref": "FilterExpressionList", + "description": "The FilterExpressions in or_group have an OR relationship." + } + }, + "type": "object" + }, + "FilterExpressionList": { + "description": "A list of filter expressions.", + "id": "FilterExpressionList", + "properties": { + "expressions": { + "description": "A list of filter expressions.", + "items": { + "$ref": "FilterExpression" + }, + "type": "array" + } + }, + "type": "object" + }, + "InListFilter": { + "description": "The result needs to be in a list of string values.", + "id": "InListFilter", + "properties": { + "caseSensitive": { + "description": "If true, the string value is case sensitive.", + "type": "boolean" + }, + "values": { + "description": "The list of string values. Must be non-empty.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "Metadata": { + "description": "The dimensions and metrics currently accepted in reporting methods.", + "id": "Metadata", + "properties": { + "dimensions": { + "description": "The dimension descriptions.", + "items": { + "$ref": "DimensionMetadata" + }, + "type": "array" + }, + "metrics": { + "description": "The metric descriptions.", + "items": { + "$ref": "MetricMetadata" + }, + "type": "array" + }, + "name": { + "description": "Resource name of this metadata.", + "type": "string" + } + }, + "type": "object" + }, + "Metric": { + "description": "The quantitative measurements of a report. For example, the metric `eventCount` is the total number of events. Requests are allowed up to 10 metrics.", + "id": "Metric", + "properties": { + "expression": { + "description": "A mathematical expression for derived metrics. For example, the metric Event count per user is `eventCount/totalUsers`.", + "type": "string" + }, + "invisible": { + "description": "Indicates if a metric is invisible in the report response. If a metric is invisible, the metric will not produce a column in the response, but can be used in `metricFilter`, `orderBys`, or a metric `expression`.", + "type": "boolean" + }, + "name": { + "description": "The name of the metric. See the [API Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#metrics) for the list of metric names. If `expression` is specified, `name` can be any string that you would like within the allowed character set. For example if `expression` is `screenPageViews/sessions`, you could call that metric's name = `viewsPerSession`. Metric names that you choose must match the regular expression \"^[a-zA-Z0-9_]$\". Metrics are referenced by `name` in `metricFilter`, `orderBys`, and metric `expression`.", + "type": "string" + } + }, + "type": "object" + }, + "MetricHeader": { + "description": "Describes a metric column in the report. Visible metrics requested in a report produce column entries within rows and MetricHeaders. However, metrics used exclusively within filters or expressions do not produce columns in a report; correspondingly, those metrics do not produce headers.", + "id": "MetricHeader", + "properties": { + "name": { + "description": "The metric's name.", + "type": "string" + }, + "type": { + "description": "The metric's data type.", + "enum": [ + "METRIC_TYPE_UNSPECIFIED", + "TYPE_INTEGER", + "TYPE_FLOAT", + "TYPE_SECONDS", + "TYPE_MILLISECONDS", + "TYPE_MINUTES", + "TYPE_HOURS", + "TYPE_STANDARD", + "TYPE_CURRENCY", + "TYPE_FEET", + "TYPE_MILES", + "TYPE_METERS", + "TYPE_KILOMETERS" + ], + "enumDescriptions": [ + "Unspecified type.", + "Integer type.", + "Floating point type.", + "A duration of seconds; a special floating point type.", + "A duration in milliseconds; a special floating point type.", + "A duration in minutes; a special floating point type.", + "A duration in hours; a special floating point type.", + "A custom metric of standard type; a special floating point type.", + "An amount of money; a special floating point type.", + "A length in feet; a special floating point type.", + "A length in miles; a special floating point type.", + "A length in meters; a special floating point type.", + "A length in kilometers; a special floating point type." + ], + "type": "string" + } + }, + "type": "object" + }, + "MetricMetadata": { + "description": "Explains a metric.", + "id": "MetricMetadata", + "properties": { + "apiName": { + "description": "A metric name. Useable in [Metric](#Metric)'s `name`. For example, `eventCount`.", + "type": "string" + }, + "customDefinition": { + "description": "True if the metric is a custom metric for this property.", + "type": "boolean" + }, + "deprecatedApiNames": { + "description": "Still usable but deprecated names for this metric. If populated, this metric is available by either `apiName` or one of `deprecatedApiNames` for a period of time. After the deprecation period, the metric will be available only by `apiName`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "description": { + "description": "Description of how this metric is used and calculated.", + "type": "string" + }, + "expression": { + "description": "The mathematical expression for this derived metric. Can be used in [Metric](#Metric)'s `expression` field for equivalent reports. Most metrics are not expressions, and for non-expressions, this field is empty.", + "type": "string" + }, + "type": { + "description": "The type of this metric.", + "enum": [ + "METRIC_TYPE_UNSPECIFIED", + "TYPE_INTEGER", + "TYPE_FLOAT", + "TYPE_SECONDS", + "TYPE_MILLISECONDS", + "TYPE_MINUTES", + "TYPE_HOURS", + "TYPE_STANDARD", + "TYPE_CURRENCY", + "TYPE_FEET", + "TYPE_MILES", + "TYPE_METERS", + "TYPE_KILOMETERS" + ], + "enumDescriptions": [ + "Unspecified type.", + "Integer type.", + "Floating point type.", + "A duration of seconds; a special floating point type.", + "A duration in milliseconds; a special floating point type.", + "A duration in minutes; a special floating point type.", + "A duration in hours; a special floating point type.", + "A custom metric of standard type; a special floating point type.", + "An amount of money; a special floating point type.", + "A length in feet; a special floating point type.", + "A length in miles; a special floating point type.", + "A length in meters; a special floating point type.", + "A length in kilometers; a special floating point type." + ], + "type": "string" + }, + "uiName": { + "description": "This metric's name within the Google Analytics user interface. For example, `Event count`.", + "type": "string" + } + }, + "type": "object" + }, + "MetricOrderBy": { + "description": "Sorts by metric values.", + "id": "MetricOrderBy", + "properties": { + "metricName": { + "description": "A metric name in the request to order by.", + "type": "string" + } + }, + "type": "object" + }, + "MetricValue": { + "description": "The value of a metric.", + "id": "MetricValue", + "properties": { + "value": { + "description": "Measurement value. See MetricHeader for type.", + "type": "string" + } + }, + "type": "object" + }, + "NumericFilter": { + "description": "Filters for numeric or date values.", + "id": "NumericFilter", + "properties": { + "operation": { + "description": "The operation type for this filter.", + "enum": [ + "OPERATION_UNSPECIFIED", + "EQUAL", + "LESS_THAN", + "LESS_THAN_OR_EQUAL", + "GREATER_THAN", + "GREATER_THAN_OR_EQUAL" + ], + "enumDescriptions": [ + "Unspecified.", + "Equal", + "Less than", + "Less than or equal", + "Greater than", + "Greater than or equal" + ], + "type": "string" + }, + "value": { + "$ref": "NumericValue", + "description": "A numeric value or a date value." + } + }, + "type": "object" + }, + "NumericValue": { + "description": "To represent a number.", + "id": "NumericValue", + "properties": { + "doubleValue": { + "description": "Double value", + "format": "double", + "type": "number" + }, + "int64Value": { + "description": "Integer value", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "OrderBy": { + "description": "The sort options.", + "id": "OrderBy", + "properties": { + "desc": { + "description": "If true, sorts by descending order.", + "type": "boolean" + }, + "dimension": { + "$ref": "DimensionOrderBy", + "description": "Sorts results by a dimension's values." + }, + "metric": { + "$ref": "MetricOrderBy", + "description": "Sorts results by a metric's values." + }, + "pivot": { + "$ref": "PivotOrderBy", + "description": "Sorts results by a metric's values within a pivot column group." + } + }, + "type": "object" + }, + "Pivot": { + "description": "Describes the visible dimension columns and rows in the report response.", + "id": "Pivot", + "properties": { + "fieldNames": { + "description": "Dimension names for visible columns in the report response. Including \"dateRange\" produces a date range column; for each row in the response, dimension values in the date range column will indicate the corresponding date range from the request.", + "items": { + "type": "string" + }, + "type": "array" + }, + "limit": { + "description": "The number of unique combinations of dimension values to return in this pivot. The `limit` parameter is required. A `limit` of 10,000 is common for single pivot requests. The product of the `limit` for each `pivot` in a `RunPivotReportRequest` must not exceed 100,000. For example, a two pivot request with `limit: 1000` in each pivot will fail because the product is `1,000,000`.", + "format": "int64", + "type": "string" + }, + "metricAggregations": { + "description": "Aggregate the metrics by dimensions in this pivot using the specified metric_aggregations.", + "items": { + "enum": [ + "METRIC_AGGREGATION_UNSPECIFIED", + "TOTAL", + "MINIMUM", + "MAXIMUM", + "COUNT" + ], + "enumDescriptions": [ + "Unspecified operator.", + "SUM operator.", + "Minimum operator.", + "Maximum operator.", + "Count operator." + ], + "type": "string" + }, + "type": "array" + }, + "offset": { + "description": "The row count of the start row. The first row is counted as row 0.", + "format": "int64", + "type": "string" + }, + "orderBys": { + "description": "Specifies how dimensions are ordered in the pivot. In the first Pivot, the OrderBys determine Row and PivotDimensionHeader ordering; in subsequent Pivots, the OrderBys determine only PivotDimensionHeader ordering. Dimensions specified in these OrderBys must be a subset of Pivot.field_names.", + "items": { + "$ref": "OrderBy" + }, + "type": "array" + } + }, + "type": "object" + }, + "PivotDimensionHeader": { + "description": "Summarizes dimension values from a row for this pivot.", + "id": "PivotDimensionHeader", + "properties": { + "dimensionValues": { + "description": "Values of multiple dimensions in a pivot.", + "items": { + "$ref": "DimensionValue" + }, + "type": "array" + } + }, + "type": "object" + }, + "PivotHeader": { + "description": "Dimensions' values in a single pivot.", + "id": "PivotHeader", + "properties": { + "pivotDimensionHeaders": { + "description": "The size is the same as the cardinality of the corresponding dimension combinations.", + "items": { + "$ref": "PivotDimensionHeader" + }, + "type": "array" + }, + "rowCount": { + "description": "The cardinality of the pivot. The total number of rows for this pivot's fields regardless of how the parameters `offset` and `limit` are specified in the request.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "PivotOrderBy": { + "description": "Sorts by a pivot column group.", + "id": "PivotOrderBy", + "properties": { + "metricName": { + "description": "In the response to order by, order rows by this column. Must be a metric name from the request.", + "type": "string" + }, + "pivotSelections": { + "description": "Used to select a dimension name and value pivot. If multiple pivot selections are given, the sort occurs on rows where all pivot selection dimension name and value pairs match the row's dimension name and value pair.", + "items": { + "$ref": "PivotSelection" + }, + "type": "array" + } + }, + "type": "object" + }, + "PivotSelection": { + "description": "A pair of dimension names and values. Rows with this dimension pivot pair are ordered by the metric's value. For example if pivots = {{\"browser\", \"Chrome\"}} and metric_name = \"Sessions\", then the rows will be sorted based on Sessions in Chrome. ---------|----------|----------------|----------|---------------- | Chrome | Chrome | Safari | Safari ---------|----------|----------------|----------|---------------- Country | Sessions | Pages/Sessions | Sessions | Pages/Sessions ---------|----------|----------------|----------|---------------- US | 2 | 2 | 3 | 1 ---------|----------|----------------|----------|---------------- Canada | 3 | 1 | 4 | 1 ---------|----------|----------------|----------|----------------", + "id": "PivotSelection", + "properties": { + "dimensionName": { + "description": "Must be a dimension name from the request.", + "type": "string" + }, + "dimensionValue": { + "description": "Order by only when the named dimension is this value.", + "type": "string" + } + }, + "type": "object" + }, + "PropertyQuota": { + "description": "Current state of all quotas for this Analytics Property. If any quota for a property is exhausted, all requests to that property will return Resource Exhausted errors.", + "id": "PropertyQuota", + "properties": { + "concurrentRequests": { + "$ref": "QuotaStatus", + "description": "Standard Analytics Properties can send up to 10 concurrent requests; Analytics 360 Properties can use up to 50 concurrent requests." + }, + "potentiallyThresholdedRequestsPerHour": { + "$ref": "QuotaStatus", + "description": "Analytics Properties can send up to 120 requests with potentially thresholded dimensions per hour. In a batch request, each report request is individually counted for this quota if the request contains potentially thresholded dimensions." + }, + "serverErrorsPerProjectPerHour": { + "$ref": "QuotaStatus", + "description": "Standard Analytics Properties and cloud project pairs can have up to 10 server errors per hour; Analytics 360 Properties and cloud project pairs can have up to 50 server errors per hour." + }, + "tokensPerDay": { + "$ref": "QuotaStatus", + "description": "Standard Analytics Properties can use up to 25,000 tokens per day; Analytics 360 Properties can use 250,000 tokens per day. Most requests consume fewer than 10 tokens." + }, + "tokensPerHour": { + "$ref": "QuotaStatus", + "description": "Standard Analytics Properties can use up to 5,000 tokens per hour; Analytics 360 Properties can use 50,000 tokens per hour. An API request consumes a single number of tokens, and that number is deducted from both the hourly and daily quotas." + } + }, + "type": "object" + }, + "QuotaStatus": { + "description": "Current state for a particular quota group.", + "id": "QuotaStatus", + "properties": { + "consumed": { + "description": "Quota consumed by this request.", + "format": "int32", + "type": "integer" + }, + "remaining": { + "description": "Quota remaining after this request.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "ResponseMetaData": { + "description": "Response's metadata carrying additional information about the report content.", + "id": "ResponseMetaData", + "properties": { + "dataLossFromOtherRow": { + "description": "If true, indicates some buckets of dimension combinations are rolled into \"(other)\" row. This can happen for high cardinality reports.", + "type": "boolean" + } + }, + "type": "object" + }, + "Row": { + "description": "Report data for each row. For example if RunReportRequest contains: ```none \"dimensions\": [ { \"name\": \"eventName\" }, { \"name\": \"countryId\" } ], \"metrics\": [ { \"name\": \"eventCount\" } ] ``` One row with 'in_app_purchase' as the eventName, 'JP' as the countryId, and 15 as the eventCount, would be: ```none \"dimensionValues\": [ { \"value\": \"in_app_purchase\" }, { \"value\": \"JP\" } ], \"metricValues\": [ { \"value\": \"15\" } ] ```", + "id": "Row", + "properties": { + "dimensionValues": { + "description": "List of requested dimension values. In a PivotReport, dimension_values are only listed for dimensions included in a pivot.", + "items": { + "$ref": "DimensionValue" + }, + "type": "array" + }, + "metricValues": { + "description": "List of requested visible metric values.", + "items": { + "$ref": "MetricValue" + }, + "type": "array" + } + }, + "type": "object" + }, + "RunPivotReportRequest": { + "description": "The request to generate a pivot report.", + "id": "RunPivotReportRequest", + "properties": { + "cohortSpec": { + "$ref": "CohortSpec", + "description": "Cohort group associated with this request. If there is a cohort group in the request the 'cohort' dimension must be present." + }, + "currencyCode": { + "description": "A currency code in ISO4217 format, such as \"AED\", \"USD\", \"JPY\". If the field is empty, the report uses the property's default currency.", + "type": "string" + }, + "dateRanges": { + "description": "The date range to retrieve event data for the report. If multiple date ranges are specified, event data from each date range is used in the report. A special dimension with field name \"dateRange\" can be included in a Pivot's field names; if included, the report compares between date ranges. In a cohort request, this `dateRanges` must be unspecified.", + "items": { + "$ref": "DateRange" + }, + "type": "array" + }, + "dimensionFilter": { + "$ref": "FilterExpression", + "description": "The filter clause of dimensions. Dimensions must be requested to be used in this filter. Metrics cannot be used in this filter." + }, + "dimensions": { + "description": "The dimensions requested. All defined dimensions must be used by one of the following: dimension_expression, dimension_filter, pivots, order_bys.", + "items": { + "$ref": "Dimension" + }, + "type": "array" + }, + "keepEmptyRows": { + "description": "If false or unspecified, each row with all metrics equal to 0 will not be returned. If true, these rows will be returned if they are not separately removed by a filter.", + "type": "boolean" + }, + "metricFilter": { + "$ref": "FilterExpression", + "description": "The filter clause of metrics. Applied at post aggregation phase, similar to SQL having-clause. Metrics must be requested to be used in this filter. Dimensions cannot be used in this filter." + }, + "metrics": { + "description": "The metrics requested, at least one metric needs to be specified. All defined metrics must be used by one of the following: metric_expression, metric_filter, order_bys.", + "items": { + "$ref": "Metric" + }, + "type": "array" + }, + "pivots": { + "description": "Describes the visual format of the report's dimensions in columns or rows. The union of the fieldNames (dimension names) in all pivots must be a subset of dimension names defined in Dimensions. No two pivots can share a dimension. A dimension is only visible if it appears in a pivot.", + "items": { + "$ref": "Pivot" + }, + "type": "array" + }, + "property": { + "description": "A Google Analytics GA4 property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). Within a batch request, this property should either be unspecified or consistent with the batch-level property. Example: properties/1234", + "type": "string" + }, + "returnPropertyQuota": { + "description": "Toggles whether to return the current state of this Analytics Property's quota. Quota is returned in [PropertyQuota](#PropertyQuota).", + "type": "boolean" + } + }, + "type": "object" + }, + "RunPivotReportResponse": { + "description": "The response pivot report table corresponding to a pivot request.", + "id": "RunPivotReportResponse", + "properties": { + "aggregates": { + "description": "Aggregation of metric values. Can be totals, minimums, or maximums. The returned aggregations are controlled by the metric_aggregations in the pivot. The type of aggregation returned in each row is shown by the dimension_values which are set to \"RESERVED_\".", + "items": { + "$ref": "Row" + }, + "type": "array" + }, + "dimensionHeaders": { + "description": "Describes dimension columns. The number of DimensionHeaders and ordering of DimensionHeaders matches the dimensions present in rows.", + "items": { + "$ref": "DimensionHeader" + }, + "type": "array" + }, + "kind": { + "description": "Identifies what kind of resource this message is. This `kind` is always the fixed string \"analyticsData#runPivotReport\". Useful to distinguish between response types in JSON.", + "type": "string" + }, + "metadata": { + "$ref": "ResponseMetaData", + "description": "Metadata for the report." + }, + "metricHeaders": { + "description": "Describes metric columns. The number of MetricHeaders and ordering of MetricHeaders matches the metrics present in rows.", + "items": { + "$ref": "MetricHeader" + }, + "type": "array" + }, + "pivotHeaders": { + "description": "Summarizes the columns and rows created by a pivot. Each pivot in the request produces one header in the response. If we have a request like this: \"pivots\": [{ \"fieldNames\": [\"country\", \"city\"] }, { \"fieldNames\": \"eventName\" }] We will have the following `pivotHeaders` in the response: \"pivotHeaders\" : [{ \"dimensionHeaders\": [{ \"dimensionValues\": [ { \"value\": \"United Kingdom\" }, { \"value\": \"London\" } ] }, { \"dimensionValues\": [ { \"value\": \"Japan\" }, { \"value\": \"Osaka\" } ] }] }, { \"dimensionHeaders\": [{ \"dimensionValues\": [{ \"value\": \"session_start\" }] }, { \"dimensionValues\": [{ \"value\": \"scroll\" }] }] }]", + "items": { + "$ref": "PivotHeader" + }, + "type": "array" + }, + "propertyQuota": { + "$ref": "PropertyQuota", + "description": "This Analytics Property's quota state including this request." + }, + "rows": { + "description": "Rows of dimension value combinations and metric values in the report.", + "items": { + "$ref": "Row" + }, + "type": "array" + } + }, + "type": "object" + }, + "RunRealtimeReportRequest": { + "description": "The request to generate a realtime report.", + "id": "RunRealtimeReportRequest", + "properties": { + "dimensionFilter": { + "$ref": "FilterExpression", + "description": "The filter clause of dimensions. Dimensions must be requested to be used in this filter. Metrics cannot be used in this filter." + }, + "dimensions": { + "description": "The dimensions requested and displayed.", + "items": { + "$ref": "Dimension" + }, + "type": "array" + }, + "limit": { + "description": "The number of rows to return. If unspecified, 10,000 rows are returned. The API returns a maximum of 100,000 rows per request, no matter how many you ask for. `limit` must be positive. The API can also return fewer rows than the requested `limit`, if there aren't as many dimension values as the `limit`. For instance, there are fewer than 300 possible values for the dimension `country`, so when reporting on only `country`, you can't get more than 300 rows, even if you set `limit` to a higher value.", + "format": "int64", + "type": "string" + }, + "metricAggregations": { + "description": "Aggregation of metrics. Aggregated metric values will be shown in rows where the dimension_values are set to \"RESERVED_(MetricAggregation)\".", + "items": { + "enum": [ + "METRIC_AGGREGATION_UNSPECIFIED", + "TOTAL", + "MINIMUM", + "MAXIMUM", + "COUNT" + ], + "enumDescriptions": [ + "Unspecified operator.", + "SUM operator.", + "Minimum operator.", + "Maximum operator.", + "Count operator." + ], + "type": "string" + }, + "type": "array" + }, + "metricFilter": { + "$ref": "FilterExpression", + "description": "The filter clause of metrics. Applied at post aggregation phase, similar to SQL having-clause. Metrics must be requested to be used in this filter. Dimensions cannot be used in this filter." + }, + "metrics": { + "description": "The metrics requested and displayed.", + "items": { + "$ref": "Metric" + }, + "type": "array" + }, + "orderBys": { + "description": "Specifies how rows are ordered in the response.", + "items": { + "$ref": "OrderBy" + }, + "type": "array" + }, + "returnPropertyQuota": { + "description": "Toggles whether to return the current state of this Analytics Property's Realtime quota. Quota is returned in [PropertyQuota](#PropertyQuota).", + "type": "boolean" + } + }, + "type": "object" + }, + "RunRealtimeReportResponse": { + "description": "The response realtime report table corresponding to a request.", + "id": "RunRealtimeReportResponse", + "properties": { + "dimensionHeaders": { + "description": "Describes dimension columns. The number of DimensionHeaders and ordering of DimensionHeaders matches the dimensions present in rows.", + "items": { + "$ref": "DimensionHeader" + }, + "type": "array" + }, + "kind": { + "description": "Identifies what kind of resource this message is. This `kind` is always the fixed string \"analyticsData#runRealtimeReport\". Useful to distinguish between response types in JSON.", + "type": "string" + }, + "maximums": { + "description": "If requested, the maximum values of metrics.", + "items": { + "$ref": "Row" + }, + "type": "array" + }, + "metricHeaders": { + "description": "Describes metric columns. The number of MetricHeaders and ordering of MetricHeaders matches the metrics present in rows.", + "items": { + "$ref": "MetricHeader" + }, + "type": "array" + }, + "minimums": { + "description": "If requested, the minimum values of metrics.", + "items": { + "$ref": "Row" + }, + "type": "array" + }, + "propertyQuota": { + "$ref": "PropertyQuota", + "description": "This Analytics Property's Realtime quota state including this request." + }, + "rowCount": { + "description": "The total number of rows in the query result. `rowCount` is independent of the number of rows returned in the response and the `limit` request parameter. For example if a query returns 175 rows and includes `limit` of 50 in the API request, the response will contain `rowCount` of 175 but only 50 rows.", + "format": "int32", + "type": "integer" + }, + "rows": { + "description": "Rows of dimension value combinations and metric values in the report.", + "items": { + "$ref": "Row" + }, + "type": "array" + }, + "totals": { + "description": "If requested, the totaled values of metrics.", + "items": { + "$ref": "Row" + }, + "type": "array" + } + }, + "type": "object" + }, + "RunReportRequest": { + "description": "The request to generate a report.", + "id": "RunReportRequest", + "properties": { + "cohortSpec": { + "$ref": "CohortSpec", + "description": "Cohort group associated with this request. If there is a cohort group in the request the 'cohort' dimension must be present." + }, + "currencyCode": { + "description": "A currency code in ISO4217 format, such as \"AED\", \"USD\", \"JPY\". If the field is empty, the report uses the property's default currency.", + "type": "string" + }, + "dateRanges": { + "description": "Date ranges of data to read. If multiple date ranges are requested, each response row will contain a zero based date range index. If two date ranges overlap, the event data for the overlapping days is included in the response rows for both date ranges. In a cohort request, this `dateRanges` must be unspecified.", + "items": { + "$ref": "DateRange" + }, + "type": "array" + }, + "dimensionFilter": { + "$ref": "FilterExpression", + "description": "The filter clause of dimensions. Dimensions must be requested to be used in this filter. Metrics cannot be used in this filter." + }, + "dimensions": { + "description": "The dimensions requested and displayed.", + "items": { + "$ref": "Dimension" + }, + "type": "array" + }, + "keepEmptyRows": { + "description": "If false or unspecified, each row with all metrics equal to 0 will not be returned. If true, these rows will be returned if they are not separately removed by a filter.", + "type": "boolean" + }, + "limit": { + "description": "The number of rows to return. If unspecified, 10,000 rows are returned. The API returns a maximum of 100,000 rows per request, no matter how many you ask for. `limit` must be positive. The API can also return fewer rows than the requested `limit`, if there aren't as many dimension values as the `limit`. For instance, there are fewer than 300 possible values for the dimension `country`, so when reporting on only `country`, you can't get more than 300 rows, even if you set `limit` to a higher value. To learn more about this pagination parameter, see [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).", + "format": "int64", + "type": "string" + }, + "metricAggregations": { + "description": "Aggregation of metrics. Aggregated metric values will be shown in rows where the dimension_values are set to \"RESERVED_(MetricAggregation)\".", + "items": { + "enum": [ + "METRIC_AGGREGATION_UNSPECIFIED", + "TOTAL", + "MINIMUM", + "MAXIMUM", + "COUNT" + ], + "enumDescriptions": [ + "Unspecified operator.", + "SUM operator.", + "Minimum operator.", + "Maximum operator.", + "Count operator." + ], + "type": "string" + }, + "type": "array" + }, + "metricFilter": { + "$ref": "FilterExpression", + "description": "The filter clause of metrics. Applied at post aggregation phase, similar to SQL having-clause. Metrics must be requested to be used in this filter. Dimensions cannot be used in this filter." + }, + "metrics": { + "description": "The metrics requested and displayed.", + "items": { + "$ref": "Metric" + }, + "type": "array" + }, + "offset": { + "description": "The row count of the start row. The first row is counted as row 0. When paging, the first request does not specify offset; or equivalently, sets offset to 0; the first request returns the first `limit` of rows. The second request sets offset to the `limit` of the first request; the second request returns the second `limit` of rows. To learn more about this pagination parameter, see [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).", + "format": "int64", + "type": "string" + }, + "orderBys": { + "description": "Specifies how rows are ordered in the response.", + "items": { + "$ref": "OrderBy" + }, + "type": "array" + }, + "property": { + "description": "A Google Analytics GA4 property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). Within a batch request, this property should either be unspecified or consistent with the batch-level property. Example: properties/1234", + "type": "string" + }, + "returnPropertyQuota": { + "description": "Toggles whether to return the current state of this Analytics Property's quota. Quota is returned in [PropertyQuota](#PropertyQuota).", + "type": "boolean" + } + }, + "type": "object" + }, + "RunReportResponse": { + "description": "The response report table corresponding to a request.", + "id": "RunReportResponse", + "properties": { + "dimensionHeaders": { + "description": "Describes dimension columns. The number of DimensionHeaders and ordering of DimensionHeaders matches the dimensions present in rows.", + "items": { + "$ref": "DimensionHeader" + }, + "type": "array" + }, + "kind": { + "description": "Identifies what kind of resource this message is. This `kind` is always the fixed string \"analyticsData#runReport\". Useful to distinguish between response types in JSON.", + "type": "string" + }, + "maximums": { + "description": "If requested, the maximum values of metrics.", + "items": { + "$ref": "Row" + }, + "type": "array" + }, + "metadata": { + "$ref": "ResponseMetaData", + "description": "Metadata for the report." + }, + "metricHeaders": { + "description": "Describes metric columns. The number of MetricHeaders and ordering of MetricHeaders matches the metrics present in rows.", + "items": { + "$ref": "MetricHeader" + }, + "type": "array" + }, + "minimums": { + "description": "If requested, the minimum values of metrics.", + "items": { + "$ref": "Row" + }, + "type": "array" + }, + "propertyQuota": { + "$ref": "PropertyQuota", + "description": "This Analytics Property's quota state including this request." + }, + "rowCount": { + "description": "The total number of rows in the query result. `rowCount` is independent of the number of rows returned in the response, the `limit` request parameter, and the `offset` request parameter. For example if a query returns 175 rows and includes `limit` of 50 in the API request, the response will contain `rowCount` of 175 but only 50 rows. To learn more about this pagination parameter, see [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).", + "format": "int32", + "type": "integer" + }, + "rows": { + "description": "Rows of dimension value combinations and metric values in the report.", + "items": { + "$ref": "Row" + }, + "type": "array" + }, + "totals": { + "description": "If requested, the totaled values of metrics.", + "items": { + "$ref": "Row" + }, + "type": "array" + } + }, + "type": "object" + }, + "StringFilter": { + "description": "The filter for string", + "id": "StringFilter", + "properties": { + "caseSensitive": { + "description": "If true, the string value is case sensitive.", + "type": "boolean" + }, + "matchType": { + "description": "The match type for this filter.", + "enum": [ + "MATCH_TYPE_UNSPECIFIED", + "EXACT", + "BEGINS_WITH", + "ENDS_WITH", + "CONTAINS", + "FULL_REGEXP", + "PARTIAL_REGEXP" + ], + "enumDescriptions": [ + "Unspecified", + "Exact match of the string value.", + "Begins with the string value.", + "Ends with the string value.", + "Contains the string value.", + "Full regular expression match with the string value.", + "Partial regular expression match with the string value." + ], + "type": "string" + }, + "value": { + "description": "The string value used for the matching.", + "type": "string" + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "Google Analytics Data API", + "version": "v1beta", + "version_module": true +} \ No newline at end of file diff --git a/discovery/androidmanagement-v1.json b/discovery/androidmanagement-v1.json index dc248fc9308..57a9d6e09aa 100644 --- a/discovery/androidmanagement-v1.json +++ b/discovery/androidmanagement-v1.json @@ -1004,7 +1004,7 @@ } } }, - "revision": "20210222", + "revision": "20210318", "rootUrl": "https://androidmanagement.googleapis.com/", "schemas": { "AdvancedSecurityOverrides": { @@ -1628,6 +1628,28 @@ }, "type": "object" }, + "ContentProviderEndpoint": { + "description": "This feature is not generally available.", + "id": "ContentProviderEndpoint", + "properties": { + "packageName": { + "description": "This feature is not generally available.", + "type": "string" + }, + "signingCertsSha256": { + "description": "Required. This feature is not generally available.", + "items": { + "type": "string" + }, + "type": "array" + }, + "uri": { + "description": "This feature is not generally available.", + "type": "string" + } + }, + "type": "object" + }, "Date": { "description": "Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: A full date, with non-zero year, month, and day values A month and day value, with a zero year, such as an anniversary A year on its own, with zero month and day values A year and month value, with a zero day, such as a credit card expiration dateRelated types are google.type.TimeOfDay and google.protobuf.Timestamp.", "id": "Date", @@ -2832,6 +2854,24 @@ }, "type": "object" }, + "OncCertificateProvider": { + "description": "This feature is not generally available.", + "id": "OncCertificateProvider", + "properties": { + "certificateReferences": { + "description": "This feature is not generally available.", + "items": { + "type": "string" + }, + "type": "array" + }, + "contentProviderEndpoint": { + "$ref": "ContentProviderEndpoint", + "description": "This feature is not generally available." + } + }, + "type": "object" + }, "Operation": { "description": "This resource represents a long-running operation that is the result of a network API call.", "id": "Operation", @@ -3316,7 +3356,7 @@ "type": "boolean" }, "installUnknownSourcesAllowed": { - "description": "Whether the user is allowed to enable the \"Unknown Sources\" setting, which allows installation of apps from unknown sources.", + "description": "This field has no effect.", "type": "boolean" }, "keyguardDisabled": { @@ -3426,6 +3466,13 @@ "description": "Whether resetting network settings is disabled.", "type": "boolean" }, + "oncCertificateProviders": { + "description": "This feature is not generally available.", + "items": { + "$ref": "OncCertificateProvider" + }, + "type": "array" + }, "openNetworkConfiguration": { "additionalProperties": { "description": "Properties of the object.", diff --git a/discovery/apigateway-v1.json b/discovery/apigateway-v1.json index 71207394b0e..9718306a531 100644 --- a/discovery/apigateway-v1.json +++ b/discovery/apigateway-v1.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" } } } @@ -143,7 +143,7 @@ ], "parameters": { "filter": { - "description": "The standard list 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" }, @@ -155,13 +155,13 @@ "type": "string" }, "pageSize": { - "description": "The standard list page size.", + "description": "The maximum number of results to return. If not set, the service will select a default.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "The standard list page token.", + "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" } @@ -1083,7 +1083,7 @@ } } }, - "revision": "20210225", + "revision": "20210310", "rootUrl": "https://apigateway.googleapis.com/", "schemas": { "ApigatewayApi": { diff --git a/discovery/apigateway-v1beta.json b/discovery/apigateway-v1beta.json index c417d5b41f6..f2cddb11e83 100644 --- a/discovery/apigateway-v1beta.json +++ b/discovery/apigateway-v1beta.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" } } } @@ -143,7 +143,7 @@ ], "parameters": { "filter": { - "description": "The standard list 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" }, @@ -155,13 +155,13 @@ "type": "string" }, "pageSize": { - "description": "The standard list page size.", + "description": "The maximum number of results to return. If not set, the service will select a default.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "The standard list page token.", + "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" } @@ -1083,7 +1083,7 @@ } } }, - "revision": "20210225", + "revision": "20210310", "rootUrl": "https://apigateway.googleapis.com/", "schemas": { "ApigatewayApi": { diff --git a/discovery/apigee-v1.json b/discovery/apigee-v1.json index 5c2140a699c..196d0fd58d8 100644 --- a/discovery/apigee-v1.json +++ b/discovery/apigee-v1.json @@ -1081,7 +1081,7 @@ ] }, "get": { - "description": "Gets an API proxy revision. To download the API proxy configuration bundle for the specified revision as a zip file, do the following: * Set the `format` query parameter to `bundle`. * Set the `Accept` header to `application/zip`. If you are using curl, specify `-o filename.zip` to save the output to a file; otherwise, it displays to `stdout`. Then, develop the API proxy configuration locally and upload the updated API proxy configuration revision, as described in [updateApiProxyRevision](updateApiProxyRevision).", + "description": "Gets an API proxy revision. To download the API proxy configuration bundle for the specified revision as a zip file, set the `format` query parameter to `bundle`. If you are using curl, specify `-o filename.zip` to save the output to a file; otherwise, it displays to `stdout`. Then, develop the API proxy configuration locally and upload the updated API proxy configuration revision, as described in [updateApiProxyRevision](updateApiProxyRevision).", "flatPath": "v1/organizations/{organizationsId}/apis/{apisId}/revisions/{revisionsId}", "httpMethod": "GET", "id": "apigee.organizations.apis.revisions.get", @@ -6390,7 +6390,7 @@ ] }, "get": { - "description": "Gets a revision of a shared flow. If `format=bundle` is passed, it instead outputs a shared flow revision as a ZIP-formatted bundle of code and config files.", + "description": "Gets a revision of a shared flow. To download the shared flow configuration bundle for the specified revision as a zip file, set the `format` query parameter to `bundle`. If you are using curl, specify `-o filename.zip` to save the output to a file; otherwise, it displays to `stdout`. Then, develop the shared flow configuration locally and upload the updated sharedFlow configuration revision, as described in [updateSharedFlowRevision](updateSharedFlowRevision).", "flatPath": "v1/organizations/{organizationsId}/sharedflows/{sharedflowsId}/revisions/{revisionsId}", "httpMethod": "GET", "id": "apigee.organizations.sharedflows.revisions.get", @@ -6661,7 +6661,7 @@ } } }, - "revision": "20210302", + "revision": "20210312", "rootUrl": "https://apigee.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -6901,6 +6901,10 @@ }, "type": "array" }, + "graphqlOperationGroup": { + "$ref": "GoogleCloudApigeeV1GraphQLOperationGroup", + "description": "Configuration used to group Apigee proxies or remote services with graphQL operation name, graphQL operation type and quotas. This grouping allows us to precisely set quota for a particular combination of graphQL name and operation type for a particular proxy request. If graphQL name is not set, this would imply quota will be applied on all graphQL requests matching the operation type." + }, "lastModifiedAt": { "description": "Response only. Modified time of this environment as milliseconds since epoch.", "format": "int64", @@ -8826,6 +8830,71 @@ "properties": {}, "type": "object" }, + "GoogleCloudApigeeV1GraphQLOperation": { + "description": "GraphQLOperation represents the pairing of graphQL operation types and the graphQL operation name.", + "id": "GoogleCloudApigeeV1GraphQLOperation", + "properties": { + "operation": { + "description": "GraphQL operation name, along with operation type which will be used to associate quotas with. If no name is specified, the quota will be applied to all graphQL operations irrespective of their operation names in the payload.", + "type": "string" + }, + "operationType": { + "description": "Required. `query`, `mutation` and `subscription` are the three operation types offered by graphQL. Currently we support only `query` and `mutation`.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudApigeeV1GraphQLOperationConfig": { + "description": "GraphQLOperationConfig binds the resources in a proxy or remote service with the graphQL operation and its associated quota enforcement.", + "id": "GoogleCloudApigeeV1GraphQLOperationConfig", + "properties": { + "apiSource": { + "description": "Required. API proxy endpoint or remote service name with which the graphQL operation, and quota are associated.", + "type": "string" + }, + "attributes": { + "description": "Custom attributes associated with the operation.", + "items": { + "$ref": "GoogleCloudApigeeV1Attribute" + }, + "type": "array" + }, + "operations": { + "description": "Required. List of graphQL name/Operation type pairs for the proxy/remote service, upon which quota will applied. If GraphQLOperation operation has only the operation type(s), that would imply that quota will be applied on all graphQL requests irrespective of the graphQL name. **Note**: Currently, we can specify only a single GraphQLOperation. Specifying more than one will result in failure of the operation.", + "items": { + "$ref": "GoogleCloudApigeeV1GraphQLOperation" + }, + "type": "array" + }, + "quota": { + "$ref": "GoogleCloudApigeeV1Quota", + "description": "Quota parameters to be enforced for the resources, methods, api_source combination. If none are specified, quota enforcement will not be done." + } + }, + "type": "object" + }, + "GoogleCloudApigeeV1GraphQLOperationGroup": { + "description": "List of graphQL operation configuration details associated with Apigee API proxies or remote services. Remote services are non-Apigee proxies, such as Istio-Envoy.", + "id": "GoogleCloudApigeeV1GraphQLOperationGroup", + "properties": { + "operationConfigType": { + "description": "Flag that specifes whether the configuration is for Apigee API proxy or a remote service. Valid values are `proxy` or `remoteservice`. Defaults to `proxy`. Set to `proxy` when Apigee API proxies are associated with the API product. Set to `remoteservice` when non-Apigee proxies like Istio-Envoy are associated with the API product.", + "type": "string" + }, + "operationConfigs": { + "description": "Required. List of operation configurations for either Apigee API proxies or other remote services that are associated with this API product.", + "items": { + "$ref": "GoogleCloudApigeeV1GraphQLOperationConfig" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudApigeeV1IngressConfig": { "id": "GoogleCloudApigeeV1IngressConfig", "properties": { @@ -9690,7 +9759,7 @@ "type": "array" }, "authorizedNetwork": { - "description": "Compute Engine network used for Service Networking to be peered with Apigee runtime instances. See [Getting started with the Service Networking API](https://cloud.google.com/service-infrastructure/docs/service-networking/getting-started). Valid only when [RuntimeType](#RuntimeType) is set to `CLOUD`. The value can be updated only when there are no runtime instances. For example: `default`. Apigee also supports shared VPC (that is, the host network project is not the same as the one that is peering with Apigee). See [Shared VPC overview](https://cloud.google.com/vpc/docs/shared-vpc). To use a shared VPC network, use the following format: `projects/{host-project-id}/{region}/networks/{network-name}`. For example: `projects/my-sharedvpc-host/global/networks/mynetwork` **Note:** Not supported for Apigee hybrid.", + "description": "Compute Engine network used for Service Networking to be peered with Apigee runtime instances. See [Getting started with the Service Networking API](https://cloud.google.com/service-infrastructure/docs/service-networking/getting-started). Valid only when [RuntimeType](#RuntimeType) is set to `CLOUD`. The value must be set before the creation of a runtime instance and can be updated only when there are no runtime instances. For example: `default`. Apigee also supports shared VPC (that is, the host network project is not the same as the one that is peering with Apigee). See [Shared VPC overview](https://cloud.google.com/vpc/docs/shared-vpc). To use a shared VPC network, use the following format: `projects/{host-project-id}/{region}/networks/{network-name}`. For example: `projects/my-sharedvpc-host/global/networks/mynetwork` **Note:** Not supported for Apigee hybrid.", "type": "string" }, "billingType": { @@ -9757,7 +9826,8 @@ "type": "string" }, "projectId": { - "description": "Project ID associated with the Apigee organization.", + "description": "Output only. Project ID associated with the Apigee organization.", + "readOnly": true, "type": "string" }, "properties": { @@ -9765,7 +9835,7 @@ "description": "Properties defined in the Apigee organization profile." }, "runtimeDatabaseEncryptionKeyName": { - "description": "Cloud KMS key name used for encrypting the data that is stored and replicated across runtime instances. Update is not allowed after the organization is created. If not specified, a Google-Managed encryption key will be used. Valid only when [RuntimeType](#RuntimeType) is `CLOUD`. For example: \"projects/foo/locations/us/keyRings/bar/cryptoKeys/baz\". **Note:** Not supported for Apigee hybrid.", + "description": "Cloud KMS key name used for encrypting the data that is stored and replicated across runtime instances. Update is not allowed after the organization is created. Required when [RuntimeType](#RuntimeType) is `CLOUD`. If not specified when [RuntimeType](#RuntimeType) is `TRIAL`, a Google-Managed encryption key will be used. For example: \"projects/foo/locations/us/keyRings/bar/cryptoKeys/baz\". **Note:** Not supported for Apigee hybrid.", "type": "string" }, "runtimeType": { diff --git a/discovery/appengine-v1.json b/discovery/appengine-v1.json index 55568bee263..7b9e21f90ef 100644 --- a/discovery/appengine-v1.json +++ b/discovery/appengine-v1.json @@ -902,18 +902,18 @@ "type": "string" }, "filter": { - "description": "The standard list 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" }, "pageSize": { - "description": "The standard list page size.", + "description": "The maximum number of results to return. If not set, the service will select a default.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "The standard list page token.", + "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" } @@ -1594,7 +1594,7 @@ } } }, - "revision": "20210227", + "revision": "20210315", "rootUrl": "https://appengine.googleapis.com/", "schemas": { "ApiConfigHandler": { @@ -3620,6 +3620,10 @@ "description": "The path or name of the app's main executable.", "type": "string" }, + "serviceAccount": { + "description": "The identity that the deployed version will run as. Admin API will use the App Engine Appspot service account as default if this field is neither provided in app.yaml file nor through CLI flag.", + "type": "string" + }, "servingStatus": { "description": "Current serving status of this version. Only the versions with a SERVING status create instances and can be billed.SERVING_STATUS_UNSPECIFIED is an invalid value. Defaults to SERVING.", "enum": [ diff --git a/discovery/appengine-v1alpha.json b/discovery/appengine-v1alpha.json index e593985ece6..c3652161db3 100644 --- a/discovery/appengine-v1alpha.json +++ b/discovery/appengine-v1alpha.json @@ -598,18 +598,18 @@ "type": "string" }, "filter": { - "description": "The standard list 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" }, "pageSize": { - "description": "The standard list page size.", + "description": "The maximum number of results to return. If not set, the service will select a default.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "The standard list page token.", + "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" } @@ -708,7 +708,7 @@ } } }, - "revision": "20210227", + "revision": "20210315", "rootUrl": "https://appengine.googleapis.com/", "schemas": { "AuthorizedCertificate": { diff --git a/discovery/appengine-v1beta.json b/discovery/appengine-v1beta.json index 573345af517..4ccf18a1752 100644 --- a/discovery/appengine-v1beta.json +++ b/discovery/appengine-v1beta.json @@ -902,18 +902,18 @@ "type": "string" }, "filter": { - "description": "The standard list 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" }, "pageSize": { - "description": "The standard list page size.", + "description": "The maximum number of results to return. If not set, the service will select a default.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "The standard list page token.", + "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" } @@ -1594,7 +1594,7 @@ } } }, - "revision": "20210227", + "revision": "20210315", "rootUrl": "https://appengine.googleapis.com/", "schemas": { "ApiConfigHandler": { @@ -3498,7 +3498,7 @@ "description": "Serving configuration for Google Cloud Endpoints (https://cloud.google.com/appengine/docs/python/endpoints/).Only returned in GET requests if view=FULL is set." }, "appEngineApis": { - "description": "app_engine_apis allows Second Generation runtimes to access the App Engine APIs.", + "description": "app_engine_apis allows second generation runtimes to access the App Engine APIs.", "type": "boolean" }, "automaticScaling": { @@ -3671,6 +3671,10 @@ "description": "The path or name of the app's main executable.", "type": "string" }, + "serviceAccount": { + "description": "The identity that the deployed version will run as. Admin API will use the App Engine Appspot service account as default if this field is neither provided in app.yaml file nor through CLI flag.", + "type": "string" + }, "servingStatus": { "description": "Current serving status of this version. Only the versions with a SERVING status create instances and can be billed.SERVING_STATUS_UNSPECIFIED is an invalid value. Defaults to SERVING.", "enum": [ diff --git a/discovery/area120tables-v1alpha1.json b/discovery/area120tables-v1alpha1.json index 7eb951f3db8..e0b55b8efdb 100644 --- a/discovery/area120tables-v1alpha1.json +++ b/discovery/area120tables-v1alpha1.json @@ -6,7 +6,7 @@ "description": "See, edit, create, and delete all of your Google Drive files" }, "https://www.googleapis.com/auth/drive.file": { - "description": "View and manage Google Drive files and folders that you have opened or created with this app" + "description": "See, edit, create, and delete only the specific Google Drive files you use with this app" }, "https://www.googleapis.com/auth/drive.readonly": { "description": "See and download all your Google Drive files" @@ -406,7 +406,7 @@ ], "parameters": { "filter": { - "description": "Optional. Raw text query to search for in rows of the table. Special characters must be escaped. Logical operators and field specific filtering not supported.", + "description": "Optional. Filter to only include resources matching the requirements. For more information, see [Filtering list results](https://support.google.com/area120-tables/answer/10503371).", "location": "query", "type": "string" }, @@ -576,7 +576,7 @@ } } }, - "revision": "20210306", + "revision": "20210322", "rootUrl": "https://area120tables.googleapis.com/", "schemas": { "BatchCreateRowsRequest": { diff --git a/discovery/artifactregistry-v1beta1.json b/discovery/artifactregistry-v1beta1.json index fa6e451f4e8..c395c307048 100644 --- a/discovery/artifactregistry-v1beta1.json +++ b/discovery/artifactregistry-v1beta1.json @@ -148,7 +148,7 @@ ], "parameters": { "filter": { - "description": "The standard list 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" }, @@ -160,13 +160,13 @@ "type": "string" }, "pageSize": { - "description": "The standard list page size.", + "description": "The maximum number of results to return. If not set, the service will select a default.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "The standard list page token.", + "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" } @@ -971,7 +971,7 @@ } } }, - "revision": "20210302", + "revision": "20210317", "rootUrl": "https://artifactregistry.googleapis.com/", "schemas": { "Binding": { diff --git a/discovery/artifactregistry-v1beta2.json b/discovery/artifactregistry-v1beta2.json index 720c7f185b8..9801f39eed9 100644 --- a/discovery/artifactregistry-v1beta2.json +++ b/discovery/artifactregistry-v1beta2.json @@ -148,7 +148,7 @@ ], "parameters": { "filter": { - "description": "The standard list 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" }, @@ -160,13 +160,13 @@ "type": "string" }, "pageSize": { - "description": "The standard list page size.", + "description": "The maximum number of results to return. If not set, the service will select a default.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "The standard list page token.", + "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" } @@ -971,7 +971,7 @@ } } }, - "revision": "20210302", + "revision": "20210317", "rootUrl": "https://artifactregistry.googleapis.com/", "schemas": { "Binding": { diff --git a/discovery/assuredworkloads-v1.json b/discovery/assuredworkloads-v1.json index ddb47520de5..da0b63f3dc9 100644 --- a/discovery/assuredworkloads-v1.json +++ b/discovery/assuredworkloads-v1.json @@ -351,7 +351,7 @@ } } }, - "revision": "20210304", + "revision": "20210312", "rootUrl": "https://assuredworkloads.googleapis.com/", "schemas": { "GoogleCloudAssuredworkloadsV1CreateWorkloadOperationMetadata": { @@ -644,6 +644,13 @@ "description": "Input only. The parent resource for the resources managed by this Assured Workload. May be either an organization or a folder. Must be the same or a child of the Workload parent. If not specified all resources are created under the Workload parent. Formats: folders/{folder_id} organizations/{organization_id}", "type": "string" }, + "resourceSettings": { + "description": "Input only. Resource properties that are used to customize workload resources. These properties (such as custom project id) will be used to create workload resources if possible. This field is optional.", + "items": { + "$ref": "GoogleCloudAssuredworkloadsV1beta1WorkloadResourceSettings" + }, + "type": "array" + }, "resources": { "description": "Output only. The resources associated with this workload. These resources will be created when creating the workload. If any of the projects already exist, the workload creation will fail. Always read only.", "items": { @@ -742,6 +749,31 @@ }, "type": "object" }, + "GoogleCloudAssuredworkloadsV1beta1WorkloadResourceSettings": { + "description": "Represent the custom settings for the resources to be created.", + "id": "GoogleCloudAssuredworkloadsV1beta1WorkloadResourceSettings", + "properties": { + "resourceId": { + "description": "Resource identifier. For a project this represents project_id. If the project is already taken, the workload creation will fail.", + "type": "string" + }, + "resourceType": { + "description": "Indicates the type of resource. This field should be specified to correspond the id to the right project type (CONSUMER_PROJECT or ENCRYPTION_KEYS_PROJECT)", + "enum": [ + "RESOURCE_TYPE_UNSPECIFIED", + "CONSUMER_PROJECT", + "ENCRYPTION_KEYS_PROJECT" + ], + "enumDescriptions": [ + "Unknown resource type.", + "Consumer project.", + "Consumer project containing encryption keys." + ], + "type": "string" + } + }, + "type": "object" + }, "GoogleLongrunningListOperationsResponse": { "description": "The response message for Operations.ListOperations.", "id": "GoogleLongrunningListOperationsResponse", diff --git a/discovery/bigquery-v2.json b/discovery/bigquery-v2.json index 87c0c86d0bd..beef4def479 100644 --- a/discovery/bigquery-v2.json +++ b/discovery/bigquery-v2.json @@ -1670,7 +1670,7 @@ } } }, - "revision": "20210219", + "revision": "20210303", "rootUrl": "https://bigquery.googleapis.com/", "schemas": { "AggregateClassificationMetrics": { @@ -3714,6 +3714,10 @@ "description": "[Optional] Specifies whether the job is allowed to create new tables. The following values are supported: CREATE_IF_NEEDED: If the table does not exist, BigQuery creates the table. CREATE_NEVER: The table must already exist. If it does not, a 'notFound' error is returned in the job result. The default value is CREATE_IF_NEEDED. Creation, truncation and append actions occur as one atomic update upon job completion.", "type": "string" }, + "createSession": { + "description": "If true, creates a new session, where session id will be a server generated random id. If false, runs query with an existing session_id passed in ConnectionProperty, otherwise runs query in non-session mode.", + "type": "boolean" + }, "defaultDataset": { "$ref": "DatasetReference", "description": "[Optional] Specifies the default dataset to use for unqualified table names in the query. Note that this does not alter behavior of unqualified dataset names." @@ -4365,6 +4369,11 @@ "Model": { "id": "Model", "properties": { + "bestTrialId": { + "description": "The best trial_id across all training runs.", + "format": "int64", + "type": "string" + }, "creationTime": { "description": "Output only. The time when this model was created, in millisecs since the epoch.", "format": "int64", @@ -4768,6 +4777,10 @@ }, "type": "array" }, + "createSession": { + "description": "If true, creates a new session, where session id will be a server generated random id. If false, runs query with an existing session_id passed in ConnectionProperty, otherwise runs query in non-session mode.", + "type": "boolean" + }, "defaultDataset": { "$ref": "DatasetReference", "description": "[Optional] Specifies the default datasetId and projectId to assume for any unqualified table names in the query. If not set, all table names in the query string must be qualified in the format 'datasetId.tableId'." @@ -5100,6 +5113,10 @@ "readOnly": true, "type": "string" }, + "returnTableType": { + "$ref": "StandardSqlTableType", + "description": "Optional. Set only if Routine is a \"TABLE_VALUED_FUNCTION\". TODO(b/173344646) - Update return_type documentation to say it cannot be set for TABLE_VALUED_FUNCTION before preview launch." + }, "returnType": { "$ref": "StandardSqlDataType", "description": "Optional if language = \"SQL\"; required otherwise. If absent, the return type is inferred from definition_body at query time in each query that references this routine. If present, then the evaluated result will be cast to the specified returned type at query time. For example, for the functions created with the following statements: * `CREATE FUNCTION Add(x FLOAT64, y FLOAT64) RETURNS FLOAT64 AS (x + y);` * `CREATE FUNCTION Increment(x FLOAT64) AS (Add(x, 1));` * `CREATE FUNCTION Decrement(x FLOAT64) RETURNS FLOAT64 AS (Add(x, -1));` The return_type is `{type_kind: \"FLOAT64\"}` for `Add` and `Decrement`, and is absent for `Increment` (inferred as FLOAT64 at query time). Suppose the function `Add` is replaced by `CREATE OR REPLACE FUNCTION Add(x INT64, y INT64) AS (x + y);` Then the inferred return type of `Increment` is automatically changed to INT64 at query time, while the return type of `Decrement` remains FLOAT64." @@ -5113,12 +5130,14 @@ "enum": [ "ROUTINE_TYPE_UNSPECIFIED", "SCALAR_FUNCTION", - "PROCEDURE" + "PROCEDURE", + "TABLE_VALUED_FUNCTION" ], "enumDescriptions": [ "", "Non-builtin permanent scalar function.", - "Stored procedure." + "Stored procedure.", + "Non-builtin permanent TVF." ], "type": "string" } @@ -5387,6 +5406,20 @@ }, "type": "object" }, + "StandardSqlTableType": { + "description": "A table type", + "id": "StandardSqlTableType", + "properties": { + "columns": { + "description": "The columns in this table type", + "items": { + "$ref": "StandardSqlField" + }, + "type": "array" + } + }, + "type": "object" + }, "Streamingbuffer": { "id": "Streamingbuffer", "properties": { diff --git a/discovery/bigquerydatatransfer-v1.json b/discovery/bigquerydatatransfer-v1.json index 79260e78a74..4761294e1b0 100644 --- a/discovery/bigquerydatatransfer-v1.json +++ b/discovery/bigquerydatatransfer-v1.json @@ -258,7 +258,7 @@ ], "parameters": { "filter": { - "description": "The standard list 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" }, @@ -270,13 +270,13 @@ "type": "string" }, "pageSize": { - "description": "The standard list page size.", + "description": "The maximum number of results to return. If not set, the service will select a default.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "The standard list page token.", + "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" } @@ -1301,7 +1301,7 @@ } } }, - "revision": "20210226", + "revision": "20210311", "rootUrl": "https://bigquerydatatransfer.googleapis.com/", "schemas": { "CheckValidCredsRequest": { diff --git a/discovery/calendar-v3.json b/discovery/calendar-v3.json index d8bef961982..f0453086a52 100644 --- a/discovery/calendar-v3.json +++ b/discovery/calendar-v3.json @@ -1723,7 +1723,7 @@ } } }, - "revision": "20210222", + "revision": "20210320", "rootUrl": "https://www.googleapis.com/", "schemas": { "Acl": { @@ -1764,7 +1764,7 @@ "type": "string" }, "id": { - "description": "Identifier of the ACL rule.", + "description": "Identifier of the Access Control List (ACL) rule. See Sharing calendars.", "type": "string" }, "kind": { @@ -1788,7 +1788,7 @@ "calendar.acl.update" ] }, - "description": "The scope of the rule.", + "description": "The extent to which calendar access is granted by this ACL rule.", "properties": { "type": { "annotations": { diff --git a/discovery/chat-v1.json b/discovery/chat-v1.json index 6dd9e30e0f3..612bfb6a9a7 100644 --- a/discovery/chat-v1.json +++ b/discovery/chat-v1.json @@ -548,7 +548,6 @@ ], "parameters": { "name": { - "description": "Resource name, in the form \"spaces/*/messages/*\". Example: spaces/AAAAMpdlehY/messages/UMxbHmzDlr4.UMxbHmzDlr4", "location": "path", "pattern": "^spaces/[^/]+/messages/[^/]+$", "required": true, @@ -602,7 +601,7 @@ } } }, - "revision": "20210227", + "revision": "20210314", "rootUrl": "https://chat.googleapis.com/", "schemas": { "ActionParameter": { @@ -1267,7 +1266,6 @@ "type": "string" }, "name": { - "description": "Resource name, in the form \"spaces/*/messages/*\". Example: spaces/AAAAMpdlehY/messages/UMxbHmzDlr4.UMxbHmzDlr4", "type": "string" }, "previewText": { @@ -1342,7 +1340,7 @@ "type": "object" }, "SlashCommand": { - "description": "A Slash Command in Hangouts Chat.", + "description": "A Slash Command in Chat.", "id": "SlashCommand", "properties": { "commandId": { @@ -1465,7 +1463,7 @@ "type": "object" }, "User": { - "description": "A user in Hangouts Chat.", + "description": "A user in Google Chat.", "id": "User", "properties": { "displayName": { @@ -1477,7 +1475,7 @@ "type": "string" }, "isAnonymous": { - "description": "True when the user is deleted or the user's proifle is not visible.", + "description": "True when the user is deleted or the user's profile is not visible.", "type": "boolean" }, "name": { diff --git a/discovery/chromemanagement-v1.json b/discovery/chromemanagement-v1.json index e4b288efb5f..b214f46ac37 100644 --- a/discovery/chromemanagement-v1.json +++ b/discovery/chromemanagement-v1.json @@ -12,7 +12,7 @@ "baseUrl": "https://chromemanagement.googleapis.com/", "batchPath": "batch", "canonicalName": "Chrome Management", - "description": "The Chrome Management API is a suite of services that allows Chrome administrators to view, manage and gain insights on their Chrome OS The Chrome Management API is a suite of services that allows GSuite domain administrators to view, manage and gain insights on their Chrome OS and Chrome Browser devices and users.", + "description": "The Chrome Management API is a suite of services that allows Chrome administrators to view, manage and gain insights on their Chrome OS and Chrome Browser devices.", "discoveryVersion": "v1", "documentationLink": "http://developers.google.com/chrome/management/", "fullyEncodeReservedExpansion": true, @@ -254,7 +254,7 @@ "type": "string" }, "orderBy": { - "description": "Field used to order results. Supported order by fields: * machine_name * device_id", + "description": "Field used to order results. Supported order by fields: * machine * device_id", "location": "query", "type": "string" }, @@ -288,7 +288,7 @@ } } }, - "revision": "20210307", + "revision": "20210322", "rootUrl": "https://chromemanagement.googleapis.com/", "schemas": { "GoogleChromeManagementV1BrowserVersion": { diff --git a/discovery/cloudasset-v1.json b/discovery/cloudasset-v1.json index 52c9b85f461..70f8e826c27 100644 --- a/discovery/cloudasset-v1.json +++ b/discovery/cloudasset-v1.json @@ -570,7 +570,7 @@ } } }, - "revision": "20210226", + "revision": "20210312", "rootUrl": "https://cloudasset.googleapis.com/", "schemas": { "AccessSelector": { @@ -609,6 +609,12 @@ }, "type": "object" }, + "AnalyzeIamPolicyLongrunningResponse": { + "description": "A response message for AssetService.AnalyzeIamPolicyLongrunning.", + "id": "AnalyzeIamPolicyLongrunningResponse", + "properties": {}, + "type": "object" + }, "AnalyzeIamPolicyResponse": { "description": "A response message for AssetService.AnalyzeIamPolicy.", "id": "AnalyzeIamPolicyResponse", diff --git a/discovery/cloudasset-v1beta1.json b/discovery/cloudasset-v1beta1.json index 45781a27f58..bf48e0f90cd 100644 --- a/discovery/cloudasset-v1beta1.json +++ b/discovery/cloudasset-v1beta1.json @@ -411,9 +411,15 @@ } } }, - "revision": "20210226", + "revision": "20210312", "rootUrl": "https://cloudasset.googleapis.com/", "schemas": { + "AnalyzeIamPolicyLongrunningResponse": { + "description": "A response message for AssetService.AnalyzeIamPolicyLongrunning.", + "id": "AnalyzeIamPolicyLongrunningResponse", + "properties": {}, + "type": "object" + }, "Asset": { "description": "An asset in Google Cloud. An asset can be any resource in the Google Cloud [resource hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), a resource outside the Google Cloud resource hierarchy (such as Google Kubernetes Engine clusters and objects), or a policy (e.g. Cloud IAM policy). See [Supported asset types](https://cloud.google.com/asset-inventory/docs/supported-asset-types) for more information.", "id": "Asset", diff --git a/discovery/cloudasset-v1p1beta1.json b/discovery/cloudasset-v1p1beta1.json index 3040d5b13f5..7e897158389 100644 --- a/discovery/cloudasset-v1p1beta1.json +++ b/discovery/cloudasset-v1p1beta1.json @@ -207,9 +207,15 @@ } } }, - "revision": "20210226", + "revision": "20210312", "rootUrl": "https://cloudasset.googleapis.com/", "schemas": { + "AnalyzeIamPolicyLongrunningResponse": { + "description": "A response message for AssetService.AnalyzeIamPolicyLongrunning.", + "id": "AnalyzeIamPolicyLongrunningResponse", + "properties": {}, + "type": "object" + }, "AuditConfig": { "description": "Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { \"audit_configs\": [ { \"service\": \"allServices\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\" }, { \"log_type\": \"ADMIN_READ\" } ] }, { \"service\": \"sampleservice.googleapis.com\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\" }, { \"log_type\": \"DATA_WRITE\", \"exempted_members\": [ \"user:aliya@example.com\" ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging.", "id": "AuditConfig", diff --git a/discovery/cloudasset-v1p4beta1.json b/discovery/cloudasset-v1p4beta1.json index db8427107bd..65c59d9d4c8 100644 --- a/discovery/cloudasset-v1p4beta1.json +++ b/discovery/cloudasset-v1p4beta1.json @@ -221,7 +221,7 @@ } } }, - "revision": "20210226", + "revision": "20210312", "rootUrl": "https://cloudasset.googleapis.com/", "schemas": { "AccessSelector": { @@ -245,6 +245,12 @@ }, "type": "object" }, + "AnalyzeIamPolicyLongrunningResponse": { + "description": "A response message for AssetService.AnalyzeIamPolicyLongrunning.", + "id": "AnalyzeIamPolicyLongrunningResponse", + "properties": {}, + "type": "object" + }, "AnalyzeIamPolicyResponse": { "description": "A response message for AssetService.AnalyzeIamPolicy.", "id": "AnalyzeIamPolicyResponse", diff --git a/discovery/cloudasset-v1p5beta1.json b/discovery/cloudasset-v1p5beta1.json index dacf5d4824d..f7cbe93ab90 100644 --- a/discovery/cloudasset-v1p5beta1.json +++ b/discovery/cloudasset-v1p5beta1.json @@ -177,9 +177,15 @@ } } }, - "revision": "20210226", + "revision": "20210312", "rootUrl": "https://cloudasset.googleapis.com/", "schemas": { + "AnalyzeIamPolicyLongrunningResponse": { + "description": "A response message for AssetService.AnalyzeIamPolicyLongrunning.", + "id": "AnalyzeIamPolicyLongrunningResponse", + "properties": {}, + "type": "object" + }, "Asset": { "description": "An asset in Google Cloud. An asset can be any resource in the Google Cloud [resource hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), a resource outside the Google Cloud resource hierarchy (such as Google Kubernetes Engine clusters and objects), or a policy (e.g. Cloud IAM policy). See [Supported asset types](https://cloud.google.com/asset-inventory/docs/supported-asset-types) for more information.", "id": "Asset", diff --git a/discovery/cloudasset-v1p7beta1.json b/discovery/cloudasset-v1p7beta1.json index a3bbd6ff1e5..5f0701a33ec 100644 --- a/discovery/cloudasset-v1p7beta1.json +++ b/discovery/cloudasset-v1p7beta1.json @@ -105,6 +105,35 @@ }, "protocol": "rest", "resources": { + "operations": { + "methods": { + "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": "v1p7beta1/{v1p7beta1Id}/{v1p7beta1Id1}/operations/{operationsId}/{operationsId1}", + "httpMethod": "GET", + "id": "cloudasset.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^[^/]+/[^/]+/operations/[^/]+/.*$", + "required": true, + "type": "string" + } + }, + "path": "v1p7beta1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "v1p7beta1": { "methods": { "exportAssets": { @@ -138,9 +167,15 @@ } } }, - "revision": "20210226", + "revision": "20210312", "rootUrl": "https://cloudasset.googleapis.com/", "schemas": { + "AnalyzeIamPolicyLongrunningResponse": { + "description": "A response message for AssetService.AnalyzeIamPolicyLongrunning.", + "id": "AnalyzeIamPolicyLongrunningResponse", + "properties": {}, + "type": "object" + }, "AuditConfig": { "description": "Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { \"audit_configs\": [ { \"service\": \"allServices\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\" }, { \"log_type\": \"ADMIN_READ\" } ] }, { \"service\": \"sampleservice.googleapis.com\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\" }, { \"log_type\": \"DATA_WRITE\", \"exempted_members\": [ \"user:aliya@example.com\" ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging.", "id": "AuditConfig", diff --git a/discovery/cloudbilling-v1.json b/discovery/cloudbilling-v1.json index e6523babbc1..6ab5ea49397 100644 --- a/discovery/cloudbilling-v1.json +++ b/discovery/cloudbilling-v1.json @@ -9,7 +9,7 @@ "description": "View your Google Cloud Platform billing accounts" }, "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" } } } @@ -114,7 +114,7 @@ "billingAccounts": { "methods": { "create": { - "description": "Creates a billing account. This method can only be used to create [billing subaccounts](https://cloud.google.com/billing/docs/concepts) by Google Cloud resellers. When creating a subaccount, the current authenticated user must have the `billing.accounts.update` IAM permission on the master account, which is typically given to billing account [administrators](https://cloud.google.com/billing/docs/how-to/billing-access). This method will return an error if the master account has not been provisioned as a reseller account.", + "description": "This method creates [billing subaccounts](https://cloud.google.com/billing/docs/concepts#subaccounts). Google Cloud resellers should use the Channel Services APIs, [accounts.customers.create](https://cloud.google.com/channel/docs/reference/rest/v1/accounts.customers/create) and [accounts.customers.entitlements.create](https://cloud.google.com/channel/docs/reference/rest/v1/accounts.customers.entitlements/create). When creating a subaccount, the current authenticated user must have the `billing.accounts.update` IAM permission on the parent account, which is typically given to billing account [administrators](https://cloud.google.com/billing/docs/how-to/billing-access). This method will return an error if the parent account has not been provisioned as a reseller account.", "flatPath": "v1/billingAccounts", "httpMethod": "POST", "id": "cloudbilling.billingAccounts.create", @@ -521,7 +521,7 @@ } } }, - "revision": "20201017", + "revision": "20210322", "rootUrl": "https://cloudbilling.googleapis.com/", "schemas": { "AggregationInfo": { @@ -619,7 +619,7 @@ "type": "string" }, "masterBillingAccount": { - "description": "If this account is a [subaccount](https://cloud.google.com/billing/docs/concepts), then this will be the resource name of the master billing account that it is being resold through. Otherwise this will be empty.", + "description": "If this account is a [subaccount](https://cloud.google.com/billing/docs/concepts), then this will be the resource name of the parent billing account that it is being resold through. Otherwise this will be empty.", "type": "string" }, "name": { diff --git a/discovery/cloudbuild-v1.json b/discovery/cloudbuild-v1.json index c7dbfa38746..bf4e7a88ce6 100644 --- a/discovery/cloudbuild-v1.json +++ b/discovery/cloudbuild-v1.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" } } } @@ -819,7 +819,7 @@ } } }, - "revision": "20210225", + "revision": "20210319", "rootUrl": "https://cloudbuild.googleapis.com/", "schemas": { "ArtifactObjects": { @@ -1997,6 +1997,10 @@ "storageSource": { "$ref": "StorageSource", "description": "If provided, get the source from this location in Google Cloud Storage." + }, + "storageSourceManifest": { + "$ref": "StorageSourceManifest", + "description": "If provided, get the source from this manifest in Google Cloud Storage. This feature is in Preview." } }, "type": "object" @@ -2020,6 +2024,10 @@ "resolvedStorageSource": { "$ref": "StorageSource", "description": "A copy of the build's `source.storage_source`, if exists, with any generations resolved." + }, + "resolvedStorageSourceManifest": { + "$ref": "StorageSourceManifest", + "description": "A copy of the build's `source.storage_source_manifest`, if exists, with any revisions resolved. This feature is in Preview." } }, "type": "object" @@ -2071,6 +2079,26 @@ }, "type": "object" }, + "StorageSourceManifest": { + "description": "Location of the source manifest in Google Cloud Storage. This feature is in Preview.", + "id": "StorageSourceManifest", + "properties": { + "bucket": { + "description": "Google Cloud Storage bucket containing the source manifest (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).", + "type": "string" + }, + "generation": { + "description": "Google Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used.", + "format": "int64", + "type": "string" + }, + "object": { + "description": "Google Cloud Storage object containing the source manifest. This object must be a JSON file.", + "type": "string" + } + }, + "type": "object" + }, "TimeSpan": { "description": "Start and end times for a build execution phase.", "id": "TimeSpan", diff --git a/discovery/cloudbuild-v1alpha1.json b/discovery/cloudbuild-v1alpha1.json index be6dcf8d5d5..470fe52ea49 100644 --- a/discovery/cloudbuild-v1alpha1.json +++ b/discovery/cloudbuild-v1alpha1.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" } } } @@ -306,7 +306,7 @@ } } }, - "revision": "20210225", + "revision": "20210319", "rootUrl": "https://cloudbuild.googleapis.com/", "schemas": { "ArtifactObjects": { @@ -1260,6 +1260,10 @@ "storageSource": { "$ref": "StorageSource", "description": "If provided, get the source from this location in Google Cloud Storage." + }, + "storageSourceManifest": { + "$ref": "StorageSourceManifest", + "description": "If provided, get the source from this manifest in Google Cloud Storage. This feature is in Preview." } }, "type": "object" @@ -1283,6 +1287,10 @@ "resolvedStorageSource": { "$ref": "StorageSource", "description": "A copy of the build's `source.storage_source`, if exists, with any generations resolved." + }, + "resolvedStorageSourceManifest": { + "$ref": "StorageSourceManifest", + "description": "A copy of the build's `source.storage_source_manifest`, if exists, with any revisions resolved. This feature is in Preview." } }, "type": "object" @@ -1334,6 +1342,26 @@ }, "type": "object" }, + "StorageSourceManifest": { + "description": "Location of the source manifest in Google Cloud Storage. This feature is in Preview.", + "id": "StorageSourceManifest", + "properties": { + "bucket": { + "description": "Google Cloud Storage bucket containing the source manifest (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).", + "type": "string" + }, + "generation": { + "description": "Google Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used.", + "format": "int64", + "type": "string" + }, + "object": { + "description": "Google Cloud Storage object containing the source manifest. This object must be a JSON file.", + "type": "string" + } + }, + "type": "object" + }, "TimeSpan": { "description": "Start and end times for a build execution phase.", "id": "TimeSpan", diff --git a/discovery/cloudbuild-v1alpha2.json b/discovery/cloudbuild-v1alpha2.json index 7736d497b58..6881c6c9238 100644 --- a/discovery/cloudbuild-v1alpha2.json +++ b/discovery/cloudbuild-v1alpha2.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" } } } @@ -317,7 +317,7 @@ } } }, - "revision": "20210225", + "revision": "20210319", "rootUrl": "https://cloudbuild.googleapis.com/", "schemas": { "ArtifactObjects": { @@ -1263,6 +1263,10 @@ "storageSource": { "$ref": "StorageSource", "description": "If provided, get the source from this location in Google Cloud Storage." + }, + "storageSourceManifest": { + "$ref": "StorageSourceManifest", + "description": "If provided, get the source from this manifest in Google Cloud Storage. This feature is in Preview." } }, "type": "object" @@ -1286,6 +1290,10 @@ "resolvedStorageSource": { "$ref": "StorageSource", "description": "A copy of the build's `source.storage_source`, if exists, with any generations resolved." + }, + "resolvedStorageSourceManifest": { + "$ref": "StorageSourceManifest", + "description": "A copy of the build's `source.storage_source_manifest`, if exists, with any revisions resolved. This feature is in Preview." } }, "type": "object" @@ -1337,6 +1345,26 @@ }, "type": "object" }, + "StorageSourceManifest": { + "description": "Location of the source manifest in Google Cloud Storage. This feature is in Preview.", + "id": "StorageSourceManifest", + "properties": { + "bucket": { + "description": "Google Cloud Storage bucket containing the source manifest (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).", + "type": "string" + }, + "generation": { + "description": "Google Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used.", + "format": "int64", + "type": "string" + }, + "object": { + "description": "Google Cloud Storage object containing the source manifest. This object must be a JSON file.", + "type": "string" + } + }, + "type": "object" + }, "TimeSpan": { "description": "Start and end times for a build execution phase.", "id": "TimeSpan", diff --git a/discovery/cloudbuild-v1beta1.json b/discovery/cloudbuild-v1beta1.json new file mode 100644 index 00000000000..8dbe226764b --- /dev/null +++ b/discovery/cloudbuild-v1beta1.json @@ -0,0 +1,1482 @@ +{ + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "See, edit, configure, and delete your Google Cloud Platform data" + } + } + } + }, + "basePath": "", + "baseUrl": "https://cloudbuild.googleapis.com/", + "batchPath": "batch", + "canonicalName": "Cloud Build", + "description": "Creates and manages builds on Google Cloud Platform.", + "discoveryVersion": "v1", + "documentationLink": "https://cloud.google.com/cloud-build/docs/", + "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": "cloudbuild:v1beta1", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://cloudbuild.mtls.googleapis.com/", + "name": "cloudbuild", + "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": { + "resources": { + "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": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", + "httpMethod": "POST", + "id": "cloudbuild.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": "v1beta1/{+name}:cancel", + "request": { + "$ref": "CancelOperationRequest" + }, + "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": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "cloudbuild.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": "v1beta1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "workerPools": { + "methods": { + "create": { + "description": "Creates a `WorkerPool` to run the builds, and returns the new worker pool. NOTE: As of now, this method returns an `Operation` that is always complete.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/workerPools", + "httpMethod": "POST", + "id": "cloudbuild.projects.locations.workerPools.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent resource where this worker pool will be created. Format: `projects/{project}/locations/{location}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "workerPoolId": { + "description": "Required. Immutable. The ID to use for the `WorkerPool`, which will become the final component of the resource name. This value should be 1-63 characters, and valid characters are /a-z-/.", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+parent}/workerPools", + "request": { + "$ref": "WorkerPool" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a `WorkerPool`. NOTE: As of now, this method returns an `Operation` that is always complete.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/workerPools/{workerPoolsId}", + "httpMethod": "DELETE", + "id": "cloudbuild.projects.locations.workerPools.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the `WorkerPool` to delete. Format: `projects/{project}/locations/{workerPool}/workerPools/{workerPool}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/workerPools/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Returns details of a `WorkerPool`.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/workerPools/{workerPoolsId}", + "httpMethod": "GET", + "id": "cloudbuild.projects.locations.workerPools.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the `WorkerPool` to retrieve. Format: `projects/{project}/locations/{location}/workerPools/{workerPool}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/workerPools/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "WorkerPool" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists `WorkerPool`s in the given project.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/workerPools", + "httpMethod": "GET", + "id": "cloudbuild.projects.locations.workerPools.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent of the collection of `WorkerPools`. Format: `projects/{project}/locations/location`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/workerPools", + "response": { + "$ref": "ListWorkerPoolsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a `WorkerPool`. NOTE: As of now, this method returns an `Operation` that is always complete.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/workerPools/{workerPoolsId}", + "httpMethod": "PATCH", + "id": "cloudbuild.projects.locations.workerPools.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. The resource name of the `WorkerPool`, with format `projects/{project}/locations/{location}/workerPools/{worker_pool}`. The value of `{worker_pool}` is provided by `worker_pool_id` in `CreateWorkerPool` request and the value of `{location}` is determined by the endpoint accessed.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/workerPools/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "A mask specifying which fields in `WorkerPool` to update.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "request": { + "$ref": "WorkerPool" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + } + }, + "revision": "20210319", + "rootUrl": "https://cloudbuild.googleapis.com/", + "schemas": { + "ArtifactObjects": { + "description": "Files in the workspace to upload to Cloud Storage upon successful completion of all build steps.", + "id": "ArtifactObjects", + "properties": { + "location": { + "description": "Cloud Storage bucket and optional object path, in the form \"gs://bucket/path/to/somewhere/\". (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). Files in the workspace matching any path pattern will be uploaded to Cloud Storage with this location as a prefix.", + "type": "string" + }, + "paths": { + "description": "Path globs used to match files in the build's workspace.", + "items": { + "type": "string" + }, + "type": "array" + }, + "timing": { + "$ref": "TimeSpan", + "description": "Output only. Stores timing information for pushing all artifact objects.", + "readOnly": true + } + }, + "type": "object" + }, + "ArtifactResult": { + "description": "An artifact that was uploaded during a build. This is a single record in the artifact manifest JSON file.", + "id": "ArtifactResult", + "properties": { + "fileHash": { + "description": "The file hash of the artifact.", + "items": { + "$ref": "FileHashes" + }, + "type": "array" + }, + "location": { + "description": "The path of an artifact in a Google Cloud Storage bucket, with the generation number. For example, `gs://mybucket/path/to/output.jar#generation`.", + "type": "string" + } + }, + "type": "object" + }, + "Artifacts": { + "description": "Artifacts produced by a build that should be uploaded upon successful completion of all build steps.", + "id": "Artifacts", + "properties": { + "images": { + "description": "A list of images to be pushed upon the successful completion of all build steps. The images will be pushed using the builder service account's credentials. The digests of the pushed images will be stored in the Build resource's results field. If any of the images fail to be pushed, the build is marked FAILURE.", + "items": { + "type": "string" + }, + "type": "array" + }, + "objects": { + "$ref": "ArtifactObjects", + "description": "A list of objects to be uploaded to Cloud Storage upon successful completion of all build steps. Files in the workspace matching specified paths globs will be uploaded to the specified Cloud Storage location using the builder service account's credentials. The location and generation of the uploaded objects will be stored in the Build resource's results field. If any objects fail to be pushed, the build is marked FAILURE." + } + }, + "type": "object" + }, + "Build": { + "description": "A build resource in the Cloud Build API. At a high level, a `Build` describes where to find source code, how to build it (for example, the builder image to run on the source), and where to store the built artifacts. Fields can include the following variables, which will be expanded when the build is created: - $PROJECT_ID: the project ID of the build. - $PROJECT_NUMBER: the project number of the build. - $BUILD_ID: the autogenerated ID of the build. - $REPO_NAME: the source repository name specified by RepoSource. - $BRANCH_NAME: the branch name specified by RepoSource. - $TAG_NAME: the tag name specified by RepoSource. - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or resolved from the specified branch or tag. - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA.", + "id": "Build", + "properties": { + "artifacts": { + "$ref": "Artifacts", + "description": "Artifacts produced by the build that should be uploaded upon successful completion of all build steps." + }, + "availableSecrets": { + "$ref": "Secrets", + "description": "Secrets and secret environment variables." + }, + "buildTriggerId": { + "description": "Output only. The ID of the `BuildTrigger` that triggered this build, if it was triggered automatically.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. Time at which the request to create the build was received.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "finishTime": { + "description": "Output only. Time at which execution of the build was finished. The difference between finish_time and start_time is the duration of the build's execution.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "id": { + "description": "Output only. Unique identifier of the build.", + "readOnly": true, + "type": "string" + }, + "images": { + "description": "A list of images to be pushed upon the successful completion of all build steps. The images are pushed using the builder service account's credentials. The digests of the pushed images will be stored in the `Build` resource's results field. If any of the images fail to be pushed, the build status is marked `FAILURE`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "logUrl": { + "description": "Output only. URL to logs for this build in Google Cloud Console.", + "readOnly": true, + "type": "string" + }, + "logsBucket": { + "description": "Google Cloud Storage bucket where logs should be written (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.", + "type": "string" + }, + "name": { + "description": "Output only. The 'Build' name with format: `projects/{project}/locations/{location}/builds/{build}`, where {build} is a unique identifier generated by the service.", + "readOnly": true, + "type": "string" + }, + "options": { + "$ref": "BuildOptions", + "description": "Special options for this build." + }, + "projectId": { + "description": "Output only. ID of the project.", + "readOnly": true, + "type": "string" + }, + "queueTtl": { + "description": "TTL in queue for this build. If provided and the build is enqueued longer than this value, the build will expire and the build status will be `EXPIRED`. The TTL starts ticking from create_time.", + "format": "google-duration", + "type": "string" + }, + "results": { + "$ref": "Results", + "description": "Output only. Results of the build.", + "readOnly": true + }, + "secrets": { + "description": "Secrets to decrypt using Cloud Key Management Service. Note: Secret Manager is the recommended technique for managing sensitive data with Cloud Build. Use `available_secrets` to configure builds to access secrets from Secret Manager. For instructions, see: https://cloud.google.com/cloud-build/docs/securing-builds/use-secrets", + "items": { + "$ref": "Secret" + }, + "type": "array" + }, + "serviceAccount": { + "description": "IAM service account whose credentials will be used at build runtime. Must be of the format `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. ACCOUNT can be email address or uniqueId of the service account. This field is in beta.", + "type": "string" + }, + "source": { + "$ref": "Source", + "description": "The location of the source files to build." + }, + "sourceProvenance": { + "$ref": "SourceProvenance", + "description": "Output only. A permanent fixed identifier for source.", + "readOnly": true + }, + "startTime": { + "description": "Output only. Time at which execution of the build was started.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "status": { + "description": "Output only. Status of the build.", + "enum": [ + "STATUS_UNKNOWN", + "QUEUED", + "WORKING", + "SUCCESS", + "FAILURE", + "INTERNAL_ERROR", + "TIMEOUT", + "CANCELLED", + "EXPIRED" + ], + "enumDescriptions": [ + "Status of the build is unknown.", + "Build or step is queued; work has not yet begun.", + "Build or step is being executed.", + "Build or step finished successfully.", + "Build or step failed to complete successfully.", + "Build or step failed due to an internal cause.", + "Build or step took longer than was allowed.", + "Build or step was canceled by a user.", + "Build was enqueued for longer than the value of `queue_ttl`." + ], + "readOnly": true, + "type": "string" + }, + "statusDetail": { + "description": "Output only. Customer-readable message about the current status.", + "readOnly": true, + "type": "string" + }, + "steps": { + "description": "Required. The operations to be performed on the workspace.", + "items": { + "$ref": "BuildStep" + }, + "type": "array" + }, + "substitutions": { + "additionalProperties": { + "type": "string" + }, + "description": "Substitutions data for `Build` resource.", + "type": "object" + }, + "tags": { + "description": "Tags for annotation of a `Build`. These are not docker tags.", + "items": { + "type": "string" + }, + "type": "array" + }, + "timeout": { + "description": "Amount of time that this build should be allowed to run, to second granularity. If this amount of time elapses, work on the build will cease and the build status will be `TIMEOUT`. `timeout` starts ticking from `startTime`. Default time is ten minutes.", + "format": "google-duration", + "type": "string" + }, + "timing": { + "additionalProperties": { + "$ref": "TimeSpan" + }, + "description": "Output only. Stores timing information for phases of the build. Valid keys are: * BUILD: time to execute all build steps * PUSH: time to push all specified images. * FETCHSOURCE: time to fetch source. If the build does not specify source or images, these keys will not be included.", + "readOnly": true, + "type": "object" + } + }, + "type": "object" + }, + "BuildOperationMetadata": { + "description": "Metadata for build operations.", + "id": "BuildOperationMetadata", + "properties": { + "build": { + "$ref": "Build", + "description": "The build that the operation is tracking." + } + }, + "type": "object" + }, + "BuildOptions": { + "description": "Optional arguments to enable specific features of builds.", + "id": "BuildOptions", + "properties": { + "diskSizeGb": { + "description": "Requested disk size for the VM that runs the build. Note that this is *NOT* \"disk free\"; some of the space will be used by the operating system and build utilities. Also note that this is the minimum disk size that will be allocated for the build -- the build may run with a larger disk than requested. At present, the maximum disk size is 1000GB; builds that request more than the maximum are rejected with an error.", + "format": "int64", + "type": "string" + }, + "dynamicSubstitutions": { + "description": "Option to specify whether or not to apply bash style string operations to the substitutions. NOTE: this is always enabled for triggered builds and cannot be overridden in the build configuration file.", + "type": "boolean" + }, + "env": { + "description": "A list of global environment variable definitions that will exist for all build steps in this build. If a variable is defined in both globally and in a build step, the variable will use the build step value. The elements are of the form \"KEY=VALUE\" for the environment variable \"KEY\" being given the value \"VALUE\".", + "items": { + "type": "string" + }, + "type": "array" + }, + "logStreamingOption": { + "description": "Option to define build log streaming behavior to Google Cloud Storage.", + "enum": [ + "STREAM_DEFAULT", + "STREAM_ON", + "STREAM_OFF" + ], + "enumDescriptions": [ + "Service may automatically determine build log streaming behavior.", + "Build logs should be streamed to Google Cloud Storage.", + "Build logs should not be streamed to Google Cloud Storage; they will be written when the build is completed." + ], + "type": "string" + }, + "logging": { + "description": "Option to specify the logging mode, which determines if and where build logs are stored.", + "enum": [ + "LOGGING_UNSPECIFIED", + "LEGACY", + "GCS_ONLY", + "STACKDRIVER_ONLY", + "CLOUD_LOGGING_ONLY", + "NONE" + ], + "enumDescriptions": [ + "The service determines the logging mode. The default is `LEGACY`. Do not rely on the default logging behavior as it may change in the future.", + "Cloud Logging and Cloud Storage logging are enabled.", + "Only Cloud Storage logging is enabled.", + "This option is the same as CLOUD_LOGGING_ONLY.", + "Only Cloud Logging is enabled. Note that logs for both the Cloud Console UI and Cloud SDK are based on Cloud Storage logs, so neither will provide logs if this option is chosen.", + "Turn off all logging. No build logs will be captured." + ], + "type": "string" + }, + "machineType": { + "description": "Compute Engine machine type on which to run the build.", + "enum": [ + "UNSPECIFIED", + "N1_HIGHCPU_8", + "N1_HIGHCPU_32", + "E2_HIGHCPU_8", + "E2_HIGHCPU_32" + ], + "enumDescriptions": [ + "Standard machine type.", + "Highcpu machine with 8 CPUs.", + "Highcpu machine with 32 CPUs.", + "Highcpu e2 machine with 8 CPUs.", + "Highcpu e2 machine with 32 CPUs." + ], + "type": "string" + }, + "requestedVerifyOption": { + "description": "Requested verifiability options.", + "enum": [ + "NOT_VERIFIED", + "VERIFIED" + ], + "enumDescriptions": [ + "Not a verifiable build. (default)", + "Verified build." + ], + "type": "string" + }, + "secretEnv": { + "description": "A list of global environment variables, which are encrypted using a Cloud Key Management Service crypto key. These values must be specified in the build's `Secret`. These variables will be available to all build steps in this build.", + "items": { + "type": "string" + }, + "type": "array" + }, + "sourceProvenanceHash": { + "description": "Requested hash for SourceProvenance.", + "items": { + "enum": [ + "NONE", + "SHA256", + "MD5" + ], + "enumDescriptions": [ + "No hash requested.", + "Use a sha256 hash.", + "Use a md5 hash." + ], + "type": "string" + }, + "type": "array" + }, + "substitutionOption": { + "description": "Option to specify behavior when there is an error in the substitution checks. NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot be overridden in the build configuration file.", + "enum": [ + "MUST_MATCH", + "ALLOW_LOOSE" + ], + "enumDescriptions": [ + "Fails the build if error in substitutions checks, like missing a substitution in the template or in the map.", + "Do not fail the build if error in substitutions checks." + ], + "type": "string" + }, + "volumes": { + "description": "Global list of volumes to mount for ALL build steps Each volume is created as an empty volume prior to starting the build process. Upon completion of the build, volumes and their contents are discarded. Global volume names and paths cannot conflict with the volumes defined a build step. Using a global volume in a build with only one step is not valid as it is indicative of a build request with an incorrect configuration.", + "items": { + "$ref": "Volume" + }, + "type": "array" + }, + "workerPool": { + "description": "Option to specify a `WorkerPool` for the build. Format: projects/{project}/locations/{location}/workerPools/{workerPool} This field is in beta and is available only to restricted users.", + "type": "string" + } + }, + "type": "object" + }, + "BuildStep": { + "description": "A step in the build pipeline.", + "id": "BuildStep", + "properties": { + "args": { + "description": "A list of arguments that will be presented to the step when it is started. If the image used to run the step's container has an entrypoint, the `args` are used as arguments to that entrypoint. If the image does not define an entrypoint, the first element in args is used as the entrypoint, and the remainder will be used as arguments.", + "items": { + "type": "string" + }, + "type": "array" + }, + "dir": { + "description": "Working directory to use when running this step's container. If this value is a relative path, it is relative to the build's working directory. If this value is absolute, it may be outside the build's working directory, in which case the contents of the path may not be persisted across build step executions, unless a `volume` for that path is specified. If the build specifies a `RepoSource` with `dir` and a step with a `dir`, which specifies an absolute path, the `RepoSource` `dir` is ignored for the step's execution.", + "type": "string" + }, + "entrypoint": { + "description": "Entrypoint to be used instead of the build step image's default entrypoint. If unset, the image's default entrypoint is used.", + "type": "string" + }, + "env": { + "description": "A list of environment variable definitions to be used when running a step. The elements are of the form \"KEY=VALUE\" for the environment variable \"KEY\" being given the value \"VALUE\".", + "items": { + "type": "string" + }, + "type": "array" + }, + "id": { + "description": "Unique identifier for this build step, used in `wait_for` to reference this build step as a dependency.", + "type": "string" + }, + "name": { + "description": "Required. The name of the container image that will run this particular build step. If the image is available in the host's Docker daemon's cache, it will be run directly. If not, the host will attempt to pull the image first, using the builder service account's credentials if necessary. The Docker daemon's cache will already have the latest versions of all of the officially supported build steps ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)). The Docker daemon will also have cached many of the layers for some popular images, like \"ubuntu\", \"debian\", but they will be refreshed at the time you attempt to use them. If you built an image in a previous build step, it will be stored in the host's Docker daemon's cache and is available to use as the name for a later build step.", + "type": "string" + }, + "pullTiming": { + "$ref": "TimeSpan", + "description": "Output only. Stores timing information for pulling this build step's builder image only.", + "readOnly": true + }, + "secretEnv": { + "description": "A list of environment variables which are encrypted using a Cloud Key Management Service crypto key. These values must be specified in the build's `Secret`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "status": { + "description": "Output only. Status of the build step. At this time, build step status is only updated on build completion; step status is not updated in real-time as the build progresses.", + "enum": [ + "STATUS_UNKNOWN", + "QUEUED", + "WORKING", + "SUCCESS", + "FAILURE", + "INTERNAL_ERROR", + "TIMEOUT", + "CANCELLED", + "EXPIRED" + ], + "enumDescriptions": [ + "Status of the build is unknown.", + "Build or step is queued; work has not yet begun.", + "Build or step is being executed.", + "Build or step finished successfully.", + "Build or step failed to complete successfully.", + "Build or step failed due to an internal cause.", + "Build or step took longer than was allowed.", + "Build or step was canceled by a user.", + "Build was enqueued for longer than the value of `queue_ttl`." + ], + "readOnly": true, + "type": "string" + }, + "timeout": { + "description": "Time limit for executing this build step. If not defined, the step has no time limit and will be allowed to continue to run until either it completes or the build itself times out.", + "format": "google-duration", + "type": "string" + }, + "timing": { + "$ref": "TimeSpan", + "description": "Output only. Stores timing information for executing this build step.", + "readOnly": true + }, + "volumes": { + "description": "List of volumes to mount into the build step. Each volume is created as an empty volume prior to execution of the build step. Upon completion of the build, volumes and their contents are discarded. Using a named volume in only one step is not valid as it is indicative of a build request with an incorrect configuration.", + "items": { + "$ref": "Volume" + }, + "type": "array" + }, + "waitFor": { + "description": "The ID(s) of the step(s) that this build step depends on. This build step will not start until all the build steps in `wait_for` have completed successfully. If `wait_for` is empty, this build step will start when all previous build steps in the `Build.Steps` list have completed successfully.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "BuiltImage": { + "description": "An image built by the pipeline.", + "id": "BuiltImage", + "properties": { + "digest": { + "description": "Docker Registry 2.0 digest.", + "type": "string" + }, + "name": { + "description": "Name used to push the container image to Google Container Registry, as presented to `docker push`.", + "type": "string" + }, + "pushTiming": { + "$ref": "TimeSpan", + "description": "Output only. Stores timing information for pushing the specified image.", + "readOnly": true + } + }, + "type": "object" + }, + "CancelOperationRequest": { + "description": "The request message for Operations.CancelOperation.", + "id": "CancelOperationRequest", + "properties": {}, + "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "id": "Empty", + "properties": {}, + "type": "object" + }, + "FileHashes": { + "description": "Container message for hashes of byte content of files, used in SourceProvenance messages to verify integrity of source input to the build.", + "id": "FileHashes", + "properties": { + "fileHash": { + "description": "Collection of file hashes.", + "items": { + "$ref": "Hash" + }, + "type": "array" + } + }, + "type": "object" + }, + "HTTPDelivery": { + "description": "HTTPDelivery is the delivery configuration for an HTTP notification.", + "id": "HTTPDelivery", + "properties": { + "uri": { + "description": "The URI to which JSON-containing HTTP POST requests should be sent.", + "type": "string" + } + }, + "type": "object" + }, + "Hash": { + "description": "Container message for hash values.", + "id": "Hash", + "properties": { + "type": { + "description": "The type of hash that was performed.", + "enum": [ + "NONE", + "SHA256", + "MD5" + ], + "enumDescriptions": [ + "No hash requested.", + "Use a sha256 hash.", + "Use a md5 hash." + ], + "type": "string" + }, + "value": { + "description": "The hash value.", + "format": "byte", + "type": "string" + } + }, + "type": "object" + }, + "InlineSecret": { + "description": "Pairs a set of secret environment variables mapped to encrypted values with the Cloud KMS key to use to decrypt the value.", + "id": "InlineSecret", + "properties": { + "envMap": { + "additionalProperties": { + "format": "byte", + "type": "string" + }, + "description": "Map of environment variable name to its encrypted value. Secret environment variables must be unique across all of a build's secrets, and must be used by at least one build step. Values can be at most 64 KB in size. There can be at most 100 secret values across all of a build's secrets.", + "type": "object" + }, + "kmsKeyName": { + "description": "Resource name of Cloud KMS crypto key to decrypt the encrypted value. In format: projects/*/locations/*/keyRings/*/cryptoKeys/*", + "type": "string" + } + }, + "type": "object" + }, + "ListWorkerPoolsResponse": { + "description": "Response containing existing `WorkerPools`.", + "id": "ListWorkerPoolsResponse", + "properties": { + "workerPools": { + "description": "`WorkerPools` for the specified project.", + "items": { + "$ref": "WorkerPool" + }, + "type": "array" + } + }, + "type": "object" + }, + "NetworkConfig": { + "description": "Network describes the network configuration for a `WorkerPool`.", + "id": "NetworkConfig", + "properties": { + "peeredNetwork": { + "description": "Required. Immutable. The network definition that the workers are peered to. If this section is left empty, the workers will be peered to `WorkerPool.project_id` on the service producer network. Must be in the format `projects/{project}/global/networks/{network}`, where `{project}` is a project number, such as `12345`, and `{network}` is the name of a VPC network in the project. See [Understanding network configuration options](https://cloud.google.com/cloud-build/docs/custom-workers/set-up-custom-worker-pool-environment#understanding_the_network_configuration_options)", + "type": "string" + } + }, + "type": "object" + }, + "Notification": { + "description": "Notification is the container which holds the data that is relevant to this particular notification.", + "id": "Notification", + "properties": { + "filter": { + "description": "The filter string to use for notification filtering. Currently, this is assumed to be a CEL program. See https://opensource.google/projects/cel for more.", + "type": "string" + }, + "httpDelivery": { + "$ref": "HTTPDelivery", + "description": "Configuration for HTTP delivery." + }, + "slackDelivery": { + "$ref": "SlackDelivery", + "description": "Configuration for Slack delivery." + }, + "smtpDelivery": { + "$ref": "SMTPDelivery", + "description": "Configuration for SMTP (email) delivery." + }, + "structDelivery": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Escape hatch for users to supply custom delivery configs.", + "type": "object" + } + }, + "type": "object" + }, + "NotifierConfig": { + "description": "NotifierConfig is the top-level configuration message.", + "id": "NotifierConfig", + "properties": { + "apiVersion": { + "description": "The API version of this configuration format.", + "type": "string" + }, + "kind": { + "description": "The type of notifier to use (e.g. SMTPNotifier).", + "type": "string" + }, + "metadata": { + "$ref": "NotifierMetadata", + "description": "Metadata for referring to/handling/deploying this notifier." + }, + "spec": { + "$ref": "NotifierSpec", + "description": "The actual configuration for this notifier." + } + }, + "type": "object" + }, + "NotifierMetadata": { + "description": "NotifierMetadata contains the data which can be used to reference or describe this notifier.", + "id": "NotifierMetadata", + "properties": { + "name": { + "description": "The human-readable and user-given name for the notifier. For example: \"repo-merge-email-notifier\".", + "type": "string" + }, + "notifier": { + "description": "The string representing the name and version of notifier to deploy. Expected to be of the form of \"/:\". For example: \"gcr.io/my-project/notifiers/smtp:1.2.34\".", + "type": "string" + } + }, + "type": "object" + }, + "NotifierSecret": { + "description": "NotifierSecret is the container that maps a secret name (reference) to its Google Cloud Secret Manager resource path.", + "id": "NotifierSecret", + "properties": { + "name": { + "description": "Name is the local name of the secret, such as the verbatim string \"my-smtp-password\".", + "type": "string" + }, + "value": { + "description": "Value is interpreted to be a resource path for fetching the actual (versioned) secret data for this secret. For example, this would be a Google Cloud Secret Manager secret version resource path like: \"projects/my-project/secrets/my-secret/versions/latest\".", + "type": "string" + } + }, + "type": "object" + }, + "NotifierSecretRef": { + "description": "NotifierSecretRef contains the reference to a secret stored in the corresponding NotifierSpec.", + "id": "NotifierSecretRef", + "properties": { + "secretRef": { + "description": "The value of `secret_ref` should be a `name` that is registered in a `Secret` in the `secrets` list of the `Spec`.", + "type": "string" + } + }, + "type": "object" + }, + "NotifierSpec": { + "description": "NotifierSpec is the configuration container for notifications.", + "id": "NotifierSpec", + "properties": { + "notification": { + "$ref": "Notification", + "description": "The configuration of this particular notifier." + }, + "secrets": { + "description": "Configurations for secret resources used by this particular notifier.", + "items": { + "$ref": "NotifierSecret" + }, + "type": "array" + } + }, + "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 response of the operation in case of success. 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" + }, + "RepoSource": { + "description": "Location of the source in a Google Cloud Source Repository.", + "id": "RepoSource", + "properties": { + "branchName": { + "description": "Regex matching branches to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax", + "type": "string" + }, + "commitSha": { + "description": "Explicit commit SHA to build.", + "type": "string" + }, + "dir": { + "description": "Directory, relative to the source root, in which to run the build. This must be a relative path. If a step's `dir` is specified and is an absolute path, this value is ignored for that step's execution.", + "type": "string" + }, + "invertRegex": { + "description": "Only trigger a build if the revision regex does NOT match the revision regex.", + "type": "boolean" + }, + "projectId": { + "description": "ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed.", + "type": "string" + }, + "repoName": { + "description": "Name of the Cloud Source Repository.", + "type": "string" + }, + "substitutions": { + "additionalProperties": { + "type": "string" + }, + "description": "Substitutions to use in a triggered build. Should only be used with RunBuildTrigger", + "type": "object" + }, + "tagName": { + "description": "Regex matching tags to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax", + "type": "string" + } + }, + "type": "object" + }, + "Results": { + "description": "Artifacts created by the build pipeline.", + "id": "Results", + "properties": { + "artifactManifest": { + "description": "Path to the artifact manifest. Only populated when artifacts are uploaded.", + "type": "string" + }, + "artifactTiming": { + "$ref": "TimeSpan", + "description": "Time to push all non-container artifacts." + }, + "buildStepImages": { + "description": "List of build step digests, in the order corresponding to build step indices.", + "items": { + "type": "string" + }, + "type": "array" + }, + "buildStepOutputs": { + "description": "List of build step outputs, produced by builder images, in the order corresponding to build step indices. [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders) can produce this output by writing to `$BUILDER_OUTPUT/output`. Only the first 4KB of data is stored.", + "items": { + "format": "byte", + "type": "string" + }, + "type": "array" + }, + "images": { + "description": "Container images that were built as a part of the build.", + "items": { + "$ref": "BuiltImage" + }, + "type": "array" + }, + "numArtifacts": { + "description": "Number of artifacts uploaded. Only populated when artifacts are uploaded.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "SMTPDelivery": { + "description": "SMTPDelivery is the delivery configuration for an SMTP (email) notification.", + "id": "SMTPDelivery", + "properties": { + "fromAddress": { + "description": "This is the SMTP account/email that appears in the `From:` of the email. If empty, it is assumed to be sender.", + "type": "string" + }, + "password": { + "$ref": "NotifierSecretRef", + "description": "The SMTP sender's password." + }, + "port": { + "description": "The SMTP port of the server.", + "type": "string" + }, + "recipientAddresses": { + "description": "This is the list of addresses to which we send the email (i.e. in the `To:` of the email).", + "items": { + "type": "string" + }, + "type": "array" + }, + "senderAddress": { + "description": "This is the SMTP account/email that is used to send the message.", + "type": "string" + }, + "server": { + "description": "The address of the SMTP server.", + "type": "string" + } + }, + "type": "object" + }, + "Secret": { + "description": "Pairs a set of secret environment variables containing encrypted values with the Cloud KMS key to use to decrypt the value. Note: Use `kmsKeyName` with `available_secrets` instead of using `kmsKeyName` with `secret`. For instructions see: https://cloud.google.com/cloud-build/docs/securing-builds/use-encrypted-credentials.", + "id": "Secret", + "properties": { + "kmsKeyName": { + "description": "Cloud KMS key name to use to decrypt these envs.", + "type": "string" + }, + "secretEnv": { + "additionalProperties": { + "format": "byte", + "type": "string" + }, + "description": "Map of environment variable name to its encrypted value. Secret environment variables must be unique across all of a build's secrets, and must be used by at least one build step. Values can be at most 64 KB in size. There can be at most 100 secret values across all of a build's secrets.", + "type": "object" + } + }, + "type": "object" + }, + "SecretManagerSecret": { + "description": "Pairs a secret environment variable with a SecretVersion in Secret Manager.", + "id": "SecretManagerSecret", + "properties": { + "env": { + "description": "Environment variable name to associate with the secret. Secret environment variables must be unique across all of a build's secrets, and must be used by at least one build step.", + "type": "string" + }, + "versionName": { + "description": "Resource name of the SecretVersion. In format: projects/*/secrets/*/versions/*", + "type": "string" + } + }, + "type": "object" + }, + "Secrets": { + "description": "Secrets and secret environment variables.", + "id": "Secrets", + "properties": { + "inline": { + "description": "Secrets encrypted with KMS key and the associated secret environment variable.", + "items": { + "$ref": "InlineSecret" + }, + "type": "array" + }, + "secretManager": { + "description": "Secrets in Secret Manager and associated secret environment variable.", + "items": { + "$ref": "SecretManagerSecret" + }, + "type": "array" + } + }, + "type": "object" + }, + "SlackDelivery": { + "description": "SlackDelivery is the delivery configuration for delivering Slack messages via webhooks. See Slack webhook documentation at: https://api.slack.com/messaging/webhooks.", + "id": "SlackDelivery", + "properties": { + "webhookUri": { + "$ref": "NotifierSecretRef", + "description": "The secret reference for the Slack webhook URI for sending messages to a channel." + } + }, + "type": "object" + }, + "Source": { + "description": "Location of the source in a supported storage service.", + "id": "Source", + "properties": { + "repoSource": { + "$ref": "RepoSource", + "description": "If provided, get the source from this location in a Cloud Source Repository." + }, + "storageSource": { + "$ref": "StorageSource", + "description": "If provided, get the source from this location in Google Cloud Storage." + }, + "storageSourceManifest": { + "$ref": "StorageSourceManifest", + "description": "If provided, get the source from this manifest in Google Cloud Storage. This feature is in Preview." + } + }, + "type": "object" + }, + "SourceProvenance": { + "description": "Provenance of the source. Ways to find the original source, or verify that some source was used for this build.", + "id": "SourceProvenance", + "properties": { + "fileHashes": { + "additionalProperties": { + "$ref": "FileHashes" + }, + "description": "Output only. Hash(es) of the build source, which can be used to verify that the original source integrity was maintained in the build. Note that `FileHashes` will only be populated if `BuildOptions` has requested a `SourceProvenanceHash`. The keys to this map are file paths used as build source and the values contain the hash values for those files. If the build source came in a single package such as a gzipped tarfile (`.tar.gz`), the `FileHash` will be for the single path to that file.", + "readOnly": true, + "type": "object" + }, + "resolvedRepoSource": { + "$ref": "RepoSource", + "description": "A copy of the build's `source.repo_source`, if exists, with any revisions resolved." + }, + "resolvedStorageSource": { + "$ref": "StorageSource", + "description": "A copy of the build's `source.storage_source`, if exists, with any generations resolved." + }, + "resolvedStorageSourceManifest": { + "$ref": "StorageSourceManifest", + "description": "A copy of the build's `source.storage_source_manifest`, if exists, with any revisions resolved. This feature is in Preview." + } + }, + "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" + }, + "StorageSource": { + "description": "Location of the source in an archive file in Google Cloud Storage.", + "id": "StorageSource", + "properties": { + "bucket": { + "description": "Google Cloud Storage bucket containing the source (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).", + "type": "string" + }, + "generation": { + "description": "Google Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used.", + "format": "int64", + "type": "string" + }, + "object": { + "description": "Google Cloud Storage object containing the source. This object must be a gzipped archive file (`.tar.gz`) containing source to build.", + "type": "string" + } + }, + "type": "object" + }, + "StorageSourceManifest": { + "description": "Location of the source manifest in Google Cloud Storage. This feature is in Preview.", + "id": "StorageSourceManifest", + "properties": { + "bucket": { + "description": "Google Cloud Storage bucket containing the source manifest (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).", + "type": "string" + }, + "generation": { + "description": "Google Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used.", + "format": "int64", + "type": "string" + }, + "object": { + "description": "Google Cloud Storage object containing the source manifest. This object must be a JSON file.", + "type": "string" + } + }, + "type": "object" + }, + "TimeSpan": { + "description": "Start and end times for a build execution phase.", + "id": "TimeSpan", + "properties": { + "endTime": { + "description": "End of time span.", + "format": "google-datetime", + "type": "string" + }, + "startTime": { + "description": "Start of time span.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "Volume": { + "description": "Volume describes a Docker container volume which is mounted into build steps in order to persist files across build step execution.", + "id": "Volume", + "properties": { + "name": { + "description": "Name of the volume to mount. Volume names must be unique per build step and must be valid names for Docker volumes. Each named volume must be used by at least two build steps.", + "type": "string" + }, + "path": { + "description": "Path at which to mount the volume. Paths must be absolute and cannot conflict with other volume paths on the same build step or with certain reserved volume paths.", + "type": "string" + } + }, + "type": "object" + }, + "WorkerConfig": { + "description": "Defines the configuration to be used for creating workers in the pool.", + "id": "WorkerConfig", + "properties": { + "diskSizeGb": { + "description": "Size of the disk attached to the worker, in GB. See [Worker pool config file](https://cloud.google.com/cloud-build/docs/custom-workers/worker-pool-config-file). Specify a value of up to 1000. If `0` is specified, Cloud Build will use a standard disk size.", + "format": "int64", + "type": "string" + }, + "machineType": { + "description": "Machine type of a worker, such as `n1-standard-1`. See [Worker pool config file](https://cloud.google.com/cloud-build/docs/custom-workers/worker-pool-config-file). If left blank, Cloud Build will use `n1-standard-1`.", + "type": "string" + }, + "noExternalIp": { + "description": "If true, workers are created without any public address, which prevents network egress to public IPs.", + "type": "boolean" + } + }, + "type": "object" + }, + "WorkerPool": { + "description": "Configuration for a `WorkerPool` to run the builds. Workers provide a build environment where Cloud Build runs your builds. Cloud Build owns and maintains a pool of workers for general use. By default, when you submit a build, Cloud Build uses one of the workers from this pool. Builds that run in the default worker pool have access to the public internet. If your build needs access to resources on a private network, create and use a `WorkerPool` to run your builds. Custom `WorkerPool`s give your builds access to any single VPC network that you administer, including any on-prem resources connected to that VPC network. For an overview of custom worker pools, see [Custom workers overview](https://cloud.google.com/cloud-build/docs/custom-workers/custom-workers-overview).", + "id": "WorkerPool", + "properties": { + "createTime": { + "description": "Output only. Time at which the request to create the `WorkerPool` was received.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "deleteTime": { + "description": "Output only. Time at which the request to delete the `WorkerPool` was received.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Output only. The resource name of the `WorkerPool`, with format `projects/{project}/locations/{location}/workerPools/{worker_pool}`. The value of `{worker_pool}` is provided by `worker_pool_id` in `CreateWorkerPool` request and the value of `{location}` is determined by the endpoint accessed.", + "readOnly": true, + "type": "string" + }, + "networkConfig": { + "$ref": "NetworkConfig", + "description": "Network configuration for the `WorkerPool`." + }, + "state": { + "description": "Output only. `WorkerPool` state.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "RUNNING", + "DELETING", + "DELETED" + ], + "enumDescriptions": [ + "State of the `WorkerPool` is unknown.", + "`WorkerPool` is being created.", + "`WorkerPool` is running.", + "`WorkerPool` is being deleted: cancelling builds and draining workers.", + "`WorkerPool` is deleted." + ], + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. Time at which the request to update the `WorkerPool` was received.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "workerConfig": { + "$ref": "WorkerConfig", + "description": "Worker configuration for the `WorkerPool`." + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "Cloud Build API", + "version": "v1beta1", + "version_module": true +} \ No newline at end of file diff --git a/discovery/cloudchannel-v1.json b/discovery/cloudchannel-v1.json index c4d7d565882..91ab1a9d0fb 100644 --- a/discovery/cloudchannel-v1.json +++ b/discovery/cloudchannel-v1.json @@ -108,7 +108,7 @@ "accounts": { "methods": { "checkCloudIdentityAccountsExist": { - "description": "Confirms the existence of Cloud Identity accounts, based on the domain and whether the Cloud Identity accounts are owned by the reseller. Possible Error Codes: * PERMISSION_DENIED: If the reseller account making the request and the reseller account being queried for are different. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. * INVALID_VALUE: Invalid domain value in the request. Return Value: List of CloudIdentityCustomerAccount resources for the domain. List may be empty. Note: in the v1alpha1 version of the API, a NOT_FOUND error is returned if no CloudIdentityCustomerAccount resources match the domain.", + "description": "Confirms the existence of Cloud Identity accounts based on the domain and if the Cloud Identity accounts are owned by the reseller. Possible error codes: * PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * INVALID_VALUE: Invalid domain value in the request. Return value: A list of CloudIdentityCustomerAccount resources for the domain (may be empty) Note: in the v1alpha1 version of the API, a NOT_FOUND error returns if no CloudIdentityCustomerAccount resources match the domain.", "flatPath": "v1/accounts/{accountsId}:checkCloudIdentityAccountsExist", "httpMethod": "POST", "id": "cloudchannel.accounts.checkCloudIdentityAccountsExist", @@ -117,7 +117,7 @@ ], "parameters": { "parent": { - "description": "Required. The resource name of the reseller account. The parent takes the format: accounts/{account_id}", + "description": "Required. The reseller account's resource name. Parent uses the format: accounts/{account_id}", "location": "path", "pattern": "^accounts/[^/]+$", "required": true, @@ -136,7 +136,7 @@ ] }, "listSubscribers": { - "description": "Lists service accounts with subscriber privileges on the Cloud Pub/Sub topic created for this Channel Services account. Possible Error Codes: * PERMISSION_DENIED: If the reseller account making the request and the reseller account being provided are different, or if the account is not a super admin. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. * NOT_FOUND: If the topic resource doesn't exist. * INTERNAL: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support. Return Value: List of service email addresses if successful, otherwise error is returned.", + "description": "Lists service accounts with subscriber privileges on the Cloud Pub/Sub topic created for this Channel Services account. Possible error codes: * PERMISSION_DENIED: The reseller account making the request and the provided reseller account are different, or the impersonated user is not a super admin. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: The topic resource doesn't exist. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: A list of service email addresses.", "flatPath": "v1/accounts/{accountsId}:listSubscribers", "httpMethod": "GET", "id": "cloudchannel.accounts.listSubscribers", @@ -152,7 +152,7 @@ "type": "string" }, "pageSize": { - "description": "Optional. The maximum number of service accounts to return. The service may return fewer than this value. If unspecified, at most 100 service accounts will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + "description": "Optional. The maximum number of service accounts to return. The service may return fewer than this value. If unspecified, returns at most 100 service accounts. The maximum value is 1000; the server will coerce values above 1000.", "format": "int32", "location": "query", "type": "integer" @@ -172,7 +172,7 @@ ] }, "listTransferableOffers": { - "description": "List TransferableOffers of a customer based on Cloud Identity ID or Customer Name in the request. This method is used when a reseller gets the entitlement information of a customer that is not owned. The reseller should provide the customer's Cloud Identity ID or Customer Name. Possible Error Codes: * PERMISSION_DENIED: Appears because of one of the following: * If the customer doesn't belong to the reseller and no auth token or invalid auth token is supplied. * If the reseller account making the request and the reseller account being queried for are different. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. Return Value: List of TransferableOffer for the given customer and SKU.", + "description": "List TransferableOffers of a customer based on Cloud Identity ID or Customer Name in the request. Use this method when a reseller gets the entitlement information of an unowned customer. The reseller should provide the customer's Cloud Identity ID or Customer Name. Possible error codes: * PERMISSION_DENIED: * The customer doesn't belong to the reseller and has no auth token. * The supplied auth token is invalid. * The reseller account making the request is different from the reseller account in the query. * INVALID_ARGUMENT: Required request parameters are missing or invalid. Return value: List of TransferableOffer for the given customer and SKU.", "flatPath": "v1/accounts/{accountsId}:listTransferableOffers", "httpMethod": "POST", "id": "cloudchannel.accounts.listTransferableOffers", @@ -200,7 +200,7 @@ ] }, "listTransferableSkus": { - "description": "List TransferableSkus of a customer based on Cloud Identity ID or Customer Name in the request. This method is used when a reseller lists the entitlements information of a customer that is not owned. The reseller should provide the customer's Cloud Identity ID or Customer Name. Possible Error Codes: * PERMISSION_DENIED: Appears because of one of the following - * The customer doesn't belong to the reseller and no auth token. * The supplied auth token is invalid. * The reseller account making the request and the queries reseller account are different. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. Return Value: List of TransferableSku for the given customer.", + "description": "List TransferableSkus of a customer based on the Cloud Identity ID or Customer Name in the request. Use this method to list the entitlements information of an unowned customer. You should provide the customer's Cloud Identity ID or Customer Name. Possible error codes: * PERMISSION_DENIED: * The customer doesn't belong to the reseller and has no auth token. * The supplied auth token is invalid. * The reseller account making the request is different from the reseller account in the query. * INVALID_ARGUMENT: Required request parameters are missing or invalid. Return value: A list of the customer's TransferableSku.", "flatPath": "v1/accounts/{accountsId}:listTransferableSkus", "httpMethod": "POST", "id": "cloudchannel.accounts.listTransferableSkus", @@ -209,7 +209,7 @@ ], "parameters": { "parent": { - "description": "Required. The resource name of the reseller's account. The parent takes the format: accounts/{account_id}", + "description": "Required. The reseller account's resource name. Parent uses the format: accounts/{account_id}", "location": "path", "pattern": "^accounts/[^/]+$", "required": true, @@ -228,7 +228,7 @@ ] }, "register": { - "description": "Registers a service account with subscriber privileges on the Cloud Pub/Sub topic created for this Channel Services account. Once you create a subscriber, you will get the events as per SubscriberEvent Possible Error Codes: * PERMISSION_DENIED: If the reseller account making the request and the reseller account being provided are different, or if the impersonated user is not a super admin. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. * INTERNAL: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support. Return Value: Topic name with service email address registered if successful, otherwise error is returned.", + "description": "Registers a service account with subscriber privileges on the Cloud Pub/Sub topic for this Channel Services account. After you create a subscriber, you get the events through SubscriberEvent Possible error codes: * PERMISSION_DENIED: The reseller account making the request and the provided reseller account are different, or the impersonated user is not a super admin. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: The topic name with the registered service email address.", "flatPath": "v1/accounts/{accountsId}:register", "httpMethod": "POST", "id": "cloudchannel.accounts.register", @@ -256,7 +256,7 @@ ] }, "unregister": { - "description": "Unregisters a service account with subscriber privileges on the Cloud Pub/Sub topic created for this Channel Services account. If there are no more service account left with sunbscriber privileges, the topic will be deleted. You can check this by calling ListSubscribers api. Possible Error Codes: * PERMISSION_DENIED: If the reseller account making the request and the reseller account being provided are different, or if the impersonated user is not a super admin. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. * NOT_FOUND: If the topic resource doesn't exist. * INTERNAL: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support. Return Value: Topic name from which service email address has been unregistered if successful, otherwise error is returned. If the service email was already not associated with the topic, the success response will be returned.", + "description": "Unregisters a service account with subscriber privileges on the Cloud Pub/Sub topic created for this Channel Services account. If there are no service accounts left with subscriber privileges, this deletes the topic. You can call ListSubscribers to check for these accounts. Possible error codes: * PERMISSION_DENIED: The reseller account making the request and the provided reseller account are different, or the impersonated user is not a super admin. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: The topic resource doesn't exist. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: The topic name that unregistered the service email address. Returns a success response if the service email address wasn't registered with the topic.", "flatPath": "v1/accounts/{accountsId}:unregister", "httpMethod": "POST", "id": "cloudchannel.accounts.unregister", @@ -288,7 +288,7 @@ "channelPartnerLinks": { "methods": { "create": { - "description": "Initiates a channel partner link between a distributor and a reseller or between resellers in an n-tier reseller channel. To accept the invite, the invited partner should follow the invite_link_uri provided in the response. If the link creation is accepted, a valid link is set up between the two involved parties. To call this method, you must be a distributor. Possible Error Codes: * PERMISSION_DENIED: If the reseller account making the request and the reseller account being queried for are different. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. * ALREADY_EXISTS: If the ChannelPartnerLink sent in the request already exists. * NOT_FOUND: If no Cloud Identity customer exists for domain provided. * INTERNAL: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support. Return Value: Newly created ChannelPartnerLink resource if successful, otherwise error is returned.", + "description": "Initiates a channel partner link between a distributor and a reseller, or between resellers in an n-tier reseller channel. Invited partners need to follow the invite_link_uri provided in the response to accept. After accepting the invitation, a link is set up between the two parties. You must be a distributor to call this method. Possible error codes: * PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * ALREADY_EXISTS: The ChannelPartnerLink sent in the request already exists. * NOT_FOUND: No Cloud Identity customer exists for provided domain. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: The new ChannelPartnerLink resource.", "flatPath": "v1/accounts/{accountsId}/channelPartnerLinks", "httpMethod": "POST", "id": "cloudchannel.accounts.channelPartnerLinks.create", @@ -297,7 +297,7 @@ ], "parameters": { "parent": { - "description": "Required. The resource name of reseller's account for which to create a channel partner link. The parent takes the format: accounts/{account_id}", + "description": "Required. Create a channel partner link for the provided reseller account's resource name. Parent uses the format: accounts/{account_id}", "location": "path", "pattern": "^accounts/[^/]+$", "required": true, @@ -316,7 +316,7 @@ ] }, "get": { - "description": "Returns a requested ChannelPartnerLink resource. To call this method, you must be a distributor. Possible Error Codes: * PERMISSION_DENIED: If the reseller account making the request and the reseller account being queried for are different. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. * NOT_FOUND: ChannelPartnerLink resource not found. Results due invalid channel partner link name. Return Value: ChannelPartnerLink resource if found, otherwise returns an error.", + "description": "Returns a requested ChannelPartnerLink resource. You must be a distributor to call this method. Possible error codes: * PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: ChannelPartnerLink resource not found because of an invalid channel partner link name. Return value: The ChannelPartnerLink resource.", "flatPath": "v1/accounts/{accountsId}/channelPartnerLinks/{channelPartnerLinksId}", "httpMethod": "GET", "id": "cloudchannel.accounts.channelPartnerLinks.get", @@ -325,7 +325,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the channel partner link to retrieve. The name takes the format: accounts/{account_id}/channelPartnerLinks/{id} where {id} is the Cloud Identity ID of the partner.", + "description": "Required. The resource name of the channel partner link to retrieve. Name uses the format: accounts/{account_id}/channelPartnerLinks/{id} where {id} is the Cloud Identity ID of the partner.", "location": "path", "pattern": "^accounts/[^/]+/channelPartnerLinks/[^/]+$", "required": true, @@ -356,7 +356,7 @@ ] }, "list": { - "description": "List ChannelPartnerLinks belonging to a distributor. To call this method, you must be a distributor. Possible Error Codes: * PERMISSION_DENIED: If the reseller account making the request and the reseller account being queried for are different. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. Return Value: If successful, returns the list of ChannelPartnerLink resources for the distributor account, otherwise returns an error.", + "description": "List ChannelPartnerLinks belonging to a distributor. You must be a distributor to call this method. Possible error codes: * PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * INVALID_ARGUMENT: Required request parameters are missing or invalid. Return value: The list of the distributor account's ChannelPartnerLink resources.", "flatPath": "v1/accounts/{accountsId}/channelPartnerLinks", "httpMethod": "GET", "id": "cloudchannel.accounts.channelPartnerLinks.list", @@ -365,18 +365,18 @@ ], "parameters": { "pageSize": { - "description": "Optional. Requested page size. Server might return fewer results than requested. If unspecified, server will pick a default size (25). The maximum value is 200, values above 200 will be coerced to 200.", + "description": "Optional. Requested page size. Server might return fewer results than requested. If unspecified, server will pick a default size (25). The maximum value is 200; the server will coerce values above 200.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "Optional. A token identifying a page of results, if other than the first one. Typically obtained via ListChannelPartnerLinksResponse.next_page_token of the previous CloudChannelService.ListChannelPartnerLinks call.", + "description": "Optional. A token for a page of results other than the first page. Obtained using ListChannelPartnerLinksResponse.next_page_token of the previous CloudChannelService.ListChannelPartnerLinks call.", "location": "query", "type": "string" }, "parent": { - "description": "Required. The resource name of the reseller account for listing channel partner links. The parent takes the format: accounts/{account_id}", + "description": "Required. The resource name of the reseller account for listing channel partner links. Parent uses the format: accounts/{account_id}", "location": "path", "pattern": "^accounts/[^/]+$", "required": true, @@ -407,7 +407,7 @@ ] }, "patch": { - "description": "Updates a channel partner link. A distributor calls this method to change a link's status. For example, suspend a partner link. To call this method, you must be a distributor. Possible Error Codes: * PERMISSION_DENIED: If the reseller account making the request and the reseller account being queried for are different. * INVALID_ARGUMENT: It can happen in following scenarios - * Missing or invalid required parameters in the request. * Updating link state from invited to active or suspended. * Sending reseller_cloud_identity_id, invite_url or name in update mask. * NOT_FOUND: ChannelPartnerLink resource not found. * INTERNAL: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support. Return Value: If successful, the updated ChannelPartnerLink resource, otherwise returns an error.", + "description": "Updates a channel partner link. Distributors call this method to change a link's status. For example, to suspend a partner link. You must be a distributor to call this method. Possible error codes: * PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * INVALID_ARGUMENT: * Required request parameters are missing or invalid. * Link state cannot change from invited to active or suspended. * Cannot send reseller_cloud_identity_id, invite_url, or name in update mask. * NOT_FOUND: ChannelPartnerLink resource not found. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: The updated ChannelPartnerLink resource.", "flatPath": "v1/accounts/{accountsId}/channelPartnerLinks/{channelPartnerLinksId}", "httpMethod": "PATCH", "id": "cloudchannel.accounts.channelPartnerLinks.patch", @@ -416,7 +416,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the channel partner link to cancel. The name takes the format: accounts/{account_id}/channelPartnerLinks/{id} where {id} is the Cloud Identity ID of the partner.", + "description": "Required. The resource name of the channel partner link to cancel. Name uses the format: accounts/{account_id}/channelPartnerLinks/{id} where {id} is the Cloud Identity ID of the partner.", "location": "path", "pattern": "^accounts/[^/]+/channelPartnerLinks/[^/]+$", "required": true, @@ -434,12 +434,166 @@ "https://www.googleapis.com/auth/apps.order" ] } + }, + "resources": { + "customers": { + "methods": { + "create": { + "description": "Creates a new Customer resource under the reseller or distributor account. Possible error codes: * PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * INVALID_ARGUMENT: * Required request parameters are missing or invalid. * Domain field value doesn't match the primary email domain. Return value: The newly created Customer resource.", + "flatPath": "v1/accounts/{accountsId}/channelPartnerLinks/{channelPartnerLinksId}/customers", + "httpMethod": "POST", + "id": "cloudchannel.accounts.channelPartnerLinks.customers.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The resource name of reseller account in which to create the customer. Parent uses the format: accounts/{account_id}", + "location": "path", + "pattern": "^accounts/[^/]+/channelPartnerLinks/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/customers", + "request": { + "$ref": "GoogleCloudChannelV1Customer" + }, + "response": { + "$ref": "GoogleCloudChannelV1Customer" + }, + "scopes": [ + "https://www.googleapis.com/auth/apps.order" + ] + }, + "delete": { + "description": "Deletes the given Customer permanently and irreversibly. Possible error codes: * PERMISSION_DENIED: The account making the request does not own this customer. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * FAILED_PRECONDITION: The customer has existing entitlements. * NOT_FOUND: No Customer resource found for the name in the request.", + "flatPath": "v1/accounts/{accountsId}/channelPartnerLinks/{channelPartnerLinksId}/customers/{customersId}", + "httpMethod": "DELETE", + "id": "cloudchannel.accounts.channelPartnerLinks.customers.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the customer to delete.", + "location": "path", + "pattern": "^accounts/[^/]+/channelPartnerLinks/[^/]+/customers/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/apps.order" + ] + }, + "get": { + "description": "Returns a requested Customer resource. Possible error codes: * PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: The customer resource doesn't exist. Usually the result of an invalid name parameter. Return value: The Customer resource.", + "flatPath": "v1/accounts/{accountsId}/channelPartnerLinks/{channelPartnerLinksId}/customers/{customersId}", + "httpMethod": "GET", + "id": "cloudchannel.accounts.channelPartnerLinks.customers.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the customer to retrieve. Name uses the format: accounts/{account_id}/customers/{customer_id}", + "location": "path", + "pattern": "^accounts/[^/]+/channelPartnerLinks/[^/]+/customers/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleCloudChannelV1Customer" + }, + "scopes": [ + "https://www.googleapis.com/auth/apps.order" + ] + }, + "list": { + "description": "List Customers. Possible error codes: * PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * INVALID_ARGUMENT: Required request parameters are missing or invalid. Return value: List of Customers, or an empty list if there are no customers.", + "flatPath": "v1/accounts/{accountsId}/channelPartnerLinks/{channelPartnerLinksId}/customers", + "httpMethod": "GET", + "id": "cloudchannel.accounts.channelPartnerLinks.customers.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. The maximum number of customers to return. The service may return fewer than this value. If unspecified, returns at most 10 customers. The maximum value is 50.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A token identifying a page of results other than the first page. Obtained through ListCustomersResponse.next_page_token of the previous CloudChannelService.ListCustomers call.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the reseller account to list customers from. Parent uses the format: accounts/{account_id}.", + "location": "path", + "pattern": "^accounts/[^/]+/channelPartnerLinks/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/customers", + "response": { + "$ref": "GoogleCloudChannelV1ListCustomersResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/apps.order" + ] + }, + "patch": { + "description": "Updates an existing Customer resource for the reseller or distributor. Possible error codes: * PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: No Customer resource found for the name in the request. Return value: The updated Customer resource.", + "flatPath": "v1/accounts/{accountsId}/channelPartnerLinks/{channelPartnerLinksId}/customers/{customersId}", + "httpMethod": "PATCH", + "id": "cloudchannel.accounts.channelPartnerLinks.customers.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. Resource name of the customer. Format: accounts/{account_id}/customers/{customer_id}", + "location": "path", + "pattern": "^accounts/[^/]+/channelPartnerLinks/[^/]+/customers/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "The update mask that applies to the resource. Optional.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "GoogleCloudChannelV1Customer" + }, + "response": { + "$ref": "GoogleCloudChannelV1Customer" + }, + "scopes": [ + "https://www.googleapis.com/auth/apps.order" + ] + } + } + } } }, "customers": { "methods": { "create": { - "description": "Creates a new Customer resource under the reseller or distributor account. Possible Error Codes: * PERMISSION_DENIED: If the reseller account making the request and the reseller account being queried for are different. * INVALID_ARGUMENT: It can happen in following scenarios - * Missing or invalid required parameters in the request. * Domain field value doesn't match the domain specified in primary email. Return Value: If successful, the newly created Customer resource, otherwise returns an error.", + "description": "Creates a new Customer resource under the reseller or distributor account. Possible error codes: * PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * INVALID_ARGUMENT: * Required request parameters are missing or invalid. * Domain field value doesn't match the primary email domain. Return value: The newly created Customer resource.", "flatPath": "v1/accounts/{accountsId}/customers", "httpMethod": "POST", "id": "cloudchannel.accounts.customers.create", @@ -448,7 +602,7 @@ ], "parameters": { "parent": { - "description": "Required. The resource name of reseller account in which to create the customer. The parent takes the format: accounts/{account_id}", + "description": "Required. The resource name of reseller account in which to create the customer. Parent uses the format: accounts/{account_id}", "location": "path", "pattern": "^accounts/[^/]+$", "required": true, @@ -467,7 +621,7 @@ ] }, "delete": { - "description": "Deletes the given Customer permanently and irreversibly. Possible Error Codes: * PERMISSION_DENIED: If the account making the request does not own this customer. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. * FAILED_PRECONDITION: If the customer has existing entitlements. * NOT_FOUND: No Customer resource found for the name specified in the request.", + "description": "Deletes the given Customer permanently and irreversibly. Possible error codes: * PERMISSION_DENIED: The account making the request does not own this customer. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * FAILED_PRECONDITION: The customer has existing entitlements. * NOT_FOUND: No Customer resource found for the name in the request.", "flatPath": "v1/accounts/{accountsId}/customers/{customersId}", "httpMethod": "DELETE", "id": "cloudchannel.accounts.customers.delete", @@ -492,7 +646,7 @@ ] }, "get": { - "description": "Returns a requested Customer resource. Possible Error Codes: * PERMISSION_DENIED: If the reseller account making the request and the reseller account being queried for are different. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. * NOT_FOUND: If the customer resource doesn't exist. Usually the result of an invalid name parameter. Return Value: Customer resource if found, error otherwise.", + "description": "Returns a requested Customer resource. Possible error codes: * PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: The customer resource doesn't exist. Usually the result of an invalid name parameter. Return value: The Customer resource.", "flatPath": "v1/accounts/{accountsId}/customers/{customersId}", "httpMethod": "GET", "id": "cloudchannel.accounts.customers.get", @@ -501,7 +655,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the customer to retrieve. The name takes the format: accounts/{account_id}/customers/{customer_id}", + "description": "Required. The resource name of the customer to retrieve. Name uses the format: accounts/{account_id}/customers/{customer_id}", "location": "path", "pattern": "^accounts/[^/]+/customers/[^/]+$", "required": true, @@ -517,7 +671,7 @@ ] }, "list": { - "description": "List downstream Customers. Possible Error Codes: * PERMISSION_DENIED: If the reseller account making the request and the reseller account being queried for are different. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. Return Value: List of Customers pertaining to the reseller or empty list if there are none.", + "description": "List Customers. Possible error codes: * PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * INVALID_ARGUMENT: Required request parameters are missing or invalid. Return value: List of Customers, or an empty list if there are no customers.", "flatPath": "v1/accounts/{accountsId}/customers", "httpMethod": "GET", "id": "cloudchannel.accounts.customers.list", @@ -526,18 +680,18 @@ ], "parameters": { "pageSize": { - "description": "Optional. The maximum number of customers to return. The service may return fewer than this value. If unspecified, at most 10 customers will be returned. The maximum value is 50; values about 50 will be coerced to 50.", + "description": "Optional. The maximum number of customers to return. The service may return fewer than this value. If unspecified, returns at most 10 customers. The maximum value is 50.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "Optional. A token identifying a page of results, if other than the first one. Typically obtained via ListCustomersResponse.next_page_token of the previous CloudChannelService.ListCustomers call.", + "description": "Optional. A token identifying a page of results other than the first page. Obtained through ListCustomersResponse.next_page_token of the previous CloudChannelService.ListCustomers call.", "location": "query", "type": "string" }, "parent": { - "description": "Required. The resource name of the reseller account from which to list customers. The parent takes the format: accounts/{account_id}.", + "description": "Required. The resource name of the reseller account to list customers from. Parent uses the format: accounts/{account_id}.", "location": "path", "pattern": "^accounts/[^/]+$", "required": true, @@ -553,7 +707,7 @@ ] }, "listPurchasableOffers": { - "description": "Lists the Purchasable Offers for the following cases: * Offers that can be newly purchased for a customer * Offers that can be changed to, for an entitlement. Possible Error Codes: * PERMISSION_DENIED: If the customer doesn't belong to the reseller * INVALID_ARGUMENT: Missing or invalid required parameters in the request.", + "description": "Lists the following: * Offers that you can purchase for a customer. * Offers that you can change for an entitlement. Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller * INVALID_ARGUMENT: Required request parameters are missing or invalid.", "flatPath": "v1/accounts/{accountsId}/customers/{customersId}:listPurchasableOffers", "httpMethod": "GET", "id": "cloudchannel.accounts.customers.listPurchasableOffers", @@ -567,7 +721,7 @@ "type": "string" }, "changeOfferPurchase.newSku": { - "description": "Optional. Resource name of the SKU that is being changed to. Should be provided if upgrading or downgrading an entitlement. Format: products/{product_id}/skus/{sku_id}", + "description": "Optional. Resource name of the new target SKU. Provide this SKU when upgrading or downgrading an entitlement. Format: products/{product_id}/skus/{sku_id}", "location": "query", "type": "string" }, @@ -577,25 +731,25 @@ "type": "string" }, "customer": { - "description": "Required. The resource name of the customer for which to list Offers. Format: accounts/{account_id}/customers/{customer_id}.", + "description": "Required. The resource name of the customer to list Offers for. Format: accounts/{account_id}/customers/{customer_id}.", "location": "path", "pattern": "^accounts/[^/]+/customers/[^/]+$", "required": true, "type": "string" }, "languageCode": { - "description": "Optional. The BCP-47 language code, such as \"en-US\". If specified, the response will be localized to the corresponding language code. Default is \"en-US\".", + "description": "Optional. The BCP-47 language code. For example, \"en-US\". The response will localize in the corresponding language code, if specified. The default value is \"en-US\".", "location": "query", "type": "string" }, "pageSize": { - "description": "Optional. Requested page size. Server might return fewer results than requested. If unspecified, at most 100 Offers will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + "description": "Optional. Requested page size. Server might return fewer results than requested. If unspecified, returns at most 100 Offers. The maximum value is 1000; the server will coerce values above 1000.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "Optional. A token identifying a page of results, if other than the first one.", + "description": "Optional. A token for a page of results other than the first page.", "location": "query", "type": "string" } @@ -609,7 +763,7 @@ ] }, "listPurchasableSkus": { - "description": "Lists the Purchasable SKUs for following cases: * SKUs that can be newly purchased for a customer * SKUs that can be upgraded/downgraded to, for an entitlement. Possible Error Codes: * PERMISSION_DENIED: If the customer doesn't belong to the reseller * INVALID_ARGUMENT: Missing or invalid required parameters in the request.", + "description": "Lists the following: * SKUs that you can purchase for a customer * SKUs that you can upgrade or downgrade for an entitlement. Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid.", "flatPath": "v1/accounts/{accountsId}/customers/{customersId}:listPurchasableSkus", "httpMethod": "GET", "id": "cloudchannel.accounts.customers.listPurchasableSkus", @@ -643,25 +797,25 @@ "type": "string" }, "customer": { - "description": "Required. The resource name of the customer for which to list SKUs. Format: accounts/{account_id}/customers/{customer_id}.", + "description": "Required. The resource name of the customer to list SKUs for. Format: accounts/{account_id}/customers/{customer_id}.", "location": "path", "pattern": "^accounts/[^/]+/customers/[^/]+$", "required": true, "type": "string" }, "languageCode": { - "description": "Optional. The BCP-47 language code, such as \"en-US\". If specified, the response will be localized to the corresponding language code. Default is \"en-US\".", + "description": "Optional. The BCP-47 language code. For example, \"en-US\". The response will localize in the corresponding language code, if specified. The default value is \"en-US\".", "location": "query", "type": "string" }, "pageSize": { - "description": "Optional. Requested page size. Server might return fewer results than requested. If unspecified, at most 100 SKUs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + "description": "Optional. Requested page size. Server might return fewer results than requested. If unspecified, returns at most 100 SKUs. The maximum value is 1000; the server will coerce values above 1000.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "Optional. A token identifying a page of results, if other than the first one.", + "description": "Optional. A token for a page of results other than the first page.", "location": "query", "type": "string" } @@ -675,7 +829,7 @@ ] }, "patch": { - "description": "Updates an existing Customer resource belonging to the reseller or distributor. Possible Error Codes: * PERMISSION_DENIED: If the reseller account making the request and the reseller account being queried for are different. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. * NOT_FOUND: No Customer resource found for the name specified in the request. Return Value: If successful, the updated Customer resource, otherwise returns an error.", + "description": "Updates an existing Customer resource for the reseller or distributor. Possible error codes: * PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: No Customer resource found for the name in the request. Return value: The updated Customer resource.", "flatPath": "v1/accounts/{accountsId}/customers/{customersId}", "httpMethod": "PATCH", "id": "cloudchannel.accounts.customers.patch", @@ -709,7 +863,7 @@ ] }, "provisionCloudIdentity": { - "description": "Creates a Cloud Identity for the given customer using the customer's information or the information provided here, if present. Possible Error Codes: * PERMISSION_DENIED: If the customer doesn't belong to the reseller. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. * NOT_FOUND: If the customer is not found for the reseller. * ALREADY_EXISTS: If the customer's primary email already exists. In this case, retry after changing the customer's primary contact email. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support in this case. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support in this case. Return Value: Long Running Operation ID. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.", + "description": "Creates a Cloud Identity for the given customer using the customer's information, or the information provided here. Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: The customer was not found. * ALREADY_EXISTS: The customer's primary email already exists. Retry after changing the customer's primary contact email. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: The ID of a long-running operation. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata contains an instance of OperationMetadata.", "flatPath": "v1/accounts/{accountsId}/customers/{customersId}:provisionCloudIdentity", "httpMethod": "POST", "id": "cloudchannel.accounts.customers.provisionCloudIdentity", @@ -737,7 +891,7 @@ ] }, "transferEntitlements": { - "description": "Transfers customer entitlements to new reseller. Possible Error Codes: * PERMISSION_DENIED: If the customer doesn't belong to the reseller. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. * NOT_FOUND: If the customer or offer resource is not found for the reseller. * ALREADY_EXISTS: If the SKU has been already transferred for the customer. * CONDITION_NOT_MET or FAILED_PRECONDITION: This failure can happen in the following cases: * Transferring a SKU that requires domain verification and the domain has not been verified. * Transferring an Add-On SKU like Vault or Drive without transferring the pre-requisite SKU, such as G Suite Basic. * Applicable only for developer accounts: reseller and resold domain must follow the domain naming convention as follows: * Domain names must start with goog-test. * Resold domain names must include the reseller domain. * All transferring entitlements must be specified. * INTERNAL: Any non-user error related to a technical issue in the backend. Please contact Cloud Channel Support in this case. * UNKNOWN: Any non-user error related to a technical issue in the backend. Please contact Cloud Channel Support in this case. Return Value: Long Running Operation ID. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.", + "description": "Transfers customer entitlements to new reseller. Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: The customer or offer resource was not found. * ALREADY_EXISTS: The SKU was already transferred for the customer. * CONDITION_NOT_MET or FAILED_PRECONDITION: * The SKU requires domain verification to transfer, but the domain is not verified. * An Add-On SKU (example, Vault or Drive) is missing the pre-requisite SKU (example, G Suite Basic). * (Developer accounts only) Reseller and resold domain must meet the following naming requirements: * Domain names must start with goog-test. * Domain names must include the reseller domain. * Specify all transferring entitlements. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: The ID of a long-running operation. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.", "flatPath": "v1/accounts/{accountsId}/customers/{customersId}:transferEntitlements", "httpMethod": "POST", "id": "cloudchannel.accounts.customers.transferEntitlements", @@ -746,7 +900,7 @@ ], "parameters": { "parent": { - "description": "Required. The resource name of reseller's customer account where the entitlements transfer to. The parent takes the format: accounts/{account_id}/customers/{customer_id}", + "description": "Required. The resource name of the reseller's customer account that will receive transferred entitlements. Parent uses the format: accounts/{account_id}/customers/{customer_id}", "location": "path", "pattern": "^accounts/[^/]+/customers/[^/]+$", "required": true, @@ -765,7 +919,7 @@ ] }, "transferEntitlementsToGoogle": { - "description": "Transfers customer entitlements from current reseller to Google. Possible Error Codes: * PERMISSION_DENIED: If the customer doesn't belong to the reseller. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. * NOT_FOUND: If the customer or offer resource is not found for the reseller. * ALREADY_EXISTS: If the SKU has been already transferred for the customer. * CONDITION_NOT_MET or FAILED_PRECONDITION: This failure can happen in the following cases: * Transferring a SKU that requires domain verification and the domain has not been verified. * Transferring an Add-On SKU like Vault or Drive without purchasing the pre-requisite SKU, such as G Suite Basic. * Applicable only for developer accounts: reseller and resold domain must follow the domain naming convention as follows: * Domain names must start with goog-test. * Resold domain names must include the reseller domain. * INTERNAL: Any non-user error related to a technical issue in the backend. Please contact Cloud Channel Support in this case. * UNKNOWN: Any non-user error related to a technical issue in the backend. Please contact Cloud Channel Support in this case. Return Value: Long Running Operation ID. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The response will contain google.protobuf.Empty on success. The Operation metadata will contain an instance of OperationMetadata.", + "description": "Transfers customer entitlements from their current reseller to Google. Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: The customer or offer resource was not found. * ALREADY_EXISTS: The SKU was already transferred for the customer. * CONDITION_NOT_MET or FAILED_PRECONDITION: * The SKU requires domain verification to transfer, but the domain is not verified. * An Add-On SKU (example, Vault or Drive) is missing the pre-requisite SKU (example, G Suite Basic). * (Developer accounts only) Reseller and resold domain must meet the following naming requirements: * Domain names must start with goog-test. * Domain names must include the reseller domain. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: The ID of a long-running operation. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The response will contain google.protobuf.Empty on success. The Operation metadata will contain an instance of OperationMetadata.", "flatPath": "v1/accounts/{accountsId}/customers/{customersId}:transferEntitlementsToGoogle", "httpMethod": "POST", "id": "cloudchannel.accounts.customers.transferEntitlementsToGoogle", @@ -774,7 +928,7 @@ ], "parameters": { "parent": { - "description": "Required. The resource name of reseller's customer account where the entitlements transfer from. The parent takes the format: accounts/{account_id}/customers/{customer_id}", + "description": "Required. The resource name of the reseller's customer account where the entitlements transfer from. Parent uses the format: accounts/{account_id}/customers/{customer_id}", "location": "path", "pattern": "^accounts/[^/]+/customers/[^/]+$", "required": true, @@ -797,7 +951,7 @@ "entitlements": { "methods": { "activate": { - "description": "Activates a previously suspended entitlement. The entitlement must be in a suspended state for it to be activated. Entitlements suspended for pending ToS acceptance can't be activated using this method. An entitlement activation is a long-running operation and can result in updates to the state of the customer entitlement. Possible Error Codes: * PERMISSION_DENIED: If the customer doesn't belong to the reseller or if the reseller account making the request and reseller account being queried for are different. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. * NOT_FOUND: Entitlement resource not found. * SUSPENSION_NOT_RESELLER_INITIATED: Can't activate an entitlement that is pending TOS acceptance. Only reseller initiated suspensions can be activated. * NOT_SUSPENDED: Can't activate entitlements that are already in ACTIVE state. Can only activate suspended entitlements. * INTERNAL: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support. Return Value: Long Running Operation ID. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.", + "description": "Activates a previously suspended entitlement. Entitlements suspended for pending ToS acceptance can't be activated using this method. An entitlement activation is a long-running operation and it updates the state of the customer entitlement. Possible error codes: * PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: Entitlement resource not found. * SUSPENSION_NOT_RESELLER_INITIATED: Can only activate reseller-initiated suspensions and entitlements that have accepted the TOS. * NOT_SUSPENDED: Can only activate suspended entitlements not in an ACTIVE state. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: The ID of a long-running operation. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.", "flatPath": "v1/accounts/{accountsId}/customers/{customersId}/entitlements/{entitlementsId}:activate", "httpMethod": "POST", "id": "cloudchannel.accounts.customers.entitlements.activate", @@ -806,7 +960,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the entitlement to activate. The name takes the format: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}", + "description": "Required. The resource name of the entitlement to activate. Name uses the format: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}", "location": "path", "pattern": "^accounts/[^/]+/customers/[^/]+/entitlements/[^/]+$", "required": true, @@ -825,7 +979,7 @@ ] }, "cancel": { - "description": "Cancels a previously fulfilled entitlement. An entitlement cancellation is a long-running operation. Possible Error Codes: * PERMISSION_DENIED: If the customer doesn't belong to the reseller or if the reseller account making the request and reseller account being queried for are different. * FAILED_PRECONDITION: If there are any Google Cloud projects linked to the Google Cloud entitlement's Cloud Billing subaccount. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. * NOT_FOUND: Entitlement resource not found. * DELETION_TYPE_NOT_ALLOWED: Cancel is only allowed for Google Workspace add-ons or entitlements for Google Cloud's development platform. * INTERNAL: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support. Return Value: Long Running Operation ID. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The response will contain google.protobuf.Empty on success. The Operation metadata will contain an instance of OperationMetadata.", + "description": "Cancels a previously fulfilled entitlement. An entitlement cancellation is a long-running operation. Possible error codes: * PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * FAILED_PRECONDITION: There are Google Cloud projects linked to the Google Cloud entitlement's Cloud Billing subaccount. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: Entitlement resource not found. * DELETION_TYPE_NOT_ALLOWED: Cancel is only allowed for Google Workspace add-ons, or entitlements for Google Cloud's development platform. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: The ID of a long-running operation. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The response will contain google.protobuf.Empty on success. The Operation metadata will contain an instance of OperationMetadata.", "flatPath": "v1/accounts/{accountsId}/customers/{customersId}/entitlements/{entitlementsId}:cancel", "httpMethod": "POST", "id": "cloudchannel.accounts.customers.entitlements.cancel", @@ -834,7 +988,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the entitlement to cancel. The name takes the format: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}", + "description": "Required. The resource name of the entitlement to cancel. Name uses the format: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}", "location": "path", "pattern": "^accounts/[^/]+/customers/[^/]+/entitlements/[^/]+$", "required": true, @@ -853,7 +1007,7 @@ ] }, "changeOffer": { - "description": "Updates the Offer for an existing customer entitlement. An entitlement update is a long-running operation and results in updates to the entitlement as a result of fulfillment. Possible Error Codes: * PERMISSION_DENIED: If the customer doesn't belong to the reseller. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. * NOT_FOUND: Offer or Entitlement resource not found. * INTERNAL: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support. Return Value: Long Running Operation ID. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.", + "description": "Updates the Offer for an existing customer entitlement. An entitlement update is a long-running operation and it updates the entitlement as a result of fulfillment. Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: Offer or Entitlement resource not found. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: The ID of a long-running operation. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.", "flatPath": "v1/accounts/{accountsId}/customers/{customersId}/entitlements/{entitlementsId}:changeOffer", "httpMethod": "POST", "id": "cloudchannel.accounts.customers.entitlements.changeOffer", @@ -862,7 +1016,7 @@ ], "parameters": { "name": { - "description": "Required. The name of the entitlement to update. Format: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}", + "description": "Required. The resource name of the entitlement to update. Name uses the format: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}", "location": "path", "pattern": "^accounts/[^/]+/customers/[^/]+/entitlements/[^/]+$", "required": true, @@ -881,7 +1035,7 @@ ] }, "changeParameters": { - "description": "Change parameters of the entitlement An entitlement parameters update is a long-running operation and results in updates to the entitlement as a result of fulfillment. Possible Error Codes: * PERMISSION_DENIED: If the customer doesn't belong to the reseller. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. For example, if the number of seats being changed to is greater than the allowed number of max seats for the resource. Or decreasing seats for a commitment based plan. * NOT_FOUND: Entitlement resource not found. * INTERNAL: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support. Return Value: Long Running Operation ID. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.", + "description": "Change parameters of the entitlement. An entitlement update is a long-running operation and it updates the entitlement as a result of fulfillment. Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid. For example, the number of seats being changed is greater than the allowed number of max seats, or decreasing seats for a commitment based plan. * NOT_FOUND: Entitlement resource not found. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: The ID of a long-running operation. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.", "flatPath": "v1/accounts/{accountsId}/customers/{customersId}/entitlements/{entitlementsId}:changeParameters", "httpMethod": "POST", "id": "cloudchannel.accounts.customers.entitlements.changeParameters", @@ -890,7 +1044,7 @@ ], "parameters": { "name": { - "description": "Required. The name of the entitlement to update. The name takes the format: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}", + "description": "Required. The name of the entitlement to update. Name uses the format: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}", "location": "path", "pattern": "^accounts/[^/]+/customers/[^/]+/entitlements/[^/]+$", "required": true, @@ -909,7 +1063,7 @@ ] }, "changeRenewalSettings": { - "description": "Updates the renewal settings for an existing customer entitlement. An entitlement update is a long-running operation and results in updates to the entitlement as a result of fulfillment. Possible Error Codes: * PERMISSION_DENIED: If the customer doesn't belong to the reseller. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. * NOT_FOUND: Entitlement resource not found. * NOT_COMMITMENT_PLAN: Renewal Settings are only applicable for a commitment plan. Can't enable or disable renewal for non-commitment plans. * INTERNAL: Any non user error related to a technical issue in the backend. In this case, contact Cloud Channel support. * UNKNOWN: Any non user error related to a technical issue in the backend. In this case, contact Cloud Channel support. Return Value: Long Running Operation ID. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.", + "description": "Updates the renewal settings for an existing customer entitlement. An entitlement update is a long-running operation and it updates the entitlement as a result of fulfillment. Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: Entitlement resource not found. * NOT_COMMITMENT_PLAN: Renewal Settings are only applicable for a commitment plan. Can't enable or disable renewals for non-commitment plans. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: The ID of a long-running operation. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.", "flatPath": "v1/accounts/{accountsId}/customers/{customersId}/entitlements/{entitlementsId}:changeRenewalSettings", "httpMethod": "POST", "id": "cloudchannel.accounts.customers.entitlements.changeRenewalSettings", @@ -918,7 +1072,7 @@ ], "parameters": { "name": { - "description": "Required. The name of the entitlement to update. The name takes the format: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}", + "description": "Required. The name of the entitlement to update. Name uses the format: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}", "location": "path", "pattern": "^accounts/[^/]+/customers/[^/]+/entitlements/[^/]+$", "required": true, @@ -937,7 +1091,7 @@ ] }, "create": { - "description": "Creates an entitlement for a customer. Possible Error Codes: * PERMISSION_DENIED: If the customer doesn't belong to the reseller. * INVALID_ARGUMENT: It can happen in below scenarios - * Missing or invalid required parameters in the request. * Cannot purchase an entitlement if there is already an entitlement for customer, for a SKU from the same product family. * INVALID_VALUE: Offer passed in isn't valid. Make sure OfferId is valid. If it is valid, then contact Google Channel support for further troubleshooting. * NOT_FOUND: If the customer or offer resource is not found for the reseller. * ALREADY_EXISTS: This failure can happen in the following cases: * If the SKU has been already purchased for the customer. * If the customer's primary email already exists. In this case retry after changing the customer's primary contact email. * CONDITION_NOT_MET or FAILED_PRECONDITION: This failure can happen in the following cases: * Purchasing a SKU that requires domain verification and the domain has not been verified. * Purchasing an Add-On SKU like Vault or Drive without purchasing the pre-requisite SKU, such as Google Workspace Business Starter. * Applicable only for developer accounts: reseller and resold domain. Must meet the following domain naming requirements: * Domain names must start with goog-test. * Resold domain names must include the reseller domain. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel Support in this case. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel Support in this case. Return Value: Long Running Operation ID. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.", + "description": "Creates an entitlement for a customer. Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: * Required request parameters are missing or invalid. * There is already a customer entitlement for a SKU from the same product family. * INVALID_VALUE: Make sure the OfferId is valid. If it is, contact Google Channel support for further troubleshooting. * NOT_FOUND: The customer or offer resource was not found. * ALREADY_EXISTS: * The SKU was already purchased for the customer. * The customer's primary email already exists. Retry after changing the customer's primary contact email. * CONDITION_NOT_MET or FAILED_PRECONDITION: * The domain required for purchasing a SKU has not been verified. * A pre-requisite SKU required to purchase an Add-On SKU is missing. For example, Google Workspace Business Starter is required to purchase Vault or Drive. * (Developer accounts only) Reseller and resold domain must meet the following naming requirements: * Domain names must start with goog-test. * Domain names must include the reseller domain. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: The ID of a long-running operation. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.", "flatPath": "v1/accounts/{accountsId}/customers/{customersId}/entitlements", "httpMethod": "POST", "id": "cloudchannel.accounts.customers.entitlements.create", @@ -946,7 +1100,7 @@ ], "parameters": { "parent": { - "description": "Required. The resource name of reseller's customer account in which to create the entitlement. The parent takes the format: accounts/{account_id}/customers/{customer_id}", + "description": "Required. The resource name of the reseller's customer account in which to create the entitlement. Parent uses the format: accounts/{account_id}/customers/{customer_id}", "location": "path", "pattern": "^accounts/[^/]+/customers/[^/]+$", "required": true, @@ -965,7 +1119,7 @@ ] }, "get": { - "description": "Returns a requested Entitlement resource. Possible Error Codes: * PERMISSION_DENIED: If the customer doesn't belong to the reseller. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. * NOT_FOUND: If the entitlement is not found for the customer. Return Value: If found, the requested Entitlement resource, otherwise returns an error.", + "description": "Returns a requested Entitlement resource. Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: The customer entitlement was not found. Return value: The requested Entitlement resource.", "flatPath": "v1/accounts/{accountsId}/customers/{customersId}/entitlements/{entitlementsId}", "httpMethod": "GET", "id": "cloudchannel.accounts.customers.entitlements.get", @@ -974,7 +1128,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the entitlement to retrieve. The name takes the format: accounts/{account_id}/customers/{customer_id}/entitlements/{id}", + "description": "Required. The resource name of the entitlement to retrieve. Name uses the format: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}", "location": "path", "pattern": "^accounts/[^/]+/customers/[^/]+/entitlements/[^/]+$", "required": true, @@ -990,7 +1144,7 @@ ] }, "list": { - "description": "List Entitlements belonging to a customer. Possible Error Codes: * PERMISSION_DENIED: If the customer doesn't belong to the reseller. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. Return Value: List of Entitlements belonging to the customer, or empty list if there are none.", + "description": "Lists Entitlements belonging to a customer. Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid. Return value: A list of the customer's Entitlements.", "flatPath": "v1/accounts/{accountsId}/customers/{customersId}/entitlements", "httpMethod": "GET", "id": "cloudchannel.accounts.customers.entitlements.list", @@ -999,18 +1153,18 @@ ], "parameters": { "pageSize": { - "description": "Optional. Requested page size. Server might return fewer results than requested. If unspecified, at most 50 entitlements will be returned. The maximum value is 100; values above 100 will be coerced to 100.", + "description": "Optional. Requested page size. Server might return fewer results than requested. If unspecified, return at most 50 entitlements. The maximum value is 100; the server will coerce values above 100.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "Optional. A token identifying a page of results, if other than the first one. Typically obtained via ListEntitlementsResponse.next_page_token of the previous CloudChannelService.ListEntitlements call.", + "description": "Optional. A token for a page of results other than the first page. Obtained using ListEntitlementsResponse.next_page_token of the previous CloudChannelService.ListEntitlements call.", "location": "query", "type": "string" }, "parent": { - "description": "Required. The resource name of the reseller's customer account for which to list entitlements. The parent takes the format: accounts/{account_id}/customers/{customer_id}", + "description": "Required. The resource name of the reseller's customer account to list entitlements for. Parent uses the format: accounts/{account_id}/customers/{customer_id}", "location": "path", "pattern": "^accounts/[^/]+/customers/[^/]+$", "required": true, @@ -1026,7 +1180,7 @@ ] }, "startPaidService": { - "description": "Starts paid service for a trial entitlement. Starts paid service for a trial entitlement immediately. This method is only applicable if a plan has already been set up for a trial entitlement but has some trial days remaining. Possible Error Codes: * PERMISSION_DENIED: If the customer doesn't belong to the reseller. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. * NOT_FOUND: Entitlement resource not found. * FAILED_PRECONDITION/NOT_IN_TRIAL: This method only works for entitlement on trial plans. * INTERNAL: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support. Return Value: Long Running Operation ID. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.", + "description": "Starts paid service for a trial entitlement. Starts paid service for a trial entitlement immediately. This method is only applicable if a plan is set up for a trial entitlement but has some trial days remaining. Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: Entitlement resource not found. * FAILED_PRECONDITION/NOT_IN_TRIAL: This method only works for entitlement on trial plans. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: The ID of a long-running operation. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.", "flatPath": "v1/accounts/{accountsId}/customers/{customersId}/entitlements/{entitlementsId}:startPaidService", "httpMethod": "POST", "id": "cloudchannel.accounts.customers.entitlements.startPaidService", @@ -1035,7 +1189,7 @@ ], "parameters": { "name": { - "description": "Required. The name of the entitlement for which paid service is being started. The name takes the format: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}", + "description": "Required. The name of the entitlement to start a paid service for. Name uses the format: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}", "location": "path", "pattern": "^accounts/[^/]+/customers/[^/]+/entitlements/[^/]+$", "required": true, @@ -1054,7 +1208,7 @@ ] }, "suspend": { - "description": "Suspends a previously fulfilled entitlement. An entitlement suspension is a long-running operation. Possible Error Codes: * PERMISSION_DENIED: If the customer doesn't belong to the reseller. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. * NOT_FOUND: Entitlement resource not found. * NOT_ACTIVE: Entitlement is not active. * INTERNAL: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support. Return Value: Long Running Operation ID. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.", + "description": "Suspends a previously fulfilled entitlement. An entitlement suspension is a long-running operation. Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: Entitlement resource not found. * NOT_ACTIVE: Entitlement is not active. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: The ID of a long-running operation. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.", "flatPath": "v1/accounts/{accountsId}/customers/{customersId}/entitlements/{entitlementsId}:suspend", "httpMethod": "POST", "id": "cloudchannel.accounts.customers.entitlements.suspend", @@ -1063,7 +1217,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the entitlement to suspend. The name takes the format: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}", + "description": "Required. The resource name of the entitlement to suspend. Name uses the format: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}", "location": "path", "pattern": "^accounts/[^/]+/customers/[^/]+/entitlements/[^/]+$", "required": true, @@ -1088,7 +1242,7 @@ "offers": { "methods": { "list": { - "description": "Lists the Offers the reseller can sell. Possible Error Codes: * INVALID_ARGUMENT: Missing or invalid required parameters in the request.", + "description": "Lists the Offers the reseller can sell. Possible error codes: * INVALID_ARGUMENT: Required request parameters are missing or invalid.", "flatPath": "v1/accounts/{accountsId}/offers", "httpMethod": "GET", "id": "cloudchannel.accounts.offers.list", @@ -1097,28 +1251,28 @@ ], "parameters": { "filter": { - "description": "Optional. The expression to filter results by name (name of the Offer), sku.name (name of the SKU) or sku.product.name (name of the Product). Example 1: sku.product.name=products/p1 AND sku.name!=products/p1/skus/s1 Example 2: name=accounts/a1/offers/o1", + "description": "Optional. The expression to filter results by name (name of the Offer), sku.name (name of the SKU), or sku.product.name (name of the Product). Example 1: sku.product.name=products/p1 AND sku.name!=products/p1/skus/s1 Example 2: name=accounts/a1/offers/o1", "location": "query", "type": "string" }, "languageCode": { - "description": "Optional. The BCP-47 language code, such as \"en-US\". If specified, the response will be localized to the corresponding language code. Default is \"en-US\".", + "description": "Optional. The BCP-47 language code. For example, \"en-US\". The response will localize in the corresponding language code, if specified. The default value is \"en-US\".", "location": "query", "type": "string" }, "pageSize": { - "description": "Optional. Requested page size. Server might return fewer results than requested. If unspecified, at most 500 Offers will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + "description": "Optional. Requested page size. Server might return fewer results than requested. If unspecified, returns at most 500 Offers. The maximum value is 1000; the server will coerce values above 1000.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "Optional. A token identifying a page of results, if other than the first one.", + "description": "Optional. A token for a page of results other than the first page.", "location": "query", "type": "string" }, "parent": { - "description": "Required. The resource name of the reseller account from which to list Offers. The parent takes the format: accounts/{account_id}.", + "description": "Required. The resource name of the reseller account from which to list Offers. Parent uses the format: accounts/{account_id}.", "location": "path", "pattern": "^accounts/[^/]+$", "required": true, @@ -1263,7 +1417,7 @@ "products": { "methods": { "list": { - "description": "Lists the Products the reseller is authorized to sell. Possible Error Codes: * INVALID_ARGUMENT: Missing or invalid required parameters in the request.", + "description": "Lists the Products the reseller is authorized to sell. Possible error codes: * INVALID_ARGUMENT: Required request parameters are missing or invalid.", "flatPath": "v1/products", "httpMethod": "GET", "id": "cloudchannel.products.list", @@ -1275,18 +1429,18 @@ "type": "string" }, "languageCode": { - "description": "Optional. The BCP-47 language code, such as \"en-US\". If specified, the response will be localized to the corresponding language code. Default is \"en-US\".", + "description": "Optional. The BCP-47 language code. For example, \"en-US\". The response will localize in the corresponding language code, if specified. The default value is \"en-US\".", "location": "query", "type": "string" }, "pageSize": { - "description": "Optional. Requested page size. Server might return fewer results than requested. If unspecified, at most 100 Products will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + "description": "Optional. Requested page size. Server might return fewer results than requested. If unspecified, returns at most 100 Products. The maximum value is 1000; the server will coerce values above 1000.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "Optional. A token identifying a page of results, if other than the first one.", + "description": "Optional. A token for a page of results other than the first page.", "location": "query", "type": "string" } @@ -1304,7 +1458,7 @@ "skus": { "methods": { "list": { - "description": "Lists the SKUs for a product the reseller is authorized to sell. Possible Error Codes: * INVALID_ARGUMENT: Missing or invalid required parameters in the request.", + "description": "Lists the SKUs for a product the reseller is authorized to sell. Possible error codes: * INVALID_ARGUMENT: Required request parameters are missing or invalid.", "flatPath": "v1/products/{productsId}/skus", "httpMethod": "GET", "id": "cloudchannel.products.skus.list", @@ -1318,23 +1472,23 @@ "type": "string" }, "languageCode": { - "description": "Optional. The BCP-47 language code, such as \"en-US\". If specified, the response will be localized to the corresponding language code. Default is \"en-US\".", + "description": "Optional. The BCP-47 language code. For example, \"en-US\". The response will localize in the corresponding language code, if specified. The default value is \"en-US\".", "location": "query", "type": "string" }, "pageSize": { - "description": "Optional. Requested page size. Server might return fewer results than requested. If unspecified, at most 100 SKUs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + "description": "Optional. Requested page size. Server might return fewer results than requested. If unspecified, returns at most 100 SKUs. The maximum value is 1000; the server will coerce values above 1000.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "Optional. A token identifying a page of results, if other than the first one. Optional.", + "description": "Optional. A token for a page of results other than the first page. Optional.", "location": "query", "type": "string" }, "parent": { - "description": "Required. The resource name of the Product for which to list SKUs. The parent takes the format: products/{product_id}. Supports products/- to retrieve SKUs for all products.", + "description": "Required. The resource name of the Product to list SKUs for. Parent uses the format: products/{product_id}. Supports products/- to retrieve SKUs for all products.", "location": "path", "pattern": "^products/[^/]+$", "required": true, @@ -1354,7 +1508,7 @@ } } }, - "revision": "20210307", + "revision": "20210319", "rootUrl": "https://cloudchannel.googleapis.com/", "schemas": { "GoogleCloudChannelV1ActivateEntitlementRequest": { @@ -1362,7 +1516,7 @@ "id": "GoogleCloudChannelV1ActivateEntitlementRequest", "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. 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 the original operation with the same request ID was received, and if so, will ignore the second request. The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) with the exception that zero UUID is not supported (`00000000-0000-0000-0000-000000000000`).", + "description": "Optional. You can specify an optional unique request ID, and if you need to retry your request, the server will know to ignore the request if it's complete. For example, 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 it received the original operation with the same request ID. If it did, it will ignore the second request. The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) with the exception that zero UUID is not supported (`00000000-0000-0000-0000-000000000000`).", "type": "string" } }, @@ -1403,7 +1557,7 @@ "id": "GoogleCloudChannelV1CancelEntitlementRequest", "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. 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 the original operation with the same request ID was received, and if so, will ignore the second request. The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) with the exception that zero UUID is not supported (`00000000-0000-0000-0000-000000000000`).", + "description": "Optional. You can specify an optional unique request ID, and if you need to retry your request, the server will know to ignore the request if it's complete. For example, 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 it received the original operation with the same request ID. If it did, it will ignore the second request. The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) with the exception that zero UUID is not supported (`00000000-0000-0000-0000-000000000000`).", "type": "string" } }, @@ -1429,7 +1583,7 @@ "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. 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 the original operation with the same request ID was received, and if so, will ignore the second request. The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) with the exception that zero UUID is not supported (`00000000-0000-0000-0000-000000000000`).", + "description": "Optional. You can specify an optional unique request ID, and if you need to retry your request, the server will know to ignore the request if it's complete. For example, 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 it received the original operation with the same request ID. If it did, it will ignore the second request. The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) with the exception that zero UUID is not supported (`00000000-0000-0000-0000-000000000000`).", "type": "string" } }, @@ -1440,7 +1594,7 @@ "id": "GoogleCloudChannelV1ChangeParametersRequest", "properties": { "parameters": { - "description": "Required. Entitlement parameters to update. Only editable parameters are allowed to be changed.", + "description": "Required. Entitlement parameters to update. You can only change editable parameters.", "items": { "$ref": "GoogleCloudChannelV1Parameter" }, @@ -1451,7 +1605,7 @@ "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. 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 the original operation with the same request ID was received, and if so, will ignore the second request. The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) with the exception that zero UUID is not supported (`00000000-0000-0000-0000-000000000000`).", + "description": "Optional. You can specify an optional unique request ID, and if you need to retry your request, the server will know to ignore the request if it's complete. For example, 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 it received the original operation with the same request ID. If it did, it will ignore the second request. The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) with the exception that zero UUID is not supported (`00000000-0000-0000-0000-000000000000`).", "type": "string" } }, @@ -1466,7 +1620,7 @@ "description": "Required. New renewal settings." }, "requestId": { - "description": "Optional. A 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. 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 the original operation with the same request ID was received, and if so, will ignore the second request. The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) with the exception that zero UUID is not supported (`00000000-0000-0000-0000-000000000000`).", + "description": "Optional. You can specify an optional unique request ID, and if you need to retry your request, the server will know to ignore the request if it's complete. For example, 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 it received the original operation with the same request ID. If it did, it will ignore the second request. The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) with the exception that zero UUID is not supported (`00000000-0000-0000-0000-000000000000`).", "type": "string" } }, @@ -1538,7 +1692,7 @@ "id": "GoogleCloudChannelV1CheckCloudIdentityAccountsExistRequest", "properties": { "domain": { - "description": "Required. Domain for which the Cloud Identity account customer is fetched.", + "description": "Required. Domain to fetch for Cloud Identity account customer.", "type": "string" } }, @@ -1559,23 +1713,23 @@ "type": "object" }, "GoogleCloudChannelV1CloudIdentityCustomerAccount": { - "description": "Entity representing a Cloud Identity account which may or may not be associated with a Channel Services API partner.", + "description": "Entity representing a Cloud Identity account that may be associated with a Channel Services API partner.", "id": "GoogleCloudChannelV1CloudIdentityCustomerAccount", "properties": { "customerCloudIdentityId": { - "description": "Cloud Identity ID of the customer. This field is populated ONLY if existing = true.", + "description": "If existing = true, the Cloud Identity ID of the customer.", "type": "string" }, "customerName": { - "description": "Name of the customer that owns the Cloud Identity account. This field is populated ONLY if owned = true. The customer_name takes the format: accounts/{account_id}/customers/{customer_id}", + "description": "If owned = true, the name of the customer that owns the Cloud Identity account. Customer_name uses the format: accounts/{account_id}/customers/{customer_id}", "type": "string" }, "existing": { - "description": "True if a Cloud Identity account exists for a specific domain.", + "description": "Returns true if a Cloud Identity account exists for a specific domain.", "type": "boolean" }, "owned": { - "description": "True if the Cloud Identity account is associated with a customer belonging to the Channel Services partner making the API call.", + "description": "Returns true if the Cloud Identity account is associated with a customer of the Channel Services partner.", "type": "boolean" } }, @@ -1707,7 +1861,7 @@ "description": "Required. The entitlement to create." }, "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. 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 the original operation with the same request ID was received, and if so, will ignore the second request. The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) with the exception that zero UUID is not supported (`00000000-0000-0000-0000-000000000000`).", + "description": "Optional. You can specify an optional unique request ID, and if you need to retry your request, the server will know to ignore the request if it's complete. For example, 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 it received the original operation with the same request ID. If it did, it will ignore the second request. The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) with the exception that zero UUID is not supported (`00000000-0000-0000-0000-000000000000`).", "type": "string" } }, @@ -2057,7 +2211,7 @@ "id": "GoogleCloudChannelV1ListCustomersResponse", "properties": { "customers": { - "description": "The customers belonging to the reseller or distributor.", + "description": "The customers belonging to a reseller or distributor.", "items": { "$ref": "GoogleCloudChannelV1Customer" }, @@ -2075,14 +2229,14 @@ "id": "GoogleCloudChannelV1ListEntitlementsResponse", "properties": { "entitlements": { - "description": "The entitlements belonging to the reseller's customer.", + "description": "The reseller customer's entitlements.", "items": { "$ref": "GoogleCloudChannelV1Entitlement" }, "type": "array" }, "nextPageToken": { - "description": "A token to List next page of results. Pass to ListEntitlementsRequest.page_token to obtain that page.", + "description": "A token to list the next page of results. Pass to ListEntitlementsRequest.page_token to obtain that page.", "type": "string" } }, @@ -2209,24 +2363,24 @@ "type": "string" }, "customerName": { - "description": "A reseller should create a customer and use the resource name of the created customer here.", + "description": "A reseller should create a customer and use the resource name of that customer here.", "type": "string" }, "languageCode": { - "description": "The BCP-47 language code, such as \"en-US\". If specified, the response will be localized to the corresponding language code. Default is \"en-US\".", + "description": "The BCP-47 language code. For example, \"en-US\". The response will localize in the corresponding language code, if specified. The default value is \"en-US\".", "type": "string" }, "pageSize": { - "description": "Requested page size. Server might return fewer results than requested. If unspecified, at most 100 Offers will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + "description": "Requested page size. Server might return fewer results than requested. If unspecified, returns at most 100 offers. The maximum value is 1000; the server will coerce values above 1000.", "format": "int32", "type": "integer" }, "pageToken": { - "description": "A token identifying a page of results, if other than the first one. Typically obtained via ListTransferableOffersResponse.next_page_token of the previous CloudChannelService.ListTransferableOffers call.", + "description": "A token for a page of results other than the first page. Obtained using ListTransferableOffersResponse.next_page_token of the previous CloudChannelService.ListTransferableOffers call.", "type": "string" }, "sku": { - "description": "Required. SKU for which the Offers are being looked up.", + "description": "Required. The SKU to look up Offers for.", "type": "string" } }, @@ -2255,7 +2409,7 @@ "id": "GoogleCloudChannelV1ListTransferableSkusRequest", "properties": { "authToken": { - "description": "This token is generated by the Super Admin of the resold customer to authorize a reseller to access their Cloud Identity and purchase entitlements on their behalf. This token can be omitted once the authorization is generated. See https://support.google.com/a/answer/7643790 for more details.", + "description": "The super admin of the resold customer generates this token to authorize a reseller to access their Cloud Identity and purchase entitlements on their behalf. You can omit this token after authorization. See https://support.google.com/a/answer/7643790 for more details.", "type": "string" }, "cloudIdentityId": { @@ -2263,20 +2417,20 @@ "type": "string" }, "customerName": { - "description": "A reseller is required to create a customer and use the resource name of the created customer here. The customer_name takes the format: accounts/{account_id}/customers/{customer_id}", + "description": "A reseller is required to create a customer and use the resource name of the created customer here. Customer_name uses the format: accounts/{account_id}/customers/{customer_id}", "type": "string" }, "languageCode": { - "description": "The BCP-47 language code, such as \"en-US\". If specified, the response will be localized to the corresponding language code. Default is \"en-US\". Optional.", + "description": "The BCP-47 language code. For example, \"en-US\". The response will localize in the corresponding language code, if specified. The default value is \"en-US\". Optional.", "type": "string" }, "pageSize": { - "description": "Requested page size. Server might return fewer results than requested. If unspecified, at most 100 SKUs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. Optional.", + "description": "The requested page size. Server might return fewer results than requested. If unspecified, returns at most 100 SKUs. The maximum value is 1000; the server will coerce values above 1000. Optional.", "format": "int32", "type": "integer" }, "pageToken": { - "description": "A token identifying a page of results, if other than the first one. Typically obtained via ListTransferableSkusResponse.next_page_token of the previous CloudChannelService.ListTransferableSkus call. Optional.", + "description": "A token for a page of results other than the first page. Obtained using ListTransferableSkusResponse.next_page_token of the previous CloudChannelService.ListTransferableSkus call. Optional.", "type": "string" } }, @@ -2291,7 +2445,7 @@ "type": "string" }, "transferableSkus": { - "description": "Information about existing SKUs for a customer that would need to be transferred.", + "description": "Information about existing SKUs for a customer that needs a transfer.", "items": { "$ref": "GoogleCloudChannelV1TransferableSku" }, @@ -2743,7 +2897,7 @@ "description": "Admin user information." }, "validateOnly": { - "description": "If set, validate the request and preview the review, but do not actually post it.", + "description": "Validate the request and preview the review, but do not post it.", "type": "boolean" } }, @@ -2772,7 +2926,7 @@ "type": "object" }, "GoogleCloudChannelV1PurchasableOffer": { - "description": "Offer that can be puchased for a customer. This is used in ListPurchasableOffer API response.", + "description": "Offer that you can purchase for a customer. This is used in the ListPurchasableOffer API response.", "id": "GoogleCloudChannelV1PurchasableOffer", "properties": { "offer": { @@ -2783,7 +2937,7 @@ "type": "object" }, "GoogleCloudChannelV1PurchasableSku": { - "description": "SKU that can be used for a puchase. This is used in ListPurchasableSku API response.", + "description": "SKU that you can purchase. This is used in ListPurchasableSku API response.", "id": "GoogleCloudChannelV1PurchasableSku", "properties": { "sku": { @@ -2798,7 +2952,7 @@ "id": "GoogleCloudChannelV1RegisterSubscriberRequest", "properties": { "serviceAccount": { - "description": "Required. Service account which will provide subscriber access to the registered topic.", + "description": "Required. Service account that provides subscriber access to the registered topic.", "type": "string" } }, @@ -2809,7 +2963,7 @@ "id": "GoogleCloudChannelV1RegisterSubscriberResponse", "properties": { "topic": { - "description": "Name of the topic to which the subscriber will listen to.", + "description": "Name of the topic the subscriber will listen to.", "type": "string" } }, @@ -2878,7 +3032,7 @@ "id": "GoogleCloudChannelV1StartPaidServiceRequest", "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. 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 the original operation with the same request ID was received, and if so, will ignore the second request. The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) with the exception that zero UUID is not supported (`00000000-0000-0000-0000-000000000000`).", + "description": "Optional. You can specify an optional unique request ID, and if you need to retry your request, the server will know to ignore the request if it's complete. For example, 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 it received the original operation with the same request ID. If it did, it will ignore the second request. The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) with the exception that zero UUID is not supported (`00000000-0000-0000-0000-000000000000`).", "type": "string" } }, @@ -2904,7 +3058,7 @@ "id": "GoogleCloudChannelV1SuspendEntitlementRequest", "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. 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 the original operation with the same request ID was received, and if so, will ignore the second request. The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) with the exception that zero UUID is not supported (`00000000-0000-0000-0000-000000000000`).", + "description": "Optional. You can specify an optional unique request ID, and if you need to retry your request, the server will know to ignore the request if it's complete. For example, 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 it received the original operation with the same request ID. If it did, it will ignore the second request. The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) with the exception that zero UUID is not supported (`00000000-0000-0000-0000-000000000000`).", "type": "string" } }, @@ -2946,29 +3100,29 @@ "id": "GoogleCloudChannelV1TransferEntitlementsRequest", "properties": { "authToken": { - "description": "This token is generated by the Super Admin of the resold customer to authorize a reseller to access their Cloud Identity and purchase entitlements on their behalf. This token can be omitted once the authorization is generated. See https://support.google.com/a/answer/7643790 for more details.", + "description": "The super admin of the resold customer generates this token to authorize a reseller to access their Cloud Identity and purchase entitlements on their behalf. You can omit this token after authorization. See https://support.google.com/a/answer/7643790 for more details.", "type": "string" }, "entitlements": { - "description": "Required. The new entitlements to be created or transferred.", + "description": "Required. The new entitlements to create or transfer.", "items": { "$ref": "GoogleCloudChannelV1Entitlement" }, "type": "array" }, "requestId": { - "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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 the original operation with the same request ID was received, and if so, will ignore the second request. The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) with the exception that zero UUID is not supported (`00000000-0000-0000-0000-000000000000`).", + "description": "Optional. You can specify an optional unique request ID, and if you need to retry your request, the server will know to ignore the request if it's complete. For example, 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 it received the original operation with the same request ID. If it did, it will ignore the second request. The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) with the exception that zero UUID is not supported (`00000000-0000-0000-0000-000000000000`).", "type": "string" } }, "type": "object" }, "GoogleCloudChannelV1TransferEntitlementsResponse": { - "description": "Response message for CloudChannelService.TransferEntitlements. This will be put into the response field of google.longrunning.Operation.", + "description": "Response message for CloudChannelService.TransferEntitlements. This is put in the response field of google.longrunning.Operation.", "id": "GoogleCloudChannelV1TransferEntitlementsResponse", "properties": { "entitlements": { - "description": "The entitlements that have been transferred.", + "description": "The transferred entitlements.", "items": { "$ref": "GoogleCloudChannelV1Entitlement" }, @@ -2982,14 +3136,14 @@ "id": "GoogleCloudChannelV1TransferEntitlementsToGoogleRequest", "properties": { "entitlements": { - "description": "Required. The entitlements to be transferred to Google.", + "description": "Required. The entitlements to transfer to Google.", "items": { "$ref": "GoogleCloudChannelV1Entitlement" }, "type": "array" }, "requestId": { - "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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 the original operation with the same request ID was received, and if so, will ignore the second request. The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) with the exception that zero UUID is not supported (`00000000-0000-0000-0000-000000000000`).", + "description": "Optional. You can specify an optional unique request ID, and if you need to retry your request, the server will know to ignore the request if it's complete. For example, 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 it received the original operation with the same request ID. If it did, it will ignore the second request. The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) with the exception that zero UUID is not supported (`00000000-0000-0000-0000-000000000000`).", "type": "string" } }, @@ -3042,7 +3196,7 @@ "id": "GoogleCloudChannelV1UnregisterSubscriberRequest", "properties": { "serviceAccount": { - "description": "Required. Service account which will be unregistered from getting subscriber access to the topic.", + "description": "Required. Service account to unregister from subscriber access to the topic.", "type": "string" } }, @@ -3053,7 +3207,7 @@ "id": "GoogleCloudChannelV1UnregisterSubscriberResponse", "properties": { "topic": { - "description": "Name of the topic from which the service account subscriber access has been removed.", + "description": "Name of the topic the service account subscriber access was removed from.", "type": "string" } }, @@ -3065,10 +3219,10 @@ "properties": { "channelPartnerLink": { "$ref": "GoogleCloudChannelV1ChannelPartnerLink", - "description": "Required. The channel partner link to update. Only field channel_partner_link.link_state is allowed to be updated." + "description": "Required. The channel partner link to update. Only channel_partner_link.link_state is allowed for updates." }, "updateMask": { - "description": "Required. The update mask that applies to the resource. The only allowable value for update mask is channel_partner_link.link_state.", + "description": "Required. The update mask that applies to the resource. The only allowable value for an update mask is channel_partner_link.link_state.", "format": "google-fieldmask", "type": "string" } @@ -3511,11 +3665,11 @@ "type": "object" }, "GoogleCloudChannelV1alpha1TransferEntitlementsResponse": { - "description": "Response message for CloudChannelService.TransferEntitlements. This will be put into the response field of google.longrunning.Operation.", + "description": "Response message for CloudChannelService.TransferEntitlements. This is put in the response field of google.longrunning.Operation.", "id": "GoogleCloudChannelV1alpha1TransferEntitlementsResponse", "properties": { "entitlements": { - "description": "The entitlements that have been transferred.", + "description": "The transferred entitlements.", "items": { "$ref": "GoogleCloudChannelV1alpha1Entitlement" }, diff --git a/discovery/cloudfunctions-v1.json b/discovery/cloudfunctions-v1.json index a2e0edbf4b8..e8a49978794 100644 --- a/discovery/cloudfunctions-v1.json +++ b/discovery/cloudfunctions-v1.json @@ -185,7 +185,7 @@ ], "parameters": { "filter": { - "description": "The standard list 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" }, @@ -197,13 +197,13 @@ "type": "string" }, "pageSize": { - "description": "The standard list page size.", + "description": "The maximum number of results to return. If not set, the service will select a default.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "The standard list page token.", + "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" } @@ -546,7 +546,7 @@ } } }, - "revision": "20210302", + "revision": "20210309", "rootUrl": "https://cloudfunctions.googleapis.com/", "schemas": { "AuditConfig": { diff --git a/discovery/cloudidentity-v1.json b/discovery/cloudidentity-v1.json index c8c618ac279..2ec1364c1d5 100644 --- a/discovery/cloudidentity-v1.json +++ b/discovery/cloudidentity-v1.json @@ -149,7 +149,7 @@ "parameterOrder": [], "parameters": { "customer": { - "description": "Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id}`, where customer_id is the customer to whom the device belongs.", + "description": "Optional. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id}`, where customer_id is the customer to whom the device belongs.", "location": "query", "type": "string" } @@ -172,7 +172,7 @@ ], "parameters": { "customer": { - "description": "Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id}`, where customer_id is the customer to whom the device belongs.", + "description": "Optional. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id}`, where customer_id is the customer to whom the device belongs.", "location": "query", "type": "string" }, @@ -199,7 +199,7 @@ ], "parameters": { "customer": { - "description": "Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the Customer in the format: `customers/{customer_id}`, where customer_id is the customer to whom the device belongs. If you're using this API for your own organization, use `customers/my_customer`. If you're using this API to manage another organization, use `customers/{customer_id}`, where customer_id is the customer to whom the device belongs.", + "description": "Optional. [Resource name](https://cloud.google.com/apis/design/resource_names) of the Customer in the format: `customers/{customer_id}`, where customer_id is the customer to whom the device belongs. If you're using this API for your own organization, use `customers/my_customer`. If you're using this API to manage another organization, use `customers/{customer_id}`, where customer_id is the customer to whom the device belongs.", "location": "query", "type": "string" }, @@ -224,7 +224,7 @@ "parameterOrder": [], "parameters": { "customer": { - "description": "Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer in the format: `customers/{customer_id}`, where customer_id is the customer to whom the device belongs. If you're using this API for your own organization, use `customers/my_customer`. If you're using this API to manage another organization, use `customers/{customer_id}`, where customer_id is the customer to whom the device belongs.", + "description": "Optional. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer in the format: `customers/{customer_id}`, where customer_id is the customer to whom the device belongs. If you're using this API for your own organization, use `customers/my_customer`. If you're using this API to manage another organization, use `customers/{customer_id}`, where customer_id is the customer to whom the device belongs.", "location": "query", "type": "string" }, @@ -384,7 +384,7 @@ ], "parameters": { "customer": { - "description": "Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id}`, where customer_id is the customer to whom the device belongs.", + "description": "Optional. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id}`, where customer_id is the customer to whom the device belongs.", "location": "query", "type": "string" }, @@ -411,7 +411,7 @@ ], "parameters": { "customer": { - "description": "Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id}`, where customer_id is the customer to whom the device belongs.", + "description": "Optional. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id}`, where customer_id is the customer to whom the device belongs.", "location": "query", "type": "string" }, @@ -438,7 +438,7 @@ ], "parameters": { "customer": { - "description": "Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id}`, where customer_id is the customer to whom the device belongs.", + "description": "Optional. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id}`, where customer_id is the customer to whom the device belongs.", "location": "query", "type": "string" }, @@ -566,12 +566,12 @@ ], "parameters": { "customer": { - "description": "Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id}`, where customer_id is the customer to whom the device belongs.", + "description": "Optional. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id}`, where customer_id is the customer to whom the device belongs.", "location": "query", "type": "string" }, "name": { - "description": "Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the ClientState in format: `devices/{device_id}/deviceUsers/{device_user_id}/clientStates/{partner_id}`, where device_id is the unique ID assigned to the Device, device_user_id is the unique ID assigned to the User and partner_id identifies the partner storing the data. To get the client state for devices belonging to your own organization, the `partnerId` is in the format: `customerId-*anystring*`. Where the `customerId` is your organization's customer ID and `anystring` is any suffix. This suffix is used in setting up Custom Access Levels in Context-Aware Access. You may use `my_customer` instead of the customer ID for devices managed by your own organization.", + "description": "Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the ClientState in format: `devices/{device_id}/deviceUsers/{device_user_id}/clientStates/{partner_id}`, where `device_id` is the unique ID assigned to the Device, `device_user_id` is the unique ID assigned to the User and `partner_id` identifies the partner storing the data. To get the client state for devices belonging to your own organization, the `partnerId` is in the format: `customerId-*anystring*`. Where the `customerId` is your organization's customer ID and `anystring` is any suffix. This suffix is used in setting up Custom Access Levels in Context-Aware Access. You may use `my_customer` instead of the customer ID for devices managed by your own organization. You may specify `-` in place of the `{device_id}`, so the ClientState resource name can be: `devices/-/deviceUsers/{device_user_resource_id}/clientStates/{partner_id}`.", "location": "path", "pattern": "^devices/[^/]+/deviceUsers/[^/]+/clientStates/[^/]+$", "required": true, @@ -593,7 +593,7 @@ ], "parameters": { "customer": { - "description": "Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id}`, where customer_id is the customer to whom the device belongs.", + "description": "Optional. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id}`, where customer_id is the customer to whom the device belongs.", "location": "query", "type": "string" }, @@ -635,7 +635,7 @@ ], "parameters": { "customer": { - "description": "Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id}`, where customer_id is the customer to whom the device belongs.", + "description": "Optional. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id}`, where customer_id is the customer to whom the device belongs.", "location": "query", "type": "string" }, @@ -1273,7 +1273,7 @@ } } }, - "revision": "20210204", + "revision": "20210310", "rootUrl": "https://cloudidentity.googleapis.com/", "schemas": { "CheckTransitiveMembershipResponse": { @@ -1443,7 +1443,7 @@ "id": "GoogleAppsCloudidentityDevicesV1ApproveDeviceUserRequest", "properties": { "customer": { - "description": "Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id}`, where customer_id is the customer to whom the device belongs.", + "description": "Optional. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id}`, where customer_id is the customer to whom the device belongs.", "type": "string" } }, @@ -1465,7 +1465,7 @@ "id": "GoogleAppsCloudidentityDevicesV1BlockDeviceUserRequest", "properties": { "customer": { - "description": "Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id}`, where customer_id is the customer to whom the device belongs.", + "description": "Optional. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id}`, where customer_id is the customer to whom the device belongs.", "type": "string" } }, @@ -1487,7 +1487,7 @@ "id": "GoogleAppsCloudidentityDevicesV1CancelWipeDeviceRequest", "properties": { "customer": { - "description": "Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id}`, where customer_id is the customer to whom the device belongs.", + "description": "Optional. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id}`, where customer_id is the customer to whom the device belongs.", "type": "string" } }, @@ -1509,7 +1509,7 @@ "id": "GoogleAppsCloudidentityDevicesV1CancelWipeDeviceUserRequest", "properties": { "customer": { - "description": "Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id}`, where customer_id is the customer to whom the device belongs.", + "description": "Optional. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id}`, where customer_id is the customer to whom the device belongs.", "type": "string" } }, @@ -2056,7 +2056,7 @@ "id": "GoogleAppsCloudidentityDevicesV1WipeDeviceRequest", "properties": { "customer": { - "description": "Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id}`, where customer_id is the customer to whom the device belongs.", + "description": "Optional. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id}`, where customer_id is the customer to whom the device belongs.", "type": "string" } }, @@ -2078,7 +2078,7 @@ "id": "GoogleAppsCloudidentityDevicesV1WipeDeviceUserRequest", "properties": { "customer": { - "description": "Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id}`, where customer_id is the customer to whom the device belongs.", + "description": "Optional. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id}`, where customer_id is the customer to whom the device belongs.", "type": "string" } }, @@ -2564,7 +2564,7 @@ "type": "object" }, "UserInvitation": { - "description": "The `UserInvitation` resource represents an email sent to an unmanaged user account (an email address that shares the domain of the Google Workspace customer but is not managed by it yet), inviting them to join the customer’s domain. If the user accepts the `UserInvitation`, the account will become a managed account.", + "description": "The `UserInvitation` resource represents an email that can be sent to an unmanaged user account inviting them to join the customer’s Google Workspace or Cloud Identity account. An unmanaged account shares an email address domain with the Google Workspace or Cloud Identity account but is not managed by it yet. If the user accepts the `UserInvitation`, the user account will become managed.", "id": "UserInvitation", "properties": { "mailsSentCount": { diff --git a/discovery/cloudidentity-v1beta1.json b/discovery/cloudidentity-v1beta1.json index 7c5301b8f16..a489bc20836 100644 --- a/discovery/cloudidentity-v1beta1.json +++ b/discovery/cloudidentity-v1beta1.json @@ -114,6 +114,151 @@ }, "protocol": "rest", "resources": { + "customers": { + "resources": { + "userinvitations": { + "methods": { + "cancel": { + "description": "Cancels a UserInvitation that was already sent.", + "flatPath": "v1beta1/customers/{customersId}/userinvitations/{userinvitationsId}:cancel", + "httpMethod": "POST", + "id": "cloudidentity.customers.userinvitations.cancel", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. `UserInvitation` name in the format `customers/{customer}/userinvitations/{user_email_address}`", + "location": "path", + "pattern": "^customers/[^/]+/userinvitations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}:cancel", + "request": { + "$ref": "CancelUserInvitationRequest" + }, + "response": { + "$ref": "Operation" + } + }, + "get": { + "description": "Retrieves a UserInvitation resource. **Note:** New consumer accounts with the customer’s verified domain created within the previous 48 hours will not appear in the result. This delay also applies to newly-verified domains.", + "flatPath": "v1beta1/customers/{customersId}/userinvitations/{userinvitationsId}", + "httpMethod": "GET", + "id": "cloudidentity.customers.userinvitations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. `UserInvitation` name in the format `customers/{customer}/userinvitations/{user_email_address}`", + "location": "path", + "pattern": "^customers/[^/]+/userinvitations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "UserInvitation" + } + }, + "isInvitableUser": { + "description": "Verifies whether a user account is eligible to receive a UserInvitation (is an unmanaged account). Eligibility is based on the following criteria: * the email address is a consumer account and it’s the primary email address of the account, and * the domain of the email address matches an existing verified Google Workspace or Cloud Identity domain If both conditions are met, the user is eligible. **Note:** This method is not supported for Workspace Essentials customers.", + "flatPath": "v1beta1/customers/{customersId}/userinvitations/{userinvitationsId}:isInvitableUser", + "httpMethod": "GET", + "id": "cloudidentity.customers.userinvitations.isInvitableUser", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. `UserInvitation` name in the format `customers/{customer}/userinvitations/{user_email_address}`", + "location": "path", + "pattern": "^customers/[^/]+/userinvitations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}:isInvitableUser", + "response": { + "$ref": "IsInvitableUserResponse" + } + }, + "list": { + "description": "Retrieves a list of UserInvitation resources. **Note:** New consumer accounts with the customer’s verified domain created within the previous 48 hours will not appear in the result. This delay also applies to newly-verified domains.", + "flatPath": "v1beta1/customers/{customersId}/userinvitations", + "httpMethod": "GET", + "id": "cloudidentity.customers.userinvitations.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. A query string for filtering `UserInvitation` results by their current state, in the format: `\"state=='invited'\"`.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. The sort order of the list results. You can sort the results in descending order based on either email or last update timestamp but not both, using `order_by=\"email desc\"`. Currently, sorting is supported for `update_time asc`, `update_time desc`, `email asc`, and `email desc`. If not specified, results will be returned based on `email asc` order.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of UserInvitation resources to return. If unspecified, at most 100 resources will be returned. The maximum value is 200; values above 200 will be set to 200.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A page token, received from a previous `ListUserInvitations` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListBooks` must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The customer ID of the Google Workspace or Cloud Identity account the UserInvitation resources are associated with.", + "location": "path", + "pattern": "^customers/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/userinvitations", + "response": { + "$ref": "ListUserInvitationsResponse" + } + }, + "send": { + "description": "Sends a UserInvitation to email. If the `UserInvitation` does not exist for this request and it is a valid request, the request creates a `UserInvitation`. **Note:** The `get` and `list` methods have a 48-hour delay where newly-created consumer accounts will not appear in the results. You can still send a `UserInvitation` to those accounts if you know the unmanaged email address and IsInvitableUser==True.", + "flatPath": "v1beta1/customers/{customersId}/userinvitations/{userinvitationsId}:send", + "httpMethod": "POST", + "id": "cloudidentity.customers.userinvitations.send", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. `UserInvitation` name in the format `customers/{customer}/userinvitations/{user_email_address}`", + "location": "path", + "pattern": "^customers/[^/]+/userinvitations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}:send", + "request": { + "$ref": "SendUserInvitationRequest" + }, + "response": { + "$ref": "Operation" + } + } + } + } + } + }, "devices": { "methods": { "cancelWipe": { @@ -165,11 +310,6 @@ "name" ], "parameters": { - "customer": { - "description": "Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id}`, where customer_id is the customer to whom the device belongs.", - "location": "query", - "type": "string" - }, "name": { "description": "Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the Device in format: `devices/{device_id}`, where device_id is the unique ID assigned to the Device.", "location": "path", @@ -192,11 +332,6 @@ "name" ], "parameters": { - "customer": { - "description": "Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the Customer in format: `customers/{customer_id}`, where customer_id is the customer to whom the device belongs.", - "location": "query", - "type": "string" - }, "name": { "description": "Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the Device in format: `devices/{device_id}`, where device_id is the unique ID assigned to the Device.", "location": "path", @@ -217,11 +352,6 @@ "id": "cloudidentity.devices.list", "parameterOrder": [], "parameters": { - "customer": { - "description": "Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer.", - "location": "query", - "type": "string" - }, "filter": { "description": "Optional. Additional restrictions when fetching list of devices. For a list of search fields, refer to [Mobile device search fields](https://developers.google.com/admin-sdk/directory/v1/search-operators). Multiple search fields are separated by the space character.", "location": "query", @@ -377,11 +507,6 @@ "name" ], "parameters": { - "customer": { - "description": "Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id}`, where customer_id is the customer to whom the device belongs.", - "location": "query", - "type": "string" - }, "name": { "description": "Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the Device in format: `devices/{device_id}/deviceUsers/{device_user_id}`, where device_id is the unique ID assigned to the Device, and device_user_id is the unique ID assigned to the User.", "location": "path", @@ -404,11 +529,6 @@ "name" ], "parameters": { - "customer": { - "description": "Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id}`, where customer_id is the customer to whom the device belongs.", - "location": "query", - "type": "string" - }, "name": { "description": "Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the Device in format: `devices/{device_id}/deviceUsers/{device_user_id}`, where device_id is the unique ID assigned to the Device, and device_user_id is the unique ID assigned to the User.", "location": "path", @@ -431,11 +551,6 @@ "parent" ], "parameters": { - "customer": { - "description": "Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id}`, where customer_id is the customer to whom the device belongs.", - "location": "query", - "type": "string" - }, "filter": { "description": "Optional. Additional restrictions when fetching list of devices. For a list of search fields, refer to [Mobile device search fields](https://developers.google.com/admin-sdk/directory/v1/search-operators). Multiple search fields are separated by the space character.", "location": "query", @@ -560,12 +675,12 @@ ], "parameters": { "customer": { - "description": "Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id}`, where customer_id is the customer to whom the device belongs.", + "description": "Optional. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id}`, where customer_id is the customer to whom the device belongs.", "location": "query", "type": "string" }, "name": { - "description": "Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the ClientState in format: `devices/{device_id}/deviceUsers/{device_user_id}/clientStates/{partner_id}`, where device_id is the unique ID assigned to the Device, device_user_id is the unique ID assigned to the User and partner_id identifies the partner storing the data. To get the client state for devices belonging to your own organization, the `partnerId` is in the format: `customerId-*anystring*`. Where the `customerId` is your organization's customer ID and `anystring` is any suffix. This suffix is used in setting up Custom Access Levels in Context-Aware Access. You may use `my_customer` instead of the customer ID for devices managed by your own organization.", + "description": "Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the ClientState in format: `devices/{device_id}/deviceUsers/{device_user_id}/clientStates/{partner_id}`, where `device_id` is the unique ID assigned to the Device, `device_user_id` is the unique ID assigned to the User and `partner_id` identifies the partner storing the data. To get the client state for devices belonging to your own organization, the `partnerId` is in the format: `customerId-*anystring*`. Where the `customerId` is your organization's customer ID and `anystring` is any suffix. This suffix is used in setting up Custom Access Levels in Context-Aware Access. You may use `my_customer` instead of the customer ID for devices managed by your own organization. You may specify `-` in place of the `{device_id}`, so the ClientState resource name can be: `devices/-/deviceUsers/{device_user_resource_id}/clientStates/{partner_id}`.", "location": "path", "pattern": "^devices/[^/]+/deviceUsers/[^/]+/clientStates/[^/]+$", "required": true, @@ -587,7 +702,7 @@ ], "parameters": { "customer": { - "description": "Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id}`, where customer_id is the customer to whom the device belongs.", + "description": "Optional. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id}`, where customer_id is the customer to whom the device belongs.", "location": "query", "type": "string" }, @@ -1221,7 +1336,7 @@ } } }, - "revision": "20210204", + "revision": "20210310", "rootUrl": "https://cloudidentity.googleapis.com/", "schemas": { "AndroidAttributes": { @@ -1262,12 +1377,7 @@ "ApproveDeviceUserRequest": { "description": "Request message for approving the device to access user data.", "id": "ApproveDeviceUserRequest", - "properties": { - "customer": { - "description": "Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id}`, where customer_id is the customer to whom the device belongs.", - "type": "string" - } - }, + "properties": {}, "type": "object" }, "ApproveDeviceUserResponse": { @@ -1284,12 +1394,7 @@ "BlockDeviceUserRequest": { "description": "Request message for blocking account on device.", "id": "BlockDeviceUserRequest", - "properties": { - "customer": { - "description": "Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id}`, where customer_id is the customer to whom the device belongs.", - "type": "string" - } - }, + "properties": {}, "type": "object" }, "BlockDeviceUserResponse": { @@ -1303,15 +1408,16 @@ }, "type": "object" }, + "CancelUserInvitationRequest": { + "description": "Request to cancel sent invitation for target email in UserInvitation.", + "id": "CancelUserInvitationRequest", + "properties": {}, + "type": "object" + }, "CancelWipeDeviceRequest": { "description": "Request message for cancelling an unfinished device wipe.", "id": "CancelWipeDeviceRequest", - "properties": { - "customer": { - "description": "Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id}`, where customer_id is the customer to whom the device belongs.", - "type": "string" - } - }, + "properties": {}, "type": "object" }, "CancelWipeDeviceResponse": { @@ -1328,12 +1434,7 @@ "CancelWipeDeviceUserRequest": { "description": "Request message for cancelling an unfinished user account wipe.", "id": "CancelWipeDeviceUserRequest", - "properties": { - "customer": { - "description": "Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id}`, where customer_id is the customer to whom the device belongs.", - "type": "string" - } - }, + "properties": {}, "type": "object" }, "CancelWipeDeviceUserResponse": { @@ -1475,13 +1576,9 @@ "description": "Request message for creating a Company Owned device.", "id": "CreateDeviceRequest", "properties": { - "customer": { - "description": "Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id}`, where customer_id is the customer to whom the device belongs.", - "type": "string" - }, "device": { "$ref": "Device", - "description": "Required. The device to be created. The name field within this device is ignored in the create method. A new name is created by the method, and returned within the response. Only the fields `device_type`, `serial_number` and `asset_tag` (if present) are used to create the device.`device_type` and `serial_number` are required." + "description": "Required. The device to be created. The name field within this device is ignored in the create method. A new name is created by the method, and returned within the response. Only the fields `device_type`, `serial_number` and `asset_tag` (if present) are used to create the device. All other fields are ignored. The `device_type` and `serial_number` fields are required." } }, "type": "object" @@ -2594,6 +2691,17 @@ }, "type": "object" }, + "IsInvitableUserResponse": { + "description": "Response for IsInvitableUser RPC.", + "id": "IsInvitableUserResponse", + "properties": { + "isInvitableUser": { + "description": "Returns true if the email address is invitable.", + "type": "boolean" + } + }, + "type": "object" + }, "ListClientStatesResponse": { "description": "Response message that is returned in LRO result of ListClientStates Operation.", "id": "ListClientStatesResponse", @@ -2684,6 +2792,24 @@ }, "type": "object" }, + "ListUserInvitationsResponse": { + "description": "Response message for UserInvitation listing request.", + "id": "ListUserInvitationsResponse", + "properties": { + "nextPageToken": { + "description": "The token for the next page. If not empty, indicates that there may be more `UserInvitation` resources that match the listing request; this value can be used in a subsequent ListUserInvitationsRequest to get continued results with the current list call.", + "type": "string" + }, + "userInvitations": { + "description": "The list of UserInvitation resources.", + "items": { + "$ref": "UserInvitation" + }, + "type": "array" + } + }, + "type": "object" + }, "LookupGroupNameResponse": { "description": "The response message for GroupsService.LookupGroupName.", "id": "LookupGroupNameResponse", @@ -2989,6 +3115,12 @@ }, "type": "object" }, + "SendUserInvitationRequest": { + "description": "A request to send email for inviting target user corresponding to the UserInvitation.", + "id": "SendUserInvitationRequest", + "properties": {}, + "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", @@ -3044,7 +3176,7 @@ "type": "object" }, "UserInvitation": { - "description": "The `UserInvitation` resource represents an email sent to an unmanaged user account (an email address that shares the domain of the Google Workspace customer but is not managed by it yet), inviting them to join the customer’s domain. If the user accepts the `UserInvitation`, the account will become a managed account.", + "description": "The `UserInvitation` resource represents an email that can be sent to an unmanaged user account inviting them to join the customer’s Google Workspace or Cloud Identity account. An unmanaged account shares an email address domain with the Google Workspace or Cloud Identity account but is not managed by it yet. If the user accepts the `UserInvitation`, the user account will become managed.", "id": "UserInvitation", "properties": { "mailsSentCount": { @@ -3085,12 +3217,7 @@ "WipeDeviceRequest": { "description": "Request message for wiping all data on the device.", "id": "WipeDeviceRequest", - "properties": { - "customer": { - "description": "Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id}`, where customer_id is the customer to whom the device belongs.", - "type": "string" - } - }, + "properties": {}, "type": "object" }, "WipeDeviceResponse": { @@ -3107,12 +3234,7 @@ "WipeDeviceUserRequest": { "description": "Request message for starting an account wipe on device.", "id": "WipeDeviceUserRequest", - "properties": { - "customer": { - "description": "Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id}`, where customer_id is the customer to whom the device belongs.", - "type": "string" - } - }, + "properties": {}, "type": "object" }, "WipeDeviceUserResponse": { diff --git a/discovery/cloudkms-v1.json b/discovery/cloudkms-v1.json index 0dae7e568cc..257b3377942 100644 --- a/discovery/cloudkms-v1.json +++ b/discovery/cloudkms-v1.json @@ -148,7 +148,7 @@ ], "parameters": { "filter": { - "description": "The standard list 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" }, @@ -160,13 +160,13 @@ "type": "string" }, "pageSize": { - "description": "The standard list page size.", + "description": "The maximum number of results to return. If not set, the service will select a default.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "The standard list page token.", + "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" } @@ -1259,7 +1259,7 @@ } } }, - "revision": "20210210", + "revision": "20210312", "rootUrl": "https://cloudkms.googleapis.com/", "schemas": { "AsymmetricDecryptRequest": { diff --git a/discovery/cloudresourcemanager-v1.json b/discovery/cloudresourcemanager-v1.json index f12a5e00422..22018cecab0 100644 --- a/discovery/cloudresourcemanager-v1.json +++ b/discovery/cloudresourcemanager-v1.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" }, "https://www.googleapis.com/auth/cloud-platform.read-only": { "description": "View your data across Google Cloud Platform services" @@ -1171,7 +1171,7 @@ } } }, - "revision": "20210302", + "revision": "20210314", "rootUrl": "https://cloudresourcemanager.googleapis.com/", "schemas": { "Ancestor": { @@ -1400,6 +1400,41 @@ }, "type": "object" }, + "CreateFolderMetadata": { + "description": "Metadata pertaining to the Folder creation process.", + "id": "CreateFolderMetadata", + "properties": { + "displayName": { + "description": "The display name of the folder.", + "type": "string" + }, + "parent": { + "description": "The resource name of the folder or organization we are creating the folder under.", + "type": "string" + } + }, + "type": "object" + }, + "CreateProjectMetadata": { + "description": "A status object which is used as the `metadata` field for the Operation returned by CreateProject. It provides insight for when significant phases of Project creation have completed.", + "id": "CreateProjectMetadata", + "properties": { + "createTime": { + "description": "Creation time of the project creation workflow.", + "format": "google-datetime", + "type": "string" + }, + "gettable": { + "description": "True if the project can be retrieved using GetProject. No other operations on the project are guaranteed to work until the project creation is complete.", + "type": "boolean" + }, + "ready": { + "description": "True if the project creation process is complete.", + "type": "boolean" + } + }, + "type": "object" + }, "CreateTagKeyMetadata": { "description": "Runtime operation information for creating a TagKey.", "id": "CreateTagKeyMetadata", @@ -1412,6 +1447,24 @@ "properties": {}, "type": "object" }, + "DeleteFolderMetadata": { + "description": "A status object which is used as the `metadata` field for the Operation returned by DeleteFolder.", + "id": "DeleteFolderMetadata", + "properties": {}, + "type": "object" + }, + "DeleteOrganizationMetadata": { + "description": "A status object which is used as the `metadata` field for the Operation returned by DeleteOrganization.", + "id": "DeleteOrganizationMetadata", + "properties": {}, + "type": "object" + }, + "DeleteProjectMetadata": { + "description": "A status object which is used as the `metadata` field for the Operation returned by DeleteProject.", + "id": "DeleteProjectMetadata", + "properties": {}, + "type": "object" + }, "DeleteTagKeyMetadata": { "description": "Runtime operation information for deleting a TagKey.", "id": "DeleteTagKeyMetadata", @@ -1783,6 +1836,31 @@ }, "type": "object" }, + "MoveFolderMetadata": { + "description": "Metadata pertaining to the Folder move process.", + "id": "MoveFolderMetadata", + "properties": { + "destinationParent": { + "description": "The resource name of the folder or organization to move the folder to.", + "type": "string" + }, + "displayName": { + "description": "The display name of the folder.", + "type": "string" + }, + "sourceParent": { + "description": "The resource name of the folder's parent.", + "type": "string" + } + }, + "type": "object" + }, + "MoveProjectMetadata": { + "description": "A status object which is used as the `metadata` field for the Operation returned by MoveProject.", + "id": "MoveProjectMetadata", + "properties": {}, + "type": "object" + }, "Operation": { "description": "This resource represents a long-running operation that is the result of a network API call.", "id": "Operation", @@ -2149,12 +2227,42 @@ }, "type": "object" }, + "UndeleteFolderMetadata": { + "description": "A status object which is used as the `metadata` field for the Operation returned by UndeleteFolder.", + "id": "UndeleteFolderMetadata", + "properties": {}, + "type": "object" + }, + "UndeleteOrganizationMetadata": { + "description": "A status object which is used as the `metadata` field for the Operation returned by UndeleteOrganization.", + "id": "UndeleteOrganizationMetadata", + "properties": {}, + "type": "object" + }, + "UndeleteProjectMetadata": { + "description": "A status object which is used as the `metadata` field for the Operation returned by UndeleteProject.", + "id": "UndeleteProjectMetadata", + "properties": {}, + "type": "object" + }, "UndeleteProjectRequest": { "description": "The request sent to the UndeleteProject method.", "id": "UndeleteProjectRequest", "properties": {}, "type": "object" }, + "UpdateFolderMetadata": { + "description": "A status object which is used as the `metadata` field for the Operation returned by UpdateFolder.", + "id": "UpdateFolderMetadata", + "properties": {}, + "type": "object" + }, + "UpdateProjectMetadata": { + "description": "A status object which is used as the `metadata` field for the Operation returned by UpdateProject.", + "id": "UpdateProjectMetadata", + "properties": {}, + "type": "object" + }, "UpdateTagKeyMetadata": { "description": "Runtime operation information for updating a TagKey.", "id": "UpdateTagKeyMetadata", diff --git a/discovery/cloudresourcemanager-v1beta1.json b/discovery/cloudresourcemanager-v1beta1.json index 7ed0ee2022d..831c466023b 100644 --- a/discovery/cloudresourcemanager-v1beta1.json +++ b/discovery/cloudresourcemanager-v1beta1.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" }, "https://www.googleapis.com/auth/cloud-platform.read-only": { "description": "View your data across Google Cloud Platform services" @@ -566,7 +566,7 @@ } } }, - "revision": "20210302", + "revision": "20210314", "rootUrl": "https://cloudresourcemanager.googleapis.com/", "schemas": { "Ancestor": { @@ -716,6 +716,41 @@ }, "type": "object" }, + "CreateFolderMetadata": { + "description": "Metadata pertaining to the Folder creation process.", + "id": "CreateFolderMetadata", + "properties": { + "displayName": { + "description": "The display name of the folder.", + "type": "string" + }, + "parent": { + "description": "The resource name of the folder or organization we are creating the folder under.", + "type": "string" + } + }, + "type": "object" + }, + "CreateProjectMetadata": { + "description": "A status object which is used as the `metadata` field for the Operation returned by CreateProject. It provides insight for when significant phases of Project creation have completed.", + "id": "CreateProjectMetadata", + "properties": { + "createTime": { + "description": "Creation time of the project creation workflow.", + "format": "google-datetime", + "type": "string" + }, + "gettable": { + "description": "True if the project can be retrieved using GetProject. No other operations on the project are guaranteed to work until the project creation is complete.", + "type": "boolean" + }, + "ready": { + "description": "True if the project creation process is complete.", + "type": "boolean" + } + }, + "type": "object" + }, "CreateTagKeyMetadata": { "description": "Runtime operation information for creating a TagKey.", "id": "CreateTagKeyMetadata", @@ -728,6 +763,24 @@ "properties": {}, "type": "object" }, + "DeleteFolderMetadata": { + "description": "A status object which is used as the `metadata` field for the Operation returned by DeleteFolder.", + "id": "DeleteFolderMetadata", + "properties": {}, + "type": "object" + }, + "DeleteOrganizationMetadata": { + "description": "A status object which is used as the `metadata` field for the Operation returned by DeleteOrganization.", + "id": "DeleteOrganizationMetadata", + "properties": {}, + "type": "object" + }, + "DeleteProjectMetadata": { + "description": "A status object which is used as the `metadata` field for the Operation returned by DeleteProject.", + "id": "DeleteProjectMetadata", + "properties": {}, + "type": "object" + }, "DeleteTagKeyMetadata": { "description": "Runtime operation information for deleting a TagKey.", "id": "DeleteTagKeyMetadata", @@ -916,6 +969,31 @@ }, "type": "object" }, + "MoveFolderMetadata": { + "description": "Metadata pertaining to the Folder move process.", + "id": "MoveFolderMetadata", + "properties": { + "destinationParent": { + "description": "The resource name of the folder or organization to move the folder to.", + "type": "string" + }, + "displayName": { + "description": "The display name of the folder.", + "type": "string" + }, + "sourceParent": { + "description": "The resource name of the folder's parent.", + "type": "string" + } + }, + "type": "object" + }, + "MoveProjectMetadata": { + "description": "A status object which is used as the `metadata` field for the Operation returned by MoveProject.", + "id": "MoveProjectMetadata", + "properties": {}, + "type": "object" + }, "Organization": { "description": "The root node in the resource hierarchy to which a particular entity's (e.g., company) resources belong.", "id": "Organization", @@ -1131,12 +1209,42 @@ }, "type": "object" }, + "UndeleteFolderMetadata": { + "description": "A status object which is used as the `metadata` field for the Operation returned by UndeleteFolder.", + "id": "UndeleteFolderMetadata", + "properties": {}, + "type": "object" + }, + "UndeleteOrganizationMetadata": { + "description": "A status object which is used as the `metadata` field for the Operation returned by UndeleteOrganization.", + "id": "UndeleteOrganizationMetadata", + "properties": {}, + "type": "object" + }, + "UndeleteProjectMetadata": { + "description": "A status object which is used as the `metadata` field for the Operation returned by UndeleteProject.", + "id": "UndeleteProjectMetadata", + "properties": {}, + "type": "object" + }, "UndeleteProjectRequest": { "description": "The request sent to the UndeleteProject method.", "id": "UndeleteProjectRequest", "properties": {}, "type": "object" }, + "UpdateFolderMetadata": { + "description": "A status object which is used as the `metadata` field for the Operation returned by UpdateFolder.", + "id": "UpdateFolderMetadata", + "properties": {}, + "type": "object" + }, + "UpdateProjectMetadata": { + "description": "A status object which is used as the `metadata` field for the Operation returned by UpdateProject.", + "id": "UpdateProjectMetadata", + "properties": {}, + "type": "object" + }, "UpdateTagKeyMetadata": { "description": "Runtime operation information for updating a TagKey.", "id": "UpdateTagKeyMetadata", diff --git a/discovery/cloudresourcemanager-v2.json b/discovery/cloudresourcemanager-v2.json index 8864b343ea2..ea6fd85e98f 100644 --- a/discovery/cloudresourcemanager-v2.json +++ b/discovery/cloudresourcemanager-v2.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" }, "https://www.googleapis.com/auth/cloud-platform.read-only": { "description": "View your data across Google Cloud Platform services" @@ -450,7 +450,7 @@ } } }, - "revision": "20210302", + "revision": "20210314", "rootUrl": "https://cloudresourcemanager.googleapis.com/", "schemas": { "AuditConfig": { @@ -589,6 +589,41 @@ }, "type": "object" }, + "CreateFolderMetadata": { + "description": "Metadata pertaining to the Folder creation process.", + "id": "CreateFolderMetadata", + "properties": { + "displayName": { + "description": "The display name of the folder.", + "type": "string" + }, + "parent": { + "description": "The resource name of the folder or organization we are creating the folder under.", + "type": "string" + } + }, + "type": "object" + }, + "CreateProjectMetadata": { + "description": "A status object which is used as the `metadata` field for the Operation returned by CreateProject. It provides insight for when significant phases of Project creation have completed.", + "id": "CreateProjectMetadata", + "properties": { + "createTime": { + "description": "Creation time of the project creation workflow.", + "format": "google-datetime", + "type": "string" + }, + "gettable": { + "description": "True if the project can be retrieved using GetProject. No other operations on the project are guaranteed to work until the project creation is complete.", + "type": "boolean" + }, + "ready": { + "description": "True if the project creation process is complete.", + "type": "boolean" + } + }, + "type": "object" + }, "CreateTagKeyMetadata": { "description": "Runtime operation information for creating a TagKey.", "id": "CreateTagKeyMetadata", @@ -601,6 +636,24 @@ "properties": {}, "type": "object" }, + "DeleteFolderMetadata": { + "description": "A status object which is used as the `metadata` field for the Operation returned by DeleteFolder.", + "id": "DeleteFolderMetadata", + "properties": {}, + "type": "object" + }, + "DeleteOrganizationMetadata": { + "description": "A status object which is used as the `metadata` field for the Operation returned by DeleteOrganization.", + "id": "DeleteOrganizationMetadata", + "properties": {}, + "type": "object" + }, + "DeleteProjectMetadata": { + "description": "A status object which is used as the `metadata` field for the Operation returned by DeleteProject.", + "id": "DeleteProjectMetadata", + "properties": {}, + "type": "object" + }, "DeleteTagKeyMetadata": { "description": "Runtime operation information for deleting a TagKey.", "id": "DeleteTagKeyMetadata", @@ -786,6 +839,25 @@ }, "type": "object" }, + "MoveFolderMetadata": { + "description": "Metadata pertaining to the Folder move process.", + "id": "MoveFolderMetadata", + "properties": { + "destinationParent": { + "description": "The resource name of the folder or organization to move the folder to.", + "type": "string" + }, + "displayName": { + "description": "The display name of the folder.", + "type": "string" + }, + "sourceParent": { + "description": "The resource name of the folder's parent.", + "type": "string" + } + }, + "type": "object" + }, "MoveFolderRequest": { "description": "The MoveFolder request message.", "id": "MoveFolderRequest", @@ -797,6 +869,12 @@ }, "type": "object" }, + "MoveProjectMetadata": { + "description": "A status object which is used as the `metadata` field for the Operation returned by MoveProject.", + "id": "MoveProjectMetadata", + "properties": {}, + "type": "object" + }, "Operation": { "description": "This resource represents a long-running operation that is the result of a network API call.", "id": "Operation", @@ -992,12 +1070,42 @@ }, "type": "object" }, + "UndeleteFolderMetadata": { + "description": "A status object which is used as the `metadata` field for the Operation returned by UndeleteFolder.", + "id": "UndeleteFolderMetadata", + "properties": {}, + "type": "object" + }, "UndeleteFolderRequest": { "description": "The UndeleteFolder request message.", "id": "UndeleteFolderRequest", "properties": {}, "type": "object" }, + "UndeleteOrganizationMetadata": { + "description": "A status object which is used as the `metadata` field for the Operation returned by UndeleteOrganization.", + "id": "UndeleteOrganizationMetadata", + "properties": {}, + "type": "object" + }, + "UndeleteProjectMetadata": { + "description": "A status object which is used as the `metadata` field for the Operation returned by UndeleteProject.", + "id": "UndeleteProjectMetadata", + "properties": {}, + "type": "object" + }, + "UpdateFolderMetadata": { + "description": "A status object which is used as the `metadata` field for the Operation returned by UpdateFolder.", + "id": "UpdateFolderMetadata", + "properties": {}, + "type": "object" + }, + "UpdateProjectMetadata": { + "description": "A status object which is used as the `metadata` field for the Operation returned by UpdateProject.", + "id": "UpdateProjectMetadata", + "properties": {}, + "type": "object" + }, "UpdateTagKeyMetadata": { "description": "Runtime operation information for updating a TagKey.", "id": "UpdateTagKeyMetadata", diff --git a/discovery/cloudresourcemanager-v2beta1.json b/discovery/cloudresourcemanager-v2beta1.json index f42a96cc5e2..d22dd312e89 100644 --- a/discovery/cloudresourcemanager-v2beta1.json +++ b/discovery/cloudresourcemanager-v2beta1.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" }, "https://www.googleapis.com/auth/cloud-platform.read-only": { "description": "View your data across Google Cloud Platform services" @@ -450,7 +450,7 @@ } } }, - "revision": "20210302", + "revision": "20210314", "rootUrl": "https://cloudresourcemanager.googleapis.com/", "schemas": { "AuditConfig": { @@ -589,6 +589,41 @@ }, "type": "object" }, + "CreateFolderMetadata": { + "description": "Metadata pertaining to the Folder creation process.", + "id": "CreateFolderMetadata", + "properties": { + "displayName": { + "description": "The display name of the folder.", + "type": "string" + }, + "parent": { + "description": "The resource name of the folder or organization we are creating the folder under.", + "type": "string" + } + }, + "type": "object" + }, + "CreateProjectMetadata": { + "description": "A status object which is used as the `metadata` field for the Operation returned by CreateProject. It provides insight for when significant phases of Project creation have completed.", + "id": "CreateProjectMetadata", + "properties": { + "createTime": { + "description": "Creation time of the project creation workflow.", + "format": "google-datetime", + "type": "string" + }, + "gettable": { + "description": "True if the project can be retrieved using GetProject. No other operations on the project are guaranteed to work until the project creation is complete.", + "type": "boolean" + }, + "ready": { + "description": "True if the project creation process is complete.", + "type": "boolean" + } + }, + "type": "object" + }, "CreateTagKeyMetadata": { "description": "Runtime operation information for creating a TagKey.", "id": "CreateTagKeyMetadata", @@ -601,6 +636,24 @@ "properties": {}, "type": "object" }, + "DeleteFolderMetadata": { + "description": "A status object which is used as the `metadata` field for the Operation returned by DeleteFolder.", + "id": "DeleteFolderMetadata", + "properties": {}, + "type": "object" + }, + "DeleteOrganizationMetadata": { + "description": "A status object which is used as the `metadata` field for the Operation returned by DeleteOrganization.", + "id": "DeleteOrganizationMetadata", + "properties": {}, + "type": "object" + }, + "DeleteProjectMetadata": { + "description": "A status object which is used as the `metadata` field for the Operation returned by DeleteProject.", + "id": "DeleteProjectMetadata", + "properties": {}, + "type": "object" + }, "DeleteTagKeyMetadata": { "description": "Runtime operation information for deleting a TagKey.", "id": "DeleteTagKeyMetadata", @@ -786,6 +839,25 @@ }, "type": "object" }, + "MoveFolderMetadata": { + "description": "Metadata pertaining to the Folder move process.", + "id": "MoveFolderMetadata", + "properties": { + "destinationParent": { + "description": "The resource name of the folder or organization to move the folder to.", + "type": "string" + }, + "displayName": { + "description": "The display name of the folder.", + "type": "string" + }, + "sourceParent": { + "description": "The resource name of the folder's parent.", + "type": "string" + } + }, + "type": "object" + }, "MoveFolderRequest": { "description": "The MoveFolder request message.", "id": "MoveFolderRequest", @@ -797,6 +869,12 @@ }, "type": "object" }, + "MoveProjectMetadata": { + "description": "A status object which is used as the `metadata` field for the Operation returned by MoveProject.", + "id": "MoveProjectMetadata", + "properties": {}, + "type": "object" + }, "Operation": { "description": "This resource represents a long-running operation that is the result of a network API call.", "id": "Operation", @@ -992,12 +1070,42 @@ }, "type": "object" }, + "UndeleteFolderMetadata": { + "description": "A status object which is used as the `metadata` field for the Operation returned by UndeleteFolder.", + "id": "UndeleteFolderMetadata", + "properties": {}, + "type": "object" + }, "UndeleteFolderRequest": { "description": "The UndeleteFolder request message.", "id": "UndeleteFolderRequest", "properties": {}, "type": "object" }, + "UndeleteOrganizationMetadata": { + "description": "A status object which is used as the `metadata` field for the Operation returned by UndeleteOrganization.", + "id": "UndeleteOrganizationMetadata", + "properties": {}, + "type": "object" + }, + "UndeleteProjectMetadata": { + "description": "A status object which is used as the `metadata` field for the Operation returned by UndeleteProject.", + "id": "UndeleteProjectMetadata", + "properties": {}, + "type": "object" + }, + "UpdateFolderMetadata": { + "description": "A status object which is used as the `metadata` field for the Operation returned by UpdateFolder.", + "id": "UpdateFolderMetadata", + "properties": {}, + "type": "object" + }, + "UpdateProjectMetadata": { + "description": "A status object which is used as the `metadata` field for the Operation returned by UpdateProject.", + "id": "UpdateProjectMetadata", + "properties": {}, + "type": "object" + }, "UpdateTagKeyMetadata": { "description": "Runtime operation information for updating a TagKey.", "id": "UpdateTagKeyMetadata", diff --git a/discovery/cloudresourcemanager-v3.json b/discovery/cloudresourcemanager-v3.json index 61104f50758..5bd70557946 100644 --- a/discovery/cloudresourcemanager-v3.json +++ b/discovery/cloudresourcemanager-v3.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" }, "https://www.googleapis.com/auth/cloud-platform.read-only": { "description": "View your data across Google Cloud Platform services" @@ -108,73 +108,706 @@ }, "protocol": "rest", "resources": { + "folders": { + "methods": { + "create": { + "description": "Creates a Folder in the resource hierarchy. Returns an Operation which can be used to track the progress of the folder creation workflow. Upon success the Operation.response field will be populated with the created Folder. In order to succeed, the addition of this new Folder must not violate the Folder naming, height or fanout constraints. + The Folder's display_name must be distinct from all other Folders that share its parent. + The addition of the Folder must not cause the active Folder hierarchy to exceed a height of 10. Note, the full active + deleted Folder hierarchy is allowed to reach a height of 20; this provides additional headroom when moving folders that contain deleted folders. + The addition of the Folder must not cause the total number of Folders under its parent to exceed 300. If the operation fails due to a folder constraint violation, some errors may be returned by the CreateFolder request, with status code FAILED_PRECONDITION and an error description. Other folder constraint violations will be communicated in the Operation, with the specific PreconditionFailure returned via the details list in the Operation.error field. The caller must have `resourcemanager.folders.create` permission on the identified parent.", + "flatPath": "v3/folders", + "httpMethod": "POST", + "id": "cloudresourcemanager.folders.create", + "parameterOrder": [], + "parameters": {}, + "path": "v3/folders", + "request": { + "$ref": "Folder" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Requests deletion of a Folder. The Folder is moved into the DELETE_REQUESTED state immediately, and is deleted approximately 30 days later. This method may only be called on an empty Folder, where a Folder is empty if it doesn't contain any Folders or Projects in the ACTIVE state. If called on a folder in DELETE_REQUESTED state the result will be a no-op success. The caller must have `resourcemanager.folders.delete` permission on the identified folder.", + "flatPath": "v3/folders/{foldersId}", + "httpMethod": "DELETE", + "id": "cloudresourcemanager.folders.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Folder to be deleted. Must be of the form `folders/{folder_id}`.", + "location": "path", + "pattern": "^folders/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v3/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Retrieves a Folder identified by the supplied resource name. Valid Folder resource names have the format `folders/{folder_id}` (for example, `folders/1234`). The caller must have `resourcemanager.folders.get` permission on the identified folder.", + "flatPath": "v3/folders/{foldersId}", + "httpMethod": "GET", + "id": "cloudresourcemanager.folders.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Folder to retrieve. Must be of the form `folders/{folder_id}`.", + "location": "path", + "pattern": "^folders/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v3/{+name}", + "response": { + "$ref": "Folder" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + }, + "getIamPolicy": { + "description": "Gets the access control policy for a Folder. The returned policy may be empty if no such policy or resource exists. The `resource` field should be the Folder's resource name, e.g. \"folders/1234\". The caller must have `resourcemanager.folders.getIamPolicy` permission on the identified folder.", + "flatPath": "v3/folders/{foldersId}:getIamPolicy", + "httpMethod": "POST", + "id": "cloudresourcemanager.folders.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^folders/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v3/{+resource}:getIamPolicy", + "request": { + "$ref": "GetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + }, + "list": { + "description": "Lists the Folders that are direct descendants of supplied parent resource. List provides a strongly consistent view of the Folders underneath the specified parent resource. List returns Folders sorted based upon the (ascending) lexical ordering of their display_name. The caller must have `resourcemanager.folders.list` permission on the identified parent.", + "flatPath": "v3/folders", + "httpMethod": "GET", + "id": "cloudresourcemanager.folders.list", + "parameterOrder": [], + "parameters": { + "pageSize": { + "description": "Optional. The maximum number of Folders to return in the response. If unspecified, server picks an appropriate default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A pagination token returned from a previous call to `ListFolders` that indicates where this listing should continue from.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the Organization or Folder whose Folders are being listed. Must be of the form `folders/{folder_id}` or `organizations/{org_id}`. Access to this method is controlled by checking the `resourcemanager.folders.list` permission on the `parent`.", + "location": "query", + "type": "string" + }, + "showDeleted": { + "description": "Optional. Controls whether Folders in the DELETE_REQUESTED state should be returned. Defaults to false.", + "location": "query", + "type": "boolean" + } + }, + "path": "v3/folders", + "response": { + "$ref": "ListFoldersResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + }, + "move": { + "description": "Moves a Folder under a new resource parent. Returns an Operation which can be used to track the progress of the folder move workflow. Upon success the Operation.response field will be populated with the moved Folder. Upon failure, a FolderOperationError categorizing the failure cause will be returned - if the failure occurs synchronously then the FolderOperationError will be returned via the Status.details field and if it occurs asynchronously then the FolderOperation will be returned via the Operation.error field. In addition, the Operation.metadata field will be populated with a FolderOperation message as an aid to stateless clients. Folder moves will be rejected if they violate either the naming, height or fanout constraints described in the CreateFolder documentation. The caller must have `resourcemanager.folders.move` permission on the folder's current and proposed new parent.", + "flatPath": "v3/folders/{foldersId}:move", + "httpMethod": "POST", + "id": "cloudresourcemanager.folders.move", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Folder to move. Must be of the form folders/{folder_id}", + "location": "path", + "pattern": "^folders/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v3/{+name}:move", + "request": { + "$ref": "MoveFolderRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a Folder, changing its display_name. Changes to the folder display_name will be rejected if they violate either the display_name formatting rules or naming constraints described in the CreateFolder documentation. The Folder's display_name must start and end with a letter or digit, may contain letters, digits, spaces, hyphens and underscores and can be between 3 and 30 characters. This is captured by the regular expression: `\\p{L}\\p{N}{1,28}[\\p{L}\\p{N}]`. The caller must have `resourcemanager.folders.update` permission on the identified folder. If the update fails due to the unique name constraint then a PreconditionFailure explaining this violation will be returned in the Status.details field.", + "flatPath": "v3/folders/{foldersId}", + "httpMethod": "PATCH", + "id": "cloudresourcemanager.folders.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. The resource name of the Folder. Its format is `folders/{folder_id}`, for example: \"folders/1234\".", + "location": "path", + "pattern": "^folders/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. Fields to be updated. Only the `display_name` can be updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v3/{+name}", + "request": { + "$ref": "Folder" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "search": { + "description": "Search for folders that match specific filter criteria. Search provides an eventually consistent view of the folders a user has access to which meet the specified filter criteria. This will only return folders on which the caller has the permission `resourcemanager.folders.get`.", + "flatPath": "v3/folders:search", + "httpMethod": "GET", + "id": "cloudresourcemanager.folders.search", + "parameterOrder": [], + "parameters": { + "pageSize": { + "description": "Optional. The maximum number of folders to return in the response. If unspecified, server picks an appropriate default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A pagination token returned from a previous call to `SearchFolders` that indicates from where search should continue.", + "location": "query", + "type": "string" + }, + "query": { + "description": "Optional. Search criteria used to select the Folders to return. If no search criteria is specified then all accessible folders will be returned. Query expressions can be used to restrict results based upon displayName, state and parent, where the operators `=` (`:`) `NOT`, `AND` and `OR` can be used along with the suffix wildcard symbol `*`. The displayName field in a query expression should use escaped quotes for values that include whitespace to prevent unexpected behavior. | Field | Description | |-------------------------|----------------------------------------| | displayName | Filters by displayName. | | parent | Filters by parent (e.g. folders/123). | | state, lifecycleState | Filters by state. | Some example queries are: * Query `displayName=Test*` returns Folder resources whose display name starts with \"Test\". * Query `state=ACTIVE` returns Folder resources with `state` set to `ACTIVE`. * Query `parent=folders/123` returns Folder resources that have `folders/123` as a parent resource. * Query `parent=folders/123 AND state=ACTIVE` returns active Folder resources that have `folders/123` as a parent resource. * Query `displayName=\\\\\"Test String\\\\\"` returns Folder resources with display names that include both \"Test\" and \"String\".", + "location": "query", + "type": "string" + } + }, + "path": "v3/folders:search", + "response": { + "$ref": "SearchFoldersResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on a Folder, replacing any existing policy. The `resource` field should be the Folder's resource name, e.g. \"folders/1234\". The caller must have `resourcemanager.folders.setIamPolicy` permission on the identified folder.", + "flatPath": "v3/folders/{foldersId}:setIamPolicy", + "httpMethod": "POST", + "id": "cloudresourcemanager.folders.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^folders/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v3/{+resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified Folder. The `resource` field should be the Folder's resource name, e.g. \"folders/1234\". There are no permissions required for making this API call.", + "flatPath": "v3/folders/{foldersId}:testIamPermissions", + "httpMethod": "POST", + "id": "cloudresourcemanager.folders.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^folders/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v3/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "undelete": { + "description": "Cancels the deletion request for a Folder. This method may be called on a Folder in any state. If Folder is in ACTIVE state the result will be a no-op success. In order to succeed, the Folder's parent must be in the ACTIVE state. In addition, reintroducing the folder into the tree must not violate folder naming, height and fanout constraints described in the CreateFolder documentation. The caller must have `resourcemanager.folders.undelete` permission on the identified folder.", + "flatPath": "v3/folders/{foldersId}:undelete", + "httpMethod": "POST", + "id": "cloudresourcemanager.folders.undelete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Folder to undelete. Must be of the form `folders/{folder_id}`.", + "location": "path", + "pattern": "^folders/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v3/{+name}:undelete", + "request": { + "$ref": "UndeleteFolderRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "liens": { "methods": { "create": { - "description": "Create a Lien which applies to the resource denoted by the `parent` field. Callers of this method will require permission on the `parent` resource. For example, applying to `projects/1234` requires permission `resourcemanager.projects.updateLiens`. NOTE: Some resources may limit the number of Liens which may be applied.", - "flatPath": "v3/liens", + "description": "Create a Lien which applies to the resource denoted by the `parent` field. Callers of this method will require permission on the `parent` resource. For example, applying to `projects/1234` requires permission `resourcemanager.projects.updateLiens`. NOTE: Some resources may limit the number of Liens which may be applied.", + "flatPath": "v3/liens", + "httpMethod": "POST", + "id": "cloudresourcemanager.liens.create", + "parameterOrder": [], + "parameters": {}, + "path": "v3/liens", + "request": { + "$ref": "Lien" + }, + "response": { + "$ref": "Lien" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + }, + "delete": { + "description": "Delete a Lien by `name`. Callers of this method will require permission on the `parent` resource. For example, a Lien with a `parent` of `projects/1234` requires permission `resourcemanager.projects.updateLiens`.", + "flatPath": "v3/liens/{liensId}", + "httpMethod": "DELETE", + "id": "cloudresourcemanager.liens.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name/identifier of the Lien to delete.", + "location": "path", + "pattern": "^liens/.*$", + "required": true, + "type": "string" + } + }, + "path": "v3/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + }, + "get": { + "description": "Retrieve a Lien by `name`. Callers of this method will require permission on the `parent` resource. For example, a Lien with a `parent` of `projects/1234` requires permission `resourcemanager.projects.get`", + "flatPath": "v3/liens/{liensId}", + "httpMethod": "GET", + "id": "cloudresourcemanager.liens.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name/identifier of the Lien.", + "location": "path", + "pattern": "^liens/.*$", + "required": true, + "type": "string" + } + }, + "path": "v3/{+name}", + "response": { + "$ref": "Lien" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + }, + "list": { + "description": "List all Liens applied to the `parent` resource. Callers of this method will require permission on the `parent` resource. For example, a Lien with a `parent` of `projects/1234` requires permission `resourcemanager.projects.get`.", + "flatPath": "v3/liens", + "httpMethod": "GET", + "id": "cloudresourcemanager.liens.list", + "parameterOrder": [], + "parameters": { + "pageSize": { + "description": "The maximum number of items to return. This is a suggestion for the server.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The `next_page_token` value returned from a previous List request, if any.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The name of the resource to list all attached Liens. For example, `projects/1234`. (google.api.field_policy).resource_type annotation is not set since the parent depends on the meta api implementation. This field could be a project or other sub project resources.", + "location": "query", + "type": "string" + } + }, + "path": "v3/liens", + "response": { + "$ref": "ListLiensResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + } + } + }, + "operations": { + "methods": { + "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": "v3/operations/{operationsId}", + "httpMethod": "GET", + "id": "cloudresourcemanager.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^operations/.*$", + "required": true, + "type": "string" + } + }, + "path": "v3/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + } + } + }, + "organizations": { + "methods": { + "get": { + "description": "Fetches an Organization resource identified by the specified resource name.", + "flatPath": "v3/organizations/{organizationsId}", + "httpMethod": "GET", + "id": "cloudresourcemanager.organizations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Organization to fetch. This is the organization's relative path in the API, formatted as \"organizations/[organizationId]\". For example, \"organizations/1234\".", + "location": "path", + "pattern": "^organizations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v3/{+name}", + "response": { + "$ref": "Organization" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + }, + "getIamPolicy": { + "description": "Gets the access control policy for an Organization resource. May be empty if no such policy or resource exists. The `resource` field should be the organization's resource name, e.g. \"organizations/123\". Authorization requires the Google IAM permission `resourcemanager.organizations.getIamPolicy` on the specified organization", + "flatPath": "v3/organizations/{organizationsId}:getIamPolicy", + "httpMethod": "POST", + "id": "cloudresourcemanager.organizations.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^organizations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v3/{+resource}:getIamPolicy", + "request": { + "$ref": "GetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + }, + "search": { + "description": "Searches Organization resources that are visible to the user and satisfy the specified filter. This method returns Organizations in an unspecified order. New Organizations do not necessarily appear at the end of the results, and may take a small amount of time to appear. Search will only return organizations on which the user has the permission `resourcemanager.organizations.get`", + "flatPath": "v3/organizations:search", + "httpMethod": "GET", + "id": "cloudresourcemanager.organizations.search", + "parameterOrder": [], + "parameters": { + "pageSize": { + "description": "Optional. The maximum number of Organizations to return in the response. If unspecified, server picks an appropriate default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A pagination token returned from a previous call to `SearchOrganizations` that indicates from where listing should continue.", + "location": "query", + "type": "string" + }, + "query": { + "description": "Optional. An optional query string used to filter the Organizations to return in the response. Query rules are case-insensitive. | Field | Description | |------------------|--------------------------------------------| | directoryCustomerId, owner.directoryCustomerId | Filters by directory customer id. | | domain | Filters by domain. | Organizations may be queried by `directoryCustomerId` or by `domain`, where the domain is a G Suite domain, for example: * Query `directorycustomerid:123456789` returns Organization resources with `owner.directory_customer_id` equal to `123456789`. * Query `domain:google.com` returns Organization resources corresponding to the domain `google.com`.", + "location": "query", + "type": "string" + } + }, + "path": "v3/organizations:search", + "response": { + "$ref": "SearchOrganizationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on an Organization resource. Replaces any existing policy. The `resource` field should be the organization's resource name, e.g. \"organizations/123\". Authorization requires the Google IAM permission `resourcemanager.organizations.setIamPolicy` on the specified organization", + "flatPath": "v3/organizations/{organizationsId}:setIamPolicy", + "httpMethod": "POST", + "id": "cloudresourcemanager.organizations.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^organizations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v3/{+resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified Organization. The `resource` field should be the organization's resource name, e.g. \"organizations/123\". There are no permissions required for making this API call.", + "flatPath": "v3/organizations/{organizationsId}:testIamPermissions", + "httpMethod": "POST", + "id": "cloudresourcemanager.organizations.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^organizations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v3/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + } + } + }, + "projects": { + "methods": { + "create": { + "description": "Request that a new Project be created. The result is an Operation which can be used to track the creation process. This process usually takes a few seconds, but can sometimes take much longer. The tracking Operation is automatically deleted after a few hours, so there is no need to call DeleteOperation.", + "flatPath": "v3/projects", "httpMethod": "POST", - "id": "cloudresourcemanager.liens.create", + "id": "cloudresourcemanager.projects.create", "parameterOrder": [], "parameters": {}, - "path": "v3/liens", + "path": "v3/projects", "request": { - "$ref": "Lien" + "$ref": "Project" }, "response": { - "$ref": "Lien" + "$ref": "Operation" }, "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" + "https://www.googleapis.com/auth/cloud-platform" ] }, "delete": { - "description": "Delete a Lien by `name`. Callers of this method will require permission on the `parent` resource. For example, a Lien with a `parent` of `projects/1234` requires permission `resourcemanager.projects.updateLiens`.", - "flatPath": "v3/liens/{liensId}", + "description": "Marks the Project identified by the specified `name` (for example, `projects/415104041262`) for deletion. This method will only affect the Project if it has a lifecycle state of ACTIVE. This method changes the Project's lifecycle state from ACTIVE to DELETE_REQUESTED. The deletion starts at an unspecified time, at which point the Project is no longer accessible. Until the deletion completes, you can check the lifecycle state checked by retrieving the Project with GetProject, and the Project remains visible to ListProjects. However, you cannot update the project. After the deletion completes, the Project is not retrievable by the GetProject, ListProjects, and SearchProjects methods. This method behaves idempotently (eg., deleting a `DELETE_REQUESTED` project will not be an error, but also won't do anything). The caller must have delete permissions for this Project.", + "flatPath": "v3/projects/{projectsId}", "httpMethod": "DELETE", - "id": "cloudresourcemanager.liens.delete", + "id": "cloudresourcemanager.projects.delete", "parameterOrder": [ "name" ], "parameters": { "name": { - "description": "Required. The name/identifier of the Lien to delete.", + "description": "Required. The name of the Project (for example, `projects/415104041262`).", "location": "path", - "pattern": "^liens/.*$", + "pattern": "^projects/[^/]+$", "required": true, "type": "string" } }, "path": "v3/{+name}", "response": { - "$ref": "Empty" + "$ref": "Operation" }, "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" + "https://www.googleapis.com/auth/cloud-platform" ] }, "get": { - "description": "Retrieve a Lien by `name`. Callers of this method will require permission on the `parent` resource. For example, a Lien with a `parent` of `projects/1234` requires permission `resourcemanager.projects.get`", - "flatPath": "v3/liens/{liensId}", + "description": "Retrieves the Project identified by the specified `name` (for example, `projects/415104041262`). The caller must have read permissions for this Project.", + "flatPath": "v3/projects/{projectsId}", "httpMethod": "GET", - "id": "cloudresourcemanager.liens.get", + "id": "cloudresourcemanager.projects.get", "parameterOrder": [ "name" ], "parameters": { "name": { - "description": "Required. The name/identifier of the Lien.", + "description": "Required. The name of the project (for example, `projects/415104041262`).", "location": "path", - "pattern": "^liens/.*$", + "pattern": "^projects/[^/]+$", "required": true, "type": "string" } }, "path": "v3/{+name}", "response": { - "$ref": "Lien" + "$ref": "Project" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + }, + "getIamPolicy": { + "description": "Returns the IAM access control policy for the specified Project. Permission is denied if the policy or the resource does not exist.", + "flatPath": "v3/projects/{projectsId}:getIamPolicy", + "httpMethod": "POST", + "id": "cloudresourcemanager.projects.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v3/{+resource}:getIamPolicy", + "request": { + "$ref": "GetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", @@ -182,67 +815,221 @@ ] }, "list": { - "description": "List all Liens applied to the `parent` resource. Callers of this method will require permission on the `parent` resource. For example, a Lien with a `parent` of `projects/1234` requires permission `resourcemanager.projects.get`.", - "flatPath": "v3/liens", + "description": "Lists Projects that are direct children of the specified folder or organization resource. List provides a strongly consistent view of the Projects underneath the specified parent resource. List returns Projects sorted based upon the (ascending) lexical ordering of their `display_name`. The caller must have `resourcemanager.projects.list` permission on the identified parent.", + "flatPath": "v3/projects", "httpMethod": "GET", - "id": "cloudresourcemanager.liens.list", + "id": "cloudresourcemanager.projects.list", "parameterOrder": [], "parameters": { "pageSize": { - "description": "The maximum number of items to return. This is a suggestion for the server.", + "description": "Optional. The maximum number of Projects to return in the response. The server can return fewer Projects than requested. If unspecified, server picks an appropriate default.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "The `next_page_token` value returned from a previous List request, if any.", + "description": "Optional. A pagination token returned from a previous call to ListProjects that indicates from where listing should continue.", "location": "query", "type": "string" }, "parent": { - "description": "Required. The name of the resource to list all attached Liens. For example, `projects/1234`. (google.api.field_policy).resource_type annotation is not set since the parent depends on the meta api implementation. This field could be a project or other sub project resources.", + "description": "Required. The name of the parent resource to list projects under. For example, setting this field to 'folders/1234' would list all projects directly under that folder.", "location": "query", "type": "string" + }, + "showDeleted": { + "description": "Optional. Indicate that Projects in the `DELETE_REQUESTED` state should also be returned. Normally only `ACTIVE` projects are returned.", + "location": "query", + "type": "boolean" } }, - "path": "v3/liens", + "path": "v3/projects", "response": { - "$ref": "ListLiensResponse" + "$ref": "ListProjectsResponse" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only" ] - } - } - }, - "operations": { - "methods": { - "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": "v3/operations/{operationsId}", - "httpMethod": "GET", - "id": "cloudresourcemanager.operations.get", + }, + "move": { + "description": "Move a Project under a new resource parent. Returns an operation which can be used to track the process of the Project move workflow. Upon success, the Operation.response field will be populated with the moved Project. The caller must have `resourcemanager.projects.update` permission on the Project and have `resourcemanager.projects.move` permission on the Project's current and proposed new parent. ", + "flatPath": "v3/projects/{projectsId}:move", + "httpMethod": "POST", + "id": "cloudresourcemanager.projects.move", "parameterOrder": [ "name" ], "parameters": { "name": { - "description": "The name of the operation resource.", + "description": "Required. The name of the project to move.", "location": "path", - "pattern": "^operations/.*$", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v3/{+name}:move", + "request": { + "$ref": "MoveProjectRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the attributes of the Project identified by the specified `name` (for example, `projects/415104041262`). At present this is only useful for updating the display_name and labels. Deleting all labels requires an update mask for labels field. The caller must have modify permissions for this Project.", + "flatPath": "v3/projects/{projectsId}", + "httpMethod": "PATCH", + "id": "cloudresourcemanager.projects.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. The unique resource name of the Project. It is an int64 generated number prefixed by \"projects/\". Example: `projects/415104041262`", + "location": "path", + "pattern": "^projects/[^/]+$", "required": true, "type": "string" + }, + "updateMask": { + "description": "Optional. An update mask to selectively update fields.", + "format": "google-fieldmask", + "location": "query", + "type": "string" } }, "path": "v3/{+name}", + "request": { + "$ref": "Project" + }, "response": { "$ref": "Operation" }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "search": { + "description": "Search for Projects that the caller has the `resourcemanager.projects.get` permission on and satisfy the specified query. This method returns Projects in an unspecified order. This method is eventually consistent with project mutations; this means that a newly created project may not appear in the results or recent updates to an existing project may not be reflected in the results. To retrieve the latest state of a project, use the GetProject method.", + "flatPath": "v3/projects:search", + "httpMethod": "GET", + "id": "cloudresourcemanager.projects.search", + "parameterOrder": [], + "parameters": { + "pageSize": { + "description": "Optional. The maximum number of Projects to return in the response. The server can return fewer Projects than requested. If unspecified, server picks an appropriate default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A pagination token returned from a previous call to ListProjects that indicates from where listing should continue.", + "location": "query", + "type": "string" + }, + "query": { + "description": "Optional. A query string for searching for projects that the caller has `resourcemanager.projects.get` permission to. If multiple fields are included in the query, the it will return results that match any of the fields. Some eligible fields are: | Field | Description | |-------------------------|----------------------------------------------| | displayName, name | Filters by displayName. | | parent.type | Parent's type: `folder` or `organization`. | | parent.id | Parent's id number (e.g. 123) | | parent | Project's parent. (e.g. folders/123, organizations/*) Prefer parent field over parent.id and parent.type. | | id, projectId | Filters by projectId. | | state, lifecycleState | Filters by state. | | labels | Filters by label name or value. | | labels. (where *key* is the name of a label) | Filters by label name. | Search expressions are case insensitive. Some examples queries: | Query | Description | |------------------|-----------------------------------------------------| | name:how* | The project's name starts with \"how\". | | name:Howl | The project's name is `Howl` or `howl`. | | name:HOWL | Equivalent to above. | | NAME:howl | Equivalent to above. | | labels.color:* | The project has the label `color`. | | labels.color:red | The project's label `color` has the value `red`. | | labels.color:red labels.size:big | The project's label `color` has the value `red` and its label `size` has the value `big`. | If no query is specified, the call will return projects for which the user has the `resourcemanager.projects.get` permission.", + "location": "query", + "type": "string" + } + }, + "path": "v3/projects:search", + "response": { + "$ref": "SearchProjectsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the IAM access control policy for the specified Project. CAUTION: This method will replace the existing policy, and cannot be used to append additional IAM settings. NOTE: Removing service accounts from policies or changing their roles can render services completely inoperable. It is important to understand how the service account is being used before removing or updating its roles. The following constraints apply when using `setIamPolicy()`: + Project does not support `allUsers` and `allAuthenticatedUsers` as `members` in a `Binding` of a `Policy`. + The owner role can be granted to a `user`, `serviceAccount`, or a group that is part of an organization. For example, group@myownpersonaldomain.com could be added as an owner to a project in the myownpersonaldomain.com organization, but not the examplepetstore.com organization. + Service accounts can be made owners of a project directly without any restrictions. However, to be added as an owner, a user must be invited via Cloud Platform console and must accept the invitation. + A user cannot be granted the owner role using `setIamPolicy()`. The user must be granted the owner role using the Cloud Platform Console and must explicitly accept the invitation. + Invitations to grant the owner role cannot be sent using `setIamPolicy()`; they must be sent only using the Cloud Platform Console. + Membership changes that leave the project without any owners that have accepted the Terms of Service (ToS) will be rejected. + If the project is not part of an organization, there must be at least one owner who has accepted the Terms of Service (ToS) agreement in the policy. Calling `setIamPolicy()` to remove the last ToS-accepted owner from the policy will fail. This restriction also applies to legacy projects that no longer have owners who have accepted the ToS. Edits to IAM policies will be rejected until the lack of a ToS-accepting owner is rectified. + Calling this method requires enabling the App Engine Admin API.", + "flatPath": "v3/projects/{projectsId}:setIamPolicy", + "httpMethod": "POST", + "id": "cloudresourcemanager.projects.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v3/{+resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified Project.", + "flatPath": "v3/projects/{projectsId}:testIamPermissions", + "httpMethod": "POST", + "id": "cloudresourcemanager.projects.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v3/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only" ] + }, + "undelete": { + "description": "Restores the Project identified by the specified `name` (for example, `projects/415104041262`). You can only use this method for a Project that has a lifecycle state of DELETE_REQUESTED. After deletion starts, the Project cannot be restored. The caller must have undelete permissions for this Project.", + "flatPath": "v3/projects/{projectsId}:undelete", + "httpMethod": "POST", + "id": "cloudresourcemanager.projects.undelete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the Project (for example, `projects/415104041262`). Required.", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v3/{+name}:undelete", + "request": { + "$ref": "UndeleteProjectRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } } }, @@ -305,7 +1092,7 @@ "parameterOrder": [], "parameters": { "pageSize": { - "description": "Optional. The maximum number of TagBindings to return in the response. This is currently not used by the server and will return the full page even if a size is specified.", + "description": "Optional. The maximum number of TagBindings to return in the response. The server allows a maximum of 300 TagBindings to return. If unspecified, the server will use 100 as the default.", "format": "int32", "location": "query", "type": "integer" @@ -456,13 +1243,13 @@ "parameterOrder": [], "parameters": { "pageSize": { - "description": "Optional. The maximum number of TagKeys to return in the response. This is currently not used by the server and will return the full page even if a size is specified currently.", + "description": "Optional. The maximum number of TagKeys to return in the response. The server allows a maximum of 300 TagKeys to return. If unspecified, the server will use 100 as the default.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "Optional. A pagination token returned from a previous call to `ListTagKey` that indicates where this listing should continue from. This is currently not used by the server.", + "description": "Optional. A pagination token returned from a previous call to `ListTagKey` that indicates where this listing should continue from.", "location": "query", "type": "string" }, @@ -702,13 +1489,13 @@ "parameterOrder": [], "parameters": { "pageSize": { - "description": "Optional. The maximum number of TagValues to return in the response. This is currently not used by the server and will return the full page even if a size is specified currently.", + "description": "Optional. The maximum number of TagValues to return in the response. The server allows a maximum of 300 TagValues to return. If unspecified, the server will use 100 as the default.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "Optional. A pagination token returned from a previous call to `ListTagValues` that indicates where this listing should continue from. This is currently not used by the server.", + "description": "Optional. A pagination token returned from a previous call to `ListTagValues` that indicates where this listing should continue from.", "location": "query", "type": "string" }, @@ -825,7 +1612,7 @@ } } }, - "revision": "20210302", + "revision": "20210314", "rootUrl": "https://cloudresourcemanager.googleapis.com/", "schemas": { "AuditConfig": { @@ -957,9 +1744,44 @@ ], "type": "string" }, - "sourceParent": { - "description": "The resource name of the folder's parent. Only applicable when the operation_type is MOVE.", - "type": "string" + "sourceParent": { + "description": "The resource name of the folder's parent. Only applicable when the operation_type is MOVE.", + "type": "string" + } + }, + "type": "object" + }, + "CreateFolderMetadata": { + "description": "Metadata pertaining to the Folder creation process.", + "id": "CreateFolderMetadata", + "properties": { + "displayName": { + "description": "The display name of the folder.", + "type": "string" + }, + "parent": { + "description": "The resource name of the folder or organization we are creating the folder under.", + "type": "string" + } + }, + "type": "object" + }, + "CreateProjectMetadata": { + "description": "A status object which is used as the `metadata` field for the Operation returned by CreateProject. It provides insight for when significant phases of Project creation have completed.", + "id": "CreateProjectMetadata", + "properties": { + "createTime": { + "description": "Creation time of the project creation workflow.", + "format": "google-datetime", + "type": "string" + }, + "gettable": { + "description": "True if the project can be retrieved using GetProject. No other operations on the project are guaranteed to work until the project creation is complete.", + "type": "boolean" + }, + "ready": { + "description": "True if the project creation process is complete.", + "type": "boolean" } }, "type": "object" @@ -976,6 +1798,24 @@ "properties": {}, "type": "object" }, + "DeleteFolderMetadata": { + "description": "A status object which is used as the `metadata` field for the Operation returned by DeleteFolder.", + "id": "DeleteFolderMetadata", + "properties": {}, + "type": "object" + }, + "DeleteOrganizationMetadata": { + "description": "A status object which is used as the `metadata` field for the Operation returned by DeleteOrganization.", + "id": "DeleteOrganizationMetadata", + "properties": {}, + "type": "object" + }, + "DeleteProjectMetadata": { + "description": "A status object which is used as the `metadata` field for the Operation returned by DeleteProject.", + "id": "DeleteProjectMetadata", + "properties": {}, + "type": "object" + }, "DeleteTagKeyMetadata": { "description": "Runtime operation information for deleting a TagKey.", "id": "DeleteTagKeyMetadata", @@ -1017,6 +1857,64 @@ }, "type": "object" }, + "Folder": { + "description": "A Folder in an Organization's resource hierarchy, used to organize that Organization's resources.", + "id": "Folder", + "properties": { + "createTime": { + "description": "Output only. Timestamp when the Folder was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "deleteTime": { + "description": "Output only. Timestamp when the Folder was requested to be deleted.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "The folder's display name. A folder's display name must be unique amongst its siblings, e.g. no two folders with the same parent can share the same display name. The display name must start and end with a letter or digit, may contain letters, digits, spaces, hyphens and underscores and can be no longer than 30 characters. This is captured by the regular expression: `[\\p{L}\\p{N}]([\\p{L}\\p{N}_- ]{0,28}[\\p{L}\\p{N}])?`.", + "type": "string" + }, + "etag": { + "description": "Output only. A checksum computed by the server based on the current value of the Folder resource. This may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Output only. The resource name of the Folder. Its format is `folders/{folder_id}`, for example: \"folders/1234\".", + "readOnly": true, + "type": "string" + }, + "parent": { + "description": "Required. The Folder's parent's resource name. Updates to the folder's parent must be performed via MoveFolder.", + "type": "string" + }, + "state": { + "description": "Output only. The lifecycle state of the folder. Updates to the state must be performed via DeleteFolder and UndeleteFolder.", + "enum": [ + "STATE_UNSPECIFIED", + "ACTIVE", + "DELETE_REQUESTED" + ], + "enumDescriptions": [ + "Unspecified state.", + "The normal and active state.", + "The folder has been marked for deletion by the user." + ], + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. Timestamp when the Folder was last modified.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "FolderOperation": { "description": "Metadata describing a long running folder operation", "id": "FolderOperation", @@ -1143,6 +2041,24 @@ }, "type": "object" }, + "ListFoldersResponse": { + "description": "The ListFolders response message.", + "id": "ListFoldersResponse", + "properties": { + "folders": { + "description": "A possibly paginated list of Folders that are direct descendants of the specified parent resource.", + "items": { + "$ref": "Folder" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A pagination token returned from a previous call to `ListFolders` that indicates from where listing should continue.", + "type": "string" + } + }, + "type": "object" + }, "ListLiensResponse": { "description": "The response message for Liens.ListLiens.", "id": "ListLiensResponse", @@ -1161,12 +2077,30 @@ }, "type": "object" }, + "ListProjectsResponse": { + "description": "A page of the response received from the ListProjects method. A paginated response where more pages are available has `next_page_token` set. This token can be used in a subsequent request to retrieve the next request page. NOTE: A response may contain fewer elements than the request `page_size` and still have a `next_page_token`.", + "id": "ListProjectsResponse", + "properties": { + "nextPageToken": { + "description": "Pagination token. If the result set is too large to fit in a single response, this token is returned. It encodes the position of the current result cursor. Feeding this value into a new list request with the `page_token` parameter gives the next page of the results. When `next_page_token` is not filled in, there is no next page and the list returned is the last page in the result set. Pagination tokens have a limited lifetime.", + "type": "string" + }, + "projects": { + "description": "The list of Projects under the parent. This list can be paginated.", + "items": { + "$ref": "Project" + }, + "type": "array" + } + }, + "type": "object" + }, "ListTagBindingsResponse": { "description": "The ListTagBindings response.", "id": "ListTagBindingsResponse", "properties": { "nextPageToken": { - "description": "A pagination token returned from a previous call to `ListTagBindings` that indicates from where listing should continue. This is currently not used, but the server may at any point start supplying a valid token.", + "description": "A pagination token returned from a previous call to `ListTagBindings` that indicates from where listing should continue.", "type": "string" }, "tagBindings": { @@ -1184,7 +2118,7 @@ "id": "ListTagKeysResponse", "properties": { "nextPageToken": { - "description": "A pagination token returned from a previous call to `ListTagKeys` that indicates from where listing should continue. This is currently not used, but the server may at any point start supplying a valid token.", + "description": "A pagination token returned from a previous call to `ListTagKeys` that indicates from where listing should continue.", "type": "string" }, "tagKeys": { @@ -1215,6 +2149,53 @@ }, "type": "object" }, + "MoveFolderMetadata": { + "description": "Metadata pertaining to the Folder move process.", + "id": "MoveFolderMetadata", + "properties": { + "destinationParent": { + "description": "The resource name of the folder or organization to move the folder to.", + "type": "string" + }, + "displayName": { + "description": "The display name of the folder.", + "type": "string" + }, + "sourceParent": { + "description": "The resource name of the folder's parent.", + "type": "string" + } + }, + "type": "object" + }, + "MoveFolderRequest": { + "description": "The MoveFolder request message.", + "id": "MoveFolderRequest", + "properties": { + "destinationParent": { + "description": "Required. The resource name of the Folder or Organization to reparent the folder under. Must be of the form `folders/{folder_id}` or `organizations/{org_id}`.", + "type": "string" + } + }, + "type": "object" + }, + "MoveProjectMetadata": { + "description": "A status object which is used as the `metadata` field for the Operation returned by MoveProject.", + "id": "MoveProjectMetadata", + "properties": {}, + "type": "object" + }, + "MoveProjectRequest": { + "description": "The request sent to MoveProject method.", + "id": "MoveProjectRequest", + "properties": { + "destinationParent": { + "description": "Required. The new parent to move the Project under.", + "type": "string" + } + }, + "type": "object" + }, "Operation": { "description": "This resource represents a long-running operation that is the result of a network API call.", "id": "Operation", @@ -1250,6 +2231,65 @@ }, "type": "object" }, + "Organization": { + "description": "The root node in the resource hierarchy to which a particular entity's (e.g., company) resources belong.", + "id": "Organization", + "properties": { + "createTime": { + "description": "Output only. Timestamp when the Organization was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "deleteTime": { + "description": "Output only. Timestamp when the Organization was requested for deletion.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "directoryCustomerId": { + "description": "Immutable. The G Suite / Workspace customer id used in the Directory API.", + "type": "string" + }, + "displayName": { + "description": "Output only. A human-readable string that refers to the Organization in the GCP Console UI. This string is set by the server and cannot be changed. The string will be set to the primary domain (for example, \"google.com\") of the G Suite customer that owns the organization.", + "readOnly": true, + "type": "string" + }, + "etag": { + "description": "Output only. A checksum computed by the server based on the current value of the Organization resource. This may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Output only. The resource name of the organization. This is the organization's relative path in the API. Its format is \"organizations/[organization_id]\". For example, \"organizations/1234\".", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. The organization's current lifecycle state.", + "enum": [ + "STATE_UNSPECIFIED", + "ACTIVE", + "DELETE_REQUESTED" + ], + "enumDescriptions": [ + "Unspecified state. This is only useful for distinguishing unset values.", + "The normal and active state.", + "The Organization has been marked for deletion by the user." + ], + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. Timestamp when the Organization was last modified.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "Policy": { "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time < timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", "id": "Policy", @@ -1281,6 +2321,75 @@ }, "type": "object" }, + "Project": { + "description": "A Project is a high-level Google Cloud Platform entity. It is a container for ACLs, APIs, App Engine Apps, VMs, and other Google Cloud Platform resources.", + "id": "Project", + "properties": { + "createTime": { + "description": "Output only. Creation time.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "deleteTime": { + "description": "Output only. The time at which this resource was requested for deletion.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "Optional. A user-assigned display name of the Project. When present it must be between 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, single-quote, double-quote, space, and exclamation point. Example: `My Project`", + "type": "string" + }, + "etag": { + "description": "Output only. A checksum computed by the server based on the current value of the Project resource. This may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.", + "readOnly": true, + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. The labels associated with this Project. Label keys must be between 1 and 63 characters long and must conform to the following regular expression: \\[a-z\\](\\[-a-z0-9\\]*\\[a-z0-9\\])?. Label values must be between 0 and 63 characters long and must conform to the regular expression (\\[a-z\\](\\[-a-z0-9\\]*\\[a-z0-9\\])?)?. No more than 256 labels can be associated with a given resource. Clients should store labels in a representation such as JSON that does not depend on specific characters being disallowed. Example: `\"myBusinessDimension\" : \"businessValue\"`", + "type": "object" + }, + "name": { + "description": "Output only. The unique resource name of the Project. It is an int64 generated number prefixed by \"projects/\". Example: `projects/415104041262`", + "readOnly": true, + "type": "string" + }, + "parent": { + "description": "Optional. A reference to a parent Resource. eg., `organizations/123` or `folders/876`.", + "type": "string" + }, + "projectId": { + "description": "Immutable. The unique, user-assigned id of the Project. It must be 6 to 30 lowercase ASCII letters, digits, or hyphens. It must start with a letter. Trailing hyphens are prohibited. Example: `tokyo-rain-123`", + "type": "string" + }, + "state": { + "description": "Output only. The Project lifecycle state.", + "enum": [ + "STATE_UNSPECIFIED", + "ACTIVE", + "DELETE_REQUESTED" + ], + "enumDescriptions": [ + "Unspecified state. This is only used/useful for distinguishing unset values.", + "The normal and active state.", + "The project has been marked for deletion by the user (by invoking DeleteProject) or by the system (Google Cloud Platform). This can generally be reversed by invoking UndeleteProject." + ], + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. The most recent time this resource was modified.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "ProjectCreationStatus": { "description": "A status object which is used as the `metadata` field for the Operation returned by CreateProject. It provides insight for when significant phases of Project creation have completed.", "id": "ProjectCreationStatus", @@ -1301,6 +2410,60 @@ }, "type": "object" }, + "SearchFoldersResponse": { + "description": "The response message for searching folders.", + "id": "SearchFoldersResponse", + "properties": { + "folders": { + "description": "A possibly paginated folder search results. the specified parent resource.", + "items": { + "$ref": "Folder" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A pagination token returned from a previous call to `SearchFolders` that indicates from where searching should continue.", + "type": "string" + } + }, + "type": "object" + }, + "SearchOrganizationsResponse": { + "description": "The response returned from the `SearchOrganizations` method.", + "id": "SearchOrganizationsResponse", + "properties": { + "nextPageToken": { + "description": "A pagination token to be used to retrieve the next page of results. If the result is too large to fit within the page size specified in the request, this field will be set with a token that can be used to fetch the next page of results. If this field is empty, it indicates that this response contains the last page of results.", + "type": "string" + }, + "organizations": { + "description": "The list of Organizations that matched the search query, possibly paginated.", + "items": { + "$ref": "Organization" + }, + "type": "array" + } + }, + "type": "object" + }, + "SearchProjectsResponse": { + "description": "A page of the response received from the SearchProjects method. A paginated response where more pages are available has `next_page_token` set. This token can be used in a subsequent request to retrieve the next request page.", + "id": "SearchProjectsResponse", + "properties": { + "nextPageToken": { + "description": "Pagination token. If the result set is too large to fit in a single response, this token is returned. It encodes the position of the current result cursor. Feeding this value into a new list request with the `page_token` parameter gives the next page of the results. When `next_page_token` is not filled in, there is no next page and the list returned is the last page in the result set. Pagination tokens have a limited lifetime.", + "type": "string" + }, + "projects": { + "description": "The list of Projects that matched the list filter query. This list can be paginated.", + "items": { + "$ref": "Project" + }, + "type": "array" + } + }, + "type": "object" + }, "SetIamPolicyRequest": { "description": "Request message for `SetIamPolicy` method.", "id": "SetIamPolicyRequest", @@ -1480,6 +2643,48 @@ }, "type": "object" }, + "UndeleteFolderMetadata": { + "description": "A status object which is used as the `metadata` field for the Operation returned by UndeleteFolder.", + "id": "UndeleteFolderMetadata", + "properties": {}, + "type": "object" + }, + "UndeleteFolderRequest": { + "description": "The UndeleteFolder request message.", + "id": "UndeleteFolderRequest", + "properties": {}, + "type": "object" + }, + "UndeleteOrganizationMetadata": { + "description": "A status object which is used as the `metadata` field for the Operation returned by UndeleteOrganization.", + "id": "UndeleteOrganizationMetadata", + "properties": {}, + "type": "object" + }, + "UndeleteProjectMetadata": { + "description": "A status object which is used as the `metadata` field for the Operation returned by UndeleteProject.", + "id": "UndeleteProjectMetadata", + "properties": {}, + "type": "object" + }, + "UndeleteProjectRequest": { + "description": "The request sent to the UndeleteProject method.", + "id": "UndeleteProjectRequest", + "properties": {}, + "type": "object" + }, + "UpdateFolderMetadata": { + "description": "A status object which is used as the `metadata` field for the Operation returned by UpdateFolder.", + "id": "UpdateFolderMetadata", + "properties": {}, + "type": "object" + }, + "UpdateProjectMetadata": { + "description": "A status object which is used as the `metadata` field for the Operation returned by UpdateProject.", + "id": "UpdateProjectMetadata", + "properties": {}, + "type": "object" + }, "UpdateTagKeyMetadata": { "description": "Runtime operation information for updating a TagKey.", "id": "UpdateTagKeyMetadata", diff --git a/discovery/cloudshell-v1.json b/discovery/cloudshell-v1.json index 90668cda2f7..96539f4f1c7 100644 --- a/discovery/cloudshell-v1.json +++ b/discovery/cloudshell-v1.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" } } } @@ -374,7 +374,7 @@ } } }, - "revision": "20210308", + "revision": "20210320", "rootUrl": "https://cloudshell.googleapis.com/", "schemas": { "AddPublicKeyMetadata": { diff --git a/discovery/compute-alpha.json b/discovery/compute-alpha.json index d2b394905b2..6350eb5a1dc 100644 --- a/discovery/compute-alpha.json +++ b/discovery/compute-alpha.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" }, "https://www.googleapis.com/auth/compute": { "description": "View and manage your Google Compute Engine resources" @@ -29,7 +29,7 @@ "description": "Creates and runs virtual machines on Google Cloud Platform.", "discoveryVersion": "v1", "documentationLink": "https://developers.google.com/compute/docs/reference/latest/", - "etag": "\"uWj2hSb4GVjzdDlAnRd2gbM1ZQ8/oj984kGKQfh4yFKo9X1341Cqgys\"", + "etag": "\"uWj2hSb4GVjzdDlAnRd2gbM1ZQ8/q86KO_TM075jWLyNAiNZlSqSxJ8\"", "icons": { "x16": "https://www.google.com/images/icons/product/compute_engine-16.png", "x32": "https://www.google.com/images/icons/product/compute_engine-32.png" @@ -8165,10 +8165,10 @@ "https://www.googleapis.com/auth/compute" ] }, - "setAutoHealingPolicies": { - "description": "Motifies the autohealing policy for the instances in this managed instance group. [Deprecated] This method is deprecated. Use instanceGroupManagers.patch instead.", + "resumeInstances": { + "description": "Flags the specified instances in the managed instance group to be resumed. This method increases the targetSize and decreases the targetSuspendedSize of the managed instance group by the number of instances that you resume. The resumeInstances operation is marked DONE if the resumeInstances request is successful. The underlying actions take additional time. You must separately verify the status of the RESUMING action with the listmanagedinstances method.\n\nIn this request, you can only specify instances that are suspended. For example, if an instance was previously suspended using the suspendInstances method, it can be resumed using the resumeInstances method.\n\nIf a health check is attached to the managed instance group, the specified instances will be verified as healthy after they are resumed.\n\nYou can specify a maximum of 1000 instances with this method per request.", "httpMethod": "POST", - "id": "compute.instanceGroupManagers.setAutoHealingPolicies", + "id": "compute.instanceGroupManagers.resumeInstances", "parameterOrder": [ "project", "zone", @@ -8176,7 +8176,7 @@ ], "parameters": { "instanceGroupManager": { - "description": "The name of the instance group manager.", + "description": "The name of the managed instance group.", "location": "path", "required": true, "type": "string" @@ -8200,9 +8200,9 @@ "type": "string" } }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setAutoHealingPolicies", + "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resumeInstances", "request": { - "$ref": "InstanceGroupManagersSetAutoHealingRequest" + "$ref": "InstanceGroupManagersResumeInstancesRequest" }, "response": { "$ref": "Operation" @@ -8212,10 +8212,10 @@ "https://www.googleapis.com/auth/compute" ] }, - "setInstanceTemplate": { - "description": "Specifies the instance template to use when creating new instances in this group. The templates for existing instances in the group do not change unless you run recreateInstances, run applyUpdatesToInstances, or set the group's updatePolicy.type to PROACTIVE.", + "setAutoHealingPolicies": { + "description": "Motifies the autohealing policy for the instances in this managed instance group. [Deprecated] This method is deprecated. Use instanceGroupManagers.patch instead.", "httpMethod": "POST", - "id": "compute.instanceGroupManagers.setInstanceTemplate", + "id": "compute.instanceGroupManagers.setAutoHealingPolicies", "parameterOrder": [ "project", "zone", @@ -8223,7 +8223,7 @@ ], "parameters": { "instanceGroupManager": { - "description": "The name of the managed instance group.", + "description": "The name of the instance group manager.", "location": "path", "required": true, "type": "string" @@ -8247,9 +8247,9 @@ "type": "string" } }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate", + "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setAutoHealingPolicies", "request": { - "$ref": "InstanceGroupManagersSetInstanceTemplateRequest" + "$ref": "InstanceGroupManagersSetAutoHealingRequest" }, "response": { "$ref": "Operation" @@ -8259,10 +8259,10 @@ "https://www.googleapis.com/auth/compute" ] }, - "setTargetPools": { - "description": "Modifies the target pools to which all instances in this managed instance group are assigned. The target pools automatically apply to all of the instances in the managed instance group. This operation is marked DONE when you make the request even if the instances have not yet been added to their target pools. The change might take some time to apply to all of the instances in the group depending on the size of the group.", + "setInstanceTemplate": { + "description": "Specifies the instance template to use when creating new instances in this group. The templates for existing instances in the group do not change unless you run recreateInstances, run applyUpdatesToInstances, or set the group's updatePolicy.type to PROACTIVE.", "httpMethod": "POST", - "id": "compute.instanceGroupManagers.setTargetPools", + "id": "compute.instanceGroupManagers.setInstanceTemplate", "parameterOrder": [ "project", "zone", @@ -8294,9 +8294,9 @@ "type": "string" } }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setTargetPools", + "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate", "request": { - "$ref": "InstanceGroupManagersSetTargetPoolsRequest" + "$ref": "InstanceGroupManagersSetInstanceTemplateRequest" }, "response": { "$ref": "Operation" @@ -8306,16 +8306,22 @@ "https://www.googleapis.com/auth/compute" ] }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource.", + "setTargetPools": { + "description": "Modifies the target pools to which all instances in this managed instance group are assigned. The target pools automatically apply to all of the instances in the managed instance group. This operation is marked DONE when you make the request even if the instances have not yet been added to their target pools. The change might take some time to apply to all of the instances in the group depending on the size of the group.", "httpMethod": "POST", - "id": "compute.instanceGroupManagers.testIamPermissions", + "id": "compute.instanceGroupManagers.setTargetPools", "parameterOrder": [ "project", "zone", - "resource" + "instanceGroupManager" ], "parameters": { + "instanceGroupManager": { + "description": "The name of the managed instance group.", + "location": "path", + "required": true, + "type": "string" + }, "project": { "description": "Project ID for this request.", "location": "path", @@ -8323,38 +8329,34 @@ "required": true, "type": "string" }, - "resource": { - "description": "Name or id of the resource for this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, + "requestId": { + "description": "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.\n\nFor 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.\n\nThe 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" }, "zone": { - "description": "The name of the zone for this request.", + "description": "The name of the zone where the managed instance group is located.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "required": true, "type": "string" } }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{resource}/testIamPermissions", + "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setTargetPools", "request": { - "$ref": "TestPermissionsRequest" + "$ref": "InstanceGroupManagersSetTargetPoolsRequest" }, "response": { - "$ref": "TestPermissionsResponse" + "$ref": "Operation" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" + "https://www.googleapis.com/auth/compute" ] }, - "update": { - "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is updated even if the instances in the group have not yet been updated. You must separately verify the status of the individual instances with the listManagedInstances method.", - "httpMethod": "PUT", - "id": "compute.instanceGroupManagers.update", + "startInstances": { + "description": "Flags the specified instances in the managed instance group to be started. This method increases the targetSize and decreases the targetStoppedSize of the managed instance group by the number of instances that you start. The startInstances operation is marked DONE if the startInstances request is successful. The underlying actions take additional time. You must separately verify the status of the STARTING action with the listmanagedinstances method.\n\nIn this request, you can only specify instances that are stopped. For example, if an instance was previously stopped using the stopInstances method, it can be started using the startInstances method.\n\nIf a health check is attached to the managed instance group, the specified instances will be verified as healthy after they are started.\n\nYou can specify a maximum of 1000 instances with this method per request.", + "httpMethod": "POST", + "id": "compute.instanceGroupManagers.startInstances", "parameterOrder": [ "project", "zone", @@ -8362,7 +8364,7 @@ ], "parameters": { "instanceGroupManager": { - "description": "The name of the instance group manager.", + "description": "The name of the managed instance group.", "location": "path", "required": true, "type": "string" @@ -8380,15 +8382,15 @@ "type": "string" }, "zone": { - "description": "The name of the zone where you want to create the managed instance group.", + "description": "The name of the zone where the managed instance group is located.", "location": "path", "required": true, "type": "string" } }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}", + "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/startInstances", "request": { - "$ref": "InstanceGroupManager" + "$ref": "InstanceGroupManagersStartInstancesRequest" }, "response": { "$ref": "Operation" @@ -8398,10 +8400,10 @@ "https://www.googleapis.com/auth/compute" ] }, - "updatePerInstanceConfigs": { - "description": "Inserts or updates per-instance configs for the managed instance group. perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch.", + "stopInstances": { + "description": "Flags the specified instances in the managed instance group to be immediately stopped. You can only specify instances that are running in this request. This method reduces the targetSize and increases the targetStoppedSize of the managed instance group by the number of instances that you stop. The stopInstances operation is marked DONE if the stopInstances request is successful. The underlying actions take additional time. You must separately verify the status of the STOPPING action with the listmanagedinstances method.\n\nIf the instanceLifecyclePolicy.metadataBasedReadinessSignal field is set on the Instance Group Manager, each instance will be initialized before it is stopped, to give user programs time to perform necessary tasks. To initialize an instance, the Instance Group Manager sets the metadata key google-compute-initialization-intent to value INITIALIZE_AND_STOP on the instance, and waits for the user program to signal it is ready. This is done by setting the guest attribute path google-compute/initialization-state to value INITIALIZED. If the instance does not signal successful initialization (does not set the guest attribute to INITIALIZED) before timeout, the initialization is considered failed and the instance is not stopped.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is suspended.\n\nStopped instances can be started using the startInstances method.\n\nYou can specify a maximum of 1000 instances with this method per request.", "httpMethod": "POST", - "id": "compute.instanceGroupManagers.updatePerInstanceConfigs", + "id": "compute.instanceGroupManagers.stopInstances", "parameterOrder": [ "project", "zone", @@ -8409,7 +8411,7 @@ ], "parameters": { "instanceGroupManager": { - "description": "The name of the managed instance group. It should conform to RFC1035.", + "description": "The name of the managed instance group.", "location": "path", "required": true, "type": "string" @@ -8427,15 +8429,15 @@ "type": "string" }, "zone": { - "description": "The name of the zone where the managed instance group is located. It should conform to RFC1035.", + "description": "The name of the zone where the managed instance group is located.", "location": "path", "required": true, "type": "string" } }, - "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/updatePerInstanceConfigs", + "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/stopInstances", "request": { - "$ref": "InstanceGroupManagersUpdatePerInstanceConfigsReq" + "$ref": "InstanceGroupManagersStopInstancesRequest" }, "response": { "$ref": "Operation" @@ -8444,23 +8446,19 @@ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] - } - } - }, - "instanceGroups": { - "methods": { - "addInstances": { - "description": "Adds a list of instances to the specified instance group. All of the instances in the instance group must be in the same network/subnetwork. Read Adding instances for more information.", + }, + "suspendInstances": { + "description": "Flags the specified instances in the managed instance group to be immediately suspended. You can only specify instances that are running in this request. This method reduces the targetSize and increases the targetSuspendedSize of the managed instance group by the number of instances that you suspend. The suspendInstances operation is marked DONE if the suspendInstances request is successful. The underlying actions take additional time. You must separately verify the status of the SUSPENDING action with the listmanagedinstances method.\n\nIf the instanceLifecyclePolicy.metadataBasedReadinessSignal field is set on the Instance Group Manager, each instance will be initialized before it is suspended, to give user programs time to perform necessary tasks. To initialize an instance, the Instance Group Manager sets the metadata key google-compute-initialization-intent to value INITIALIZE_AND_SUSPEND on the instance, and waits for the user program to signal it is ready. This is done by setting the guest attribute path google-compute/initialization-state to value INITIALIZED. If the instance does not signal successful initialization (does not set the guest attribute to INITIALIZED) before timeout, the initialization is considered failed and the instance is not suspended.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is suspended.\n\nSuspended instances can be resumed using the resumeInstances method.\n\nYou can specify a maximum of 1000 instances with this method per request.", "httpMethod": "POST", - "id": "compute.instanceGroups.addInstances", + "id": "compute.instanceGroupManagers.suspendInstances", "parameterOrder": [ "project", "zone", - "instanceGroup" + "instanceGroupManager" ], "parameters": { - "instanceGroup": { - "description": "The name of the instance group where you are adding instances.", + "instanceGroupManager": { + "description": "The name of the managed instance group.", "location": "path", "required": true, "type": "string" @@ -8478,15 +8476,15 @@ "type": "string" }, "zone": { - "description": "The name of the zone where the instance group is located.", + "description": "The name of the zone where the managed instance group is located.", "location": "path", "required": true, "type": "string" } }, - "path": "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/addInstances", + "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/suspendInstances", "request": { - "$ref": "InstanceGroupsAddInstancesRequest" + "$ref": "InstanceGroupManagersSuspendInstancesRequest" }, "response": { "$ref": "Operation" @@ -8496,42 +8494,16 @@ "https://www.googleapis.com/auth/compute" ] }, - "aggregatedList": { - "description": "Retrieves the list of instance groups and sorts them by zone.", - "httpMethod": "GET", - "id": "compute.instanceGroups.aggregatedList", + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource.", + "httpMethod": "POST", + "id": "compute.instanceGroupManagers.testIamPermissions", "parameterOrder": [ - "project" + "project", + "zone", + "resource" ], "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.\n\nYou 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.\n\nTo 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) ```", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or `creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", - "location": "query", - "type": "string" - }, "project": { "description": "Project ID for this request.", "location": "path", @@ -8539,15 +8511,27 @@ "required": true, "type": "string" }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", - "location": "query", - "type": "boolean" + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "zone": { + "description": "The name of the zone for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" } }, - "path": "projects/{project}/aggregated/instanceGroups", + "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{resource}/testIamPermissions", + "request": { + "$ref": "TestPermissionsRequest" + }, "response": { - "$ref": "InstanceGroupAggregatedList" + "$ref": "TestPermissionsResponse" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", @@ -8555,18 +8539,18 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, - "delete": { - "description": "Deletes the specified instance group. The instances in the group are not deleted. Note that instance group must not belong to a backend service. Read Deleting an instance group for more information.", - "httpMethod": "DELETE", - "id": "compute.instanceGroups.delete", + "update": { + "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is updated even if the instances in the group have not yet been updated. You must separately verify the status of the individual instances with the listManagedInstances method.", + "httpMethod": "PUT", + "id": "compute.instanceGroupManagers.update", "parameterOrder": [ "project", "zone", - "instanceGroup" + "instanceGroupManager" ], "parameters": { - "instanceGroup": { - "description": "The name of the instance group to delete.", + "instanceGroupManager": { + "description": "The name of the instance group manager.", "location": "path", "required": true, "type": "string" @@ -8584,13 +8568,16 @@ "type": "string" }, "zone": { - "description": "The name of the zone where the instance group is located.", + "description": "The name of the zone where you want to create the managed instance group.", "location": "path", "required": true, "type": "string" } }, - "path": "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}", + "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}", + "request": { + "$ref": "InstanceGroupManager" + }, "response": { "$ref": "Operation" }, @@ -8599,18 +8586,18 @@ "https://www.googleapis.com/auth/compute" ] }, - "get": { - "description": "Returns the specified zonal instance group. Get a list of available zonal instance groups by making a list() request.\n\nFor managed instance groups, use the instanceGroupManagers or regionInstanceGroupManagers methods instead.", - "httpMethod": "GET", - "id": "compute.instanceGroups.get", + "updatePerInstanceConfigs": { + "description": "Inserts or updates per-instance configs for the managed instance group. perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch.", + "httpMethod": "POST", + "id": "compute.instanceGroupManagers.updatePerInstanceConfigs", "parameterOrder": [ "project", "zone", - "instanceGroup" + "instanceGroupManager" ], "parameters": { - "instanceGroup": { - "description": "The name of the instance group.", + "instanceGroupManager": { + "description": "The name of the managed instance group. It should conform to RFC1035.", "location": "path", "required": true, "type": "string" @@ -8622,32 +8609,50 @@ "required": true, "type": "string" }, + "requestId": { + "description": "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.\n\nFor 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.\n\nThe 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" + }, "zone": { - "description": "The name of the zone where the instance group is located.", + "description": "The name of the zone where the managed instance group is located. It should conform to RFC1035.", "location": "path", "required": true, "type": "string" } }, - "path": "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}", + "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/updatePerInstanceConfigs", + "request": { + "$ref": "InstanceGroupManagersUpdatePerInstanceConfigsReq" + }, "response": { - "$ref": "InstanceGroup" + "$ref": "Operation" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" + "https://www.googleapis.com/auth/compute" ] - }, - "insert": { - "description": "Creates an instance group in the specified project using the parameters that are included in the request.", + } + } + }, + "instanceGroups": { + "methods": { + "addInstances": { + "description": "Adds a list of instances to the specified instance group. All of the instances in the instance group must be in the same network/subnetwork. Read Adding instances for more information.", "httpMethod": "POST", - "id": "compute.instanceGroups.insert", + "id": "compute.instanceGroups.addInstances", "parameterOrder": [ "project", - "zone" + "zone", + "instanceGroup" ], "parameters": { + "instanceGroup": { + "description": "The name of the instance group where you are adding instances.", + "location": "path", + "required": true, + "type": "string" + }, "project": { "description": "Project ID for this request.", "location": "path", @@ -8661,15 +8666,15 @@ "type": "string" }, "zone": { - "description": "The name of the zone where you want to create the instance group.", + "description": "The name of the zone where the instance group is located.", "location": "path", "required": true, "type": "string" } }, - "path": "projects/{project}/zones/{zone}/instanceGroups", + "path": "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/addInstances", "request": { - "$ref": "InstanceGroup" + "$ref": "InstanceGroupsAddInstancesRequest" }, "response": { "$ref": "Operation" @@ -8679,13 +8684,196 @@ "https://www.googleapis.com/auth/compute" ] }, - "list": { - "description": "Retrieves the list of zonal instance group resources contained within the specified zone.\n\nFor managed instance groups, use the instanceGroupManagers or regionInstanceGroupManagers methods instead.", + "aggregatedList": { + "description": "Retrieves the list of instance groups and sorts them by zone.", "httpMethod": "GET", - "id": "compute.instanceGroups.list", + "id": "compute.instanceGroups.aggregatedList", "parameterOrder": [ - "project", - "zone" + "project" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.\n\nYou 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.\n\nTo 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) ```", + "location": "query", + "type": "string" + }, + "includeAllScopes": { + "description": "Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.", + "location": "query", + "type": "boolean" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or `creationTimestamp desc` is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "returnPartialSuccess": { + "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + "location": "query", + "type": "boolean" + } + }, + "path": "projects/{project}/aggregated/instanceGroups", + "response": { + "$ref": "InstanceGroupAggregatedList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "delete": { + "description": "Deletes the specified instance group. The instances in the group are not deleted. Note that instance group must not belong to a backend service. Read Deleting an instance group for more information.", + "httpMethod": "DELETE", + "id": "compute.instanceGroups.delete", + "parameterOrder": [ + "project", + "zone", + "instanceGroup" + ], + "parameters": { + "instanceGroup": { + "description": "The name of the instance group to delete.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "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.\n\nFor 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.\n\nThe 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" + }, + "zone": { + "description": "The name of the zone where the instance group is located.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "description": "Returns the specified zonal instance group. Get a list of available zonal instance groups by making a list() request.\n\nFor managed instance groups, use the instanceGroupManagers or regionInstanceGroupManagers methods instead.", + "httpMethod": "GET", + "id": "compute.instanceGroups.get", + "parameterOrder": [ + "project", + "zone", + "instanceGroup" + ], + "parameters": { + "instanceGroup": { + "description": "The name of the instance group.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "zone": { + "description": "The name of the zone where the instance group is located.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}", + "response": { + "$ref": "InstanceGroup" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "description": "Creates an instance group in the specified project using the parameters that are included in the request.", + "httpMethod": "POST", + "id": "compute.instanceGroups.insert", + "parameterOrder": [ + "project", + "zone" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "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.\n\nFor 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.\n\nThe 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" + }, + "zone": { + "description": "The name of the zone where you want to create the instance group.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/zones/{zone}/instanceGroups", + "request": { + "$ref": "InstanceGroup" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "description": "Retrieves the list of zonal instance group resources contained within the specified zone.\n\nFor managed instance groups, use the instanceGroupManagers or regionInstanceGroupManagers methods instead.", + "httpMethod": "GET", + "id": "compute.instanceGroups.list", + "parameterOrder": [ + "project", + "zone" ], "parameters": { "filter": { @@ -10349,6 +10537,44 @@ "https://www.googleapis.com/auth/compute" ] }, + "sendDiagnosticInterrupt": { + "description": "TODO(b/180520210): Add IAM permission for this API. Sends diagnostic interrupt to the instance.", + "httpMethod": "POST", + "id": "compute.instances.sendDiagnosticInterrupt", + "parameterOrder": [ + "project", + "zone", + "instance" + ], + "parameters": { + "instance": { + "description": "Name of the instance scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "zone": { + "description": "The name of the zone for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/zones/{zone}/instances/{instance}/sendDiagnosticInterrupt", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "setDeletionProtection": { "description": "Sets deletion protection on the instance.", "httpMethod": "POST", @@ -22061,10 +22287,10 @@ "https://www.googleapis.com/auth/compute" ] }, - "setAutoHealingPolicies": { - "description": "Modifies the autohealing policy for the instances in this managed instance group. [Deprecated] This method is deprecated. Use regionInstanceGroupManagers.patch instead.", + "resumeInstances": { + "description": "Flags the specified instances in the managed instance group to be resumed. This method increases the targetSize and decreases the targetSuspendedSize of the managed instance group by the number of instances that you resume. The resumeInstances operation is marked DONE if the resumeInstances request is successful. The underlying actions take additional time. You must separately verify the status of the RESUMING action with the listmanagedinstances method.\n\nIn this request, you can only specify instances that are suspended. For example, if an instance was previously suspended using the suspendInstances method, it can be resumed using the resumeInstances method.\n\nIf a health check is attached to the managed instance group, the specified instances will be verified as healthy after they are resumed.\n\nYou can specify a maximum of 1000 instances with this method per request.", "httpMethod": "POST", - "id": "compute.regionInstanceGroupManagers.setAutoHealingPolicies", + "id": "compute.regionInstanceGroupManagers.resumeInstances", "parameterOrder": [ "project", "region", @@ -22096,9 +22322,9 @@ "type": "string" } }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setAutoHealingPolicies", + "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resumeInstances", "request": { - "$ref": "RegionInstanceGroupManagersSetAutoHealingRequest" + "$ref": "RegionInstanceGroupManagersResumeInstancesRequest" }, "response": { "$ref": "Operation" @@ -22108,57 +22334,104 @@ "https://www.googleapis.com/auth/compute" ] }, - "setInstanceTemplate": { - "description": "Sets the instance template to use when creating new instances or recreating instances in this group. Existing instances are not affected.", - "httpMethod": "POST", - "id": "compute.regionInstanceGroupManagers.setInstanceTemplate", - "parameterOrder": [ - "project", - "region", - "instanceGroupManager" - ], - "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Project ID for this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "required": true, - "type": "string" - }, - "requestId": { - "description": "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.\n\nFor 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.\n\nThe 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": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate", - "request": { - "$ref": "RegionInstanceGroupManagersSetTemplateRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "setTargetPools": { - "description": "Modifies the target pools to which all new instances in this group are assigned. Existing instances in the group are not affected.", + "setAutoHealingPolicies": { + "description": "Modifies the autohealing policy for the instances in this managed instance group. [Deprecated] This method is deprecated. Use regionInstanceGroupManagers.patch instead.", "httpMethod": "POST", - "id": "compute.regionInstanceGroupManagers.setTargetPools", + "id": "compute.regionInstanceGroupManagers.setAutoHealingPolicies", + "parameterOrder": [ + "project", + "region", + "instanceGroupManager" + ], + "parameters": { + "instanceGroupManager": { + "description": "Name of the managed instance group.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "required": true, + "type": "string" + }, + "requestId": { + "description": "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.\n\nFor 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.\n\nThe 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": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setAutoHealingPolicies", + "request": { + "$ref": "RegionInstanceGroupManagersSetAutoHealingRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "setInstanceTemplate": { + "description": "Sets the instance template to use when creating new instances or recreating instances in this group. Existing instances are not affected.", + "httpMethod": "POST", + "id": "compute.regionInstanceGroupManagers.setInstanceTemplate", + "parameterOrder": [ + "project", + "region", + "instanceGroupManager" + ], + "parameters": { + "instanceGroupManager": { + "description": "The name of the managed instance group.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "required": true, + "type": "string" + }, + "requestId": { + "description": "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.\n\nFor 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.\n\nThe 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": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate", + "request": { + "$ref": "RegionInstanceGroupManagersSetTemplateRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "setTargetPools": { + "description": "Modifies the target pools to which all new instances in this group are assigned. Existing instances in the group are not affected.", + "httpMethod": "POST", + "id": "compute.regionInstanceGroupManagers.setTargetPools", "parameterOrder": [ "project", "region", @@ -22202,6 +22475,147 @@ "https://www.googleapis.com/auth/compute" ] }, + "startInstances": { + "description": "Flags the specified instances in the managed instance group to be started. This method increases the targetSize and decreases the targetStoppedSize of the managed instance group by the number of instances that you start. The startInstances operation is marked DONE if the startInstances request is successful. The underlying actions take additional time. You must separately verify the status of the STARTING action with the listmanagedinstances method.\n\nIn this request, you can only specify instances that are stopped. For example, if an instance was previously stopped using the stopInstances method, it can be started using the startInstances method.\n\nIf a health check is attached to the managed instance group, the specified instances will be verified as healthy after they are started.\n\nYou can specify a maximum of 1000 instances with this method per request.", + "httpMethod": "POST", + "id": "compute.regionInstanceGroupManagers.startInstances", + "parameterOrder": [ + "project", + "region", + "instanceGroupManager" + ], + "parameters": { + "instanceGroupManager": { + "description": "Name of the managed instance group.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "required": true, + "type": "string" + }, + "requestId": { + "description": "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.\n\nFor 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.\n\nThe 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": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/startInstances", + "request": { + "$ref": "RegionInstanceGroupManagersStartInstancesRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "stopInstances": { + "description": "Flags the specified instances in the managed instance group to be immediately stopped. You can only specify instances that are running in this request. This method reduces the targetSize and increases the targetStoppedSize of the managed instance group by the number of instances that you stop. The stopInstances operation is marked DONE if the stopInstances request is successful. The underlying actions take additional time. You must separately verify the status of the STOPPING action with the listmanagedinstances method.\n\nIf the instanceLifecyclePolicy.metadataBasedReadinessSignal field is set on the Instance Group Manager, each instance will be initialized before it is stopped, to give user programs time to perform necessary tasks. To initialize an instance, the Instance Group Manager sets the metadata key google-compute-initialization-intent to value INITIALIZE_AND_STOP on the instance, and waits for the user program to signal it is ready. This is done by setting the guest attribute path google-compute/initialization-state to value INITIALIZED. If the instance does not signal successful initialization (does not set the guest attribute to INITIALIZED) before timeout, the initialization is considered failed and the instance is not stopped.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is suspended.\n\nStopped instances can be started using the startInstances method.\n\nYou can specify a maximum of 1000 instances with this method per request.", + "httpMethod": "POST", + "id": "compute.regionInstanceGroupManagers.stopInstances", + "parameterOrder": [ + "project", + "region", + "instanceGroupManager" + ], + "parameters": { + "instanceGroupManager": { + "description": "The name of the managed instance group.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "required": true, + "type": "string" + }, + "requestId": { + "description": "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.\n\nFor 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.\n\nThe 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": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/stopInstances", + "request": { + "$ref": "RegionInstanceGroupManagersStopInstancesRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "suspendInstances": { + "description": "Flags the specified instances in the managed instance group to be immediately suspended. You can only specify instances that are running in this request. This method reduces the targetSize and increases the targetSuspendedSize of the managed instance group by the number of instances that you suspend. The suspendInstances operation is marked DONE if the suspendInstances request is successful. The underlying actions take additional time. You must separately verify the status of the SUSPENDING action with the listmanagedinstances method.\n\nIf the instanceLifecyclePolicy.metadataBasedReadinessSignal field is set on the Instance Group Manager, each instance will be initialized before it is suspended, to give user programs time to perform necessary tasks. To initialize an instance, the Instance Group Manager sets the metadata key google-compute-initialization-intent to value INITIALIZE_AND_SUSPEND on the instance, and waits for the user program to signal it is ready. This is done by setting the guest attribute path google-compute/initialization-state to value INITIALIZED. If the instance does not signal successful initialization (does not set the guest attribute to INITIALIZED) before timeout, the initialization is considered failed and the instance is not suspended.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is suspended.\n\nSuspended instances can be resumed using the resumeInstances method.\n\nYou can specify a maximum of 1000 instances with this method per request.", + "httpMethod": "POST", + "id": "compute.regionInstanceGroupManagers.suspendInstances", + "parameterOrder": [ + "project", + "region", + "instanceGroupManager" + ], + "parameters": { + "instanceGroupManager": { + "description": "Name of the managed instance group.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "required": true, + "type": "string" + }, + "requestId": { + "description": "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.\n\nFor 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.\n\nThe 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": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/suspendInstances", + "request": { + "$ref": "RegionInstanceGroupManagersSuspendInstancesRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "testIamPermissions": { "description": "Returns permissions that a caller has on the specified resource.", "httpMethod": "POST", @@ -23275,79 +23689,867 @@ } } }, - "regionNotificationEndpoints": { + "regionNetworkFirewallPolicies": { "methods": { - "aggregatedList": { - "description": "Retrieves the list of all NotificationEndpoint resources, regional and global, available to the specified project.", - "httpMethod": "GET", - "id": "compute.regionNotificationEndpoints.aggregatedList", + "addAssociation": { + "description": "Inserts an association for the specified network firewall policy.", + "httpMethod": "POST", + "id": "compute.regionNetworkFirewallPolicies.addAssociation", "parameterOrder": [ - "project" + "project", + "region", + "firewallPolicy" ], "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.\n\nYou 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.\n\nTo 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) ```", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or `creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", - "location": "query", + "firewallPolicy": { + "description": "Name of the firewall policy to update.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, "type": "string" }, "project": { - "description": "Name of the project scoping this request.", + "description": "Project ID for this request.", "location": "path", "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "required": true, "type": "string" }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "replaceExistingAssociation": { + "description": "Indicates whether or not to replace it if an association already exists. This is false by default, in which case an error will be returned if an association already exists.", "location": "query", "type": "boolean" + }, + "requestId": { + "description": "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.\n\nFor 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.\n\nThe 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": "projects/{project}/aggregated/notificationEndpoints", + "path": "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/addAssociation", + "request": { + "$ref": "FirewallPolicyAssociation" + }, "response": { - "$ref": "NotificationEndpointAggregatedList" + "$ref": "Operation" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" + "https://www.googleapis.com/auth/compute" ] }, - "delete": { - "description": "Deletes the specified NotificationEndpoint in the given region", - "httpMethod": "DELETE", - "id": "compute.regionNotificationEndpoints.delete", + "addRule": { + "description": "Inserts a rule into a network firewall policy.", + "httpMethod": "POST", + "id": "compute.regionNetworkFirewallPolicies.addRule", "parameterOrder": [ "project", "region", - "notificationEndpoint" + "firewallPolicy" ], "parameters": { - "notificationEndpoint": { - "description": "Name of the NotificationEndpoint resource to delete.", + "firewallPolicy": { + "description": "Name of the firewall policy to update.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "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.\n\nFor 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.\n\nThe 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": "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/addRule", + "request": { + "$ref": "FirewallPolicyRule" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "cloneRules": { + "description": "Copies rules to the specified network firewall policy.", + "httpMethod": "POST", + "id": "compute.regionNetworkFirewallPolicies.cloneRules", + "parameterOrder": [ + "project", + "region", + "firewallPolicy" + ], + "parameters": { + "firewallPolicy": { + "description": "Name of the firewall policy to update.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "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.\n\nFor 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.\n\nThe 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" + }, + "sourceFirewallPolicy": { + "description": "The firewall policy from which to copy rules.", + "location": "query", + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/cloneRules", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "delete": { + "description": "Deletes the specified network firewall policy.", + "httpMethod": "DELETE", + "id": "compute.regionNetworkFirewallPolicies.delete", + "parameterOrder": [ + "project", + "region", + "firewallPolicy" + ], + "parameters": { + "firewallPolicy": { + "description": "Name of the firewall policy to delete.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "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.\n\nFor 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.\n\nThe 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": "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "description": "Returns the specified network firewall policy.", + "httpMethod": "GET", + "id": "compute.regionNetworkFirewallPolicies.get", + "parameterOrder": [ + "project", + "region", + "firewallPolicy" + ], + "parameters": { + "firewallPolicy": { + "description": "Name of the firewall policy to get.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}", + "response": { + "$ref": "FirewallPolicy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "getAssociation": { + "description": "Gets an association with the specified name.", + "httpMethod": "GET", + "id": "compute.regionNetworkFirewallPolicies.getAssociation", + "parameterOrder": [ + "project", + "region", + "firewallPolicy" + ], + "parameters": { + "firewallPolicy": { + "description": "Name of the firewall policy to which the queried association belongs.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "name": { + "description": "The name of the association to get from the firewall policy.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/getAssociation", + "response": { + "$ref": "FirewallPolicyAssociation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "getIamPolicy": { + "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + "httpMethod": "GET", + "id": "compute.regionNetworkFirewallPolicies.getIamPolicy", + "parameterOrder": [ + "project", + "region", + "resource" + ], + "parameters": { + "optionsRequestedPolicyVersion": { + "description": "Requested IAM Policy version.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "The name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/firewallPolicies/{resource}/getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "getRule": { + "description": "Gets a rule of the specified priority.", + "httpMethod": "GET", + "id": "compute.regionNetworkFirewallPolicies.getRule", + "parameterOrder": [ + "project", + "region", + "firewallPolicy" + ], + "parameters": { + "firewallPolicy": { + "description": "Name of the firewall policy to which the queried rule belongs.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "priority": { + "description": "The priority of the rule to get from the firewall policy.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/getRule", + "response": { + "$ref": "FirewallPolicyRule" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "description": "Creates a new network firewall policy in the specified project and region.", + "httpMethod": "POST", + "id": "compute.regionNetworkFirewallPolicies.insert", + "parameterOrder": [ + "project", + "region" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "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.\n\nFor 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.\n\nThe 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": "projects/{project}/regions/{region}/firewallPolicies", + "request": { + "$ref": "FirewallPolicy" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "description": "Lists all the network firewall policies that have been configured for the specified project in the given region.", + "httpMethod": "GET", + "id": "compute.regionNetworkFirewallPolicies.list", + "parameterOrder": [ + "project", + "region" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.\n\nYou 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.\n\nTo 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) ```", + "location": "query", + "type": "string" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or `creationTimestamp desc` is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "returnPartialSuccess": { + "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + "location": "query", + "type": "boolean" + } + }, + "path": "projects/{project}/regions/{region}/firewallPolicies", + "response": { + "$ref": "FirewallPolicyList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "patch": { + "description": "Patches the specified network firewall policy.", + "httpMethod": "PATCH", + "id": "compute.regionNetworkFirewallPolicies.patch", + "parameterOrder": [ + "project", + "region", + "firewallPolicy" + ], + "parameters": { + "firewallPolicy": { + "description": "Name of the firewall policy to update.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "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.\n\nFor 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.\n\nThe 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": "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}", + "request": { + "$ref": "FirewallPolicy" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "patchRule": { + "description": "Patches a rule of the specified priority.", + "httpMethod": "POST", + "id": "compute.regionNetworkFirewallPolicies.patchRule", + "parameterOrder": [ + "project", + "region", + "firewallPolicy" + ], + "parameters": { + "firewallPolicy": { + "description": "Name of the firewall policy to update.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "priority": { + "description": "The priority of the rule to patch.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "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.\n\nFor 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.\n\nThe 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": "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/patchRule", + "request": { + "$ref": "FirewallPolicyRule" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "removeAssociation": { + "description": "Removes an association for the specified network firewall policy.", + "httpMethod": "POST", + "id": "compute.regionNetworkFirewallPolicies.removeAssociation", + "parameterOrder": [ + "project", + "region", + "firewallPolicy" + ], + "parameters": { + "firewallPolicy": { + "description": "Name of the firewall policy to update.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "name": { + "description": "Name for the association that will be removed.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "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.\n\nFor 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.\n\nThe 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": "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/removeAssociation", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "removeRule": { + "description": "Deletes a rule of the specified priority.", + "httpMethod": "POST", + "id": "compute.regionNetworkFirewallPolicies.removeRule", + "parameterOrder": [ + "project", + "region", + "firewallPolicy" + ], + "parameters": { + "firewallPolicy": { + "description": "Name of the firewall policy to update.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "priority": { + "description": "The priority of the rule to remove from the firewall policy.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "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.\n\nFor 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.\n\nThe 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": "projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/removeRule", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + "httpMethod": "POST", + "id": "compute.regionNetworkFirewallPolicies.setIamPolicy", + "parameterOrder": [ + "project", + "region", + "resource" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "The name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/firewallPolicies/{resource}/setIamPolicy", + "request": { + "$ref": "RegionSetPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource.", + "httpMethod": "POST", + "id": "compute.regionNetworkFirewallPolicies.testIamPermissions", + "parameterOrder": [ + "project", + "region", + "resource" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "The name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/firewallPolicies/{resource}/testIamPermissions", + "request": { + "$ref": "TestPermissionsRequest" + }, + "response": { + "$ref": "TestPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + } + } + }, + "regionNotificationEndpoints": { + "methods": { + "aggregatedList": { + "description": "Retrieves the list of all NotificationEndpoint resources, regional and global, available to the specified project.", + "httpMethod": "GET", + "id": "compute.regionNotificationEndpoints.aggregatedList", + "parameterOrder": [ + "project" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.\n\nYou 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.\n\nTo 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) ```", + "location": "query", + "type": "string" + }, + "includeAllScopes": { + "description": "Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.", + "location": "query", + "type": "boolean" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or `creationTimestamp desc` is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Name of the project scoping this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "returnPartialSuccess": { + "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + "location": "query", + "type": "boolean" + } + }, + "path": "projects/{project}/aggregated/notificationEndpoints", + "response": { + "$ref": "NotificationEndpointAggregatedList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "delete": { + "description": "Deletes the specified NotificationEndpoint in the given region", + "httpMethod": "DELETE", + "id": "compute.regionNotificationEndpoints.delete", + "parameterOrder": [ + "project", + "region", + "notificationEndpoint" + ], + "parameters": { + "notificationEndpoint": { + "description": "Name of the NotificationEndpoint resource to delete.", "location": "path", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, @@ -34355,7 +35557,7 @@ } } }, - "revision": "20210301", + "revision": "20210310", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -35356,6 +36558,11 @@ "description": "The number of threads per physical core. To disable simultaneous multithreading (SMT) set this to 1. If unset, the maximum number of threads supported per core by the underlying processor is assumed.", "format": "int32", "type": "integer" + }, + "visibleCoreCount": { + "description": "The number of physical cores to expose to an instance. Multiply by the number of threads per core to compute the total number of virtual CPUs to expose to the instance. If unset, the number of cores is inferred from the instance's nominal CPU count and the underlying platform's SMT width.", + "format": "int32", + "type": "integer" } }, "type": "object" @@ -36223,6 +37430,8 @@ "NOT_ENOUGH_QUOTA_AVAILABLE", "REGION_RESOURCE_STOCKOUT", "SCALING_TARGET_DOES_NOT_EXIST", + "SCHEDULED_INSTANCES_GREATER_THAN_AUTOSCALER_MAX", + "SCHEDULED_INSTANCES_LESS_THAN_AUTOSCALER_MIN", "UNKNOWN", "UNSUPPORTED_MAX_RATE_LOAD_BALANCING_CONFIGURATION", "ZONE_RESOURCE_STOCKOUT" @@ -36245,6 +37454,8 @@ "", "", "", + "", + "", "" ], "type": "string" @@ -36786,7 +37997,7 @@ "id": "BackendBucketCdnPolicyNegativeCachingPolicy", "properties": { "code": { - "description": "The HTTP status code to define a TTL against. Only HTTP status codes 300, 301, 308, 404, 405, 410, 421, 451 and 501 are can be specified as values, and you cannot specify a status code more than once.", + "description": "The HTTP status code to define a TTL against. Only HTTP status codes 300, 301, 302, 307, 308, 404, 405, 410, 421, 451 and 501 are can be specified as values, and you cannot specify a status code more than once.", "format": "int32", "type": "integer" }, @@ -37380,7 +38591,7 @@ "id": "BackendServiceCdnPolicyNegativeCachingPolicy", "properties": { "code": { - "description": "The HTTP status code to define a TTL against. Only HTTP status codes 300, 301, 308, 404, 405, 410, 421, 451 and 501 are can be specified as values, and you cannot specify a status code more than once.", + "description": "The HTTP status code to define a TTL against. Only HTTP status codes 300, 301, 302, 307, 308, 404, 405, 410, 421, 451 and 501 are can be specified as values, and you cannot specify a status code more than once.", "format": "int32", "type": "integer" }, @@ -40941,7 +42152,7 @@ "type": "string" }, "displayName": { - "description": "User-provided name of the Organization firewall plicy. The name should be unique in the organization in which the firewall policy is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", + "description": "Depreacted, please use short name instead. User-provided name of the Organization firewall plicy. The name should be unique in the organization in which the firewall policy is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "type": "string" }, @@ -40968,6 +42179,10 @@ "description": "[Output Only] The parent of the firewall policy.", "type": "string" }, + "region": { + "description": "[Output Only] URL of the region where the regional firewall policy resides. This field is not applicable to global firewall policies. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.", + "type": "string" + }, "ruleTupleCount": { "description": "[Output Only] Total count of all firewall policy rule tuples. A firewall policy can not exceed a set number of tuples.", "format": "int32", @@ -40987,6 +42202,11 @@ "selfLinkWithId": { "description": "[Output Only] Server-defined URL for this resource with the resource id.", "type": "string" + }, + "shortName": { + "description": "User-provided name of the Organization firewall plicy. The name should be unique in the organization in which the firewall policy is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "type": "string" } }, "type": "object" @@ -40999,7 +42219,7 @@ "type": "string" }, "displayName": { - "description": "[Output Only] The display name of the firewall policy of the association.", + "description": "[Output Only] Deprecated, please use short name instead. The display name of the firewall policy of the association.", "type": "string" }, "firewallPolicyId": { @@ -41009,6 +42229,10 @@ "name": { "description": "The name for an association.", "type": "string" + }, + "shortName": { + "description": "[Output Only] The short name of the firewall policy of the association.", + "type": "string" } }, "type": "object" @@ -42174,6 +43398,20 @@ "response": { "description": "The string to match anywhere in the first 1024 bytes of the response body. If left empty (the default value), the status code determines health. The response data can only be ASCII.", "type": "string" + }, + "weightReportMode": { + "description": "Weight report mode. used for weighted Load Balancing.", + "enum": [ + "DISABLE", + "DRY_RUN", + "ENABLE" + ], + "enumDescriptions": [ + "", + "", + "" + ], + "type": "string" } }, "type": "object" @@ -42227,6 +43465,20 @@ "response": { "description": "The string to match anywhere in the first 1024 bytes of the response body. If left empty (the default value), the status code determines health. The response data can only be ASCII.", "type": "string" + }, + "weightReportMode": { + "description": "Weight report mode. used for weighted Load Balancing.", + "enum": [ + "DISABLE", + "DRY_RUN", + "ENABLE" + ], + "enumDescriptions": [ + "", + "", + "" + ], + "type": "string" } }, "type": "object" @@ -42280,6 +43532,20 @@ "response": { "description": "The string to match anywhere in the first 1024 bytes of the response body. If left empty (the default value), the status code determines health. The response data can only be ASCII.", "type": "string" + }, + "weightReportMode": { + "description": "Weight report mode. used for weighted Load Balancing.", + "enum": [ + "DISABLE", + "DRY_RUN", + "ENABLE" + ], + "enumDescriptions": [ + "", + "", + "" + ], + "type": "string" } }, "type": "object" @@ -43202,6 +44468,14 @@ "description": "Metadata defined as annotations for network endpoint.", "type": "object" }, + "forwardingRule": { + "description": "URL of the forwarding rule associated with the health status of the instance.", + "type": "string" + }, + "forwardingRuleIp": { + "description": "A forwarding rule IP address assigned to this instance.", + "type": "string" + }, "healthState": { "description": "Health state of the instance.", "enum": [ @@ -45443,6 +46717,10 @@ "description": "[Output Only] The URL of the Instance Group resource.", "type": "string" }, + "instanceLifecyclePolicy": { + "$ref": "InstanceGroupManagerInstanceLifecyclePolicy", + "description": "Instance lifecycle policy for this Instance Group Manager." + }, "instanceTemplate": { "description": "The URL of the instance template that is specified for this managed instance group. The group uses this template to create all new instances in the managed instance group. The templates for existing instances in the group do not change unless you run recreateInstances, run applyUpdatesToInstances, or set the group's updatePolicy.type to PROACTIVE.", "type": "string" @@ -45512,6 +46790,16 @@ "format": "int32", "type": "integer" }, + "targetStoppedSize": { + "description": "The target number of stopped instances for this managed instance group. This number changes when you: \n- Stop instance using the stopInstances method or start instances using the startInstances method. \n- Manually change the targetStoppedSize using the update method.", + "format": "int32", + "type": "integer" + }, + "targetSuspendedSize": { + "description": "The target number of suspended instances for this managed instance group. This number changes when you: \n- Suspend instance using the suspendInstances method or resume instances using the resumeInstances method. \n- Manually change the targetSuspendedSize using the update method.", + "format": "int32", + "type": "integer" + }, "updatePolicy": { "$ref": "InstanceGroupManagerUpdatePolicy", "description": "The update policy for this managed instance group." @@ -45573,6 +46861,26 @@ "format": "int32", "type": "integer" }, + "resuming": { + "description": "[Output Only] The number of instances in the managed instance group that are scheduled to be resumed or are currently being resumed.", + "format": "int32", + "type": "integer" + }, + "starting": { + "description": "[Output Only] The number of instances in the managed instance group that are scheduled to be started or are currently being started.", + "format": "int32", + "type": "integer" + }, + "stopping": { + "description": "[Output Only] The number of instances in the managed instance group that are scheduled to be stopped or are currently being stopped.", + "format": "int32", + "type": "integer" + }, + "suspending": { + "description": "[Output Only] The number of instances in the managed instance group that are scheduled to be suspended or are currently being suspended.", + "format": "int32", + "type": "integer" + }, "verifying": { "description": "[Output Only] The number of instances in the managed instance group that are being verified. See the managedInstances[].currentAction property in the listManagedInstances method documentation.", "format": "int32", @@ -45724,6 +47032,27 @@ }, "type": "object" }, + "InstanceGroupManagerInstanceLifecyclePolicy": { + "id": "InstanceGroupManagerInstanceLifecyclePolicy", + "properties": { + "metadataBasedReadinessSignal": { + "$ref": "InstanceGroupManagerInstanceLifecyclePolicyMetadataBasedReadinessSignal", + "description": "The configuration for metadata based readiness signal sent by the instance during initialization when stopping / suspending an instance. The Instance Group Manager will wait for a signal that indicates successful initialization before stopping / suspending an instance.\n\nIf a successful readiness signal is not sent before timeout, the corresponding instance will not be stopped / suspended. Instead, an error will be visible in the lastAttempt.errors field of the managed instance in the listmanagedinstances method.\n\nIf metadataBasedReadinessSignal.timeoutSec is unset, the Instance Group Manager will directly proceed to suspend / stop instances, skipping initialization on them." + } + }, + "type": "object" + }, + "InstanceGroupManagerInstanceLifecyclePolicyMetadataBasedReadinessSignal": { + "id": "InstanceGroupManagerInstanceLifecyclePolicyMetadataBasedReadinessSignal", + "properties": { + "timeoutSec": { + "description": "The number of seconds to wait for a readiness signal during initialization before timing out.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "InstanceGroupManagerList": { "description": "[Output Only] A list of managed instance groups.", "id": "InstanceGroupManagerList", @@ -46265,178 +47594,238 @@ }, "type": "object" }, - "InstanceGroupManagersPatchPerInstanceConfigsReq": { - "description": "InstanceGroupManagers.patchPerInstanceConfigs", - "id": "InstanceGroupManagersPatchPerInstanceConfigsReq", + "InstanceGroupManagersPatchPerInstanceConfigsReq": { + "description": "InstanceGroupManagers.patchPerInstanceConfigs", + "id": "InstanceGroupManagersPatchPerInstanceConfigsReq", + "properties": { + "perInstanceConfigs": { + "description": "The list of per-instance configs to insert or patch on this managed instance group.", + "items": { + "$ref": "PerInstanceConfig" + }, + "type": "array" + } + }, + "type": "object" + }, + "InstanceGroupManagersRecreateInstancesRequest": { + "id": "InstanceGroupManagersRecreateInstancesRequest", + "properties": { + "instances": { + "description": "The URLs of one or more instances to recreate. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "InstanceGroupManagersResizeAdvancedRequest": { + "id": "InstanceGroupManagersResizeAdvancedRequest", + "properties": { + "noCreationRetries": { + "description": "If this flag is true, the managed instance group attempts to create all instances initiated by this resize request only once. If there is an error during creation, the managed instance group does not retry create this instance, and we will decrease the targetSize of the request instead. If the flag is false, the group attempts to recreate each instance continuously until it succeeds.\n\nThis flag matters only in the first attempt of creation of an instance. After an instance is successfully created while this flag is enabled, the instance behaves the same way as all the other instances created with a regular resize request. In particular, if a running instance dies unexpectedly at a later time and needs to be recreated, this mode does not affect the recreation behavior in that scenario.\n\nThis flag is applicable only to the current resize request. It does not influence other resize requests in any way.\n\nYou can see which instances is being creating in which mode by calling the get or listManagedInstances API.", + "type": "boolean" + }, + "targetSize": { + "description": "The number of running instances that the managed instance group should maintain at any given time. The group automatically adds or removes instances to maintain the number of instances specified by this parameter.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "InstanceGroupManagersResumeInstancesRequest": { + "id": "InstanceGroupManagersResumeInstancesRequest", + "properties": { + "instances": { + "description": "The URLs of one or more instances to resume. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "InstanceGroupManagersScopedList": { + "id": "InstanceGroupManagersScopedList", + "properties": { + "instanceGroupManagers": { + "description": "[Output Only] The list of managed instance groups that are contained in the specified project and zone.", + "items": { + "$ref": "InstanceGroupManager" + }, + "type": "array" + }, + "warning": { + "description": "[Output Only] The warning that replaces the list of managed instance groups when the list is empty.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "LARGE_DEPLOYMENT_WARNING", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "PARTIAL_SUCCESS", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "InstanceGroupManagersSetAutoHealingRequest": { + "id": "InstanceGroupManagersSetAutoHealingRequest", "properties": { - "perInstanceConfigs": { - "description": "The list of per-instance configs to insert or patch on this managed instance group.", + "autoHealingPolicies": { "items": { - "$ref": "PerInstanceConfig" + "$ref": "InstanceGroupManagerAutoHealingPolicy" }, "type": "array" } }, "type": "object" }, - "InstanceGroupManagersRecreateInstancesRequest": { - "id": "InstanceGroupManagersRecreateInstancesRequest", + "InstanceGroupManagersSetInstanceTemplateRequest": { + "id": "InstanceGroupManagersSetInstanceTemplateRequest", "properties": { - "instances": { - "description": "The URLs of one or more instances to recreate. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", - "items": { - "type": "string" - }, - "type": "array" + "instanceTemplate": { + "description": "The URL of the instance template that is specified for this managed instance group. The group uses this template to create all new instances in the managed instance group. The templates for existing instances in the group do not change unless you run recreateInstances, run applyUpdatesToInstances, or set the group's updatePolicy.type to PROACTIVE.", + "type": "string" } }, "type": "object" }, - "InstanceGroupManagersResizeAdvancedRequest": { - "id": "InstanceGroupManagersResizeAdvancedRequest", + "InstanceGroupManagersSetTargetPoolsRequest": { + "id": "InstanceGroupManagersSetTargetPoolsRequest", "properties": { - "noCreationRetries": { - "description": "If this flag is true, the managed instance group attempts to create all instances initiated by this resize request only once. If there is an error during creation, the managed instance group does not retry create this instance, and we will decrease the targetSize of the request instead. If the flag is false, the group attempts to recreate each instance continuously until it succeeds.\n\nThis flag matters only in the first attempt of creation of an instance. After an instance is successfully created while this flag is enabled, the instance behaves the same way as all the other instances created with a regular resize request. In particular, if a running instance dies unexpectedly at a later time and needs to be recreated, this mode does not affect the recreation behavior in that scenario.\n\nThis flag is applicable only to the current resize request. It does not influence other resize requests in any way.\n\nYou can see which instances is being creating in which mode by calling the get or listManagedInstances API.", - "type": "boolean" + "fingerprint": { + "description": "The fingerprint of the target pools information. Use this optional property to prevent conflicts when multiple users change the target pools settings concurrently. Obtain the fingerprint with the instanceGroupManagers.get method. Then, include the fingerprint in your request to ensure that you do not overwrite changes that were applied from another concurrent request.", + "format": "byte", + "type": "string" }, - "targetSize": { - "description": "The number of running instances that the managed instance group should maintain at any given time. The group automatically adds or removes instances to maintain the number of instances specified by this parameter.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "InstanceGroupManagersScopedList": { - "id": "InstanceGroupManagersScopedList", - "properties": { - "instanceGroupManagers": { - "description": "[Output Only] The list of managed instance groups that are contained in the specified project and zone.", + "targetPools": { + "description": "The list of target pool URLs that instances in this managed instance group belong to. The managed instance group applies these target pools to all of the instances in the group. Existing instances and new instances in the group all receive these target pool settings.", "items": { - "$ref": "InstanceGroupManager" + "type": "string" }, "type": "array" - }, - "warning": { - "description": "[Output Only] The warning that replaces the list of managed instance groups when the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "LARGE_DEPLOYMENT_WARNING", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" } }, "type": "object" }, - "InstanceGroupManagersSetAutoHealingRequest": { - "id": "InstanceGroupManagersSetAutoHealingRequest", + "InstanceGroupManagersStartInstancesRequest": { + "id": "InstanceGroupManagersStartInstancesRequest", "properties": { - "autoHealingPolicies": { + "instances": { + "description": "The URLs of one or more instances to start. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", "items": { - "$ref": "InstanceGroupManagerAutoHealingPolicy" + "type": "string" }, "type": "array" } }, "type": "object" }, - "InstanceGroupManagersSetInstanceTemplateRequest": { - "id": "InstanceGroupManagersSetInstanceTemplateRequest", + "InstanceGroupManagersStopInstancesRequest": { + "id": "InstanceGroupManagersStopInstancesRequest", "properties": { - "instanceTemplate": { - "description": "The URL of the instance template that is specified for this managed instance group. The group uses this template to create all new instances in the managed instance group. The templates for existing instances in the group do not change unless you run recreateInstances, run applyUpdatesToInstances, or set the group's updatePolicy.type to PROACTIVE.", - "type": "string" + "forceStop": { + "description": "If this flag is set to true, the Instance Group Manager will proceed to stop the instances, skipping initialization on them.", + "type": "boolean" + }, + "instances": { + "description": "The URLs of one or more instances to stop. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", + "items": { + "type": "string" + }, + "type": "array" } }, "type": "object" }, - "InstanceGroupManagersSetTargetPoolsRequest": { - "id": "InstanceGroupManagersSetTargetPoolsRequest", + "InstanceGroupManagersSuspendInstancesRequest": { + "id": "InstanceGroupManagersSuspendInstancesRequest", "properties": { - "fingerprint": { - "description": "The fingerprint of the target pools information. Use this optional property to prevent conflicts when multiple users change the target pools settings concurrently. Obtain the fingerprint with the instanceGroupManagers.get method. Then, include the fingerprint in your request to ensure that you do not overwrite changes that were applied from another concurrent request.", - "format": "byte", - "type": "string" + "forceSuspend": { + "description": "If this flag is set to true, the Instance Group Manager will proceed to suspend the instances, skipping initialization on them.", + "type": "boolean" }, - "targetPools": { - "description": "The list of target pool URLs that instances in this managed instance group belong to. The managed instance group applies these target pools to all of the instances in the group. Existing instances and new instances in the group all receive these target pool settings.", + "instances": { + "description": "The URLs of one or more instances to suspend. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", "items": { "type": "string" }, @@ -46998,6 +48387,10 @@ "RECREATING", "REFRESHING", "RESTARTING", + "RESUMING", + "STARTING", + "STOPPING", + "SUSPENDING", "VERIFYING" ], "enumDescriptions": [ @@ -47009,6 +48402,10 @@ "", "", "", + "", + "", + "", + "", "" ], "type": "string" @@ -47458,7 +48855,7 @@ "id": "InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy", "properties": { "displayName": { - "description": "[Output Only] The display name of the firewall policy.", + "description": "[Output Only] Deprecated, please use short name instead. The display name of the firewall policy.", "type": "string" }, "name": { @@ -47472,6 +48869,10 @@ }, "type": "array" }, + "shortName": { + "description": "[Output Only] The short name of the firewall policy.", + "type": "string" + }, "type": { "description": "[Output Only] The type of the firewall policy.", "enum": [ @@ -50809,6 +52210,10 @@ "RECREATING", "REFRESHING", "RESTARTING", + "RESUMING", + "STARTING", + "STOPPING", + "SUSPENDING", "VERIFYING" ], "enumDescriptions": [ @@ -50820,6 +52225,10 @@ "", "", "", + "", + "", + "", + "", "" ], "type": "string" @@ -51306,6 +52715,7 @@ "INTERNET_FQDN_PORT", "INTERNET_IP_PORT", "NON_GCP_PRIVATE_IP_PORT", + "PRIVATE_SERVICE_CONNECT", "SERVERLESS" ], "enumDescriptions": [ @@ -51315,10 +52725,15 @@ "", "", "", + "", "" ], "type": "string" }, + "pscTargetService": { + "description": "The target service url used to set up private service connection to a Google API. An example value is: \"asia-northeast3-cloudkms.googleapis.com\"", + "type": "string" + }, "region": { "description": "[Output Only] The URL of the region where the network endpoint group is located.", "type": "string" @@ -52414,7 +53829,7 @@ "id": "NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy", "properties": { "displayName": { - "description": "[Output Only] The display name of the firewall policy.", + "description": "[Output Only] Deprecated, please use short name instead. The display name of the firewall policy.", "type": "string" }, "name": { @@ -52428,6 +53843,10 @@ }, "type": "array" }, + "shortName": { + "description": "[Output Only] The short name of the firewall policy.", + "type": "string" + }, "type": { "description": "[Output Only] The type of the firewall policy.", "enum": [ @@ -57050,9 +58469,11 @@ "AUTOSCALERS", "BACKEND_BUCKETS", "BACKEND_SERVICES", + "C2D_CPUS", "C2_CPUS", "COMMITMENTS", "COMMITTED_A2_CPUS", + "COMMITTED_C2D_CPUS", "COMMITTED_C2_CPUS", "COMMITTED_CPUS", "COMMITTED_E2_CPUS", @@ -57288,6 +58709,8 @@ "", "", "", + "", + "", "" ], "type": "string" @@ -58252,6 +59675,19 @@ }, "type": "object" }, + "RegionInstanceGroupManagersResumeInstancesRequest": { + "id": "RegionInstanceGroupManagersResumeInstancesRequest", + "properties": { + "instances": { + "description": "The URLs of one or more instances to resume. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "RegionInstanceGroupManagersSetAutoHealingRequest": { "id": "RegionInstanceGroupManagersSetAutoHealingRequest", "properties": { @@ -58292,6 +59728,53 @@ }, "type": "object" }, + "RegionInstanceGroupManagersStartInstancesRequest": { + "id": "RegionInstanceGroupManagersStartInstancesRequest", + "properties": { + "instances": { + "description": "The URLs of one or more instances to start. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "RegionInstanceGroupManagersStopInstancesRequest": { + "id": "RegionInstanceGroupManagersStopInstancesRequest", + "properties": { + "forceStop": { + "description": "If this flag is set to true, the Instance Group Manager will proceed to stop the instances, skipping initialization on them.", + "type": "boolean" + }, + "instances": { + "description": "The URLs of one or more instances to stop. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "RegionInstanceGroupManagersSuspendInstancesRequest": { + "id": "RegionInstanceGroupManagersSuspendInstancesRequest", + "properties": { + "forceSuspend": { + "description": "If this flag is set to true, the Instance Group Manager will proceed to suspend the instances, skipping initialization on them.", + "type": "boolean" + }, + "instances": { + "description": "The URLs of one or more instances to suspend. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "RegionInstanceGroupsListInstances": { "id": "RegionInstanceGroupsListInstances", "properties": { @@ -59994,6 +61477,10 @@ "description": "Represents a Route resource.\n\nA route defines a path from VM instances in the VPC network to a specific destination. This destination can be inside or outside the VPC network. For more information, read the Routes overview. (== resource_for {$api_version}.routes ==)", "id": "Route", "properties": { + "allowConflictingSubnetworks": { + "description": "Whether this route can conflict with existing subnetworks. Setting this to true allows this route to conflict with subnetworks that have already been configured on the corresponding network.", + "type": "boolean" + }, "creationTimestamp": { "description": "[Output Only] Creation timestamp in RFC3339 text format.", "type": "string" @@ -60579,7 +62066,7 @@ "type": "integer" }, "keepaliveInterval": { - "description": "The interval in seconds between BGP keepalive messages that are sent to the peer.\nNot currently available publicly.\nHold time is three times the interval at which keepalive messages are sent, and the hold time is the maximum number of seconds allowed to elapse between successive keepalive messages that BGP receives from a peer.\nBGP will use the smaller of either the local hold time value or the peer's hold time value as the hold time for the BGP connection between the two peers.\nIf set, this value must be between 1 and 120. The default is 20.", + "description": "The interval in seconds between BGP keepalive messages that are sent to the peer.\nNot currently available publicly.\nHold time is three times the interval at which keepalive messages are sent, and the hold time is the maximum number of seconds allowed to elapse between successive keepalive messages that BGP receives from a peer.\nBGP will use the smaller of either the local hold time value or the peer's hold time value as the hold time for the BGP connection between the two peers.\nIf set, this value must be between 20 and 60. The default is 20.", "format": "uint32", "type": "integer" } @@ -60602,7 +62089,7 @@ "type": "string" }, "advertisedGroups": { - "description": "User-specified list of prefix groups to advertise in custom mode, which can take one of the following options: \n- ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets. \n- ALL_VPC_SUBNETS: Advertises the router's own VPC subnets. \n- ALL_PEER_VPC_SUBNETS: Advertises peer subnets of the router's VPC network. Note that this field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the \"bgp\" message). These groups are advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups.", + "description": "User-specified list of prefix groups to advertise in custom mode, which can take one of the following options: \n- ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets. \n- ALL_VPC_SUBNETS: Advertises the router's own VPC subnets. Note that this field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the \"bgp\" message). These groups are advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups.", "items": { "enum": [ "ALL_PEER_VPC_SUBNETS", @@ -61208,6 +62695,10 @@ "description": "IP address of the remote BGP interface.", "type": "string" }, + "routerApplianceInstance": { + "description": "[Output only] URI of the VM instance that is used as third-party router appliances such as Next Gen Firewalls, Virtual Routers, or Router Appliances. The VM instance is the peer side of the BGP session.", + "type": "string" + }, "state": { "description": "BGP state as specified in RFC1771.", "type": "string" @@ -61719,7 +63210,7 @@ "type": "object" }, "Scheduling": { - "description": "Sets the scheduling options for an Instance. NextID: 17", + "description": "Sets the scheduling options for an Instance. NextID: 20", "id": "Scheduling", "properties": { "automaticRestart": { @@ -62180,6 +63671,10 @@ "description": "Denotes whether to enable logging for a particular rule. If logging is enabled, logs will be exported to the configured export destination in Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you cannot enable logging on \"goto_next\" rules.\n\nThis field may only be specified when the versioned_expr is set to FIREWALL.", "type": "boolean" }, + "headerAction": { + "$ref": "SecurityPolicyRuleHttpHeaderAction", + "description": "Optional, additional actions that are performed on headers." + }, "kind": { "default": "compute#securityPolicyRule", "description": "[Output only] Type of the resource. Always compute#securityPolicyRule for security policy rules", @@ -62233,6 +63728,33 @@ }, "type": "object" }, + "SecurityPolicyRuleHttpHeaderAction": { + "id": "SecurityPolicyRuleHttpHeaderAction", + "properties": { + "requestHeadersToAdds": { + "description": "The list of request headers to add or overwrite if they?re already present.", + "items": { + "$ref": "SecurityPolicyRuleHttpHeaderActionHttpHeaderOption" + }, + "type": "array" + } + }, + "type": "object" + }, + "SecurityPolicyRuleHttpHeaderActionHttpHeaderOption": { + "id": "SecurityPolicyRuleHttpHeaderActionHttpHeaderOption", + "properties": { + "headerName": { + "description": "The name of the header to set.", + "type": "string" + }, + "headerValue": { + "description": "The value to set the named header to.", + "type": "string" + } + }, + "type": "object" + }, "SecurityPolicyRuleMatcher": { "description": "Represents a match condition that incoming traffic is evaluated against. Exactly one field must be specified.", "id": "SecurityPolicyRuleMatcher", @@ -62332,18 +63854,13 @@ "id": "SecurityPolicyRuleRateLimitOptions", "properties": { "banDurationSec": { - "description": "Can only be specified if the action for the rule is \"rate_based_ban\". If specified, the key will be banned for the configured 'ban_duration' when the number of requests that exceed the 'rate_limit_threshold' also exceed this 'ban_threshold'.", + "description": "Can only be specified if the action for the rule is \"rate_based_ban\". If specified, determines the time (in seconds) the traffic will continue to be banned by the rate limit after the rate falls below the threshold.", "format": "int32", "type": "integer" }, "banThreshold": { "$ref": "SecurityPolicyRuleRateLimitOptionsThreshold", - "description": "Can only be specified if the action for the rule is \"rate_based_ban\". If specified, the key will be banned for the configured 'ban_duration' when the number of requests that exceed the 'rate_limit_threshold' also exceed this 'ban_threshold'." - }, - "blockDuration": { - "description": "Can only be specified if the action for the rule is \"rate_based_ban\" If specified, determines the time (in seconds) the traffic will continue to be blocked by the rate limit after the rate falls below the threshold. The default value is 0 seconds. [Deprecated] This field is deprecated.", - "format": "int32", - "type": "integer" + "description": "Can only be specified if the action for the rule is \"rate_based_ban\". If specified, the key will be banned for the configured 'ban_duration_sec' when the number of requests that exceed the 'rate_limit_threshold' also exceed this 'ban_threshold'." }, "conformAction": { "description": "Action to take when requests are under the given threshold. When requests are throttled, this is also the action for all requests which are not dropped. Valid options are \"allow\", \"fairshare\", and \"drop_overload\".", @@ -62368,11 +63885,6 @@ "rateLimitThreshold": { "$ref": "SecurityPolicyRuleRateLimitOptionsThreshold", "description": "Threshold at which to begin ratelimiting." - }, - "thresholdRps": { - "description": "Rate in requests per second at which to begin ratelimiting. [Deprecated] This field is deprecated.", - "format": "int32", - "type": "integer" } }, "type": "object" @@ -62527,7 +64039,7 @@ "type": "object" }, "ServiceAttachment": { - "description": "Represents a ServiceAttachment resource.\n\nA service attachment represents a service that a producer has exposed. It encapsulates the load balancer which fronts the service runs and a list of NAT IP ranges that the producers uses to represent the consumers connecting to the service. next tag = 16", + "description": "Represents a ServiceAttachment resource.\n\nA service attachment represents a service that a producer has exposed. It encapsulates the load balancer which fronts the service runs and a list of NAT IP ranges that the producers uses to represent the consumers connecting to the service. next tag = 17", "id": "ServiceAttachment", "properties": { "connectionPreference": { diff --git a/discovery/compute-beta.json b/discovery/compute-beta.json index c906680814d..fadc84448f8 100644 --- a/discovery/compute-beta.json +++ b/discovery/compute-beta.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" }, "https://www.googleapis.com/auth/compute": { "description": "View and manage your Google Compute Engine resources" @@ -29,7 +29,7 @@ "description": "Creates and runs virtual machines on Google Cloud Platform.", "discoveryVersion": "v1", "documentationLink": "https://developers.google.com/compute/docs/reference/latest/", - "etag": "\"uWj2hSb4GVjzdDlAnRd2gbM1ZQ8/jHiC35wfwurRz_CsQFfDnnAl-Zs\"", + "etag": "\"uWj2hSb4GVjzdDlAnRd2gbM1ZQ8/oz4Ox4FGyjrKikcko_NMCcqq4mE\"", "icons": { "x16": "https://www.google.com/images/icons/product/compute_engine-16.png", "x32": "https://www.google.com/images/icons/product/compute_engine-32.png" @@ -1152,6 +1152,46 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, + "getIamPolicy": { + "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + "httpMethod": "GET", + "id": "compute.backendBuckets.getIamPolicy", + "parameterOrder": [ + "project", + "resource" + ], + "parameters": { + "optionsRequestedPolicyVersion": { + "description": "Requested IAM Policy version.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/global/backendBuckets/{resource}/getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, "insert": { "description": "Creates a BackendBucket resource in the specified project using the data included in the request.", "httpMethod": "POST", @@ -1280,6 +1320,79 @@ "https://www.googleapis.com/auth/compute" ] }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + "httpMethod": "POST", + "id": "compute.backendBuckets.setIamPolicy", + "parameterOrder": [ + "project", + "resource" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/global/backendBuckets/{resource}/setIamPolicy", + "request": { + "$ref": "GlobalSetPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource.", + "httpMethod": "POST", + "id": "compute.backendBuckets.testIamPermissions", + "parameterOrder": [ + "project", + "resource" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/global/backendBuckets/{resource}/testIamPermissions", + "request": { + "$ref": "TestPermissionsRequest" + }, + "response": { + "$ref": "TestPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, "update": { "description": "Updates the specified BackendBucket resource with the data included in the request.", "httpMethod": "PUT", @@ -12177,6 +12290,43 @@ "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.", + "httpMethod": "POST", + "id": "compute.licenseCodes.testIamPermissions", + "parameterOrder": [ + "project", + "resource" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/global/licenseCodes/{resource}/testIamPermissions", + "request": { + "$ref": "TestPermissionsRequest" + }, + "response": { + "$ref": "TestPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] } } }, @@ -12419,6 +12569,43 @@ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.", + "httpMethod": "POST", + "id": "compute.licenses.testIamPermissions", + "parameterOrder": [ + "project", + "resource" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/global/licenses/{resource}/testIamPermissions", + "request": { + "$ref": "TestPermissionsRequest" + }, + "response": { + "$ref": "TestPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] } } }, @@ -17811,6 +17998,51 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource.", + "httpMethod": "POST", + "id": "compute.regionCommitments.testIamPermissions", + "parameterOrder": [ + "project", + "region", + "resource" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "The name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/commitments/{resource}/testIamPermissions", + "request": { + "$ref": "TestPermissionsRequest" + }, + "response": { + "$ref": "TestPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, "updateReservations": { "description": "Transfers GPUs or local SSDs between reservations within commitments.", "httpMethod": "POST", @@ -18789,6 +19021,51 @@ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource.", + "httpMethod": "POST", + "id": "compute.regionHealthCheckServices.testIamPermissions", + "parameterOrder": [ + "project", + "region", + "resource" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "The name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/healthCheckServices/{resource}/testIamPermissions", + "request": { + "$ref": "TestPermissionsRequest" + }, + "response": { + "$ref": "TestPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] } } }, @@ -19034,6 +19311,51 @@ "https://www.googleapis.com/auth/compute" ] }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource.", + "httpMethod": "POST", + "id": "compute.regionHealthChecks.testIamPermissions", + "parameterOrder": [ + "project", + "region", + "resource" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "The name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/healthChecks/{resource}/testIamPermissions", + "request": { + "$ref": "TestPermissionsRequest" + }, + "response": { + "$ref": "TestPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, "update": { "description": "Updates a HealthCheck resource in the specified project using the data included in the request.", "httpMethod": "PUT", @@ -20871,6 +21193,51 @@ "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource.", + "httpMethod": "POST", + "id": "compute.regionNotificationEndpoints.testIamPermissions", + "parameterOrder": [ + "project", + "region", + "resource" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "The name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/notificationEndpoints/{resource}/testIamPermissions", + "request": { + "$ref": "TestPermissionsRequest" + }, + "response": { + "$ref": "TestPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] } } }, @@ -21254,6 +21621,51 @@ "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource and region.", + "httpMethod": "POST", + "id": "compute.regionSslCertificates.testIamPermissions", + "parameterOrder": [ + "project", + "region", + "resource" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "The name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/sslCertificates/{resource}/testIamPermissions", + "request": { + "$ref": "TestPermissionsRequest" + }, + "response": { + "$ref": "TestPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] } } }, @@ -21498,6 +21910,51 @@ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource.", + "httpMethod": "POST", + "id": "compute.regionTargetHttpProxies.testIamPermissions", + "parameterOrder": [ + "project", + "region", + "resource" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "The name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/targetHttpProxies/{resource}/testIamPermissions", + "request": { + "$ref": "TestPermissionsRequest" + }, + "response": { + "$ref": "TestPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] } } }, @@ -21791,6 +22248,51 @@ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource.", + "httpMethod": "POST", + "id": "compute.regionTargetHttpsProxies.testIamPermissions", + "parameterOrder": [ + "project", + "region", + "resource" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "The name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/targetHttpsProxies/{resource}/testIamPermissions", + "request": { + "$ref": "TestPermissionsRequest" + }, + "response": { + "$ref": "TestPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] } } }, @@ -22085,6 +22587,51 @@ "https://www.googleapis.com/auth/compute" ] }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource.", + "httpMethod": "POST", + "id": "compute.regionUrlMaps.testIamPermissions", + "parameterOrder": [ + "project", + "region", + "resource" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "The name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/urlMaps/{resource}/testIamPermissions", + "request": { + "$ref": "TestPermissionsRequest" + }, + "response": { + "$ref": "TestPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, "update": { "description": "Updates the specified UrlMap resource with the data included in the request.", "httpMethod": "PUT", @@ -24513,6 +25060,54 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, + "getIamPolicy": { + "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + "httpMethod": "GET", + "id": "compute.serviceAttachments.getIamPolicy", + "parameterOrder": [ + "project", + "region", + "resource" + ], + "parameters": { + "optionsRequestedPolicyVersion": { + "description": "Requested IAM Policy version.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "The name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/serviceAttachments/{resource}/getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, "insert": { "description": "Creates a ServiceAttachment in the specified project in the given scope using the parameters that are included in the request.", "httpMethod": "POST", @@ -24615,6 +25210,95 @@ "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + "httpMethod": "POST", + "id": "compute.serviceAttachments.setIamPolicy", + "parameterOrder": [ + "project", + "region", + "resource" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "The name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/serviceAttachments/{resource}/setIamPolicy", + "request": { + "$ref": "RegionSetPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource.", + "httpMethod": "POST", + "id": "compute.serviceAttachments.testIamPermissions", + "parameterOrder": [ + "project", + "region", + "resource" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "The name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/serviceAttachments/{resource}/testIamPermissions", + "request": { + "$ref": "TestPermissionsRequest" + }, + "response": { + "$ref": "TestPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] } } }, @@ -26280,6 +26964,43 @@ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource.", + "httpMethod": "POST", + "id": "compute.targetGrpcProxies.testIamPermissions", + "parameterOrder": [ + "project", + "resource" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/global/targetGrpcProxies/{resource}/testIamPermissions", + "request": { + "$ref": "TestPermissionsRequest" + }, + "response": { + "$ref": "TestPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] } } }, @@ -28585,6 +29306,43 @@ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource.", + "httpMethod": "POST", + "id": "compute.targetTcpProxies.testIamPermissions", + "parameterOrder": [ + "project", + "resource" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/global/targetTcpProxies/{resource}/testIamPermissions", + "request": { + "$ref": "TestPermissionsRequest" + }, + "response": { + "$ref": "TestPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] } } }, @@ -29696,6 +30454,51 @@ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource.", + "httpMethod": "POST", + "id": "compute.vpnGateways.testIamPermissions", + "parameterOrder": [ + "project", + "region", + "resource" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "The name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/vpnGateways/{resource}/testIamPermissions", + "request": { + "$ref": "TestPermissionsRequest" + }, + "response": { + "$ref": "TestPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] } } }, @@ -30328,7 +31131,7 @@ } } }, - "revision": "20210301", + "revision": "20210310", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -30884,6 +31687,7 @@ "enum": [ "DNS_RESOLVER", "GCE_ENDPOINT", + "IPSEC_INTERCONNECT", "NAT_AUTO", "PRIVATE_SERVICE_CONNECT", "SHARED_LOADBALANCER_VIP", @@ -30895,6 +31699,7 @@ "", "", "", + "", "" ], "type": "string" @@ -31997,6 +32802,8 @@ "NOT_ENOUGH_QUOTA_AVAILABLE", "REGION_RESOURCE_STOCKOUT", "SCALING_TARGET_DOES_NOT_EXIST", + "SCHEDULED_INSTANCES_GREATER_THAN_AUTOSCALER_MAX", + "SCHEDULED_INSTANCES_LESS_THAN_AUTOSCALER_MIN", "UNKNOWN", "UNSUPPORTED_MAX_RATE_LOAD_BALANCING_CONFIGURATION", "ZONE_RESOURCE_STOCKOUT" @@ -32019,6 +32826,8 @@ "", "", "", + "", + "", "" ], "type": "string" @@ -32550,7 +33359,7 @@ "id": "BackendBucketCdnPolicyNegativeCachingPolicy", "properties": { "code": { - "description": "The HTTP status code to define a TTL against. Only HTTP status codes 300, 301, 308, 404, 405, 410, 421, 451 and 501 are can be specified as values, and you cannot specify a status code more than once.", + "description": "The HTTP status code to define a TTL against. Only HTTP status codes 300, 301, 302, 307, 308, 404, 405, 410, 421, 451 and 501 are can be specified as values, and you cannot specify a status code more than once.", "format": "int32", "type": "integer" }, @@ -32812,6 +33621,10 @@ "$ref": "BackendServiceLogConfig", "description": "This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver." }, + "maxStreamDuration": { + "$ref": "Duration", + "description": "Specifies the default maximum duration (timeout) for streams to this service. Duration is computed from the beginning of the stream until the response has been completely processed, including all retries. A stream that does not complete in this duration is closed.\nIf not specified, there will be no timeout limit, i.e. the maximum duration is infinite.\nThis field is only allowed when the loadBalancingScheme of the backend service is INTERNAL_SELF_MANAGED." + }, "name": { "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", @@ -33126,7 +33939,7 @@ "id": "BackendServiceCdnPolicyNegativeCachingPolicy", "properties": { "code": { - "description": "The HTTP status code to define a TTL against. Only HTTP status codes 300, 301, 308, 404, 405, 410, 421, 451 and 501 are can be specified as values, and you cannot specify a status code more than once.", + "description": "The HTTP status code to define a TTL against. Only HTTP status codes 300, 301, 302, 307, 308, 404, 405, 410, 421, 451 and 501 are can be specified as values, and you cannot specify a status code more than once.", "format": "int32", "type": "integer" }, @@ -36499,7 +37312,7 @@ "type": "string" }, "displayName": { - "description": "User-provided name of the Organization firewall plicy. The name should be unique in the organization in which the firewall policy is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", + "description": "Depreacted, please use short name instead. User-provided name of the Organization firewall plicy. The name should be unique in the organization in which the firewall policy is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "type": "string" }, @@ -36545,6 +37358,11 @@ "selfLinkWithId": { "description": "[Output Only] Server-defined URL for this resource with the resource id.", "type": "string" + }, + "shortName": { + "description": "User-provided name of the Organization firewall plicy. The name should be unique in the organization in which the firewall policy is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "type": "string" } }, "type": "object" @@ -36557,7 +37375,7 @@ "type": "string" }, "displayName": { - "description": "[Output Only] The display name of the firewall policy of the association.", + "description": "[Output Only] Deprecated, please use short name instead. The display name of the firewall policy of the association.", "type": "string" }, "firewallPolicyId": { @@ -36567,6 +37385,10 @@ "name": { "description": "The name for an association.", "type": "string" + }, + "shortName": { + "description": "[Output Only] The short name of the firewall policy of the association.", + "type": "string" } }, "type": "object" @@ -38994,6 +39816,10 @@ "$ref": "HttpFaultInjection", "description": "The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests.\ntimeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.\nNot supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true." }, + "maxStreamDuration": { + "$ref": "Duration", + "description": "Specifies the maximum duration (timeout) for streams on the selected route. Unlike the timeout field where the timeout duration starts from the time the request has been fully processed (i.e. end-of-stream), the duration in this field is computed from the beginning of the stream until the response has been completely processed, including all retries. A stream that does not complete in this duration is closed.\nIf not specified, will use the largest maxStreamDuration among all backend services associated with the route.\nThis field is only allowed if the Url map is used with backend services with loadBalancingScheme set to INTERNAL_SELF_MANAGED." + }, "requestMirrorPolicy": { "$ref": "RequestMirrorPolicy", "description": "Specifies the policy on how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow.\nNot supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true." @@ -42375,7 +43201,7 @@ "id": "InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy", "properties": { "displayName": { - "description": "[Output Only] The display name of the firewall policy.", + "description": "[Output Only] Deprecated, please use short name instead. The display name of the firewall policy.", "type": "string" }, "name": { @@ -42389,6 +43215,10 @@ }, "type": "array" }, + "shortName": { + "description": "[Output Only] The short name of the firewall policy.", + "type": "string" + }, "type": { "description": "[Output Only] The type of the firewall policy.", "enum": [ @@ -42904,6 +43734,18 @@ ], "type": "string" }, + "encryption": { + "description": "Indicates the user-supplied encryption option of this interconnect attachment: \n- NONE is the default value, which means that the attachment carries unencrypted traffic. VMs can send traffic to, or receive traffic from, this type of attachment. \n- IPSEC indicates that the attachment carries only traffic encrypted by an IPsec device such as an HA VPN gateway. VMs cannot directly send traffic to, or receive traffic from, such an attachment. To use IPsec-encrypted Cloud Interconnect, create the attachment using this option.", + "enum": [ + "IPSEC", + "NONE" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, "googleReferenceId": { "description": "[Output Only] Google reference ID, to be used when raising support tickets with Google or otherwise to debug backend connectivity issues. [Deprecated] This field is not used.", "type": "string" @@ -42917,6 +43759,13 @@ "description": "URL of the underlying Interconnect object that this attachment's traffic will traverse through.", "type": "string" }, + "ipsecInternalAddresses": { + "description": "URL of addresses that have been reserved for the interconnect attachment, Used only for interconnect attachment that has the encryption option as IPSEC. The addresses must be RFC 1918 IP address ranges. When creating HA VPN gateway over the interconnect attachment, if the attachment is configured to use an RFC 1918 IP address, then the VPN gateway?s IP address will be allocated from the IP address range specified here. For example, if the HA VPN gateway?s interface 0 is paired to this interconnect attachment, then an RFC 1918 IP address for the VPN gateway interface 0 will be allocated from the IP address specified for this interconnect attachment. If this field is not specified for interconnect attachment that has encryption option as IPSEC, later on when creating HA VPN gateway on this interconnect attachment, the HA VPN gateway's IP address will be allocated from regional external IP address pool.", + "items": { + "type": "string" + }, + "type": "array" + }, "kind": { "default": "compute#interconnectAttachment", "description": "[Output Only] Type of the resource. Always compute#interconnectAttachment for interconnect attachments.", @@ -46487,7 +47336,7 @@ "id": "NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy", "properties": { "displayName": { - "description": "[Output Only] The display name of the firewall policy.", + "description": "[Output Only] Deprecated, please use short name instead. The display name of the firewall policy.", "type": "string" }, "name": { @@ -46501,6 +47350,10 @@ }, "type": "array" }, + "shortName": { + "description": "[Output Only] The short name of the firewall policy.", + "type": "string" + }, "type": { "description": "[Output Only] The type of the firewall policy.", "enum": [ @@ -50608,9 +51461,11 @@ "AUTOSCALERS", "BACKEND_BUCKETS", "BACKEND_SERVICES", + "C2D_CPUS", "C2_CPUS", "COMMITMENTS", "COMMITTED_A2_CPUS", + "COMMITTED_C2D_CPUS", "COMMITTED_C2_CPUS", "COMMITTED_CPUS", "COMMITTED_E2_CPUS", @@ -50828,6 +51683,8 @@ "", "", "", + "", + "", "" ], "type": "string" @@ -53650,6 +54507,10 @@ "description": "An optional description of this resource. Provide this property when you create the resource.", "type": "string" }, + "encryptedInterconnectRouter": { + "description": "Field to indicate if a router is dedicated to use with encrypted Interconnect Attachment (IPsec-encrypted Cloud Interconnect feature).", + "type": "boolean" + }, "id": { "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", "format": "uint64", @@ -53885,7 +54746,7 @@ "type": "integer" }, "keepaliveInterval": { - "description": "The interval in seconds between BGP keepalive messages that are sent to the peer.\nNot currently available publicly.\nHold time is three times the interval at which keepalive messages are sent, and the hold time is the maximum number of seconds allowed to elapse between successive keepalive messages that BGP receives from a peer.\nBGP will use the smaller of either the local hold time value or the peer's hold time value as the hold time for the BGP connection between the two peers.\nIf set, this value must be between 1 and 120. The default is 20.", + "description": "The interval in seconds between BGP keepalive messages that are sent to the peer.\nNot currently available publicly.\nHold time is three times the interval at which keepalive messages are sent, and the hold time is the maximum number of seconds allowed to elapse between successive keepalive messages that BGP receives from a peer.\nBGP will use the smaller of either the local hold time value or the peer's hold time value as the hold time for the BGP connection between the two peers.\nIf set, this value must be between 20 and 60. The default is 20.", "format": "uint32", "type": "integer" } @@ -53908,7 +54769,7 @@ "type": "string" }, "advertisedGroups": { - "description": "User-specified list of prefix groups to advertise in custom mode, which can take one of the following options: \n- ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets. \n- ALL_VPC_SUBNETS: Advertises the router's own VPC subnets. \n- ALL_PEER_VPC_SUBNETS: Advertises peer subnets of the router's VPC network. Note that this field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the \"bgp\" message). These groups are advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups.", + "description": "User-specified list of prefix groups to advertise in custom mode, which can take one of the following options: \n- ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets. \n- ALL_VPC_SUBNETS: Advertises the router's own VPC subnets. Note that this field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the \"bgp\" message). These groups are advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups.", "items": { "enum": [ "ALL_SUBNETS" @@ -53991,6 +54852,10 @@ "peerIpAddress": { "description": "IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.", "type": "string" + }, + "routerApplianceInstance": { + "description": "URI of the VM instance that is used as third-party router appliances such as Next Gen Firewalls, Virtual Routers, or Router Appliances. The VM instance must be located in zones contained in the same region as this Cloud Router. The VM instance is the peer side of the BGP session.", + "type": "string" } }, "type": "object" @@ -54066,6 +54931,19 @@ "description": "Name of this interface entry. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "type": "string" + }, + "privateIpAddress": { + "description": "The regional private internal IP address that is used to establish BGP sessions to a VM instance acting as a third-party Router Appliance, such as a Next Gen Firewall, a Virtual Router, or an SD-WAN VM.", + "type": "string" + }, + "redundantInterface": { + "description": "Name of the interface that will be redundant with the current interface you are creating. The redundantInterface must belong to the same Cloud Router as the interface here. To establish the BGP session to a Router Appliance VM, you must create two BGP peers. The two BGP peers must be attached to two separate interfaces that are redundant with each other. The redundant_interface must be 1-63 characters long, and comply with RFC1035. Specifically, the redundant_interface must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "type": "string" + }, + "subnetwork": { + "description": "The URL of the subnetwork resource that this interface belongs to, which must be in the same region as the Cloud Router. When you establish a BGP session to a VM instance using this interface, the VM instance must belong to the same subnetwork as the subnetwork specified here.", + "type": "string" } }, "type": "object" @@ -54407,6 +55285,10 @@ "description": "IP address of the remote BGP interface.", "type": "string" }, + "routerApplianceInstance": { + "description": "[Output only] URI of the VM instance that is used as third-party router appliances such as Next Gen Firewalls, Virtual Routers, or Router Appliances. The VM instance is the peer side of the BGP session.", + "type": "string" + }, "state": { "description": "BGP state as specified in RFC1771.", "type": "string" @@ -54873,7 +55755,7 @@ "type": "object" }, "Scheduling": { - "description": "Sets the scheduling options for an Instance. NextID: 17", + "description": "Sets the scheduling options for an Instance. NextID: 20", "id": "Scheduling", "properties": { "automaticRestart": { @@ -55489,7 +56371,7 @@ "type": "object" }, "ServiceAttachment": { - "description": "Represents a ServiceAttachment resource.\n\nA service attachment represents a service that a producer has exposed. It encapsulates the load balancer which fronts the service runs and a list of NAT IP ranges that the producers uses to represent the consumers connecting to the service. next tag = 16", + "description": "Represents a ServiceAttachment resource.\n\nA service attachment represents a service that a producer has exposed. It encapsulates the load balancer which fronts the service runs and a list of NAT IP ranges that the producers uses to represent the consumers connecting to the service. next tag = 17", "id": "ServiceAttachment", "properties": { "connectionPreference": { @@ -62092,6 +62974,10 @@ "format": "uint32", "type": "integer" }, + "interconnectAttachment": { + "description": "URL of the interconnect attachment resource. When the value of this field is present, the VPN Gateway will be used for IPsec-encrypted Cloud Interconnect; all Egress or Ingress traffic for this VPN Gateway interface will go through the specified interconnect attachment resource.", + "type": "string" + }, "ipAddress": { "description": "[Output Only] The external IP address for this VPN gateway interface.", "type": "string" diff --git a/discovery/compute-v1.json b/discovery/compute-v1.json index 798f9b9ceb1..69d4162fc48 100644 --- a/discovery/compute-v1.json +++ b/discovery/compute-v1.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" }, "https://www.googleapis.com/auth/compute": { "description": "View and manage your Google Compute Engine resources" @@ -29,7 +29,7 @@ "description": "Creates and runs virtual machines on Google Cloud Platform.", "discoveryVersion": "v1", "documentationLink": "https://developers.google.com/compute/docs/reference/latest/", - "etag": "\"uWj2hSb4GVjzdDlAnRd2gbM1ZQ8/pFsvg75aSQSd5X_WtRuLZFJX5rc\"", + "etag": "\"uWj2hSb4GVjzdDlAnRd2gbM1ZQ8/9rfyC5OSVJz9l70YzG-HkdI6Hyc\"", "icons": { "x16": "https://www.google.com/images/icons/product/compute_engine-16.png", "x32": "https://www.google.com/images/icons/product/compute_engine-32.png" @@ -5007,87 +5007,28 @@ } } }, - "healthChecks": { + "globalPublicDelegatedPrefixes": { "methods": { - "aggregatedList": { - "description": "Retrieves the list of all HealthCheck resources, regional and global, available to the specified project.", - "httpMethod": "GET", - "id": "compute.healthChecks.aggregatedList", - "parameterOrder": [ - "project" - ], - "parameters": { - "filter": { - "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.\n\nYou 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.\n\nTo 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) ```", - "location": "query", - "type": "string" - }, - "includeAllScopes": { - "description": "Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.", - "location": "query", - "type": "boolean" - }, - "maxResults": { - "default": "500", - "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", - "format": "uint32", - "location": "query", - "minimum": "0", - "type": "integer" - }, - "orderBy": { - "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or `creationTimestamp desc` is supported.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Name of the project scoping this request.", - "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", - "required": true, - "type": "string" - }, - "returnPartialSuccess": { - "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", - "location": "query", - "type": "boolean" - } - }, - "path": "projects/{project}/aggregated/healthChecks", - "response": { - "$ref": "HealthChecksAggregatedList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, "delete": { - "description": "Deletes the specified HealthCheck resource.", + "description": "Deletes the specified global PublicDelegatedPrefix.", "httpMethod": "DELETE", - "id": "compute.healthChecks.delete", + "id": "compute.globalPublicDelegatedPrefixes.delete", "parameterOrder": [ "project", - "healthCheck" + "publicDelegatedPrefix" ], "parameters": { - "healthCheck": { - "description": "Name of the HealthCheck resource to delete.", + "project": { + "description": "Project ID for this request.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "required": true, "type": "string" }, - "project": { - "description": "Project ID for this request.", + "publicDelegatedPrefix": { + "description": "Name of the PublicDelegatedPrefix resource to delete.", "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -5097,7 +5038,7 @@ "type": "string" } }, - "path": "projects/{project}/global/healthChecks/{healthCheck}", + "path": "projects/{project}/global/publicDelegatedPrefixes/{publicDelegatedPrefix}", "response": { "$ref": "Operation" }, @@ -5107,32 +5048,32 @@ ] }, "get": { - "description": "Returns the specified HealthCheck resource. Gets a list of available health checks by making a list() request.", + "description": "Returns the specified global PublicDelegatedPrefix resource.", "httpMethod": "GET", - "id": "compute.healthChecks.get", + "id": "compute.globalPublicDelegatedPrefixes.get", "parameterOrder": [ "project", - "healthCheck" + "publicDelegatedPrefix" ], "parameters": { - "healthCheck": { - "description": "Name of the HealthCheck resource to return.", + "project": { + "description": "Project ID for this request.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "required": true, "type": "string" }, - "project": { - "description": "Project ID for this request.", + "publicDelegatedPrefix": { + "description": "Name of the PublicDelegatedPrefix resource to return.", "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } }, - "path": "projects/{project}/global/healthChecks/{healthCheck}", + "path": "projects/{project}/global/publicDelegatedPrefixes/{publicDelegatedPrefix}", "response": { - "$ref": "HealthCheck" + "$ref": "PublicDelegatedPrefix" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", @@ -5141,9 +5082,9 @@ ] }, "insert": { - "description": "Creates a HealthCheck resource in the specified project using the data included in the request.", + "description": "Creates a global PublicDelegatedPrefix in the specified project using the parameters that are included in the request.", "httpMethod": "POST", - "id": "compute.healthChecks.insert", + "id": "compute.globalPublicDelegatedPrefixes.insert", "parameterOrder": [ "project" ], @@ -5161,9 +5102,9 @@ "type": "string" } }, - "path": "projects/{project}/global/healthChecks", + "path": "projects/{project}/global/publicDelegatedPrefixes", "request": { - "$ref": "HealthCheck" + "$ref": "PublicDelegatedPrefix" }, "response": { "$ref": "Operation" @@ -5174,9 +5115,9 @@ ] }, "list": { - "description": "Retrieves the list of HealthCheck resources available to the specified project.", + "description": "Lists the global PublicDelegatedPrefixes for a project.", "httpMethod": "GET", - "id": "compute.healthChecks.list", + "id": "compute.globalPublicDelegatedPrefixes.list", "parameterOrder": [ "project" ], @@ -5217,9 +5158,9 @@ "type": "boolean" } }, - "path": "projects/{project}/global/healthChecks", + "path": "projects/{project}/global/publicDelegatedPrefixes", "response": { - "$ref": "HealthCheckList" + "$ref": "PublicDelegatedPrefixList" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", @@ -5228,25 +5169,25 @@ ] }, "patch": { - "description": "Updates a HealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "description": "Patches the specified global PublicDelegatedPrefix resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.", "httpMethod": "PATCH", - "id": "compute.healthChecks.patch", + "id": "compute.globalPublicDelegatedPrefixes.patch", "parameterOrder": [ "project", - "healthCheck" + "publicDelegatedPrefix" ], "parameters": { - "healthCheck": { - "description": "Name of the HealthCheck resource to patch.", + "project": { + "description": "Project ID for this request.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "required": true, "type": "string" }, - "project": { - "description": "Project ID for this request.", + "publicDelegatedPrefix": { + "description": "Name of the PublicDelegatedPrefix resource to patch.", "location": "path", - "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -5256,9 +5197,9 @@ "type": "string" } }, - "path": "projects/{project}/global/healthChecks/{healthCheck}", + "path": "projects/{project}/global/publicDelegatedPrefixes/{publicDelegatedPrefix}", "request": { - "$ref": "HealthCheck" + "$ref": "PublicDelegatedPrefix" }, "response": { "$ref": "Operation" @@ -5267,63 +5208,81 @@ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] - }, - "update": { - "description": "Updates a HealthCheck resource in the specified project using the data included in the request.", - "httpMethod": "PUT", - "id": "compute.healthChecks.update", + } + } + }, + "healthChecks": { + "methods": { + "aggregatedList": { + "description": "Retrieves the list of all HealthCheck resources, regional and global, available to the specified project.", + "httpMethod": "GET", + "id": "compute.healthChecks.aggregatedList", "parameterOrder": [ - "project", - "healthCheck" + "project" ], "parameters": { - "healthCheck": { - "description": "Name of the HealthCheck resource to update.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, + "filter": { + "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.\n\nYou 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.\n\nTo 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) ```", + "location": "query", + "type": "string" + }, + "includeAllScopes": { + "description": "Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.", + "location": "query", + "type": "boolean" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or `creationTimestamp desc` is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + "location": "query", "type": "string" }, "project": { - "description": "Project ID for this request.", + "description": "Name of the project scoping this request.", "location": "path", "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", "required": true, "type": "string" }, - "requestId": { - "description": "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.\n\nFor 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.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "returnPartialSuccess": { + "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", "location": "query", - "type": "string" + "type": "boolean" } }, - "path": "projects/{project}/global/healthChecks/{healthCheck}", - "request": { - "$ref": "HealthCheck" - }, + "path": "projects/{project}/aggregated/healthChecks", "response": { - "$ref": "Operation" + "$ref": "HealthChecksAggregatedList" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" ] - } - } - }, - "httpHealthChecks": { - "methods": { + }, "delete": { - "description": "Deletes the specified HttpHealthCheck resource.", + "description": "Deletes the specified HealthCheck resource.", "httpMethod": "DELETE", - "id": "compute.httpHealthChecks.delete", + "id": "compute.healthChecks.delete", "parameterOrder": [ "project", - "httpHealthCheck" + "healthCheck" ], "parameters": { - "httpHealthCheck": { - "description": "Name of the HttpHealthCheck resource to delete.", + "healthCheck": { + "description": "Name of the HealthCheck resource to delete.", "location": "path", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, @@ -5342,7 +5301,7 @@ "type": "string" } }, - "path": "projects/{project}/global/httpHealthChecks/{httpHealthCheck}", + "path": "projects/{project}/global/healthChecks/{healthCheck}", "response": { "$ref": "Operation" }, @@ -5352,16 +5311,16 @@ ] }, "get": { - "description": "Returns the specified HttpHealthCheck resource. Gets a list of available HTTP health checks by making a list() request.", + "description": "Returns the specified HealthCheck resource. Gets a list of available health checks by making a list() request.", "httpMethod": "GET", - "id": "compute.httpHealthChecks.get", + "id": "compute.healthChecks.get", "parameterOrder": [ "project", - "httpHealthCheck" + "healthCheck" ], "parameters": { - "httpHealthCheck": { - "description": "Name of the HttpHealthCheck resource to return.", + "healthCheck": { + "description": "Name of the HealthCheck resource to return.", "location": "path", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, @@ -5375,9 +5334,9 @@ "type": "string" } }, - "path": "projects/{project}/global/httpHealthChecks/{httpHealthCheck}", + "path": "projects/{project}/global/healthChecks/{healthCheck}", "response": { - "$ref": "HttpHealthCheck" + "$ref": "HealthCheck" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", @@ -5386,9 +5345,9 @@ ] }, "insert": { - "description": "Creates a HttpHealthCheck resource in the specified project using the data included in the request.", + "description": "Creates a HealthCheck resource in the specified project using the data included in the request.", "httpMethod": "POST", - "id": "compute.httpHealthChecks.insert", + "id": "compute.healthChecks.insert", "parameterOrder": [ "project" ], @@ -5406,9 +5365,9 @@ "type": "string" } }, - "path": "projects/{project}/global/httpHealthChecks", + "path": "projects/{project}/global/healthChecks", "request": { - "$ref": "HttpHealthCheck" + "$ref": "HealthCheck" }, "response": { "$ref": "Operation" @@ -5419,9 +5378,9 @@ ] }, "list": { - "description": "Retrieves the list of HttpHealthCheck resources available to the specified project.", + "description": "Retrieves the list of HealthCheck resources available to the specified project.", "httpMethod": "GET", - "id": "compute.httpHealthChecks.list", + "id": "compute.healthChecks.list", "parameterOrder": [ "project" ], @@ -5462,9 +5421,9 @@ "type": "boolean" } }, - "path": "projects/{project}/global/httpHealthChecks", + "path": "projects/{project}/global/healthChecks", "response": { - "$ref": "HttpHealthCheckList" + "$ref": "HealthCheckList" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", @@ -5473,16 +5432,16 @@ ] }, "patch": { - "description": "Updates a HttpHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "description": "Updates a HealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", "httpMethod": "PATCH", - "id": "compute.httpHealthChecks.patch", + "id": "compute.healthChecks.patch", "parameterOrder": [ "project", - "httpHealthCheck" + "healthCheck" ], "parameters": { - "httpHealthCheck": { - "description": "Name of the HttpHealthCheck resource to patch.", + "healthCheck": { + "description": "Name of the HealthCheck resource to patch.", "location": "path", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, @@ -5501,9 +5460,9 @@ "type": "string" } }, - "path": "projects/{project}/global/httpHealthChecks/{httpHealthCheck}", + "path": "projects/{project}/global/healthChecks/{healthCheck}", "request": { - "$ref": "HttpHealthCheck" + "$ref": "HealthCheck" }, "response": { "$ref": "Operation" @@ -5514,16 +5473,16 @@ ] }, "update": { - "description": "Updates a HttpHealthCheck resource in the specified project using the data included in the request.", + "description": "Updates a HealthCheck resource in the specified project using the data included in the request.", "httpMethod": "PUT", - "id": "compute.httpHealthChecks.update", + "id": "compute.healthChecks.update", "parameterOrder": [ "project", - "httpHealthCheck" + "healthCheck" ], "parameters": { - "httpHealthCheck": { - "description": "Name of the HttpHealthCheck resource to update.", + "healthCheck": { + "description": "Name of the HealthCheck resource to update.", "location": "path", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, @@ -5542,9 +5501,9 @@ "type": "string" } }, - "path": "projects/{project}/global/httpHealthChecks/{httpHealthCheck}", + "path": "projects/{project}/global/healthChecks/{healthCheck}", "request": { - "$ref": "HttpHealthCheck" + "$ref": "HealthCheck" }, "response": { "$ref": "Operation" @@ -5556,19 +5515,19 @@ } } }, - "httpsHealthChecks": { + "httpHealthChecks": { "methods": { "delete": { - "description": "Deletes the specified HttpsHealthCheck resource.", + "description": "Deletes the specified HttpHealthCheck resource.", "httpMethod": "DELETE", - "id": "compute.httpsHealthChecks.delete", + "id": "compute.httpHealthChecks.delete", "parameterOrder": [ "project", - "httpsHealthCheck" + "httpHealthCheck" ], "parameters": { - "httpsHealthCheck": { - "description": "Name of the HttpsHealthCheck resource to delete.", + "httpHealthCheck": { + "description": "Name of the HttpHealthCheck resource to delete.", "location": "path", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, @@ -5587,7 +5546,7 @@ "type": "string" } }, - "path": "projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}", + "path": "projects/{project}/global/httpHealthChecks/{httpHealthCheck}", "response": { "$ref": "Operation" }, @@ -5597,16 +5556,16 @@ ] }, "get": { - "description": "Returns the specified HttpsHealthCheck resource. Gets a list of available HTTPS health checks by making a list() request.", + "description": "Returns the specified HttpHealthCheck resource. Gets a list of available HTTP health checks by making a list() request.", "httpMethod": "GET", - "id": "compute.httpsHealthChecks.get", + "id": "compute.httpHealthChecks.get", "parameterOrder": [ "project", - "httpsHealthCheck" + "httpHealthCheck" ], "parameters": { - "httpsHealthCheck": { - "description": "Name of the HttpsHealthCheck resource to return.", + "httpHealthCheck": { + "description": "Name of the HttpHealthCheck resource to return.", "location": "path", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, @@ -5620,9 +5579,9 @@ "type": "string" } }, - "path": "projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}", + "path": "projects/{project}/global/httpHealthChecks/{httpHealthCheck}", "response": { - "$ref": "HttpsHealthCheck" + "$ref": "HttpHealthCheck" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", @@ -5631,9 +5590,9 @@ ] }, "insert": { - "description": "Creates a HttpsHealthCheck resource in the specified project using the data included in the request.", + "description": "Creates a HttpHealthCheck resource in the specified project using the data included in the request.", "httpMethod": "POST", - "id": "compute.httpsHealthChecks.insert", + "id": "compute.httpHealthChecks.insert", "parameterOrder": [ "project" ], @@ -5651,9 +5610,9 @@ "type": "string" } }, - "path": "projects/{project}/global/httpsHealthChecks", + "path": "projects/{project}/global/httpHealthChecks", "request": { - "$ref": "HttpsHealthCheck" + "$ref": "HttpHealthCheck" }, "response": { "$ref": "Operation" @@ -5664,9 +5623,254 @@ ] }, "list": { - "description": "Retrieves the list of HttpsHealthCheck resources available to the specified project.", + "description": "Retrieves the list of HttpHealthCheck resources available to the specified project.", "httpMethod": "GET", - "id": "compute.httpsHealthChecks.list", + "id": "compute.httpHealthChecks.list", + "parameterOrder": [ + "project" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.\n\nYou 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.\n\nTo 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) ```", + "location": "query", + "type": "string" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or `creationTimestamp desc` is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "returnPartialSuccess": { + "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + "location": "query", + "type": "boolean" + } + }, + "path": "projects/{project}/global/httpHealthChecks", + "response": { + "$ref": "HttpHealthCheckList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "patch": { + "description": "Updates a HttpHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "httpMethod": "PATCH", + "id": "compute.httpHealthChecks.patch", + "parameterOrder": [ + "project", + "httpHealthCheck" + ], + "parameters": { + "httpHealthCheck": { + "description": "Name of the HttpHealthCheck resource to patch.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "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.\n\nFor 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.\n\nThe 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": "projects/{project}/global/httpHealthChecks/{httpHealthCheck}", + "request": { + "$ref": "HttpHealthCheck" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "update": { + "description": "Updates a HttpHealthCheck resource in the specified project using the data included in the request.", + "httpMethod": "PUT", + "id": "compute.httpHealthChecks.update", + "parameterOrder": [ + "project", + "httpHealthCheck" + ], + "parameters": { + "httpHealthCheck": { + "description": "Name of the HttpHealthCheck resource to update.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "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.\n\nFor 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.\n\nThe 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": "projects/{project}/global/httpHealthChecks/{httpHealthCheck}", + "request": { + "$ref": "HttpHealthCheck" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + } + } + }, + "httpsHealthChecks": { + "methods": { + "delete": { + "description": "Deletes the specified HttpsHealthCheck resource.", + "httpMethod": "DELETE", + "id": "compute.httpsHealthChecks.delete", + "parameterOrder": [ + "project", + "httpsHealthCheck" + ], + "parameters": { + "httpsHealthCheck": { + "description": "Name of the HttpsHealthCheck resource to delete.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "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.\n\nFor 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.\n\nThe 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": "projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "description": "Returns the specified HttpsHealthCheck resource. Gets a list of available HTTPS health checks by making a list() request.", + "httpMethod": "GET", + "id": "compute.httpsHealthChecks.get", + "parameterOrder": [ + "project", + "httpsHealthCheck" + ], + "parameters": { + "httpsHealthCheck": { + "description": "Name of the HttpsHealthCheck resource to return.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}", + "response": { + "$ref": "HttpsHealthCheck" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "description": "Creates a HttpsHealthCheck resource in the specified project using the data included in the request.", + "httpMethod": "POST", + "id": "compute.httpsHealthChecks.insert", + "parameterOrder": [ + "project" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "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.\n\nFor 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.\n\nThe 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": "projects/{project}/global/httpsHealthChecks", + "request": { + "$ref": "HttpsHealthCheck" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "description": "Retrieves the list of HttpsHealthCheck resources available to the specified project.", + "httpMethod": "GET", + "id": "compute.httpsHealthChecks.list", "parameterOrder": [ "project" ], @@ -14259,25 +14463,17 @@ } } }, - "regionAutoscalers": { + "publicAdvertisedPrefixes": { "methods": { "delete": { - "description": "Deletes the specified autoscaler.", + "description": "Deletes the specified PublicAdvertisedPrefix", "httpMethod": "DELETE", - "id": "compute.regionAutoscalers.delete", + "id": "compute.publicAdvertisedPrefixes.delete", "parameterOrder": [ "project", - "region", - "autoscaler" + "publicAdvertisedPrefix" ], "parameters": { - "autoscaler": { - "description": "Name of the autoscaler to delete.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, "project": { "description": "Project ID for this request.", "location": "path", @@ -14285,10 +14481,10 @@ "required": true, "type": "string" }, - "region": { - "description": "Name of the region scoping this request.", + "publicAdvertisedPrefix": { + "description": "Name of the PublicAdvertisedPrefix resource to delete.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -14298,7 +14494,7 @@ "type": "string" } }, - "path": "projects/{project}/regions/{region}/autoscalers/{autoscaler}", + "path": "projects/{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}", "response": { "$ref": "Operation" }, @@ -14308,22 +14504,14 @@ ] }, "get": { - "description": "Returns the specified autoscaler.", + "description": "Returns the specified PublicAdvertisedPrefix resource.", "httpMethod": "GET", - "id": "compute.regionAutoscalers.get", + "id": "compute.publicAdvertisedPrefixes.get", "parameterOrder": [ "project", - "region", - "autoscaler" + "publicAdvertisedPrefix" ], "parameters": { - "autoscaler": { - "description": "Name of the autoscaler to return.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", - "required": true, - "type": "string" - }, "project": { "description": "Project ID for this request.", "location": "path", @@ -14331,17 +14519,17 @@ "required": true, "type": "string" }, - "region": { - "description": "Name of the region scoping this request.", + "publicAdvertisedPrefix": { + "description": "Name of the PublicAdvertisedPrefix resource to return.", "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } }, - "path": "projects/{project}/regions/{region}/autoscalers/{autoscaler}", + "path": "projects/{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}", "response": { - "$ref": "Autoscaler" + "$ref": "PublicAdvertisedPrefix" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", @@ -14350,12 +14538,11 @@ ] }, "insert": { - "description": "Creates an autoscaler in the specified project using the data included in the request.", + "description": "Creates a PublicAdvertisedPrefix in the specified project using the parameters that are included in the request.", "httpMethod": "POST", - "id": "compute.regionAutoscalers.insert", + "id": "compute.publicAdvertisedPrefixes.insert", "parameterOrder": [ - "project", - "region" + "project" ], "parameters": { "project": { @@ -14365,22 +14552,15 @@ "required": true, "type": "string" }, - "region": { - "description": "Name of the region scoping this request.", - "location": "path", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "required": true, - "type": "string" - }, "requestId": { "description": "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.\n\nFor 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.\n\nThe 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": "projects/{project}/regions/{region}/autoscalers", + "path": "projects/{project}/global/publicAdvertisedPrefixes", "request": { - "$ref": "Autoscaler" + "$ref": "PublicAdvertisedPrefix" }, "response": { "$ref": "Operation" @@ -14391,12 +14571,543 @@ ] }, "list": { - "description": "Retrieves a list of autoscalers contained within the specified region.", + "description": "Lists the PublicAdvertisedPrefixes for a project.", "httpMethod": "GET", - "id": "compute.regionAutoscalers.list", + "id": "compute.publicAdvertisedPrefixes.list", "parameterOrder": [ - "project", - "region" + "project" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.\n\nYou 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.\n\nTo 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) ```", + "location": "query", + "type": "string" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or `creationTimestamp desc` is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "returnPartialSuccess": { + "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + "location": "query", + "type": "boolean" + } + }, + "path": "projects/{project}/global/publicAdvertisedPrefixes", + "response": { + "$ref": "PublicAdvertisedPrefixList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "patch": { + "description": "Patches the specified Router resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.", + "httpMethod": "PATCH", + "id": "compute.publicAdvertisedPrefixes.patch", + "parameterOrder": [ + "project", + "publicAdvertisedPrefix" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "publicAdvertisedPrefix": { + "description": "Name of the PublicAdvertisedPrefix resource to patch.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "requestId": { + "description": "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.\n\nFor 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.\n\nThe 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": "projects/{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}", + "request": { + "$ref": "PublicAdvertisedPrefix" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + } + } + }, + "publicDelegatedPrefixes": { + "methods": { + "aggregatedList": { + "description": "Lists all PublicDelegatedPrefix resources owned by the specific project across all scopes.", + "httpMethod": "GET", + "id": "compute.publicDelegatedPrefixes.aggregatedList", + "parameterOrder": [ + "project" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.\n\nYou 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.\n\nTo 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) ```", + "location": "query", + "type": "string" + }, + "includeAllScopes": { + "description": "Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.", + "location": "query", + "type": "boolean" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or `creationTimestamp desc` is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Name of the project scoping this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "returnPartialSuccess": { + "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + "location": "query", + "type": "boolean" + } + }, + "path": "projects/{project}/aggregated/publicDelegatedPrefixes", + "response": { + "$ref": "PublicDelegatedPrefixAggregatedList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "delete": { + "description": "Deletes the specified PublicDelegatedPrefix in the given region.", + "httpMethod": "DELETE", + "id": "compute.publicDelegatedPrefixes.delete", + "parameterOrder": [ + "project", + "region", + "publicDelegatedPrefix" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "publicDelegatedPrefix": { + "description": "Name of the PublicDelegatedPrefix resource to delete.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region of this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "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.\n\nFor 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.\n\nThe 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": "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "description": "Returns the specified PublicDelegatedPrefix resource in the given region.", + "httpMethod": "GET", + "id": "compute.publicDelegatedPrefixes.get", + "parameterOrder": [ + "project", + "region", + "publicDelegatedPrefix" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "publicDelegatedPrefix": { + "description": "Name of the PublicDelegatedPrefix resource to return.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region of this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}", + "response": { + "$ref": "PublicDelegatedPrefix" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "description": "Creates a PublicDelegatedPrefix in the specified project in the given region using the parameters that are included in the request.", + "httpMethod": "POST", + "id": "compute.publicDelegatedPrefixes.insert", + "parameterOrder": [ + "project", + "region" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region of this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "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.\n\nFor 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.\n\nThe 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": "projects/{project}/regions/{region}/publicDelegatedPrefixes", + "request": { + "$ref": "PublicDelegatedPrefix" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "description": "Lists the PublicDelegatedPrefixes for a project in the given region.", + "httpMethod": "GET", + "id": "compute.publicDelegatedPrefixes.list", + "parameterOrder": [ + "project", + "region" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.\n\nYou 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.\n\nTo 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) ```", + "location": "query", + "type": "string" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by `name` or `creationTimestamp desc` is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region of this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "returnPartialSuccess": { + "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + "location": "query", + "type": "boolean" + } + }, + "path": "projects/{project}/regions/{region}/publicDelegatedPrefixes", + "response": { + "$ref": "PublicDelegatedPrefixList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "patch": { + "description": "Patches the specified PublicDelegatedPrefix resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.", + "httpMethod": "PATCH", + "id": "compute.publicDelegatedPrefixes.patch", + "parameterOrder": [ + "project", + "region", + "publicDelegatedPrefix" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "publicDelegatedPrefix": { + "description": "Name of the PublicDelegatedPrefix resource to patch.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "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.\n\nFor 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.\n\nThe 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": "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}", + "request": { + "$ref": "PublicDelegatedPrefix" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + } + } + }, + "regionAutoscalers": { + "methods": { + "delete": { + "description": "Deletes the specified autoscaler.", + "httpMethod": "DELETE", + "id": "compute.regionAutoscalers.delete", + "parameterOrder": [ + "project", + "region", + "autoscaler" + ], + "parameters": { + "autoscaler": { + "description": "Name of the autoscaler to delete.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "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.\n\nFor 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.\n\nThe 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": "projects/{project}/regions/{region}/autoscalers/{autoscaler}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "description": "Returns the specified autoscaler.", + "httpMethod": "GET", + "id": "compute.regionAutoscalers.get", + "parameterOrder": [ + "project", + "region", + "autoscaler" + ], + "parameters": { + "autoscaler": { + "description": "Name of the autoscaler to return.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/autoscalers/{autoscaler}", + "response": { + "$ref": "Autoscaler" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "description": "Creates an autoscaler in the specified project using the data included in the request.", + "httpMethod": "POST", + "id": "compute.regionAutoscalers.insert", + "parameterOrder": [ + "project", + "region" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "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.\n\nFor 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.\n\nThe 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": "projects/{project}/regions/{region}/autoscalers", + "request": { + "$ref": "Autoscaler" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "description": "Retrieves a list of autoscalers contained within the specified region.", + "httpMethod": "GET", + "id": "compute.regionAutoscalers.list", + "parameterOrder": [ + "project", + "region" ], "parameters": { "filter": { @@ -26409,7 +27120,7 @@ } } }, - "revision": "20210301", + "revision": "20210310", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -26953,6 +27664,7 @@ "enum": [ "DNS_RESOLVER", "GCE_ENDPOINT", + "IPSEC_INTERCONNECT", "NAT_AUTO", "PRIVATE_SERVICE_CONNECT", "SHARED_LOADBALANCER_VIP", @@ -26964,6 +27676,7 @@ "", "", "", + "", "" ], "type": "string" @@ -27746,6 +28459,13 @@ "description": "[Output Only] URL of the region where the instance group resides (for autoscalers living in regional scope).", "type": "string" }, + "scalingScheduleStatus": { + "additionalProperties": { + "$ref": "ScalingScheduleStatus" + }, + "description": "[Output Only] Status information of existing scaling schedules.", + "type": "object" + }, "selfLink": { "description": "[Output Only] Server-defined URL for the resource.", "type": "string" @@ -28048,6 +28768,8 @@ "NOT_ENOUGH_QUOTA_AVAILABLE", "REGION_RESOURCE_STOCKOUT", "SCALING_TARGET_DOES_NOT_EXIST", + "SCHEDULED_INSTANCES_GREATER_THAN_AUTOSCALER_MAX", + "SCHEDULED_INSTANCES_LESS_THAN_AUTOSCALER_MIN", "UNKNOWN", "UNSUPPORTED_MAX_RATE_LOAD_BALANCING_CONFIGURATION", "ZONE_RESOURCE_STOCKOUT" @@ -28070,6 +28792,8 @@ "", "", "", + "", + "", "" ], "type": "string" @@ -28227,6 +28951,13 @@ }, "scaleInControl": { "$ref": "AutoscalingPolicyScaleInControl" + }, + "scalingSchedules": { + "additionalProperties": { + "$ref": "AutoscalingPolicyScalingSchedule" + }, + "description": "Scaling schedules defined for an autoscaler. Multiple schedules can be set on an autoscaler, and they can overlap. During overlapping periods the greatest min_required_replicas of all scaling schedules is applied. Up to 128 scaling schedules are allowed.", + "type": "object" } }, "type": "object" @@ -28310,6 +29041,39 @@ }, "type": "object" }, + "AutoscalingPolicyScalingSchedule": { + "description": "Scaling based on user-defined schedule. The message describes a single scaling schedule. A scaling schedule changes the minimum number of VM instances an autoscaler can recommend, which can trigger scaling out.", + "id": "AutoscalingPolicyScalingSchedule", + "properties": { + "description": { + "description": "A description of a scaling schedule.", + "type": "string" + }, + "disabled": { + "description": "A boolean value that specifies whether a scaling schedule can influence autoscaler recommendations. If set to true, then a scaling schedule has no effect. This field is optional, and its value is false by default.", + "type": "boolean" + }, + "durationSec": { + "description": "The duration of time intervals, in seconds, for which this scaling schedule is to run. The minimum allowed value is 300. This field is required.", + "format": "int32", + "type": "integer" + }, + "minRequiredReplicas": { + "description": "The minimum number of VM instances that the autoscaler will recommend in time intervals starting according to schedule. This field is required.", + "format": "int32", + "type": "integer" + }, + "schedule": { + "description": "The start timestamps of time intervals when this scaling schedule is to provide a scaling signal. This field uses the extended cron format (with an optional year field). The expression can describe a single timestamp if the optional year is set, in which case the scaling schedule runs once. The schedule is interpreted with respect to time_zone. This field is required. Note: These timestamps only describe when autoscaler starts providing the scaling signal. The VMs need additional time to become serving.", + "type": "string" + }, + "timeZone": { + "description": "The time zone to use when interpreting the schedule. The value of this field must be a time zone name from the tz database: http://en.wikipedia.org/wiki/Tz_database. This field is assigned a default value of ?UTC? if left empty.", + "type": "string" + } + }, + "type": "object" + }, "Backend": { "description": "Message containing information of one individual backend.", "id": "Backend", @@ -28439,6 +29203,13 @@ "description": "Message containing Cloud CDN configuration for a backend bucket.", "id": "BackendBucketCdnPolicy", "properties": { + "bypassCacheOnRequestHeaders": { + "description": "Bypass the cache when the specified request headers are matched - e.g. Pragma or Authorization headers. Up to 5 headers can be specified. The cache is bypassed for all cdnPolicy.cacheMode settings.", + "items": { + "$ref": "BackendBucketCdnPolicyBypassCacheOnRequestHeader" + }, + "type": "array" + }, "cacheMode": { "description": "Specifies the cache setting for all responses from this backend. The possible values are:\n\nUSE_ORIGIN_HEADERS Requires the origin to set valid caching headers to cache content. Responses without these headers will not be cached at Google's edge, and will require a full trip to the origin on every request, potentially impacting performance and increasing load on the origin server.\n\nFORCE_CACHE_ALL Cache all content, ignoring any \"private\", \"no-store\" or \"no-cache\" directives in Cache-Control response headers. Warning: this may result in Cloud CDN caching private, per-user (user identifiable) content.\n\nCACHE_ALL_STATIC Automatically cache static content, including common image formats, media (video and audio), and web assets (JavaScript and CSS). Requests and responses that are marked as uncacheable, as well as dynamic content (including HTML), will not be cached.", "enum": [ @@ -28470,6 +29241,22 @@ "format": "int32", "type": "integer" }, + "negativeCaching": { + "description": "Negative caching allows per-status code TTLs to be set, in order to apply fine-grained caching for common errors or redirects. This can reduce the load on your origin and improve end-user experience by reducing response latency. When the cache mode is set to CACHE_ALL_STATIC or USE_ORIGIN_HEADERS, negative caching applies to responses with the specified response code that lack any Cache-Control, Expires, or Pragma: no-cache directives. When the cache mode is set to FORCE_CACHE_ALL, negative caching applies to all responses with the specified response code, and override any caching headers. By default, Cloud CDN will apply the following default TTLs to these status codes: HTTP 300 (Multiple Choice), 301, 308 (Permanent Redirects): 10m HTTP 404 (Not Found), 410 (Gone), 451 (Unavailable For Legal Reasons): 120s HTTP 405 (Method Not Found), 421 (Misdirected Request), 501 (Not Implemented): 60s. These defaults can be overridden in negative_caching_policy.", + "type": "boolean" + }, + "negativeCachingPolicy": { + "description": "Sets a cache TTL for the specified HTTP status code. negative_caching must be enabled to configure negative_caching_policy. Omitting the policy and leaving negative_caching enabled will use Cloud CDN's default cache TTLs. Note that when specifying an explicit negative_caching_policy, you should take care to specify a cache TTL for all response codes that you wish to cache. Cloud CDN will not apply any default negative caching when a policy exists.", + "items": { + "$ref": "BackendBucketCdnPolicyNegativeCachingPolicy" + }, + "type": "array" + }, + "serveWhileStale": { + "description": "Serve existing content from the cache (if available) when revalidating content with the origin, or when an error is encountered when refreshing the cache. This setting defines the default \"max-stale\" duration for any cached responses that do not specify a max-stale directive. Stale responses that exceed the TTL configured here will not be served. The default limit (max-stale) is 86400s (1 day), which will allow stale content to be served up to this limit beyond the max-age (or s-max-age) of a cached response. The maximum allowed value is 604800 (1 week). Set this to zero (0) to disable serve-while-stale.", + "format": "int32", + "type": "integer" + }, "signedUrlCacheMaxAgeSec": { "description": "Maximum number of seconds the response to a signed URL request will be considered fresh. After this time period, the response will be revalidated before being served. Defaults to 1hr (3600s). When serving responses to signed URL requests, Cloud CDN will internally behave as though all responses from this backend had a \"Cache-Control: public, max-age=[TTL]\" header, regardless of any existing Cache-Control header. The actual headers served in responses will not be altered.", "format": "int64", @@ -28485,361 +29272,51 @@ }, "type": "object" }, - "BackendBucketList": { - "description": "Contains a list of BackendBucket resources.", - "id": "BackendBucketList", + "BackendBucketCdnPolicyBypassCacheOnRequestHeader": { + "description": "Bypass the cache when the specified request headers are present, e.g. Pragma or Authorization headers. Values are case insensitive. The presence of such a header overrides the cache_mode setting.", + "id": "BackendBucketCdnPolicyBypassCacheOnRequestHeader", "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of BackendBucket resources.", - "items": { - "$ref": "BackendBucket" - }, - "type": "array" - }, - "kind": { - "default": "compute#backendBucketList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", + "headerName": { + "description": "The header field name to match on when bypassing cache. Values are case-insensitive.", "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "LARGE_DEPLOYMENT_WARNING", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" } }, "type": "object" }, - "BackendService": { - "description": "Represents a Backend Service resource.\n\nA backend service defines how Google Cloud load balancers distribute traffic. The backend service configuration contains a set of values, such as the protocol used to connect to backends, various distribution and session settings, health checks, and timeouts. These settings provide fine-grained control over how your load balancer behaves. Most of the settings have default values that allow for easy configuration if you need to get started quickly.\n\nBackend services in Google Compute Engine can be either regionally or globally scoped.\n\n* [Global](/compute/docs/reference/rest/{$api_version}/backendServices) * [Regional](/compute/docs/reference/rest/{$api_version}/regionBackendServices)\n\nFor more information, see Backend Services.\n\n(== resource_for {$api_version}.backendService ==)", - "id": "BackendService", + "BackendBucketCdnPolicyNegativeCachingPolicy": { + "description": "Specify CDN TTLs for response error codes.", + "id": "BackendBucketCdnPolicyNegativeCachingPolicy", "properties": { - "affinityCookieTtlSec": { - "description": "Lifetime of cookies in seconds. Only applicable if the loadBalancingScheme is EXTERNAL, INTERNAL_SELF_MANAGED, or INTERNAL_MANAGED, the protocol is HTTP or HTTPS, and the sessionAffinity is GENERATED_COOKIE, or HTTP_COOKIE.\n\nIf set to 0, the cookie is non-persistent and lasts only until the end of the browser session (or equivalent). The maximum allowed value is one day (86,400).\n\nNot supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.", - "format": "int32", - "type": "integer" - }, - "backends": { - "description": "The list of backends that serve this BackendService.", - "items": { - "$ref": "Backend" - }, - "type": "array" - }, - "cdnPolicy": { - "$ref": "BackendServiceCdnPolicy", - "description": "Cloud CDN configuration for this BackendService. Only available for external HTTP(S) Load Balancing." - }, - "circuitBreakers": { - "$ref": "CircuitBreakers", - "description": "Settings controlling the volume of connections to a backend service. If not set, this feature is considered disabled.\n\nThis field is applicable to either: \n- A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED. \n- A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED. \n\nNot supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true." - }, - "connectionDraining": { - "$ref": "ConnectionDraining" - }, - "consistentHash": { - "$ref": "ConsistentHashLoadBalancerSettings", - "description": "Consistent Hash-based load balancing can be used to provide soft session affinity based on HTTP headers, cookies or other properties. This load balancing policy is applicable only for HTTP connections. The affinity to a particular destination host will be lost when one or more hosts are added/removed from the destination service. This field specifies parameters that control consistent hashing. This field is only applicable when localityLbPolicy is set to MAGLEV or RING_HASH.\n\nThis field is applicable to either: \n- A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED. \n- A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED. \n\nNot supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true." - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp in RFC3339 text format.", - "type": "string" - }, - "customRequestHeaders": { - "description": "Headers that the HTTP/S load balancer should add to proxied requests.", - "items": { - "type": "string" - }, - "type": "array" - }, - "customResponseHeaders": { - "description": "Headers that the HTTP/S load balancer should add to proxied responses.", - "items": { - "type": "string" - }, - "type": "array" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you create the resource.", - "type": "string" - }, - "enableCDN": { - "description": "If true, enables Cloud CDN for the backend service. Only applicable if the loadBalancingScheme is EXTERNAL and the protocol is HTTP or HTTPS.", - "type": "boolean" - }, - "failoverPolicy": { - "$ref": "BackendServiceFailoverPolicy", - "description": "Applicable only to Failover for Internal TCP/UDP Load Balancing and Network Load Balancing. Requires at least one backend instance group to be defined as a backup (failover) backend." - }, - "fingerprint": { - "description": "Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a BackendService. An up-to-date fingerprint must be provided in order to update the BackendService, otherwise the request will fail with error 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to retrieve a BackendService.", - "format": "byte", - "type": "string" - }, - "healthChecks": { - "description": "The list of URLs to the healthChecks, httpHealthChecks (legacy), or httpsHealthChecks (legacy) resource for health checking this backend service. Not all backend services support legacy health checks. See Load balancer guide. Currently, at most one health check can be specified for each backend service. Backend services with instance group or zonal NEG backends must have a health check. Backend services with internet or serverless NEG backends must not have a health check.", - "items": { - "type": "string" - }, - "type": "array" - }, - "iap": { - "$ref": "BackendServiceIAP", - "description": "The configurations for Identity-Aware Proxy on this resource. Not available for Internal TCP/UDP Load Balancing and Network Load Balancing." - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#backendService", - "description": "[Output Only] Type of resource. Always compute#backendService for backend services.", - "type": "string" - }, - "loadBalancingScheme": { - "description": "Specifies the load balancer type. Choose EXTERNAL for external HTTP(S), SSL Proxy, TCP Proxy and Network Load Balancing. Choose INTERNAL for Internal TCP/UDP Load Balancing. Choose INTERNAL_MANAGED for Internal HTTP(S) Load Balancing. INTERNAL_SELF_MANAGED for Traffic Director. A backend service created for one type of load balancer cannot be used with another. For more information, refer to Choosing a load balancer.", - "enum": [ - "EXTERNAL", - "INTERNAL", - "INTERNAL_MANAGED", - "INTERNAL_SELF_MANAGED", - "INVALID_LOAD_BALANCING_SCHEME" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "localityLbPolicy": { - "description": "The load balancing algorithm used within the scope of the locality. The possible values are: \n- ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. \n- LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. \n- RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. \n- RANDOM: The load balancer selects a random healthy host. \n- ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. \n- MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824 \n\nThis field is applicable to either: \n- A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED. \n- A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED. \n\nIf sessionAffinity is not NONE, and this field is not set to MAGLEV or RING_HASH, session affinity settings will not take effect.\n\nOnly the default ROUND_ROBIN policy is supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.", - "enum": [ - "INVALID_LB_POLICY", - "LEAST_REQUEST", - "MAGLEV", - "ORIGINAL_DESTINATION", - "RANDOM", - "RING_HASH", - "ROUND_ROBIN" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "logConfig": { - "$ref": "BackendServiceLogConfig", - "description": "This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver." - }, - "name": { - "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "network": { - "description": "The URL of the network to which this backend service belongs. This field can only be specified when the load balancing scheme is set to INTERNAL.", - "type": "string" - }, - "outlierDetection": { - "$ref": "OutlierDetection", - "description": "Settings controlling the eviction of unhealthy hosts from the load balancing pool for the backend service. If not set, this feature is considered disabled.\n\nThis field is applicable to either: \n- A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED. \n- A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED. \n\nNot supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true." - }, - "port": { - "description": "Deprecated in favor of portName. The TCP port to connect on the backend. The default value is 80.\n\nBackend services for Internal TCP/UDP Load Balancing and Network Load Balancing require you omit port.", + "code": { + "description": "The HTTP status code to define a TTL against. Only HTTP status codes 300, 301, 302, 307, 308, 404, 405, 410, 421, 451 and 501 are can be specified as values, and you cannot specify a status code more than once.", "format": "int32", "type": "integer" }, - "portName": { - "description": "A named port on a backend instance group representing the port for communication to the backend VMs in that group. Required when the loadBalancingScheme is EXTERNAL (except Network Load Balancing), INTERNAL_MANAGED, or INTERNAL_SELF_MANAGED and the backends are instance groups. The named port must be defined on each backend instance group. This parameter has no meaning if the backends are NEGs.\n\n\n\nBackend services for Internal TCP/UDP Load Balancing and Network Load Balancing require you omit port_name.", - "type": "string" - }, - "protocol": { - "description": "The protocol this BackendService uses to communicate with backends.\n\nPossible values are HTTP, HTTPS, HTTP2, TCP, SSL, UDP or GRPC. depending on the chosen load balancer or Traffic Director configuration. Refer to the documentation for the load balancer or for Traffic Director for more information.\n\nMust be set to GRPC when the backend service is referenced by a URL map that is bound to target gRPC proxy.", - "enum": [ - "GRPC", - "HTTP", - "HTTP2", - "HTTPS", - "SSL", - "TCP", - "UDP" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "region": { - "description": "[Output Only] URL of the region where the regional backend service resides. This field is not applicable to global backend services. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.", - "type": "string" - }, - "securityPolicy": { - "description": "[Output Only] The resource URL for the security policy associated with this backend service.", - "type": "string" - }, - "securitySettings": { - "$ref": "SecuritySettings", - "description": "This field specifies the security policy that applies to this backend service. This field is applicable to either: \n- A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED. \n- A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED." - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "sessionAffinity": { - "description": "Type of session affinity to use. The default is NONE.\n\nWhen the loadBalancingScheme is EXTERNAL: * For Network Load Balancing, the possible values are NONE, CLIENT_IP, CLIENT_IP_PROTO, or CLIENT_IP_PORT_PROTO. * For all other load balancers that use loadBalancingScheme=EXTERNAL, the possible values are NONE, CLIENT_IP, or GENERATED_COOKIE. * You can use GENERATED_COOKIE if the protocol is HTTP, HTTP2, or HTTPS.\n\nWhen the loadBalancingScheme is INTERNAL, possible values are NONE, CLIENT_IP, CLIENT_IP_PROTO, or CLIENT_IP_PORT_PROTO.\n\nWhen the loadBalancingScheme is INTERNAL_SELF_MANAGED, or INTERNAL_MANAGED, possible values are NONE, CLIENT_IP, GENERATED_COOKIE, HEADER_FIELD, or HTTP_COOKIE.\n\nNot supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.", - "enum": [ - "CLIENT_IP", - "CLIENT_IP_PORT_PROTO", - "CLIENT_IP_PROTO", - "GENERATED_COOKIE", - "HEADER_FIELD", - "HTTP_COOKIE", - "NONE" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "timeoutSec": { - "description": "The backend service timeout has a different meaning depending on the type of load balancer. For more information see, Backend service settings The default is 30 seconds. The full range of timeout values allowed is 1 - 2,147,483,647 seconds.", + "ttl": { + "description": "The TTL (in seconds) for which to cache responses with the corresponding status code. The maximum allowed value is 1800s (30 minutes), noting that infrequently accessed objects may be evicted from the cache before the defined TTL.", "format": "int32", "type": "integer" } }, "type": "object" }, - "BackendServiceAggregatedList": { - "description": "Contains a list of BackendServicesScopedList.", - "id": "BackendServiceAggregatedList", + "BackendBucketList": { + "description": "Contains a list of BackendBucket resources.", + "id": "BackendBucketList", "properties": { "id": { "description": "[Output Only] Unique identifier for the resource; defined by the server.", "type": "string" }, "items": { - "additionalProperties": { - "$ref": "BackendServicesScopedList", - "description": "Name of the scope containing this set of BackendServices." + "description": "A list of BackendBucket resources.", + "items": { + "$ref": "BackendBucket" }, - "description": "A list of BackendServicesScopedList resources.", - "type": "object" + "type": "array" }, "kind": { - "default": "compute#backendServiceAggregatedList", + "default": "compute#backendBucketList", "description": "Type of resource.", "type": "string" }, @@ -28851,13 +29328,355 @@ "description": "[Output Only] Server-defined URL for this resource.", "type": "string" }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, + "warning": { + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "LARGE_DEPLOYMENT_WARNING", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "PARTIAL_SUCCESS", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "BackendService": { + "description": "Represents a Backend Service resource.\n\nA backend service defines how Google Cloud load balancers distribute traffic. The backend service configuration contains a set of values, such as the protocol used to connect to backends, various distribution and session settings, health checks, and timeouts. These settings provide fine-grained control over how your load balancer behaves. Most of the settings have default values that allow for easy configuration if you need to get started quickly.\n\nBackend services in Google Compute Engine can be either regionally or globally scoped.\n\n* [Global](/compute/docs/reference/rest/{$api_version}/backendServices) * [Regional](/compute/docs/reference/rest/{$api_version}/regionBackendServices)\n\nFor more information, see Backend Services.\n\n(== resource_for {$api_version}.backendService ==)", + "id": "BackendService", + "properties": { + "affinityCookieTtlSec": { + "description": "Lifetime of cookies in seconds. Only applicable if the loadBalancingScheme is EXTERNAL, INTERNAL_SELF_MANAGED, or INTERNAL_MANAGED, the protocol is HTTP or HTTPS, and the sessionAffinity is GENERATED_COOKIE, or HTTP_COOKIE.\n\nIf set to 0, the cookie is non-persistent and lasts only until the end of the browser session (or equivalent). The maximum allowed value is one day (86,400).\n\nNot supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.", + "format": "int32", + "type": "integer" + }, + "backends": { + "description": "The list of backends that serve this BackendService.", + "items": { + "$ref": "Backend" + }, + "type": "array" + }, + "cdnPolicy": { + "$ref": "BackendServiceCdnPolicy", + "description": "Cloud CDN configuration for this BackendService. Only available for external HTTP(S) Load Balancing." + }, + "circuitBreakers": { + "$ref": "CircuitBreakers", + "description": "Settings controlling the volume of connections to a backend service. If not set, this feature is considered disabled.\n\nThis field is applicable to either: \n- A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED. \n- A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED. \n\nNot supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true." + }, + "connectionDraining": { + "$ref": "ConnectionDraining" + }, + "consistentHash": { + "$ref": "ConsistentHashLoadBalancerSettings", + "description": "Consistent Hash-based load balancing can be used to provide soft session affinity based on HTTP headers, cookies or other properties. This load balancing policy is applicable only for HTTP connections. The affinity to a particular destination host will be lost when one or more hosts are added/removed from the destination service. This field specifies parameters that control consistent hashing. This field is only applicable when localityLbPolicy is set to MAGLEV or RING_HASH.\n\nThis field is applicable to either: \n- A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED. \n- A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED. \n\nNot supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true." + }, + "creationTimestamp": { + "description": "[Output Only] Creation timestamp in RFC3339 text format.", + "type": "string" + }, + "customRequestHeaders": { + "description": "Headers that the HTTP/S load balancer should add to proxied requests.", + "items": { + "type": "string" + }, + "type": "array" + }, + "customResponseHeaders": { + "description": "Headers that the HTTP/S load balancer should add to proxied responses.", + "items": { + "type": "string" + }, + "type": "array" + }, + "description": { + "description": "An optional description of this resource. Provide this property when you create the resource.", + "type": "string" + }, + "enableCDN": { + "description": "If true, enables Cloud CDN for the backend service. Only applicable if the loadBalancingScheme is EXTERNAL and the protocol is HTTP or HTTPS.", + "type": "boolean" + }, + "failoverPolicy": { + "$ref": "BackendServiceFailoverPolicy", + "description": "Applicable only to Failover for Internal TCP/UDP Load Balancing and Network Load Balancing. Requires at least one backend instance group to be defined as a backup (failover) backend." + }, + "fingerprint": { + "description": "Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a BackendService. An up-to-date fingerprint must be provided in order to update the BackendService, otherwise the request will fail with error 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to retrieve a BackendService.", + "format": "byte", + "type": "string" + }, + "healthChecks": { + "description": "The list of URLs to the healthChecks, httpHealthChecks (legacy), or httpsHealthChecks (legacy) resource for health checking this backend service. Not all backend services support legacy health checks. See Load balancer guide. Currently, at most one health check can be specified for each backend service. Backend services with instance group or zonal NEG backends must have a health check. Backend services with internet or serverless NEG backends must not have a health check.", + "items": { + "type": "string" + }, + "type": "array" + }, + "iap": { + "$ref": "BackendServiceIAP", + "description": "The configurations for Identity-Aware Proxy on this resource. Not available for Internal TCP/UDP Load Balancing and Network Load Balancing." + }, + "id": { + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", + "format": "uint64", + "type": "string" + }, + "kind": { + "default": "compute#backendService", + "description": "[Output Only] Type of resource. Always compute#backendService for backend services.", + "type": "string" + }, + "loadBalancingScheme": { + "description": "Specifies the load balancer type. Choose EXTERNAL for external HTTP(S), SSL Proxy, TCP Proxy and Network Load Balancing. Choose INTERNAL for Internal TCP/UDP Load Balancing. Choose INTERNAL_MANAGED for Internal HTTP(S) Load Balancing. INTERNAL_SELF_MANAGED for Traffic Director. A backend service created for one type of load balancer cannot be used with another. For more information, refer to Choosing a load balancer.", + "enum": [ + "EXTERNAL", + "INTERNAL", + "INTERNAL_MANAGED", + "INTERNAL_SELF_MANAGED", + "INVALID_LOAD_BALANCING_SCHEME" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "localityLbPolicy": { + "description": "The load balancing algorithm used within the scope of the locality. The possible values are: \n- ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. \n- LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. \n- RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. \n- RANDOM: The load balancer selects a random healthy host. \n- ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. \n- MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824 \n\nThis field is applicable to either: \n- A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED. \n- A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED. \n\nIf sessionAffinity is not NONE, and this field is not set to MAGLEV or RING_HASH, session affinity settings will not take effect.\n\nOnly the default ROUND_ROBIN policy is supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.", + "enum": [ + "INVALID_LB_POLICY", + "LEAST_REQUEST", + "MAGLEV", + "ORIGINAL_DESTINATION", + "RANDOM", + "RING_HASH", + "ROUND_ROBIN" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "logConfig": { + "$ref": "BackendServiceLogConfig", + "description": "This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver." + }, + "maxStreamDuration": { + "$ref": "Duration", + "description": "Specifies the default maximum duration (timeout) for streams to this service. Duration is computed from the beginning of the stream until the response has been completely processed, including all retries. A stream that does not complete in this duration is closed.\nIf not specified, there will be no timeout limit, i.e. the maximum duration is infinite.\nThis field is only allowed when the loadBalancingScheme of the backend service is INTERNAL_SELF_MANAGED." + }, + "name": { + "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "type": "string" + }, + "network": { + "description": "The URL of the network to which this backend service belongs. This field can only be specified when the load balancing scheme is set to INTERNAL.", + "type": "string" + }, + "outlierDetection": { + "$ref": "OutlierDetection", + "description": "Settings controlling the eviction of unhealthy hosts from the load balancing pool for the backend service. If not set, this feature is considered disabled.\n\nThis field is applicable to either: \n- A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED. \n- A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED. \n\nNot supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true." + }, + "port": { + "description": "Deprecated in favor of portName. The TCP port to connect on the backend. The default value is 80.\n\nBackend services for Internal TCP/UDP Load Balancing and Network Load Balancing require you omit port.", + "format": "int32", + "type": "integer" + }, + "portName": { + "description": "A named port on a backend instance group representing the port for communication to the backend VMs in that group. Required when the loadBalancingScheme is EXTERNAL (except Network Load Balancing), INTERNAL_MANAGED, or INTERNAL_SELF_MANAGED and the backends are instance groups. The named port must be defined on each backend instance group. This parameter has no meaning if the backends are NEGs.\n\n\n\nBackend services for Internal TCP/UDP Load Balancing and Network Load Balancing require you omit port_name.", + "type": "string" + }, + "protocol": { + "description": "The protocol this BackendService uses to communicate with backends.\n\nPossible values are HTTP, HTTPS, HTTP2, TCP, SSL, UDP or GRPC. depending on the chosen load balancer or Traffic Director configuration. Refer to the documentation for the load balancer or for Traffic Director for more information.\n\nMust be set to GRPC when the backend service is referenced by a URL map that is bound to target gRPC proxy.", + "enum": [ + "GRPC", + "HTTP", + "HTTP2", + "HTTPS", + "SSL", + "TCP", + "UDP" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "region": { + "description": "[Output Only] URL of the region where the regional backend service resides. This field is not applicable to global backend services. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.", + "type": "string" + }, + "securityPolicy": { + "description": "[Output Only] The resource URL for the security policy associated with this backend service.", + "type": "string" + }, + "securitySettings": { + "$ref": "SecuritySettings", + "description": "This field specifies the security policy that applies to this backend service. This field is applicable to either: \n- A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED. \n- A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED." + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for the resource.", + "type": "string" + }, + "sessionAffinity": { + "description": "Type of session affinity to use. The default is NONE.\n\nWhen the loadBalancingScheme is EXTERNAL: * For Network Load Balancing, the possible values are NONE, CLIENT_IP, CLIENT_IP_PROTO, or CLIENT_IP_PORT_PROTO. * For all other load balancers that use loadBalancingScheme=EXTERNAL, the possible values are NONE, CLIENT_IP, or GENERATED_COOKIE. * You can use GENERATED_COOKIE if the protocol is HTTP, HTTP2, or HTTPS.\n\nWhen the loadBalancingScheme is INTERNAL, possible values are NONE, CLIENT_IP, CLIENT_IP_PROTO, or CLIENT_IP_PORT_PROTO.\n\nWhen the loadBalancingScheme is INTERNAL_SELF_MANAGED, or INTERNAL_MANAGED, possible values are NONE, CLIENT_IP, GENERATED_COOKIE, HEADER_FIELD, or HTTP_COOKIE.\n\nNot supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.", + "enum": [ + "CLIENT_IP", + "CLIENT_IP_PORT_PROTO", + "CLIENT_IP_PROTO", + "GENERATED_COOKIE", + "HEADER_FIELD", + "HTTP_COOKIE", + "NONE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "timeoutSec": { + "description": "The backend service timeout has a different meaning depending on the type of load balancer. For more information see, Backend service settings The default is 30 seconds. The full range of timeout values allowed is 1 - 2,147,483,647 seconds.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "BackendServiceAggregatedList": { + "description": "Contains a list of BackendServicesScopedList.", + "id": "BackendServiceAggregatedList", + "properties": { + "id": { + "description": "[Output Only] Unique identifier for the resource; defined by the server.", + "type": "string" + }, + "items": { + "additionalProperties": { + "$ref": "BackendServicesScopedList", + "description": "Name of the scope containing this set of BackendServices." + }, + "description": "A list of BackendServicesScopedList resources.", + "type": "object" + }, + "kind": { + "default": "compute#backendServiceAggregatedList", + "description": "Type of resource.", + "type": "string" + }, + "nextPageToken": { + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for this resource.", + "type": "string" + }, + "unreachables": { + "description": "[Output Only] Unreachable resources.", + "items": { + "type": "string" + }, + "type": "array" + }, "warning": { "description": "[Output Only] Informational warning message.", "properties": { @@ -28950,6 +29769,13 @@ "description": "Message containing Cloud CDN configuration for a backend service.", "id": "BackendServiceCdnPolicy", "properties": { + "bypassCacheOnRequestHeaders": { + "description": "Bypass the cache when the specified request headers are matched - e.g. Pragma or Authorization headers. Up to 5 headers can be specified. The cache is bypassed for all cdnPolicy.cacheMode settings.", + "items": { + "$ref": "BackendServiceCdnPolicyBypassCacheOnRequestHeader" + }, + "type": "array" + }, "cacheKeyPolicy": { "$ref": "CacheKeyPolicy", "description": "The CacheKeyPolicy for this CdnPolicy." @@ -28985,6 +29811,22 @@ "format": "int32", "type": "integer" }, + "negativeCaching": { + "description": "Negative caching allows per-status code TTLs to be set, in order to apply fine-grained caching for common errors or redirects. This can reduce the load on your origin and improve end-user experience by reducing response latency. When the cache mode is set to CACHE_ALL_STATIC or USE_ORIGIN_HEADERS, negative caching applies to responses with the specified response code that lack any Cache-Control, Expires, or Pragma: no-cache directives. When the cache mode is set to FORCE_CACHE_ALL, negative caching applies to all responses with the specified response code, and override any caching headers. By default, Cloud CDN will apply the following default TTLs to these status codes: HTTP 300 (Multiple Choice), 301, 308 (Permanent Redirects): 10m HTTP 404 (Not Found), 410 (Gone), 451 (Unavailable For Legal Reasons): 120s HTTP 405 (Method Not Found), 421 (Misdirected Request), 501 (Not Implemented): 60s. These defaults can be overridden in negative_caching_policy.", + "type": "boolean" + }, + "negativeCachingPolicy": { + "description": "Sets a cache TTL for the specified HTTP status code. negative_caching must be enabled to configure negative_caching_policy. Omitting the policy and leaving negative_caching enabled will use Cloud CDN's default cache TTLs. Note that when specifying an explicit negative_caching_policy, you should take care to specify a cache TTL for all response codes that you wish to cache. Cloud CDN will not apply any default negative caching when a policy exists.", + "items": { + "$ref": "BackendServiceCdnPolicyNegativeCachingPolicy" + }, + "type": "array" + }, + "serveWhileStale": { + "description": "Serve existing content from the cache (if available) when revalidating content with the origin, or when an error is encountered when refreshing the cache. This setting defines the default \"max-stale\" duration for any cached responses that do not specify a max-stale directive. Stale responses that exceed the TTL configured here will not be served. The default limit (max-stale) is 86400s (1 day), which will allow stale content to be served up to this limit beyond the max-age (or s-max-age) of a cached response. The maximum allowed value is 604800 (1 week). Set this to zero (0) to disable serve-while-stale.", + "format": "int32", + "type": "integer" + }, "signedUrlCacheMaxAgeSec": { "description": "Maximum number of seconds the response to a signed URL request will be considered fresh. After this time period, the response will be revalidated before being served. Defaults to 1hr (3600s). When serving responses to signed URL requests, Cloud CDN will internally behave as though all responses from this backend had a \"Cache-Control: public, max-age=[TTL]\" header, regardless of any existing Cache-Control header. The actual headers served in responses will not be altered.", "format": "int64", @@ -29000,6 +29842,34 @@ }, "type": "object" }, + "BackendServiceCdnPolicyBypassCacheOnRequestHeader": { + "description": "Bypass the cache when the specified request headers are present, e.g. Pragma or Authorization headers. Values are case insensitive. The presence of such a header overrides the cache_mode setting.", + "id": "BackendServiceCdnPolicyBypassCacheOnRequestHeader", + "properties": { + "headerName": { + "description": "The header field name to match on when bypassing cache. Values are case-insensitive.", + "type": "string" + } + }, + "type": "object" + }, + "BackendServiceCdnPolicyNegativeCachingPolicy": { + "description": "Specify CDN TTLs for response error codes.", + "id": "BackendServiceCdnPolicyNegativeCachingPolicy", + "properties": { + "code": { + "description": "The HTTP status code to define a TTL against. Only HTTP status codes 300, 301, 302, 307, 308, 404, 405, 410, 421, 451 and 501 are can be specified as values, and you cannot specify a status code more than once.", + "format": "int32", + "type": "integer" + }, + "ttl": { + "description": "The TTL (in seconds) for which to cache responses with the corresponding status code. The maximum allowed value is 1800s (30 minutes), noting that infrequently accessed objects may be evicted from the cache before the defined TTL.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "BackendServiceFailoverPolicy": { "description": "Applicable only to Failover for Internal TCP/UDP Load Balancing and Network Load Balancing. On failover or failback, this field indicates whether connection draining will be honored. GCP has a fixed connection draining timeout of 10 minutes. A setting of true terminates existing TCP connections to the active pool during failover and failback, immediately draining traffic. A setting of false allows existing TCP connections to persist, even on VMs no longer in the active pool, for up to the duration of the connection draining timeout (10 minutes).", "id": "BackendServiceFailoverPolicy", @@ -31992,7 +32862,7 @@ "type": "string" }, "displayName": { - "description": "User-provided name of the Organization firewall plicy. The name should be unique in the organization in which the firewall policy is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", + "description": "Depreacted, please use short name instead. User-provided name of the Organization firewall plicy. The name should be unique in the organization in which the firewall policy is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "type": "string" }, @@ -32038,6 +32908,11 @@ "selfLinkWithId": { "description": "[Output Only] Server-defined URL for this resource with the resource id.", "type": "string" + }, + "shortName": { + "description": "User-provided name of the Organization firewall plicy. The name should be unique in the organization in which the firewall policy is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "type": "string" } }, "type": "object" @@ -32050,7 +32925,7 @@ "type": "string" }, "displayName": { - "description": "[Output Only] The display name of the firewall policy of the association.", + "description": "[Output Only] Deprecated, please use short name instead. The display name of the firewall policy of the association.", "type": "string" }, "firewallPolicyId": { @@ -32060,6 +32935,10 @@ "name": { "description": "The name for an association.", "type": "string" + }, + "shortName": { + "description": "[Output Only] The short name of the firewall policy of the association.", + "type": "string" } }, "type": "object" @@ -34456,6 +35335,10 @@ "$ref": "HttpFaultInjection", "description": "The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests.\ntimeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy.\nNot supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true." }, + "maxStreamDuration": { + "$ref": "Duration", + "description": "Specifies the maximum duration (timeout) for streams on the selected route. Unlike the timeout field where the timeout duration starts from the time the request has been fully processed (i.e. end-of-stream), the duration in this field is computed from the beginning of the stream until the response has been completely processed, including all retries. A stream that does not complete in this duration is closed.\nIf not specified, will use the largest maxStreamDuration among all backend services associated with the route.\nThis field is only allowed if the Url map is used with backend services with loadBalancingScheme set to INTERNAL_SELF_MANAGED." + }, "requestMirrorPolicy": { "$ref": "RequestMirrorPolicy", "description": "Specifies the policy on how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow.\nNot supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true." @@ -37730,7 +38613,7 @@ "id": "InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy", "properties": { "displayName": { - "description": "[Output Only] The display name of the firewall policy.", + "description": "[Output Only] Deprecated, please use short name instead. The display name of the firewall policy.", "type": "string" }, "name": { @@ -37744,6 +38627,10 @@ }, "type": "array" }, + "shortName": { + "description": "[Output Only] The short name of the firewall policy.", + "type": "string" + }, "type": { "description": "[Output Only] The type of the firewall policy.", "enum": [ @@ -38197,6 +39084,18 @@ ], "type": "string" }, + "encryption": { + "description": "Indicates the user-supplied encryption option of this interconnect attachment: \n- NONE is the default value, which means that the attachment carries unencrypted traffic. VMs can send traffic to, or receive traffic from, this type of attachment. \n- IPSEC indicates that the attachment carries only traffic encrypted by an IPsec device such as an HA VPN gateway. VMs cannot directly send traffic to, or receive traffic from, such an attachment. To use IPsec-encrypted Cloud Interconnect, create the attachment using this option.", + "enum": [ + "IPSEC", + "NONE" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, "googleReferenceId": { "description": "[Output Only] Google reference ID, to be used when raising support tickets with Google or otherwise to debug backend connectivity issues. [Deprecated] This field is not used.", "type": "string" @@ -38210,6 +39109,13 @@ "description": "URL of the underlying Interconnect object that this attachment's traffic will traverse through.", "type": "string" }, + "ipsecInternalAddresses": { + "description": "URL of addresses that have been reserved for the interconnect attachment, Used only for interconnect attachment that has the encryption option as IPSEC. The addresses must be RFC 1918 IP address ranges. When creating HA VPN gateway over the interconnect attachment, if the attachment is configured to use an RFC 1918 IP address, then the VPN gateway?s IP address will be allocated from the IP address range specified here. For example, if the HA VPN gateway?s interface 0 is paired to this interconnect attachment, then an RFC 1918 IP address for the VPN gateway interface 0 will be allocated from the IP address specified for this interconnect attachment. If this field is not specified for interconnect attachment that has encryption option as IPSEC, later on when creating HA VPN gateway on this interconnect attachment, the HA VPN gateway's IP address will be allocated from regional external IP address pool.", + "items": { + "type": "string" + }, + "type": "array" + }, "kind": { "default": "compute#interconnectAttachment", "description": "[Output Only] Type of the resource. Always compute#interconnectAttachment for interconnect attachments.", @@ -41507,7 +42413,7 @@ "id": "NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy", "properties": { "displayName": { - "description": "[Output Only] The display name of the firewall policy.", + "description": "[Output Only] Deprecated, please use short name instead. The display name of the firewall policy.", "type": "string" }, "name": { @@ -41521,6 +42427,10 @@ }, "type": "array" }, + "shortName": { + "description": "[Output Only] The short name of the firewall policy.", + "type": "string" + }, "type": { "description": "[Output Only] The type of the firewall policy.", "enum": [ @@ -44455,379 +45365,1066 @@ }, "type": "object" }, - "PathMatcher": { - "description": "A matcher for the path portion of the URL. The BackendService from the longest-matched rule will serve the URL. If no rule was matched, the default service will be used.", - "id": "PathMatcher", - "properties": { - "defaultRouteAction": { - "$ref": "HttpRouteAction", - "description": "defaultRouteAction takes effect when none of the pathRules or routeRules match. The load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices.\nOnly one of defaultRouteAction or defaultUrlRedirect must be set.\nUrlMaps for external HTTP(S) load balancers support only the urlRewrite action within a pathMatcher's defaultRouteAction." - }, - "defaultService": { - "description": "The full or partial URL to the BackendService resource. This will be used if none of the pathRules or routeRules defined by this PathMatcher are matched. For example, the following are all valid URLs to a BackendService resource: \n- https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService \n- compute/v1/projects/project/global/backendServices/backendService \n- global/backendServices/backendService If defaultRouteAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if defaultRouteAction specifies any weightedBackendServices, defaultService must not be specified.\nOnly one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.\nAuthorization requires one or more of the following Google IAM permissions on the specified resource default_service: \n- compute.backendBuckets.use \n- compute.backendServices.use", - "type": "string" - }, - "defaultUrlRedirect": { - "$ref": "HttpRedirectAction", - "description": "When none of the specified pathRules or routeRules match, the request is redirected to a URL specified by defaultUrlRedirect.\nIf defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.\nNot supported when the URL map is bound to target gRPC proxy." - }, - "description": { - "description": "An optional description of this resource. Provide this property when you create the resource.", - "type": "string" - }, - "headerAction": { - "$ref": "HttpHeaderAction", - "description": "Specifies changes to request and response headers that need to take effect for the selected backendService.\nHeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap \nNote that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.\nNot supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true." - }, - "name": { - "description": "The name to which this PathMatcher is referred by the HostRule.", - "type": "string" - }, - "pathRules": { - "description": "The list of path rules. Use this list instead of routeRules when routing based on simple path matching is all that's required. The order by which path rules are specified does not matter. Matches are always done on the longest-path-first basis.\nFor example: a pathRule with a path /a/b/c/* will match before /a/b/* irrespective of the order in which those paths appear in this list.\nWithin a given pathMatcher, only one of pathRules or routeRules must be set.", - "items": { - "$ref": "PathRule" - }, - "type": "array" - }, - "routeRules": { - "description": "The list of HTTP route rules. Use this list instead of pathRules when advanced route matching and routing actions are desired. routeRules are evaluated in order of priority, from the lowest to highest number.\nWithin a given pathMatcher, you can set only one of pathRules or routeRules.", - "items": { - "$ref": "HttpRouteRule" - }, - "type": "array" - } - }, - "type": "object" - }, - "PathRule": { - "description": "A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.", - "id": "PathRule", - "properties": { - "paths": { - "description": "The list of path patterns to match. Each must start with / and the only place a * is allowed is at the end following a /. The string fed to the path matcher does not include any text after the first ? or #, and those chars are not allowed here.", - "items": { - "type": "string" - }, - "type": "array" - }, - "routeAction": { - "$ref": "HttpRouteAction", - "description": "In response to a matching path, the load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If routeAction specifies any weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices.\nOnly one of routeAction or urlRedirect must be set.\nUrlMaps for external HTTP(S) load balancers support only the urlRewrite action within a pathRule's routeAction." - }, - "service": { - "description": "The full or partial URL of the backend service resource to which traffic is directed if this rule is matched. If routeAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if service is specified, routeAction cannot contain any weightedBackendService s. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified.\nOnly one of urlRedirect, service or routeAction.weightedBackendService must be set.", - "type": "string" - }, - "urlRedirect": { - "$ref": "HttpRedirectAction", - "description": "When a path pattern is matched, the request is redirected to a URL specified by urlRedirect.\nIf urlRedirect is specified, service or routeAction must not be set.\nNot supported when the URL map is bound to target gRPC proxy." - } - }, - "type": "object" - }, - "PerInstanceConfig": { - "id": "PerInstanceConfig", - "properties": { - "fingerprint": { - "description": "Fingerprint of this per-instance config. This field can be used in optimistic locking. It is ignored when inserting a per-instance config. An up-to-date fingerprint must be provided in order to update an existing per-instance config or the field needs to be unset.", - "format": "byte", - "type": "string" - }, - "name": { - "description": "The name of a per-instance config and its corresponding instance. Serves as a merge key during UpdatePerInstanceConfigs operations, that is, if a per-instance config with the same name exists then it will be updated, otherwise a new one will be created for the VM instance with the same name. An attempt to create a per-instance config for a VM instance that either doesn't exist or is not part of the group will result in an error.", - "type": "string" - }, - "preservedState": { - "$ref": "PreservedState", - "description": "The intended preserved state for the given instance. Does not contain preserved state generated from a stateful policy." - }, - "status": { - "description": "The status of applying this per-instance config on the corresponding managed instance.", - "enum": [ - "APPLYING", - "DELETING", - "EFFECTIVE", - "NONE", - "UNAPPLIED", - "UNAPPLIED_DELETION" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "Policy": { - "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.\n\n\n\nA `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role.\n\nFor some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).\n\n**JSON example:**\n\n{ \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time < timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 }\n\n**YAML example:**\n\nbindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3\n\nFor a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", - "id": "Policy", - "properties": { - "auditConfigs": { - "description": "Specifies cloud audit logging configuration for this policy.", - "items": { - "$ref": "AuditConfig" - }, - "type": "array" - }, - "bindings": { - "description": "Associates a list of `members` to a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one member.", - "items": { - "$ref": "Binding" - }, - "type": "array" - }, - "etag": { - "description": "`etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy.\n\n**Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.", - "format": "byte", - "type": "string" - }, - "iamOwned": { - "description": "", - "type": "boolean" - }, - "rules": { - "description": "If more than one rule is specified, the rules are applied in the following manner: - All matching LOG rules are always applied. - If any DENY/DENY_WITH_LOG rule matches, permission is denied. Logging will be applied if one or more matching rule requires logging. - Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is granted. Logging will be applied if one or more matching rule requires logging. - Otherwise, if no rule applies, permission is denied.", - "items": { - "$ref": "Rule" - }, - "type": "array" - }, - "version": { - "description": "Specifies the format of the policy.\n\nValid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.\n\nAny operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:\n\n* Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions\n\n**Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.\n\nIf a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.\n\nTo learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "PreconfiguredWafSet": { - "id": "PreconfiguredWafSet", - "properties": { - "expressionSets": { - "description": "List of entities that are currently supported for WAF rules.", - "items": { - "$ref": "WafExpressionSet" - }, - "type": "array" - } - }, - "type": "object" - }, - "PreservedState": { - "description": "Preserved state for a given instance.", - "id": "PreservedState", - "properties": { - "disks": { - "additionalProperties": { - "$ref": "PreservedStatePreservedDisk" - }, - "description": "Preserved disks defined for this instance. This map is keyed with the device names of the disks.", - "type": "object" - }, - "metadata": { - "additionalProperties": { - "type": "string" - }, - "description": "Preserved metadata defined for this instance.", - "type": "object" - } - }, - "type": "object" - }, - "PreservedStatePreservedDisk": { - "id": "PreservedStatePreservedDisk", - "properties": { - "autoDelete": { - "description": "These stateful disks will never be deleted during autohealing, update, instance recreate operations. This flag is used to configure if the disk should be deleted after it is no longer used by the group, e.g. when the given instance or the whole MIG is deleted. Note: disks attached in READ_ONLY mode cannot be auto-deleted.", - "enum": [ - "NEVER", - "ON_PERMANENT_INSTANCE_DELETION" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "mode": { - "description": "The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.", - "enum": [ - "READ_ONLY", - "READ_WRITE" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "source": { - "description": "The URL of the disk resource that is stateful and should be attached to the VM instance.", - "type": "string" - } - }, - "type": "object" - }, - "Project": { - "description": "Represents a Project resource.\n\nA project is used to organize resources in a Google Cloud Platform environment. For more information, read about the Resource Hierarchy. (== resource_for {$api_version}.projects ==)", - "id": "Project", - "properties": { - "commonInstanceMetadata": { - "$ref": "Metadata", - "description": "Metadata key/value pairs available to all instances contained in this project. See Custom metadata for more information." - }, - "creationTimestamp": { - "description": "[Output Only] Creation timestamp in RFC3339 text format.", - "type": "string" - }, - "defaultNetworkTier": { - "description": "This signifies the default network tier used for configuring resources of the project and can only take the following values: PREMIUM, STANDARD. Initially the default network tier is PREMIUM.", - "enum": [ - "PREMIUM", - "STANDARD" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "defaultServiceAccount": { - "description": "[Output Only] Default service account used by VMs running in this project.", - "type": "string" - }, - "description": { - "description": "An optional textual description of the resource.", - "type": "string" - }, - "enabledFeatures": { - "description": "Restricted features enabled for use on this project.", - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server. This is not the project ID, and is just a unique ID used by Compute Engine to identify resources.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#project", - "description": "[Output Only] Type of the resource. Always compute#project for projects.", - "type": "string" - }, - "name": { - "description": "The project ID. For example: my-example-project. Use the project ID to make requests to Compute Engine.", - "type": "string" - }, - "quotas": { - "description": "[Output Only] Quotas assigned to this project.", - "items": { - "$ref": "Quota" - }, - "type": "array" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for the resource.", - "type": "string" - }, - "usageExportLocation": { - "$ref": "UsageExportLocation", - "description": "The naming prefix for daily usage reports and the Google Cloud Storage bucket where they are stored." - }, - "xpnProjectStatus": { - "description": "[Output Only] The role this project has in a shared VPC configuration. Currently, only projects with the host role, which is specified by the value HOST, are differentiated.", - "enum": [ - "HOST", - "UNSPECIFIED_XPN_PROJECT_STATUS" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "ProjectsDisableXpnResourceRequest": { - "id": "ProjectsDisableXpnResourceRequest", - "properties": { - "xpnResource": { - "$ref": "XpnResourceId", - "description": "Service resource (a.k.a service project) ID." - } - }, - "type": "object" - }, - "ProjectsEnableXpnResourceRequest": { - "id": "ProjectsEnableXpnResourceRequest", - "properties": { - "xpnResource": { - "$ref": "XpnResourceId", - "description": "Service resource (a.k.a service project) ID." - } - }, - "type": "object" - }, - "ProjectsGetXpnResources": { - "id": "ProjectsGetXpnResources", - "properties": { - "kind": { - "default": "compute#projectsGetXpnResources", - "description": "[Output Only] Type of resource. Always compute#projectsGetXpnResources for lists of service resources (a.k.a service projects)", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", - "type": "string" - }, - "resources": { - "description": "Service resources (a.k.a service projects) attached to this project as their shared VPC host.", - "items": { - "$ref": "XpnResourceId" - }, - "type": "array" - } - }, - "type": "object" - }, - "ProjectsListXpnHostsRequest": { - "id": "ProjectsListXpnHostsRequest", - "properties": { - "organization": { - "description": "Optional organization ID managed by Cloud Resource Manager, for which to list shared VPC host projects. If not specified, the organization will be inferred from the project.", - "type": "string" - } - }, - "type": "object" - }, - "ProjectsSetDefaultNetworkTierRequest": { - "id": "ProjectsSetDefaultNetworkTierRequest", - "properties": { - "networkTier": { - "description": "Default network tier to be set.", - "enum": [ - "PREMIUM", - "STANDARD" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, + "PathMatcher": { + "description": "A matcher for the path portion of the URL. The BackendService from the longest-matched rule will serve the URL. If no rule was matched, the default service will be used.", + "id": "PathMatcher", + "properties": { + "defaultRouteAction": { + "$ref": "HttpRouteAction", + "description": "defaultRouteAction takes effect when none of the pathRules or routeRules match. The load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices.\nOnly one of defaultRouteAction or defaultUrlRedirect must be set.\nUrlMaps for external HTTP(S) load balancers support only the urlRewrite action within a pathMatcher's defaultRouteAction." + }, + "defaultService": { + "description": "The full or partial URL to the BackendService resource. This will be used if none of the pathRules or routeRules defined by this PathMatcher are matched. For example, the following are all valid URLs to a BackendService resource: \n- https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService \n- compute/v1/projects/project/global/backendServices/backendService \n- global/backendServices/backendService If defaultRouteAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if defaultRouteAction specifies any weightedBackendServices, defaultService must not be specified.\nOnly one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set.\nAuthorization requires one or more of the following Google IAM permissions on the specified resource default_service: \n- compute.backendBuckets.use \n- compute.backendServices.use", + "type": "string" + }, + "defaultUrlRedirect": { + "$ref": "HttpRedirectAction", + "description": "When none of the specified pathRules or routeRules match, the request is redirected to a URL specified by defaultUrlRedirect.\nIf defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set.\nNot supported when the URL map is bound to target gRPC proxy." + }, + "description": { + "description": "An optional description of this resource. Provide this property when you create the resource.", + "type": "string" + }, + "headerAction": { + "$ref": "HttpHeaderAction", + "description": "Specifies changes to request and response headers that need to take effect for the selected backendService.\nHeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap \nNote that headerAction is not supported for Loadbalancers that have their loadBalancingScheme set to EXTERNAL.\nNot supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true." + }, + "name": { + "description": "The name to which this PathMatcher is referred by the HostRule.", + "type": "string" + }, + "pathRules": { + "description": "The list of path rules. Use this list instead of routeRules when routing based on simple path matching is all that's required. The order by which path rules are specified does not matter. Matches are always done on the longest-path-first basis.\nFor example: a pathRule with a path /a/b/c/* will match before /a/b/* irrespective of the order in which those paths appear in this list.\nWithin a given pathMatcher, only one of pathRules or routeRules must be set.", + "items": { + "$ref": "PathRule" + }, + "type": "array" + }, + "routeRules": { + "description": "The list of HTTP route rules. Use this list instead of pathRules when advanced route matching and routing actions are desired. routeRules are evaluated in order of priority, from the lowest to highest number.\nWithin a given pathMatcher, you can set only one of pathRules or routeRules.", + "items": { + "$ref": "HttpRouteRule" + }, + "type": "array" + } + }, + "type": "object" + }, + "PathRule": { + "description": "A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.", + "id": "PathRule", + "properties": { + "paths": { + "description": "The list of path patterns to match. Each must start with / and the only place a * is allowed is at the end following a /. The string fed to the path matcher does not include any text after the first ? or #, and those chars are not allowed here.", + "items": { + "type": "string" + }, + "type": "array" + }, + "routeAction": { + "$ref": "HttpRouteAction", + "description": "In response to a matching path, the load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If routeAction specifies any weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices.\nOnly one of routeAction or urlRedirect must be set.\nUrlMaps for external HTTP(S) load balancers support only the urlRewrite action within a pathRule's routeAction." + }, + "service": { + "description": "The full or partial URL of the backend service resource to which traffic is directed if this rule is matched. If routeAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if service is specified, routeAction cannot contain any weightedBackendService s. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified.\nOnly one of urlRedirect, service or routeAction.weightedBackendService must be set.", + "type": "string" + }, + "urlRedirect": { + "$ref": "HttpRedirectAction", + "description": "When a path pattern is matched, the request is redirected to a URL specified by urlRedirect.\nIf urlRedirect is specified, service or routeAction must not be set.\nNot supported when the URL map is bound to target gRPC proxy." + } + }, + "type": "object" + }, + "PerInstanceConfig": { + "id": "PerInstanceConfig", + "properties": { + "fingerprint": { + "description": "Fingerprint of this per-instance config. This field can be used in optimistic locking. It is ignored when inserting a per-instance config. An up-to-date fingerprint must be provided in order to update an existing per-instance config or the field needs to be unset.", + "format": "byte", + "type": "string" + }, + "name": { + "description": "The name of a per-instance config and its corresponding instance. Serves as a merge key during UpdatePerInstanceConfigs operations, that is, if a per-instance config with the same name exists then it will be updated, otherwise a new one will be created for the VM instance with the same name. An attempt to create a per-instance config for a VM instance that either doesn't exist or is not part of the group will result in an error.", + "type": "string" + }, + "preservedState": { + "$ref": "PreservedState", + "description": "The intended preserved state for the given instance. Does not contain preserved state generated from a stateful policy." + }, + "status": { + "description": "The status of applying this per-instance config on the corresponding managed instance.", + "enum": [ + "APPLYING", + "DELETING", + "EFFECTIVE", + "NONE", + "UNAPPLIED", + "UNAPPLIED_DELETION" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, + "Policy": { + "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.\n\n\n\nA `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role.\n\nFor some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).\n\n**JSON example:**\n\n{ \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time < timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 }\n\n**YAML example:**\n\nbindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3\n\nFor a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", + "id": "Policy", + "properties": { + "auditConfigs": { + "description": "Specifies cloud audit logging configuration for this policy.", + "items": { + "$ref": "AuditConfig" + }, + "type": "array" + }, + "bindings": { + "description": "Associates a list of `members` to a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one member.", + "items": { + "$ref": "Binding" + }, + "type": "array" + }, + "etag": { + "description": "`etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy.\n\n**Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.", + "format": "byte", + "type": "string" + }, + "iamOwned": { + "description": "", + "type": "boolean" + }, + "rules": { + "description": "If more than one rule is specified, the rules are applied in the following manner: - All matching LOG rules are always applied. - If any DENY/DENY_WITH_LOG rule matches, permission is denied. Logging will be applied if one or more matching rule requires logging. - Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is granted. Logging will be applied if one or more matching rule requires logging. - Otherwise, if no rule applies, permission is denied.", + "items": { + "$ref": "Rule" + }, + "type": "array" + }, + "version": { + "description": "Specifies the format of the policy.\n\nValid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.\n\nAny operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:\n\n* Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions\n\n**Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.\n\nIf a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.\n\nTo learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "PreconfiguredWafSet": { + "id": "PreconfiguredWafSet", + "properties": { + "expressionSets": { + "description": "List of entities that are currently supported for WAF rules.", + "items": { + "$ref": "WafExpressionSet" + }, + "type": "array" + } + }, + "type": "object" + }, + "PreservedState": { + "description": "Preserved state for a given instance.", + "id": "PreservedState", + "properties": { + "disks": { + "additionalProperties": { + "$ref": "PreservedStatePreservedDisk" + }, + "description": "Preserved disks defined for this instance. This map is keyed with the device names of the disks.", + "type": "object" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Preserved metadata defined for this instance.", + "type": "object" + } + }, + "type": "object" + }, + "PreservedStatePreservedDisk": { + "id": "PreservedStatePreservedDisk", + "properties": { + "autoDelete": { + "description": "These stateful disks will never be deleted during autohealing, update, instance recreate operations. This flag is used to configure if the disk should be deleted after it is no longer used by the group, e.g. when the given instance or the whole MIG is deleted. Note: disks attached in READ_ONLY mode cannot be auto-deleted.", + "enum": [ + "NEVER", + "ON_PERMANENT_INSTANCE_DELETION" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, + "mode": { + "description": "The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.", + "enum": [ + "READ_ONLY", + "READ_WRITE" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, + "source": { + "description": "The URL of the disk resource that is stateful and should be attached to the VM instance.", + "type": "string" + } + }, + "type": "object" + }, + "Project": { + "description": "Represents a Project resource.\n\nA project is used to organize resources in a Google Cloud Platform environment. For more information, read about the Resource Hierarchy. (== resource_for {$api_version}.projects ==)", + "id": "Project", + "properties": { + "commonInstanceMetadata": { + "$ref": "Metadata", + "description": "Metadata key/value pairs available to all instances contained in this project. See Custom metadata for more information." + }, + "creationTimestamp": { + "description": "[Output Only] Creation timestamp in RFC3339 text format.", + "type": "string" + }, + "defaultNetworkTier": { + "description": "This signifies the default network tier used for configuring resources of the project and can only take the following values: PREMIUM, STANDARD. Initially the default network tier is PREMIUM.", + "enum": [ + "PREMIUM", + "STANDARD" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, + "defaultServiceAccount": { + "description": "[Output Only] Default service account used by VMs running in this project.", + "type": "string" + }, + "description": { + "description": "An optional textual description of the resource.", + "type": "string" + }, + "enabledFeatures": { + "description": "Restricted features enabled for use on this project.", + "items": { + "type": "string" + }, + "type": "array" + }, + "id": { + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server. This is not the project ID, and is just a unique ID used by Compute Engine to identify resources.", + "format": "uint64", + "type": "string" + }, + "kind": { + "default": "compute#project", + "description": "[Output Only] Type of the resource. Always compute#project for projects.", + "type": "string" + }, + "name": { + "description": "The project ID. For example: my-example-project. Use the project ID to make requests to Compute Engine.", + "type": "string" + }, + "quotas": { + "description": "[Output Only] Quotas assigned to this project.", + "items": { + "$ref": "Quota" + }, + "type": "array" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for the resource.", + "type": "string" + }, + "usageExportLocation": { + "$ref": "UsageExportLocation", + "description": "The naming prefix for daily usage reports and the Google Cloud Storage bucket where they are stored." + }, + "xpnProjectStatus": { + "description": "[Output Only] The role this project has in a shared VPC configuration. Currently, only projects with the host role, which is specified by the value HOST, are differentiated.", + "enum": [ + "HOST", + "UNSPECIFIED_XPN_PROJECT_STATUS" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, + "ProjectsDisableXpnResourceRequest": { + "id": "ProjectsDisableXpnResourceRequest", + "properties": { + "xpnResource": { + "$ref": "XpnResourceId", + "description": "Service resource (a.k.a service project) ID." + } + }, + "type": "object" + }, + "ProjectsEnableXpnResourceRequest": { + "id": "ProjectsEnableXpnResourceRequest", + "properties": { + "xpnResource": { + "$ref": "XpnResourceId", + "description": "Service resource (a.k.a service project) ID." + } + }, + "type": "object" + }, + "ProjectsGetXpnResources": { + "id": "ProjectsGetXpnResources", + "properties": { + "kind": { + "default": "compute#projectsGetXpnResources", + "description": "[Output Only] Type of resource. Always compute#projectsGetXpnResources for lists of service resources (a.k.a service projects)", + "type": "string" + }, + "nextPageToken": { + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", + "type": "string" + }, + "resources": { + "description": "Service resources (a.k.a service projects) attached to this project as their shared VPC host.", + "items": { + "$ref": "XpnResourceId" + }, + "type": "array" + } + }, + "type": "object" + }, + "ProjectsListXpnHostsRequest": { + "id": "ProjectsListXpnHostsRequest", + "properties": { + "organization": { + "description": "Optional organization ID managed by Cloud Resource Manager, for which to list shared VPC host projects. If not specified, the organization will be inferred from the project.", + "type": "string" + } + }, + "type": "object" + }, + "ProjectsSetDefaultNetworkTierRequest": { + "id": "ProjectsSetDefaultNetworkTierRequest", + "properties": { + "networkTier": { + "description": "Default network tier to be set.", + "enum": [ + "PREMIUM", + "STANDARD" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, + "PublicAdvertisedPrefix": { + "description": "A public advertised prefix represents an aggregated IP prefix or netblock which customers bring to cloud. The IP prefix is a single unit of route advertisement and is announced globally to the internet.", + "id": "PublicAdvertisedPrefix", + "properties": { + "creationTimestamp": { + "description": "[Output Only] Creation timestamp in RFC3339 text format.", + "type": "string" + }, + "description": { + "description": "An optional description of this resource. Provide this property when you create the resource.", + "type": "string" + }, + "dnsVerificationIp": { + "description": "The IPv4 address to be used for reverse DNS verification.", + "type": "string" + }, + "fingerprint": { + "description": "Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a new PublicAdvertisedPrefix. An up-to-date fingerprint must be provided in order to update the PublicAdvertisedPrefix, otherwise the request will fail with error 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to retrieve a PublicAdvertisedPrefix.", + "format": "byte", + "type": "string" + }, + "id": { + "description": "[Output Only] The unique identifier for the resource type. The server generates this identifier.", + "format": "uint64", + "type": "string" + }, + "ipCidrRange": { + "description": "The IPv4 address range, in CIDR format, represented by this public advertised prefix.", + "type": "string" + }, + "kind": { + "default": "compute#publicAdvertisedPrefix", + "description": "[Output Only] Type of the resource. Always compute#publicAdvertisedPrefix for public advertised prefixes.", + "type": "string" + }, + "name": { + "annotations": { + "required": [ + "compute.publicAdvertisedPrefixes.insert" + ] + }, + "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "type": "string" + }, + "publicDelegatedPrefixs": { + "description": "[Output Only] The list of public delegated prefixes that exist for this public advertised prefix.", + "items": { + "$ref": "PublicAdvertisedPrefixPublicDelegatedPrefix" + }, + "type": "array" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for the resource.", + "type": "string" + }, + "sharedSecret": { + "description": "[Output Only] The shared secret to be used for reverse DNS verification.", + "type": "string" + }, + "status": { + "description": "The status of the public advertised prefix.", + "enum": [ + "INITIAL", + "PREFIX_CONFIGURATION_COMPLETE", + "PREFIX_CONFIGURATION_IN_PROGRESS", + "PREFIX_REMOVAL_IN_PROGRESS", + "PTR_CONFIGURED", + "REVERSE_DNS_LOOKUP_FAILED", + "VALIDATED" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, + "PublicAdvertisedPrefixList": { + "id": "PublicAdvertisedPrefixList", + "properties": { + "id": { + "description": "[Output Only] Unique identifier for the resource; defined by the server.", + "type": "string" + }, + "items": { + "description": "A list of PublicAdvertisedPrefix resources.", + "items": { + "$ref": "PublicAdvertisedPrefix" + }, + "type": "array" + }, + "kind": { + "default": "compute#publicAdvertisedPrefixList", + "description": "[Output Only] Type of the resource. Always compute#publicAdvertisedPrefix for public advertised prefixes.", + "type": "string" + }, + "nextPageToken": { + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for this resource.", + "type": "string" + }, + "warning": { + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "LARGE_DEPLOYMENT_WARNING", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "PARTIAL_SUCCESS", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "PublicAdvertisedPrefixPublicDelegatedPrefix": { + "description": "Represents a CIDR range which can be used to assign addresses.", + "id": "PublicAdvertisedPrefixPublicDelegatedPrefix", + "properties": { + "ipRange": { + "description": "The IP address range of the public delegated prefix", + "type": "string" + }, + "name": { + "description": "The name of the public delegated prefix", + "type": "string" + }, + "project": { + "description": "The project number of the public delegated prefix", + "type": "string" + }, + "region": { + "description": "The region of the public delegated prefix if it is regional. If absent, the prefix is global.", + "type": "string" + }, + "status": { + "description": "The status of the public delegated prefix. Possible values are: INITIALIZING: The public delegated prefix is being initialized and addresses cannot be created yet. ANNOUNCED: The public delegated prefix is active.", + "type": "string" + } + }, + "type": "object" + }, + "PublicDelegatedPrefix": { + "description": "A PublicDelegatedPrefix resource represents an IP block within a PublicAdvertisedPrefix that is configured within a single cloud scope (global or region). IPs in the block can be allocated to resources within that scope. Public delegated prefixes may be further broken up into smaller IP blocks in the same scope as the parent block.", + "id": "PublicDelegatedPrefix", + "properties": { + "creationTimestamp": { + "description": "[Output Only] Creation timestamp in RFC3339 text format.", + "type": "string" + }, + "description": { + "description": "An optional description of this resource. Provide this property when you create the resource.", + "type": "string" + }, + "fingerprint": { + "description": "Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a new PublicDelegatedPrefix. An up-to-date fingerprint must be provided in order to update the PublicDelegatedPrefix, otherwise the request will fail with error 412 conditionNotMet.\n\nTo see the latest fingerprint, make a get() request to retrieve a PublicDelegatedPrefix.", + "format": "byte", + "type": "string" + }, + "id": { + "description": "[Output Only] The unique identifier for the resource type. The server generates this identifier.", + "format": "uint64", + "type": "string" + }, + "ipCidrRange": { + "description": "The IPv4 address range, in CIDR format, represented by this public delegated prefix.", + "type": "string" + }, + "isLiveMigration": { + "description": "If true, the prefix will be live migrated.", + "type": "boolean" + }, + "kind": { + "default": "compute#publicDelegatedPrefix", + "description": "[Output Only] Type of the resource. Always compute#publicDelegatedPrefix for public delegated prefixes.", + "type": "string" + }, + "name": { + "annotations": { + "required": [ + "compute.publicDelegatedPrefixes.insert" + ] + }, + "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "type": "string" + }, + "parentPrefix": { + "description": "The URL of parent prefix. Either PublicAdvertisedPrefix or PublicDelegatedPrefix.", + "type": "string" + }, + "publicDelegatedSubPrefixs": { + "description": "The list of sub public delegated prefixes that exist for this public delegated prefix.", + "items": { + "$ref": "PublicDelegatedPrefixPublicDelegatedSubPrefix" + }, + "type": "array" + }, + "region": { + "description": "[Output Only] URL of the region where the public delegated prefix resides. This field applies only to the region resource. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for the resource.", + "type": "string" + }, + "status": { + "description": "[Output Only] The status of the public delegated prefix.", + "enum": [ + "ANNOUNCED", + "DELETING", + "INITIALIZING" + ], + "enumDescriptions": [ + "", + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, + "PublicDelegatedPrefixAggregatedList": { + "id": "PublicDelegatedPrefixAggregatedList", + "properties": { + "id": { + "description": "[Output Only] Unique identifier for the resource; defined by the server.", + "type": "string" + }, + "items": { + "additionalProperties": { + "$ref": "PublicDelegatedPrefixesScopedList", + "description": "[Output Only] Name of the scope containing this set of PublicDelegatedPrefixes." + }, + "description": "A list of PublicDelegatedPrefixesScopedList resources.", + "type": "object" + }, + "kind": { + "default": "compute#publicDelegatedPrefixAggregatedList", + "description": "[Output Only] Type of the resource. Always compute#publicDelegatedPrefixAggregatedList for aggregated lists of public delegated prefixes.", + "type": "string" + }, + "nextPageToken": { + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for this resource.", + "type": "string" + }, + "unreachables": { + "description": "[Output Only] Unreachable resources.", + "items": { + "type": "string" + }, + "type": "array" + }, + "warning": { + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "LARGE_DEPLOYMENT_WARNING", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "PARTIAL_SUCCESS", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "PublicDelegatedPrefixList": { + "id": "PublicDelegatedPrefixList", + "properties": { + "id": { + "description": "[Output Only] Unique identifier for the resource; defined by the server.", + "type": "string" + }, + "items": { + "description": "A list of PublicDelegatedPrefix resources.", + "items": { + "$ref": "PublicDelegatedPrefix" + }, + "type": "array" + }, + "kind": { + "default": "compute#publicDelegatedPrefixList", + "description": "[Output Only] Type of the resource. Always compute#publicDelegatedPrefixList for public delegated prefixes.", + "type": "string" + }, + "nextPageToken": { + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for this resource.", + "type": "string" + }, + "warning": { + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "LARGE_DEPLOYMENT_WARNING", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "PARTIAL_SUCCESS", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "PublicDelegatedPrefixPublicDelegatedSubPrefix": { + "description": "Represents a sub PublicDelegatedPrefix.", + "id": "PublicDelegatedPrefixPublicDelegatedSubPrefix", + "properties": { + "delegateeProject": { + "description": "Name of the project scoping this PublicDelegatedSubPrefix.", + "type": "string" + }, + "description": { + "description": "An optional description of this resource. Provide this property when you create the resource.", + "type": "string" + }, + "ipCidrRange": { + "description": "The IPv4 address range, in CIDR format, represented by this sub public delegated prefix.", + "type": "string" + }, + "isAddress": { + "description": "Whether the sub prefix is delegated to create Address resources in the delegatee project.", + "type": "boolean" + }, + "name": { + "description": "The name of the sub public delegated prefix.", + "type": "string" + }, + "region": { + "description": "[Output Only] The region of the sub public delegated prefix if it is regional. If absent, the sub prefix is global.", + "type": "string" + }, + "status": { + "description": "[Output Only] The status of the sub public delegated prefix.", + "enum": [ + "ACTIVE", + "INACTIVE" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, + "PublicDelegatedPrefixesScopedList": { + "id": "PublicDelegatedPrefixesScopedList", + "properties": { + "publicDelegatedPrefixes": { + "description": "[Output Only] A list of PublicDelegatedPrefixes contained in this scope.", + "items": { + "$ref": "PublicDelegatedPrefix" + }, + "type": "array" + }, + "warning": { + "description": "[Output Only] Informational warning which replaces the list of public delegated prefixes when the list is empty.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "LARGE_DEPLOYMENT_WARNING", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "PARTIAL_SUCCESS", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, "Quota": { "description": "A quotas entry.", "id": "Quota", @@ -44845,9 +46442,11 @@ "AUTOSCALERS", "BACKEND_BUCKETS", "BACKEND_SERVICES", + "C2D_CPUS", "C2_CPUS", "COMMITMENTS", "COMMITTED_A2_CPUS", + "COMMITTED_C2D_CPUS", "COMMITTED_C2_CPUS", "COMMITTED_CPUS", "COMMITTED_E2_CPUS", @@ -45063,6 +46662,8 @@ "", "", "", + "", + "", "" ], "type": "string" @@ -47854,6 +49455,10 @@ "description": "An optional description of this resource. Provide this property when you create the resource.", "type": "string" }, + "encryptedInterconnectRouter": { + "description": "Field to indicate if a router is dedicated to use with encrypted Interconnect Attachment (IPsec-encrypted Cloud Interconnect feature).", + "type": "boolean" + }, "id": { "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", "format": "uint64", @@ -48107,7 +49712,7 @@ "type": "string" }, "advertisedGroups": { - "description": "User-specified list of prefix groups to advertise in custom mode, which can take one of the following options: \n- ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets. \n- ALL_VPC_SUBNETS: Advertises the router's own VPC subnets. \n- ALL_PEER_VPC_SUBNETS: Advertises peer subnets of the router's VPC network. Note that this field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the \"bgp\" message). These groups are advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups.", + "description": "User-specified list of prefix groups to advertise in custom mode, which can take one of the following options: \n- ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets. \n- ALL_VPC_SUBNETS: Advertises the router's own VPC subnets. Note that this field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the \"bgp\" message). These groups are advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups.", "items": { "enum": [ "ALL_SUBNETS" @@ -48874,8 +50479,38 @@ }, "type": "object" }, + "ScalingScheduleStatus": { + "id": "ScalingScheduleStatus", + "properties": { + "lastStartTime": { + "description": "[Output Only] The last time the scaling schedule became active. Note: this is a timestamp when a schedule actually became active, not when it was planned to do so. The timestamp is in RFC3339 text format.", + "type": "string" + }, + "nextStartTime": { + "description": "[Output Only] The next time the scaling schedule is to become active. Note: this is a timestamp when a schedule is planned to run, but the actual time might be slightly different. The timestamp is in RFC3339 text format.", + "type": "string" + }, + "state": { + "description": "[Output Only] The current state of a scaling schedule.", + "enum": [ + "ACTIVE", + "DISABLED", + "OBSOLETE", + "READY" + ], + "enumDescriptions": [ + "", + "", + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, "Scheduling": { - "description": "Sets the scheduling options for an Instance. NextID: 17", + "description": "Sets the scheduling options for an Instance. NextID: 20", "id": "Scheduling", "properties": { "automaticRestart": { @@ -55145,6 +56780,10 @@ "format": "uint32", "type": "integer" }, + "interconnectAttachment": { + "description": "URL of the interconnect attachment resource. When the value of this field is present, the VPN Gateway will be used for IPsec-encrypted Cloud Interconnect; all Egress or Ingress traffic for this VPN Gateway interface will go through the specified interconnect attachment resource.", + "type": "string" + }, "ipAddress": { "description": "[Output Only] The external IP address for this VPN gateway interface.", "type": "string" diff --git a/discovery/container-v1.json b/discovery/container-v1.json index e67de6de778..b93fc41d81f 100644 --- a/discovery/container-v1.json +++ b/discovery/container-v1.json @@ -2459,7 +2459,7 @@ } } }, - "revision": "20210224", + "revision": "20210311", "rootUrl": "https://container.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -2548,7 +2548,7 @@ "type": "object" }, "Autopilot": { - "description": "Autopilot is the configuration for Autopilot settings on the cluster. It is the official product name of what is previously known as AutoGKE", + "description": "Autopilot is the configuration for Autopilot settings on the cluster.", "id": "Autopilot", "properties": { "enabled": { @@ -2715,7 +2715,7 @@ }, "autopilot": { "$ref": "Autopilot", - "description": "Autopilot configuration for the cluster. It has the same semantics as AutoGKE and overrides the setting in autogke." + "description": "Autopilot configuration for the cluster." }, "autoscaling": { "$ref": "ClusterAutoscaling", diff --git a/discovery/container-v1beta1.json b/discovery/container-v1beta1.json index 9eeacdd6723..fe702368afc 100644 --- a/discovery/container-v1beta1.json +++ b/discovery/container-v1beta1.json @@ -2484,7 +2484,7 @@ } } }, - "revision": "20210219", + "revision": "20210311", "rootUrl": "https://container.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -2581,7 +2581,7 @@ "type": "object" }, "Autopilot": { - "description": "Autopilot is the configuration for Autopilot settings on the cluster. It is the official product name of what is previously known as AutoGKE", + "description": "Autopilot is the configuration for Autopilot settings on the cluster.", "id": "Autopilot", "properties": { "enabled": { @@ -2763,7 +2763,7 @@ }, "autopilot": { "$ref": "Autopilot", - "description": "Autopilot configuration for the cluster. It has the same semantics as AutoGKE and overrides the setting in autogke." + "description": "Autopilot configuration for the cluster." }, "autoscaling": { "$ref": "ClusterAutoscaling", @@ -3148,6 +3148,10 @@ "$ref": "IntraNodeVisibilityConfig", "description": "The desired config of Intra-node visibility." }, + "desiredL4ilbSubsettingConfig": { + "$ref": "ILBSubsettingConfig", + "description": "The desired L4 Internal Load Balancer Subsetting configuration." + }, "desiredLocations": { "description": "The desired list of Google Compute Engine [zones](https://cloud.google.com/compute/docs/zones#available) in which the cluster's nodes should be located. This list must always include the cluster's primary zone. Warning: changing cluster locations will update the locations of all node pools and will result in nodes being added and/or removed.", "items": { @@ -3553,6 +3557,17 @@ }, "type": "object" }, + "ILBSubsettingConfig": { + "description": "ILBSubsettingConfig contains the desired config of L4 Internal LoadBalancer subsetting on this cluster.", + "id": "ILBSubsettingConfig", + "properties": { + "enabled": { + "description": "Enables l4 ILB subsetting for this cluster", + "type": "boolean" + } + }, + "type": "object" + }, "IPAllocationPolicy": { "description": "Configuration for controlling how IPs are allocated in the cluster.", "id": "IPAllocationPolicy", @@ -4015,6 +4030,10 @@ "description": "Whether Intra-node visibility is enabled for this cluster. This makes same node pod to pod traffic visible for VPC network.", "type": "boolean" }, + "enableL4ilbSubsetting": { + "description": "Whether L4ILB Subsetting is enabled for this cluster.", + "type": "boolean" + }, "network": { "description": "Output only. The relative name of the Google Compute Engine network(https://cloud.google.com/compute/docs/networks-and-firewalls#networks) to which the cluster is connected. Example: projects/my-project/global/networks/my-network", "type": "string" @@ -4076,6 +4095,20 @@ }, "type": "object" }, + "NetworkTags": { + "description": "Collection of Compute Engine network tags that can be applied to a node's underyling VM instance. (See `tags` field in [`NodeConfig`](/kubernetes-engine/docs/reference/rest/v1/NodeConfig)).", + "id": "NetworkTags", + "properties": { + "tags": { + "description": "List of network tags.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "NodeConfig": { "description": "Parameters that describe the nodes in a cluster.", "id": "NodeConfig", @@ -4214,6 +4247,20 @@ }, "type": "object" }, + "NodeLabels": { + "description": "Collection of node-level [Kubernetes labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels).", + "id": "NodeLabels", + "properties": { + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Map of node label keys and node label values.", + "type": "object" + } + }, + "type": "object" + }, "NodeManagement": { "description": "NodeManagement defines the set of node management services turned on for the node pool.", "id": "NodeManagement", @@ -4408,6 +4455,20 @@ }, "type": "object" }, + "NodeTaints": { + "description": "Collection of Kubernetes [node taints](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration).", + "id": "NodeTaints", + "properties": { + "taints": { + "description": "List of node taints.", + "items": { + "$ref": "NodeTaint" + }, + "type": "array" + } + }, + "type": "object" + }, "NotificationConfig": { "description": "NotificationConfig is the configuration of notifications.", "id": "NotificationConfig", @@ -5529,6 +5590,10 @@ "$ref": "NodeKubeletConfig", "description": "Node kubelet configs." }, + "labels": { + "$ref": "NodeLabels", + "description": "The desired node labels to be applied to all nodes in the node pool. If this field is not present, the labels will not be changed. Otherwise, the existing node labels will be *replaced* with the provided labels." + }, "linuxNodeConfig": { "$ref": "LinuxNodeConfig", "description": "Parameters that can be configured on Linux nodes." @@ -5556,6 +5621,14 @@ "description": "Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field.", "type": "string" }, + "tags": { + "$ref": "NetworkTags", + "description": "The desired network tags to be applied to all nodes in the node pool. If this field is not present, the tags will not be changed. Otherwise, the existing network tags will be *replaced* with the provided tags." + }, + "taints": { + "$ref": "NodeTaints", + "description": "The desired node taints to be applied to all nodes in the node pool. If this field is not present, the taints will not be changed. Otherwise, the existing node taints will be *replaced* with the provided taints." + }, "upgradeSettings": { "$ref": "UpgradeSettings", "description": "Upgrade settings control disruption and speed of the upgrade." diff --git a/discovery/content-v2.1.json b/discovery/content-v2.1.json index 08f4d7366b1..2fbf85db1fe 100644 --- a/discovery/content-v2.1.json +++ b/discovery/content-v2.1.json @@ -8,8 +8,8 @@ } } }, - "basePath": "", - "baseUrl": "https://shoppingcontent.googleapis.com/", + "basePath": "/content/v2.1/", + "baseUrl": "https://shoppingcontent.googleapis.com/content/v2.1/", "batchPath": "batch", "canonicalName": "Shopping Content", "description": "Manage your product listings and accounts for Google Shopping", @@ -109,12 +109,12 @@ "methods": { "authinfo": { "description": "Returns information about the authenticated user.", - "flatPath": "content/v2.1/accounts/authinfo", + "flatPath": "accounts/authinfo", "httpMethod": "GET", "id": "content.accounts.authinfo", "parameterOrder": [], "parameters": {}, - "path": "content/v2.1/accounts/authinfo", + "path": "accounts/authinfo", "response": { "$ref": "AccountsAuthInfoResponse" }, @@ -124,7 +124,7 @@ }, "claimwebsite": { "description": "Claims the website of a Merchant Center sub-account.", - "flatPath": "content/v2.1/{merchantId}/accounts/{accountId}/claimwebsite", + "flatPath": "{merchantId}/accounts/{accountId}/claimwebsite", "httpMethod": "POST", "id": "content.accounts.claimwebsite", "parameterOrder": [ @@ -152,7 +152,7 @@ "type": "boolean" } }, - "path": "content/v2.1/{merchantId}/accounts/{accountId}/claimwebsite", + "path": "{merchantId}/accounts/{accountId}/claimwebsite", "response": { "$ref": "AccountsClaimWebsiteResponse" }, @@ -162,12 +162,12 @@ }, "custombatch": { "description": "Retrieves, inserts, updates, and deletes multiple Merchant Center (sub-)accounts in a single request.", - "flatPath": "content/v2.1/accounts/batch", + "flatPath": "accounts/batch", "httpMethod": "POST", "id": "content.accounts.custombatch", "parameterOrder": [], "parameters": {}, - "path": "content/v2.1/accounts/batch", + "path": "accounts/batch", "request": { "$ref": "AccountsCustomBatchRequest" }, @@ -180,7 +180,7 @@ }, "delete": { "description": "Deletes a Merchant Center sub-account.", - "flatPath": "content/v2.1/{merchantId}/accounts/{accountId}", + "flatPath": "{merchantId}/accounts/{accountId}", "httpMethod": "DELETE", "id": "content.accounts.delete", "parameterOrder": [ @@ -209,14 +209,14 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/accounts/{accountId}", + "path": "{merchantId}/accounts/{accountId}", "scopes": [ "https://www.googleapis.com/auth/content" ] }, "get": { "description": "Retrieves a Merchant Center account.", - "flatPath": "content/v2.1/{merchantId}/accounts/{accountId}", + "flatPath": "{merchantId}/accounts/{accountId}", "httpMethod": "GET", "id": "content.accounts.get", "parameterOrder": [ @@ -252,7 +252,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/accounts/{accountId}", + "path": "{merchantId}/accounts/{accountId}", "response": { "$ref": "Account" }, @@ -262,7 +262,7 @@ }, "insert": { "description": "Creates a Merchant Center sub-account.", - "flatPath": "content/v2.1/{merchantId}/accounts", + "flatPath": "{merchantId}/accounts", "httpMethod": "POST", "id": "content.accounts.insert", "parameterOrder": [ @@ -277,7 +277,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/accounts", + "path": "{merchantId}/accounts", "request": { "$ref": "Account" }, @@ -290,7 +290,7 @@ }, "link": { "description": "Performs an action on a link between two Merchant Center accounts, namely accountId and linkedAccountId.", - "flatPath": "content/v2.1/{merchantId}/accounts/{accountId}/link", + "flatPath": "{merchantId}/accounts/{accountId}/link", "httpMethod": "POST", "id": "content.accounts.link", "parameterOrder": [ @@ -313,7 +313,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/accounts/{accountId}/link", + "path": "{merchantId}/accounts/{accountId}/link", "request": { "$ref": "AccountsLinkRequest" }, @@ -326,7 +326,7 @@ }, "list": { "description": "Lists the sub-accounts in your Merchant Center account.", - "flatPath": "content/v2.1/{merchantId}/accounts", + "flatPath": "{merchantId}/accounts", "httpMethod": "GET", "id": "content.accounts.list", "parameterOrder": [ @@ -371,7 +371,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/accounts", + "path": "{merchantId}/accounts", "response": { "$ref": "AccountsListResponse" }, @@ -381,7 +381,7 @@ }, "listlinks": { "description": "Returns the list of accounts linked to your Merchant Center account.", - "flatPath": "content/v2.1/{merchantId}/accounts/{accountId}/listlinks", + "flatPath": "{merchantId}/accounts/{accountId}/listlinks", "httpMethod": "GET", "id": "content.accounts.listlinks", "parameterOrder": [ @@ -415,7 +415,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/accounts/{accountId}/listlinks", + "path": "{merchantId}/accounts/{accountId}/listlinks", "response": { "$ref": "AccountsListLinksResponse" }, @@ -425,7 +425,7 @@ }, "update": { "description": "Updates a Merchant Center account. Any fields that are not provided are deleted from the resource.", - "flatPath": "content/v2.1/{merchantId}/accounts/{accountId}", + "flatPath": "{merchantId}/accounts/{accountId}", "httpMethod": "PUT", "id": "content.accounts.update", "parameterOrder": [ @@ -448,7 +448,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/accounts/{accountId}", + "path": "{merchantId}/accounts/{accountId}", "request": { "$ref": "Account" }, @@ -461,7 +461,7 @@ }, "updatelabels": { "description": "Updates labels that are assigned to the Merchant Center account by CSS user.", - "flatPath": "content/v2.1/{merchantId}/accounts/{accountId}/updatelabels", + "flatPath": "{merchantId}/accounts/{accountId}/updatelabels", "httpMethod": "POST", "id": "content.accounts.updatelabels", "parameterOrder": [ @@ -484,7 +484,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/accounts/{accountId}/updatelabels", + "path": "{merchantId}/accounts/{accountId}/updatelabels", "request": { "$ref": "AccountsUpdateLabelsRequest" }, @@ -501,7 +501,7 @@ "methods": { "create": { "description": "Uploads credentials for the Merchant Center account. If credentials already exist for this Merchant Center account and purpose, this method updates them.", - "flatPath": "content/v2.1/accounts/{accountId}/credentials", + "flatPath": "accounts/{accountId}/credentials", "httpMethod": "POST", "id": "content.accounts.credentials.create", "parameterOrder": [ @@ -516,7 +516,7 @@ "type": "string" } }, - "path": "content/v2.1/accounts/{accountId}/credentials", + "path": "accounts/{accountId}/credentials", "request": { "$ref": "AccountCredentials" }, @@ -533,7 +533,7 @@ "methods": { "create": { "description": "Creates a new label, not assigned to any account.", - "flatPath": "content/v2.1/accounts/{accountId}/labels", + "flatPath": "accounts/{accountId}/labels", "httpMethod": "POST", "id": "content.accounts.labels.create", "parameterOrder": [ @@ -548,7 +548,7 @@ "type": "string" } }, - "path": "content/v2.1/accounts/{accountId}/labels", + "path": "accounts/{accountId}/labels", "request": { "$ref": "AccountLabel" }, @@ -561,7 +561,7 @@ }, "delete": { "description": "Deletes a label and removes it from all accounts to which it was assigned.", - "flatPath": "content/v2.1/accounts/{accountId}/labels/{labelId}", + "flatPath": "accounts/{accountId}/labels/{labelId}", "httpMethod": "DELETE", "id": "content.accounts.labels.delete", "parameterOrder": [ @@ -584,14 +584,14 @@ "type": "string" } }, - "path": "content/v2.1/accounts/{accountId}/labels/{labelId}", + "path": "accounts/{accountId}/labels/{labelId}", "scopes": [ "https://www.googleapis.com/auth/content" ] }, "list": { "description": "Lists the labels assigned to an account.", - "flatPath": "content/v2.1/accounts/{accountId}/labels", + "flatPath": "accounts/{accountId}/labels", "httpMethod": "GET", "id": "content.accounts.labels.list", "parameterOrder": [ @@ -617,7 +617,7 @@ "type": "string" } }, - "path": "content/v2.1/accounts/{accountId}/labels", + "path": "accounts/{accountId}/labels", "response": { "$ref": "ListAccountLabelsResponse" }, @@ -627,7 +627,7 @@ }, "patch": { "description": "Updates a label.", - "flatPath": "content/v2.1/accounts/{accountId}/labels/{labelId}", + "flatPath": "accounts/{accountId}/labels/{labelId}", "httpMethod": "PATCH", "id": "content.accounts.labels.patch", "parameterOrder": [ @@ -650,7 +650,7 @@ "type": "string" } }, - "path": "content/v2.1/accounts/{accountId}/labels/{labelId}", + "path": "accounts/{accountId}/labels/{labelId}", "request": { "$ref": "AccountLabel" }, @@ -667,7 +667,7 @@ "methods": { "create": { "description": "Links return carrier to a merchant account.", - "flatPath": "content/v2.1/accounts/{accountId}/returncarrier", + "flatPath": "accounts/{accountId}/returncarrier", "httpMethod": "POST", "id": "content.accounts.returncarrier.create", "parameterOrder": [ @@ -682,7 +682,7 @@ "type": "string" } }, - "path": "content/v2.1/accounts/{accountId}/returncarrier", + "path": "accounts/{accountId}/returncarrier", "request": { "$ref": "AccountReturnCarrier" }, @@ -695,7 +695,7 @@ }, "delete": { "description": "Delete a return carrier in the merchant account.", - "flatPath": "content/v2.1/accounts/{accountId}/returncarrier/{carrierAccountId}", + "flatPath": "accounts/{accountId}/returncarrier/{carrierAccountId}", "httpMethod": "DELETE", "id": "content.accounts.returncarrier.delete", "parameterOrder": [ @@ -718,14 +718,14 @@ "type": "string" } }, - "path": "content/v2.1/accounts/{accountId}/returncarrier/{carrierAccountId}", + "path": "accounts/{accountId}/returncarrier/{carrierAccountId}", "scopes": [ "https://www.googleapis.com/auth/content" ] }, "list": { "description": "Lists available return carriers in the merchant account.", - "flatPath": "content/v2.1/accounts/{accountId}/returncarrier", + "flatPath": "accounts/{accountId}/returncarrier", "httpMethod": "GET", "id": "content.accounts.returncarrier.list", "parameterOrder": [ @@ -740,7 +740,7 @@ "type": "string" } }, - "path": "content/v2.1/accounts/{accountId}/returncarrier", + "path": "accounts/{accountId}/returncarrier", "response": { "$ref": "ListAccountReturnCarrierResponse" }, @@ -750,7 +750,7 @@ }, "patch": { "description": "Updates a return carrier in the merchant account.", - "flatPath": "content/v2.1/accounts/{accountId}/returncarrier/{carrierAccountId}", + "flatPath": "accounts/{accountId}/returncarrier/{carrierAccountId}", "httpMethod": "PATCH", "id": "content.accounts.returncarrier.patch", "parameterOrder": [ @@ -773,7 +773,7 @@ "type": "string" } }, - "path": "content/v2.1/accounts/{accountId}/returncarrier/{carrierAccountId}", + "path": "accounts/{accountId}/returncarrier/{carrierAccountId}", "request": { "$ref": "AccountReturnCarrier" }, @@ -792,12 +792,12 @@ "methods": { "custombatch": { "description": "Retrieves multiple Merchant Center account statuses in a single request.", - "flatPath": "content/v2.1/accountstatuses/batch", + "flatPath": "accountstatuses/batch", "httpMethod": "POST", "id": "content.accountstatuses.custombatch", "parameterOrder": [], "parameters": {}, - "path": "content/v2.1/accountstatuses/batch", + "path": "accountstatuses/batch", "request": { "$ref": "AccountstatusesCustomBatchRequest" }, @@ -810,7 +810,7 @@ }, "get": { "description": "Retrieves the status of a Merchant Center account. No itemLevelIssues are returned for multi-client accounts.", - "flatPath": "content/v2.1/{merchantId}/accountstatuses/{accountId}", + "flatPath": "{merchantId}/accountstatuses/{accountId}", "httpMethod": "GET", "id": "content.accountstatuses.get", "parameterOrder": [ @@ -839,7 +839,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/accountstatuses/{accountId}", + "path": "{merchantId}/accountstatuses/{accountId}", "response": { "$ref": "AccountStatus" }, @@ -849,7 +849,7 @@ }, "list": { "description": "Lists the statuses of the sub-accounts in your Merchant Center account.", - "flatPath": "content/v2.1/{merchantId}/accountstatuses", + "flatPath": "{merchantId}/accountstatuses", "httpMethod": "GET", "id": "content.accountstatuses.list", "parameterOrder": [ @@ -881,7 +881,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/accountstatuses", + "path": "{merchantId}/accountstatuses", "response": { "$ref": "AccountstatusesListResponse" }, @@ -895,12 +895,12 @@ "methods": { "custombatch": { "description": "Retrieves and updates tax settings of multiple accounts in a single request.", - "flatPath": "content/v2.1/accounttax/batch", + "flatPath": "accounttax/batch", "httpMethod": "POST", "id": "content.accounttax.custombatch", "parameterOrder": [], "parameters": {}, - "path": "content/v2.1/accounttax/batch", + "path": "accounttax/batch", "request": { "$ref": "AccounttaxCustomBatchRequest" }, @@ -913,7 +913,7 @@ }, "get": { "description": "Retrieves the tax settings of the account.", - "flatPath": "content/v2.1/{merchantId}/accounttax/{accountId}", + "flatPath": "{merchantId}/accounttax/{accountId}", "httpMethod": "GET", "id": "content.accounttax.get", "parameterOrder": [ @@ -936,7 +936,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/accounttax/{accountId}", + "path": "{merchantId}/accounttax/{accountId}", "response": { "$ref": "AccountTax" }, @@ -946,7 +946,7 @@ }, "list": { "description": "Lists the tax settings of the sub-accounts in your Merchant Center account.", - "flatPath": "content/v2.1/{merchantId}/accounttax", + "flatPath": "{merchantId}/accounttax", "httpMethod": "GET", "id": "content.accounttax.list", "parameterOrder": [ @@ -972,7 +972,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/accounttax", + "path": "{merchantId}/accounttax", "response": { "$ref": "AccounttaxListResponse" }, @@ -982,7 +982,7 @@ }, "update": { "description": "Updates the tax settings of the account. Any fields that are not provided are deleted from the resource.", - "flatPath": "content/v2.1/{merchantId}/accounttax/{accountId}", + "flatPath": "{merchantId}/accounttax/{accountId}", "httpMethod": "PUT", "id": "content.accounttax.update", "parameterOrder": [ @@ -1005,7 +1005,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/accounttax/{accountId}", + "path": "{merchantId}/accounttax/{accountId}", "request": { "$ref": "AccountTax" }, @@ -1022,7 +1022,7 @@ "methods": { "get": { "description": "Retrieves a status of BoG program for your Merchant Center account.", - "flatPath": "content/v2.1/{merchantId}/buyongoogleprograms/{regionCode}", + "flatPath": "{merchantId}/buyongoogleprograms/{regionCode}", "httpMethod": "GET", "id": "content.buyongoogleprograms.get", "parameterOrder": [ @@ -1044,7 +1044,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/buyongoogleprograms/{regionCode}", + "path": "{merchantId}/buyongoogleprograms/{regionCode}", "response": { "$ref": "BuyOnGoogleProgramStatus" }, @@ -1054,7 +1054,7 @@ }, "onboard": { "description": "Onboards BoG in your Merchant Center account. By using this method, you agree to the [Terms of Service](https://merchants.google.com/mc/termsofservice/transactions/US/latest). Calling this method is only possible if the authenticated account is the same as the merchant id in the request. Calling this method multiple times will only accept Terms of Service if the latest version is not currently signed.", - "flatPath": "content/v2.1/{merchantId}/buyongoogleprograms/{regionCode}/onboard", + "flatPath": "{merchantId}/buyongoogleprograms/{regionCode}/onboard", "httpMethod": "POST", "id": "content.buyongoogleprograms.onboard", "parameterOrder": [ @@ -1076,7 +1076,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/buyongoogleprograms/{regionCode}/onboard", + "path": "{merchantId}/buyongoogleprograms/{regionCode}/onboard", "request": { "$ref": "OnboardBuyOnGoogleProgramRequest" }, @@ -1090,7 +1090,7 @@ "methods": { "create": { "description": "Uploads a collection to your Merchant Center account. If a collection with the same collectionId already exists, this method updates that entry. In each update, the collection is completely replaced by the fields in the body of the update request.", - "flatPath": "content/v2.1/{merchantId}/collections", + "flatPath": "{merchantId}/collections", "httpMethod": "POST", "id": "content.collections.create", "parameterOrder": [ @@ -1105,7 +1105,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/collections", + "path": "{merchantId}/collections", "request": { "$ref": "Collection" }, @@ -1118,7 +1118,7 @@ }, "delete": { "description": "Deletes a collection from your Merchant Center account.", - "flatPath": "content/v2.1/{merchantId}/collections/{collectionId}", + "flatPath": "{merchantId}/collections/{collectionId}", "httpMethod": "DELETE", "id": "content.collections.delete", "parameterOrder": [ @@ -1140,14 +1140,14 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/collections/{collectionId}", + "path": "{merchantId}/collections/{collectionId}", "scopes": [ "https://www.googleapis.com/auth/content" ] }, "get": { "description": "Retrieves a collection from your Merchant Center account.", - "flatPath": "content/v2.1/{merchantId}/collections/{collectionId}", + "flatPath": "{merchantId}/collections/{collectionId}", "httpMethod": "GET", "id": "content.collections.get", "parameterOrder": [ @@ -1169,7 +1169,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/collections/{collectionId}", + "path": "{merchantId}/collections/{collectionId}", "response": { "$ref": "Collection" }, @@ -1179,7 +1179,7 @@ }, "list": { "description": "Lists the collections in your Merchant Center account. The response might contain fewer items than specified by page_size. Rely on next_page_token to determine if there are more items to be requested.", - "flatPath": "content/v2.1/{merchantId}/collections", + "flatPath": "{merchantId}/collections", "httpMethod": "GET", "id": "content.collections.list", "parameterOrder": [ @@ -1205,7 +1205,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/collections", + "path": "{merchantId}/collections", "response": { "$ref": "ListCollectionsResponse" }, @@ -1219,7 +1219,7 @@ "methods": { "get": { "description": "Gets the status of a collection from your Merchant Center account.", - "flatPath": "content/v2.1/{merchantId}/collectionstatuses/{collectionId}", + "flatPath": "{merchantId}/collectionstatuses/{collectionId}", "httpMethod": "GET", "id": "content.collectionstatuses.get", "parameterOrder": [ @@ -1241,7 +1241,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/collectionstatuses/{collectionId}", + "path": "{merchantId}/collectionstatuses/{collectionId}", "response": { "$ref": "CollectionStatus" }, @@ -1251,7 +1251,7 @@ }, "list": { "description": "Lists the statuses of the collections in your Merchant Center account.", - "flatPath": "content/v2.1/{merchantId}/collectionstatuses", + "flatPath": "{merchantId}/collectionstatuses", "httpMethod": "GET", "id": "content.collectionstatuses.list", "parameterOrder": [ @@ -1277,7 +1277,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/collectionstatuses", + "path": "{merchantId}/collectionstatuses", "response": { "$ref": "ListCollectionStatusesResponse" }, @@ -1291,7 +1291,7 @@ "methods": { "get": { "description": "Retrieves a single CSS domain by ID.", - "flatPath": "content/v2.1/{cssGroupId}/csses/{cssDomainId}", + "flatPath": "{cssGroupId}/csses/{cssDomainId}", "httpMethod": "GET", "id": "content.csses.get", "parameterOrder": [ @@ -1314,7 +1314,7 @@ "type": "string" } }, - "path": "content/v2.1/{cssGroupId}/csses/{cssDomainId}", + "path": "{cssGroupId}/csses/{cssDomainId}", "response": { "$ref": "Css" }, @@ -1324,7 +1324,7 @@ }, "list": { "description": "Lists CSS domains affiliated with a CSS group.", - "flatPath": "content/v2.1/{cssGroupId}/csses", + "flatPath": "{cssGroupId}/csses", "httpMethod": "GET", "id": "content.csses.list", "parameterOrder": [ @@ -1350,7 +1350,7 @@ "type": "string" } }, - "path": "content/v2.1/{cssGroupId}/csses", + "path": "{cssGroupId}/csses", "response": { "$ref": "ListCssesResponse" }, @@ -1360,7 +1360,7 @@ }, "updatelabels": { "description": "Updates labels that are assigned to a CSS domain by its CSS group.", - "flatPath": "content/v2.1/{cssGroupId}/csses/{cssDomainId}/updatelabels", + "flatPath": "{cssGroupId}/csses/{cssDomainId}/updatelabels", "httpMethod": "POST", "id": "content.csses.updatelabels", "parameterOrder": [ @@ -1383,7 +1383,7 @@ "type": "string" } }, - "path": "content/v2.1/{cssGroupId}/csses/{cssDomainId}/updatelabels", + "path": "{cssGroupId}/csses/{cssDomainId}/updatelabels", "request": { "$ref": "LabelIds" }, @@ -1400,12 +1400,12 @@ "methods": { "custombatch": { "description": "Deletes, fetches, gets, inserts and updates multiple datafeeds in a single request.", - "flatPath": "content/v2.1/datafeeds/batch", + "flatPath": "datafeeds/batch", "httpMethod": "POST", "id": "content.datafeeds.custombatch", "parameterOrder": [], "parameters": {}, - "path": "content/v2.1/datafeeds/batch", + "path": "datafeeds/batch", "request": { "$ref": "DatafeedsCustomBatchRequest" }, @@ -1418,7 +1418,7 @@ }, "delete": { "description": "Deletes a datafeed configuration from your Merchant Center account.", - "flatPath": "content/v2.1/{merchantId}/datafeeds/{datafeedId}", + "flatPath": "{merchantId}/datafeeds/{datafeedId}", "httpMethod": "DELETE", "id": "content.datafeeds.delete", "parameterOrder": [ @@ -1441,14 +1441,14 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/datafeeds/{datafeedId}", + "path": "{merchantId}/datafeeds/{datafeedId}", "scopes": [ "https://www.googleapis.com/auth/content" ] }, "fetchnow": { "description": "Invokes a fetch for the datafeed in your Merchant Center account. If you need to call this method more than once per day, we recommend you use the Products service to update your product data.", - "flatPath": "content/v2.1/{merchantId}/datafeeds/{datafeedId}/fetchNow", + "flatPath": "{merchantId}/datafeeds/{datafeedId}/fetchNow", "httpMethod": "POST", "id": "content.datafeeds.fetchnow", "parameterOrder": [ @@ -1471,7 +1471,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/datafeeds/{datafeedId}/fetchNow", + "path": "{merchantId}/datafeeds/{datafeedId}/fetchNow", "response": { "$ref": "DatafeedsFetchNowResponse" }, @@ -1481,7 +1481,7 @@ }, "get": { "description": "Retrieves a datafeed configuration from your Merchant Center account.", - "flatPath": "content/v2.1/{merchantId}/datafeeds/{datafeedId}", + "flatPath": "{merchantId}/datafeeds/{datafeedId}", "httpMethod": "GET", "id": "content.datafeeds.get", "parameterOrder": [ @@ -1504,7 +1504,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/datafeeds/{datafeedId}", + "path": "{merchantId}/datafeeds/{datafeedId}", "response": { "$ref": "Datafeed" }, @@ -1514,7 +1514,7 @@ }, "insert": { "description": "Registers a datafeed configuration with your Merchant Center account.", - "flatPath": "content/v2.1/{merchantId}/datafeeds", + "flatPath": "{merchantId}/datafeeds", "httpMethod": "POST", "id": "content.datafeeds.insert", "parameterOrder": [ @@ -1529,7 +1529,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/datafeeds", + "path": "{merchantId}/datafeeds", "request": { "$ref": "Datafeed" }, @@ -1542,7 +1542,7 @@ }, "list": { "description": "Lists the configurations for datafeeds in your Merchant Center account.", - "flatPath": "content/v2.1/{merchantId}/datafeeds", + "flatPath": "{merchantId}/datafeeds", "httpMethod": "GET", "id": "content.datafeeds.list", "parameterOrder": [ @@ -1568,7 +1568,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/datafeeds", + "path": "{merchantId}/datafeeds", "response": { "$ref": "DatafeedsListResponse" }, @@ -1578,7 +1578,7 @@ }, "update": { "description": "Updates a datafeed configuration of your Merchant Center account. Any fields that are not provided are deleted from the resource.", - "flatPath": "content/v2.1/{merchantId}/datafeeds/{datafeedId}", + "flatPath": "{merchantId}/datafeeds/{datafeedId}", "httpMethod": "PUT", "id": "content.datafeeds.update", "parameterOrder": [ @@ -1601,7 +1601,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/datafeeds/{datafeedId}", + "path": "{merchantId}/datafeeds/{datafeedId}", "request": { "$ref": "Datafeed" }, @@ -1618,12 +1618,12 @@ "methods": { "custombatch": { "description": "Gets multiple Merchant Center datafeed statuses in a single request.", - "flatPath": "content/v2.1/datafeedstatuses/batch", + "flatPath": "datafeedstatuses/batch", "httpMethod": "POST", "id": "content.datafeedstatuses.custombatch", "parameterOrder": [], "parameters": {}, - "path": "content/v2.1/datafeedstatuses/batch", + "path": "datafeedstatuses/batch", "request": { "$ref": "DatafeedstatusesCustomBatchRequest" }, @@ -1636,7 +1636,7 @@ }, "get": { "description": "Retrieves the status of a datafeed from your Merchant Center account.", - "flatPath": "content/v2.1/{merchantId}/datafeedstatuses/{datafeedId}", + "flatPath": "{merchantId}/datafeedstatuses/{datafeedId}", "httpMethod": "GET", "id": "content.datafeedstatuses.get", "parameterOrder": [ @@ -1669,7 +1669,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/datafeedstatuses/{datafeedId}", + "path": "{merchantId}/datafeedstatuses/{datafeedId}", "response": { "$ref": "DatafeedStatus" }, @@ -1679,7 +1679,7 @@ }, "list": { "description": "Lists the statuses of the datafeeds in your Merchant Center account.", - "flatPath": "content/v2.1/{merchantId}/datafeedstatuses", + "flatPath": "{merchantId}/datafeedstatuses", "httpMethod": "GET", "id": "content.datafeedstatuses.list", "parameterOrder": [ @@ -1705,7 +1705,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/datafeedstatuses", + "path": "{merchantId}/datafeedstatuses", "response": { "$ref": "DatafeedstatusesListResponse" }, @@ -1719,12 +1719,12 @@ "methods": { "custombatch": { "description": "Retrieves and/or updates the LIA settings of multiple accounts in a single request.", - "flatPath": "content/v2.1/liasettings/batch", + "flatPath": "liasettings/batch", "httpMethod": "POST", "id": "content.liasettings.custombatch", "parameterOrder": [], "parameters": {}, - "path": "content/v2.1/liasettings/batch", + "path": "liasettings/batch", "request": { "$ref": "LiasettingsCustomBatchRequest" }, @@ -1737,7 +1737,7 @@ }, "get": { "description": "Retrieves the LIA settings of the account.", - "flatPath": "content/v2.1/{merchantId}/liasettings/{accountId}", + "flatPath": "{merchantId}/liasettings/{accountId}", "httpMethod": "GET", "id": "content.liasettings.get", "parameterOrder": [ @@ -1760,7 +1760,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/liasettings/{accountId}", + "path": "{merchantId}/liasettings/{accountId}", "response": { "$ref": "LiaSettings" }, @@ -1770,7 +1770,7 @@ }, "getaccessiblegmbaccounts": { "description": "Retrieves the list of accessible Google My Business accounts.", - "flatPath": "content/v2.1/{merchantId}/liasettings/{accountId}/accessiblegmbaccounts", + "flatPath": "{merchantId}/liasettings/{accountId}/accessiblegmbaccounts", "httpMethod": "GET", "id": "content.liasettings.getaccessiblegmbaccounts", "parameterOrder": [ @@ -1793,7 +1793,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/liasettings/{accountId}/accessiblegmbaccounts", + "path": "{merchantId}/liasettings/{accountId}/accessiblegmbaccounts", "response": { "$ref": "LiasettingsGetAccessibleGmbAccountsResponse" }, @@ -1803,7 +1803,7 @@ }, "list": { "description": "Lists the LIA settings of the sub-accounts in your Merchant Center account.", - "flatPath": "content/v2.1/{merchantId}/liasettings", + "flatPath": "{merchantId}/liasettings", "httpMethod": "GET", "id": "content.liasettings.list", "parameterOrder": [ @@ -1829,7 +1829,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/liasettings", + "path": "{merchantId}/liasettings", "response": { "$ref": "LiasettingsListResponse" }, @@ -1839,12 +1839,12 @@ }, "listposdataproviders": { "description": "Retrieves the list of POS data providers that have active settings for the all eiligible countries.", - "flatPath": "content/v2.1/liasettings/posdataproviders", + "flatPath": "liasettings/posdataproviders", "httpMethod": "GET", "id": "content.liasettings.listposdataproviders", "parameterOrder": [], "parameters": {}, - "path": "content/v2.1/liasettings/posdataproviders", + "path": "liasettings/posdataproviders", "response": { "$ref": "LiasettingsListPosDataProvidersResponse" }, @@ -1854,7 +1854,7 @@ }, "requestgmbaccess": { "description": "Requests access to a specified Google My Business account.", - "flatPath": "content/v2.1/{merchantId}/liasettings/{accountId}/requestgmbaccess", + "flatPath": "{merchantId}/liasettings/{accountId}/requestgmbaccess", "httpMethod": "POST", "id": "content.liasettings.requestgmbaccess", "parameterOrder": [ @@ -1884,7 +1884,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/liasettings/{accountId}/requestgmbaccess", + "path": "{merchantId}/liasettings/{accountId}/requestgmbaccess", "response": { "$ref": "LiasettingsRequestGmbAccessResponse" }, @@ -1894,7 +1894,7 @@ }, "requestinventoryverification": { "description": "Requests inventory validation for the specified country.", - "flatPath": "content/v2.1/{merchantId}/liasettings/{accountId}/requestinventoryverification/{country}", + "flatPath": "{merchantId}/liasettings/{accountId}/requestinventoryverification/{country}", "httpMethod": "POST", "id": "content.liasettings.requestinventoryverification", "parameterOrder": [ @@ -1924,7 +1924,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/liasettings/{accountId}/requestinventoryverification/{country}", + "path": "{merchantId}/liasettings/{accountId}/requestinventoryverification/{country}", "response": { "$ref": "LiasettingsRequestInventoryVerificationResponse" }, @@ -1934,7 +1934,7 @@ }, "setinventoryverificationcontact": { "description": "Sets the inventory verification contract for the specified country.", - "flatPath": "content/v2.1/{merchantId}/liasettings/{accountId}/setinventoryverificationcontact", + "flatPath": "{merchantId}/liasettings/{accountId}/setinventoryverificationcontact", "httpMethod": "POST", "id": "content.liasettings.setinventoryverificationcontact", "parameterOrder": [ @@ -1985,7 +1985,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/liasettings/{accountId}/setinventoryverificationcontact", + "path": "{merchantId}/liasettings/{accountId}/setinventoryverificationcontact", "response": { "$ref": "LiasettingsSetInventoryVerificationContactResponse" }, @@ -1995,7 +1995,7 @@ }, "setposdataprovider": { "description": "Sets the POS data provider for the specified country.", - "flatPath": "content/v2.1/{merchantId}/liasettings/{accountId}/setposdataprovider", + "flatPath": "{merchantId}/liasettings/{accountId}/setposdataprovider", "httpMethod": "POST", "id": "content.liasettings.setposdataprovider", "parameterOrder": [ @@ -2036,7 +2036,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/liasettings/{accountId}/setposdataprovider", + "path": "{merchantId}/liasettings/{accountId}/setposdataprovider", "response": { "$ref": "LiasettingsSetPosDataProviderResponse" }, @@ -2046,7 +2046,7 @@ }, "update": { "description": "Updates the LIA settings of the account. Any fields that are not provided are deleted from the resource.", - "flatPath": "content/v2.1/{merchantId}/liasettings/{accountId}", + "flatPath": "{merchantId}/liasettings/{accountId}", "httpMethod": "PUT", "id": "content.liasettings.update", "parameterOrder": [ @@ -2069,7 +2069,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/liasettings/{accountId}", + "path": "{merchantId}/liasettings/{accountId}", "request": { "$ref": "LiaSettings" }, @@ -2086,12 +2086,12 @@ "methods": { "custombatch": { "description": "Updates local inventory for multiple products or stores in a single request.", - "flatPath": "content/v2.1/localinventory/batch", + "flatPath": "localinventory/batch", "httpMethod": "POST", "id": "content.localinventory.custombatch", "parameterOrder": [], "parameters": {}, - "path": "content/v2.1/localinventory/batch", + "path": "localinventory/batch", "request": { "$ref": "LocalinventoryCustomBatchRequest" }, @@ -2104,7 +2104,7 @@ }, "insert": { "description": "Updates the local inventory of a product in your Merchant Center account.", - "flatPath": "content/v2.1/{merchantId}/products/{productId}/localinventory", + "flatPath": "{merchantId}/products/{productId}/localinventory", "httpMethod": "POST", "id": "content.localinventory.insert", "parameterOrder": [ @@ -2126,7 +2126,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/products/{productId}/localinventory", + "path": "{merchantId}/products/{productId}/localinventory", "request": { "$ref": "LocalInventory" }, @@ -2143,7 +2143,7 @@ "methods": { "createchargeinvoice": { "description": "Creates a charge invoice for a shipment group, and triggers a charge capture for orderinvoice enabled orders.", - "flatPath": "content/v2.1/{merchantId}/orderinvoices/{orderId}/createChargeInvoice", + "flatPath": "{merchantId}/orderinvoices/{orderId}/createChargeInvoice", "httpMethod": "POST", "id": "content.orderinvoices.createchargeinvoice", "parameterOrder": [ @@ -2165,7 +2165,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/orderinvoices/{orderId}/createChargeInvoice", + "path": "{merchantId}/orderinvoices/{orderId}/createChargeInvoice", "request": { "$ref": "OrderinvoicesCreateChargeInvoiceRequest" }, @@ -2178,7 +2178,7 @@ }, "createrefundinvoice": { "description": "Creates a refund invoice for one or more shipment groups, and triggers a refund for orderinvoice enabled orders. This can only be used for line items that have previously been charged using `createChargeInvoice`. All amounts (except for the summary) are incremental with respect to the previous invoice.", - "flatPath": "content/v2.1/{merchantId}/orderinvoices/{orderId}/createRefundInvoice", + "flatPath": "{merchantId}/orderinvoices/{orderId}/createRefundInvoice", "httpMethod": "POST", "id": "content.orderinvoices.createrefundinvoice", "parameterOrder": [ @@ -2200,7 +2200,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/orderinvoices/{orderId}/createRefundInvoice", + "path": "{merchantId}/orderinvoices/{orderId}/createRefundInvoice", "request": { "$ref": "OrderinvoicesCreateRefundInvoiceRequest" }, @@ -2217,7 +2217,7 @@ "methods": { "listdisbursements": { "description": "Retrieves a report for disbursements from your Merchant Center account.", - "flatPath": "content/v2.1/{merchantId}/orderreports/disbursements", + "flatPath": "{merchantId}/orderreports/disbursements", "httpMethod": "GET", "id": "content.orderreports.listdisbursements", "parameterOrder": [ @@ -2253,7 +2253,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/orderreports/disbursements", + "path": "{merchantId}/orderreports/disbursements", "response": { "$ref": "OrderreportsListDisbursementsResponse" }, @@ -2263,7 +2263,7 @@ }, "listtransactions": { "description": "Retrieves a list of transactions for a disbursement from your Merchant Center account.", - "flatPath": "content/v2.1/{merchantId}/orderreports/disbursements/{disbursementId}/transactions", + "flatPath": "{merchantId}/orderreports/disbursements/{disbursementId}/transactions", "httpMethod": "GET", "id": "content.orderreports.listtransactions", "parameterOrder": [ @@ -2306,7 +2306,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/orderreports/disbursements/{disbursementId}/transactions", + "path": "{merchantId}/orderreports/disbursements/{disbursementId}/transactions", "response": { "$ref": "OrderreportsListTransactionsResponse" }, @@ -2320,7 +2320,7 @@ "methods": { "acknowledge": { "description": "Acks an order return in your Merchant Center account.", - "flatPath": "content/v2.1/{merchantId}/orderreturns/{returnId}/acknowledge", + "flatPath": "{merchantId}/orderreturns/{returnId}/acknowledge", "httpMethod": "POST", "id": "content.orderreturns.acknowledge", "parameterOrder": [ @@ -2342,7 +2342,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/orderreturns/{returnId}/acknowledge", + "path": "{merchantId}/orderreturns/{returnId}/acknowledge", "request": { "$ref": "OrderreturnsAcknowledgeRequest" }, @@ -2355,7 +2355,7 @@ }, "createorderreturn": { "description": "Create return in your Merchant Center account.", - "flatPath": "content/v2.1/{merchantId}/orderreturns/createOrderReturn", + "flatPath": "{merchantId}/orderreturns/createOrderReturn", "httpMethod": "POST", "id": "content.orderreturns.createorderreturn", "parameterOrder": [ @@ -2370,7 +2370,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/orderreturns/createOrderReturn", + "path": "{merchantId}/orderreturns/createOrderReturn", "request": { "$ref": "OrderreturnsCreateOrderReturnRequest" }, @@ -2383,7 +2383,7 @@ }, "get": { "description": "Retrieves an order return from your Merchant Center account.", - "flatPath": "content/v2.1/{merchantId}/orderreturns/{returnId}", + "flatPath": "{merchantId}/orderreturns/{returnId}", "httpMethod": "GET", "id": "content.orderreturns.get", "parameterOrder": [ @@ -2405,7 +2405,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/orderreturns/{returnId}", + "path": "{merchantId}/orderreturns/{returnId}", "response": { "$ref": "MerchantOrderReturn" }, @@ -2415,7 +2415,7 @@ }, "list": { "description": "Lists order returns in your Merchant Center account.", - "flatPath": "content/v2.1/{merchantId}/orderreturns", + "flatPath": "{merchantId}/orderreturns", "httpMethod": "GET", "id": "content.orderreturns.list", "parameterOrder": [ @@ -2533,7 +2533,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/orderreturns", + "path": "{merchantId}/orderreturns", "response": { "$ref": "OrderreturnsListResponse" }, @@ -2543,7 +2543,7 @@ }, "process": { "description": "Processes return in your Merchant Center account.", - "flatPath": "content/v2.1/{merchantId}/orderreturns/{returnId}/process", + "flatPath": "{merchantId}/orderreturns/{returnId}/process", "httpMethod": "POST", "id": "content.orderreturns.process", "parameterOrder": [ @@ -2565,7 +2565,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/orderreturns/{returnId}/process", + "path": "{merchantId}/orderreturns/{returnId}/process", "request": { "$ref": "OrderreturnsProcessRequest" }, @@ -2582,7 +2582,7 @@ "methods": { "acknowledge": { "description": "Marks an order as acknowledged.", - "flatPath": "content/v2.1/{merchantId}/orders/{orderId}/acknowledge", + "flatPath": "{merchantId}/orders/{orderId}/acknowledge", "httpMethod": "POST", "id": "content.orders.acknowledge", "parameterOrder": [ @@ -2604,7 +2604,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/orders/{orderId}/acknowledge", + "path": "{merchantId}/orders/{orderId}/acknowledge", "request": { "$ref": "OrdersAcknowledgeRequest" }, @@ -2617,7 +2617,7 @@ }, "advancetestorder": { "description": "Sandbox only. Moves a test order from state \"`inProgress`\" to state \"`pendingShipment`\".", - "flatPath": "content/v2.1/{merchantId}/testorders/{orderId}/advance", + "flatPath": "{merchantId}/testorders/{orderId}/advance", "httpMethod": "POST", "id": "content.orders.advancetestorder", "parameterOrder": [ @@ -2639,7 +2639,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/testorders/{orderId}/advance", + "path": "{merchantId}/testorders/{orderId}/advance", "response": { "$ref": "OrdersAdvanceTestOrderResponse" }, @@ -2649,7 +2649,7 @@ }, "cancel": { "description": "Cancels all line items in an order, making a full refund.", - "flatPath": "content/v2.1/{merchantId}/orders/{orderId}/cancel", + "flatPath": "{merchantId}/orders/{orderId}/cancel", "httpMethod": "POST", "id": "content.orders.cancel", "parameterOrder": [ @@ -2671,7 +2671,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/orders/{orderId}/cancel", + "path": "{merchantId}/orders/{orderId}/cancel", "request": { "$ref": "OrdersCancelRequest" }, @@ -2684,7 +2684,7 @@ }, "cancellineitem": { "description": "Cancels a line item, making a full refund.", - "flatPath": "content/v2.1/{merchantId}/orders/{orderId}/cancelLineItem", + "flatPath": "{merchantId}/orders/{orderId}/cancelLineItem", "httpMethod": "POST", "id": "content.orders.cancellineitem", "parameterOrder": [ @@ -2706,7 +2706,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/orders/{orderId}/cancelLineItem", + "path": "{merchantId}/orders/{orderId}/cancelLineItem", "request": { "$ref": "OrdersCancelLineItemRequest" }, @@ -2719,7 +2719,7 @@ }, "canceltestorderbycustomer": { "description": "Sandbox only. Cancels a test order for customer-initiated cancellation.", - "flatPath": "content/v2.1/{merchantId}/testorders/{orderId}/cancelByCustomer", + "flatPath": "{merchantId}/testorders/{orderId}/cancelByCustomer", "httpMethod": "POST", "id": "content.orders.canceltestorderbycustomer", "parameterOrder": [ @@ -2741,7 +2741,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/testorders/{orderId}/cancelByCustomer", + "path": "{merchantId}/testorders/{orderId}/cancelByCustomer", "request": { "$ref": "OrdersCancelTestOrderByCustomerRequest" }, @@ -2754,7 +2754,7 @@ }, "createtestorder": { "description": "Sandbox only. Creates a test order.", - "flatPath": "content/v2.1/{merchantId}/testorders", + "flatPath": "{merchantId}/testorders", "httpMethod": "POST", "id": "content.orders.createtestorder", "parameterOrder": [ @@ -2769,7 +2769,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/testorders", + "path": "{merchantId}/testorders", "request": { "$ref": "OrdersCreateTestOrderRequest" }, @@ -2782,7 +2782,7 @@ }, "createtestreturn": { "description": "Sandbox only. Creates a test return.", - "flatPath": "content/v2.1/{merchantId}/orders/{orderId}/testreturn", + "flatPath": "{merchantId}/orders/{orderId}/testreturn", "httpMethod": "POST", "id": "content.orders.createtestreturn", "parameterOrder": [ @@ -2804,7 +2804,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/orders/{orderId}/testreturn", + "path": "{merchantId}/orders/{orderId}/testreturn", "request": { "$ref": "OrdersCreateTestReturnRequest" }, @@ -2817,7 +2817,7 @@ }, "get": { "description": "Retrieves an order from your Merchant Center account.", - "flatPath": "content/v2.1/{merchantId}/orders/{orderId}", + "flatPath": "{merchantId}/orders/{orderId}", "httpMethod": "GET", "id": "content.orders.get", "parameterOrder": [ @@ -2839,7 +2839,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/orders/{orderId}", + "path": "{merchantId}/orders/{orderId}", "response": { "$ref": "Order" }, @@ -2849,7 +2849,7 @@ }, "getbymerchantorderid": { "description": "Retrieves an order using merchant order ID.", - "flatPath": "content/v2.1/{merchantId}/ordersbymerchantid/{merchantOrderId}", + "flatPath": "{merchantId}/ordersbymerchantid/{merchantOrderId}", "httpMethod": "GET", "id": "content.orders.getbymerchantorderid", "parameterOrder": [ @@ -2871,7 +2871,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/ordersbymerchantid/{merchantOrderId}", + "path": "{merchantId}/ordersbymerchantid/{merchantOrderId}", "response": { "$ref": "OrdersGetByMerchantOrderIdResponse" }, @@ -2881,7 +2881,7 @@ }, "gettestordertemplate": { "description": "Sandbox only. Retrieves an order template that can be used to quickly create a new order in sandbox.", - "flatPath": "content/v2.1/{merchantId}/testordertemplates/{templateName}", + "flatPath": "{merchantId}/testordertemplates/{templateName}", "httpMethod": "GET", "id": "content.orders.gettestordertemplate", "parameterOrder": [ @@ -2924,7 +2924,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/testordertemplates/{templateName}", + "path": "{merchantId}/testordertemplates/{templateName}", "response": { "$ref": "OrdersGetTestOrderTemplateResponse" }, @@ -2934,7 +2934,7 @@ }, "instorerefundlineitem": { "description": "Deprecated. Notifies that item return and refund was handled directly by merchant outside of Google payments processing (e.g. cash refund done in store). Note: We recommend calling the returnrefundlineitem method to refund in-store returns. We will issue the refund directly to the customer. This helps to prevent possible differences arising between merchant and Google transaction records. We also recommend having the point of sale system communicate with Google to ensure that customers do not receive a double refund by first refunding via Google then via an in-store return.", - "flatPath": "content/v2.1/{merchantId}/orders/{orderId}/inStoreRefundLineItem", + "flatPath": "{merchantId}/orders/{orderId}/inStoreRefundLineItem", "httpMethod": "POST", "id": "content.orders.instorerefundlineitem", "parameterOrder": [ @@ -2956,7 +2956,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/orders/{orderId}/inStoreRefundLineItem", + "path": "{merchantId}/orders/{orderId}/inStoreRefundLineItem", "request": { "$ref": "OrdersInStoreRefundLineItemRequest" }, @@ -2969,7 +2969,7 @@ }, "list": { "description": "Lists the orders in your Merchant Center account.", - "flatPath": "content/v2.1/{merchantId}/orders", + "flatPath": "{merchantId}/orders", "httpMethod": "GET", "id": "content.orders.list", "parameterOrder": [ @@ -3047,7 +3047,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/orders", + "path": "{merchantId}/orders", "response": { "$ref": "OrdersListResponse" }, @@ -3057,7 +3057,7 @@ }, "refunditem": { "description": "Issues a partial or total refund for items and shipment.", - "flatPath": "content/v2.1/{merchantId}/orders/{orderId}/refunditem", + "flatPath": "{merchantId}/orders/{orderId}/refunditem", "httpMethod": "POST", "id": "content.orders.refunditem", "parameterOrder": [ @@ -3079,7 +3079,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/orders/{orderId}/refunditem", + "path": "{merchantId}/orders/{orderId}/refunditem", "request": { "$ref": "OrdersRefundItemRequest" }, @@ -3092,7 +3092,7 @@ }, "refundorder": { "description": "Issues a partial or total refund for an order.", - "flatPath": "content/v2.1/{merchantId}/orders/{orderId}/refundorder", + "flatPath": "{merchantId}/orders/{orderId}/refundorder", "httpMethod": "POST", "id": "content.orders.refundorder", "parameterOrder": [ @@ -3114,7 +3114,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/orders/{orderId}/refundorder", + "path": "{merchantId}/orders/{orderId}/refundorder", "request": { "$ref": "OrdersRefundOrderRequest" }, @@ -3127,7 +3127,7 @@ }, "rejectreturnlineitem": { "description": "Rejects return on an line item.", - "flatPath": "content/v2.1/{merchantId}/orders/{orderId}/rejectReturnLineItem", + "flatPath": "{merchantId}/orders/{orderId}/rejectReturnLineItem", "httpMethod": "POST", "id": "content.orders.rejectreturnlineitem", "parameterOrder": [ @@ -3149,7 +3149,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/orders/{orderId}/rejectReturnLineItem", + "path": "{merchantId}/orders/{orderId}/rejectReturnLineItem", "request": { "$ref": "OrdersRejectReturnLineItemRequest" }, @@ -3162,7 +3162,7 @@ }, "returnrefundlineitem": { "description": "Returns and refunds a line item. Note that this method can only be called on fully shipped orders. Please also note that the Orderreturns API is the preferred way to handle returns after you receive a return from a customer. You can use Orderreturns.list or Orderreturns.get to search for the return, and then use Orderreturns.processreturn to issue the refund. If the return cannot be found, then we recommend using this API to issue a refund.", - "flatPath": "content/v2.1/{merchantId}/orders/{orderId}/returnRefundLineItem", + "flatPath": "{merchantId}/orders/{orderId}/returnRefundLineItem", "httpMethod": "POST", "id": "content.orders.returnrefundlineitem", "parameterOrder": [ @@ -3184,7 +3184,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/orders/{orderId}/returnRefundLineItem", + "path": "{merchantId}/orders/{orderId}/returnRefundLineItem", "request": { "$ref": "OrdersReturnRefundLineItemRequest" }, @@ -3197,7 +3197,7 @@ }, "setlineitemmetadata": { "description": "Sets (or overrides if it already exists) merchant provided annotations in the form of key-value pairs. A common use case would be to supply us with additional structured information about a line item that cannot be provided via other methods. Submitted key-value pairs can be retrieved as part of the orders resource.", - "flatPath": "content/v2.1/{merchantId}/orders/{orderId}/setLineItemMetadata", + "flatPath": "{merchantId}/orders/{orderId}/setLineItemMetadata", "httpMethod": "POST", "id": "content.orders.setlineitemmetadata", "parameterOrder": [ @@ -3219,7 +3219,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/orders/{orderId}/setLineItemMetadata", + "path": "{merchantId}/orders/{orderId}/setLineItemMetadata", "request": { "$ref": "OrdersSetLineItemMetadataRequest" }, @@ -3232,7 +3232,7 @@ }, "shiplineitems": { "description": "Marks line item(s) as shipped.", - "flatPath": "content/v2.1/{merchantId}/orders/{orderId}/shipLineItems", + "flatPath": "{merchantId}/orders/{orderId}/shipLineItems", "httpMethod": "POST", "id": "content.orders.shiplineitems", "parameterOrder": [ @@ -3254,7 +3254,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/orders/{orderId}/shipLineItems", + "path": "{merchantId}/orders/{orderId}/shipLineItems", "request": { "$ref": "OrdersShipLineItemsRequest" }, @@ -3267,7 +3267,7 @@ }, "updatelineitemshippingdetails": { "description": "Updates ship by and delivery by dates for a line item.", - "flatPath": "content/v2.1/{merchantId}/orders/{orderId}/updateLineItemShippingDetails", + "flatPath": "{merchantId}/orders/{orderId}/updateLineItemShippingDetails", "httpMethod": "POST", "id": "content.orders.updatelineitemshippingdetails", "parameterOrder": [ @@ -3289,7 +3289,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/orders/{orderId}/updateLineItemShippingDetails", + "path": "{merchantId}/orders/{orderId}/updateLineItemShippingDetails", "request": { "$ref": "OrdersUpdateLineItemShippingDetailsRequest" }, @@ -3302,7 +3302,7 @@ }, "updatemerchantorderid": { "description": "Updates the merchant order ID for a given order.", - "flatPath": "content/v2.1/{merchantId}/orders/{orderId}/updateMerchantOrderId", + "flatPath": "{merchantId}/orders/{orderId}/updateMerchantOrderId", "httpMethod": "POST", "id": "content.orders.updatemerchantorderid", "parameterOrder": [ @@ -3324,7 +3324,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/orders/{orderId}/updateMerchantOrderId", + "path": "{merchantId}/orders/{orderId}/updateMerchantOrderId", "request": { "$ref": "OrdersUpdateMerchantOrderIdRequest" }, @@ -3337,7 +3337,7 @@ }, "updateshipment": { "description": "Updates a shipment's status, carrier, and/or tracking ID.", - "flatPath": "content/v2.1/{merchantId}/orders/{orderId}/updateShipment", + "flatPath": "{merchantId}/orders/{orderId}/updateShipment", "httpMethod": "POST", "id": "content.orders.updateshipment", "parameterOrder": [ @@ -3359,7 +3359,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/orders/{orderId}/updateShipment", + "path": "{merchantId}/orders/{orderId}/updateShipment", "request": { "$ref": "OrdersUpdateShipmentRequest" }, @@ -3376,7 +3376,7 @@ "methods": { "create": { "description": "Creates new order tracking signal.", - "flatPath": "content/v2.1/{merchantId}/ordertrackingsignals", + "flatPath": "{merchantId}/ordertrackingsignals", "httpMethod": "POST", "id": "content.ordertrackingsignals.create", "parameterOrder": [ @@ -3391,7 +3391,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/ordertrackingsignals", + "path": "{merchantId}/ordertrackingsignals", "request": { "$ref": "OrderTrackingSignal" }, @@ -3408,12 +3408,12 @@ "methods": { "custombatch": { "description": "Batches multiple POS-related calls in a single request.", - "flatPath": "content/v2.1/pos/batch", + "flatPath": "pos/batch", "httpMethod": "POST", "id": "content.pos.custombatch", "parameterOrder": [], "parameters": {}, - "path": "content/v2.1/pos/batch", + "path": "pos/batch", "request": { "$ref": "PosCustomBatchRequest" }, @@ -3426,7 +3426,7 @@ }, "delete": { "description": "Deletes a store for the given merchant.", - "flatPath": "content/v2.1/{merchantId}/pos/{targetMerchantId}/store/{storeCode}", + "flatPath": "{merchantId}/pos/{targetMerchantId}/store/{storeCode}", "httpMethod": "DELETE", "id": "content.pos.delete", "parameterOrder": [ @@ -3456,14 +3456,14 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/pos/{targetMerchantId}/store/{storeCode}", + "path": "{merchantId}/pos/{targetMerchantId}/store/{storeCode}", "scopes": [ "https://www.googleapis.com/auth/content" ] }, "get": { "description": "Retrieves information about the given store.", - "flatPath": "content/v2.1/{merchantId}/pos/{targetMerchantId}/store/{storeCode}", + "flatPath": "{merchantId}/pos/{targetMerchantId}/store/{storeCode}", "httpMethod": "GET", "id": "content.pos.get", "parameterOrder": [ @@ -3493,7 +3493,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/pos/{targetMerchantId}/store/{storeCode}", + "path": "{merchantId}/pos/{targetMerchantId}/store/{storeCode}", "response": { "$ref": "PosStore" }, @@ -3503,7 +3503,7 @@ }, "insert": { "description": "Creates a store for the given merchant.", - "flatPath": "content/v2.1/{merchantId}/pos/{targetMerchantId}/store", + "flatPath": "{merchantId}/pos/{targetMerchantId}/store", "httpMethod": "POST", "id": "content.pos.insert", "parameterOrder": [ @@ -3526,7 +3526,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/pos/{targetMerchantId}/store", + "path": "{merchantId}/pos/{targetMerchantId}/store", "request": { "$ref": "PosStore" }, @@ -3539,7 +3539,7 @@ }, "inventory": { "description": "Submit inventory for the given merchant.", - "flatPath": "content/v2.1/{merchantId}/pos/{targetMerchantId}/inventory", + "flatPath": "{merchantId}/pos/{targetMerchantId}/inventory", "httpMethod": "POST", "id": "content.pos.inventory", "parameterOrder": [ @@ -3562,7 +3562,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/pos/{targetMerchantId}/inventory", + "path": "{merchantId}/pos/{targetMerchantId}/inventory", "request": { "$ref": "PosInventoryRequest" }, @@ -3575,7 +3575,7 @@ }, "list": { "description": "Lists the stores of the target merchant.", - "flatPath": "content/v2.1/{merchantId}/pos/{targetMerchantId}/store", + "flatPath": "{merchantId}/pos/{targetMerchantId}/store", "httpMethod": "GET", "id": "content.pos.list", "parameterOrder": [ @@ -3598,7 +3598,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/pos/{targetMerchantId}/store", + "path": "{merchantId}/pos/{targetMerchantId}/store", "response": { "$ref": "PosListResponse" }, @@ -3608,7 +3608,7 @@ }, "sale": { "description": "Submit a sale event for the given merchant.", - "flatPath": "content/v2.1/{merchantId}/pos/{targetMerchantId}/sale", + "flatPath": "{merchantId}/pos/{targetMerchantId}/sale", "httpMethod": "POST", "id": "content.pos.sale", "parameterOrder": [ @@ -3631,7 +3631,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/pos/{targetMerchantId}/sale", + "path": "{merchantId}/pos/{targetMerchantId}/sale", "request": { "$ref": "PosSaleRequest" }, @@ -3648,12 +3648,12 @@ "methods": { "custombatch": { "description": "Retrieves, inserts, and deletes multiple products in a single request.", - "flatPath": "content/v2.1/products/batch", + "flatPath": "products/batch", "httpMethod": "POST", "id": "content.products.custombatch", "parameterOrder": [], "parameters": {}, - "path": "content/v2.1/products/batch", + "path": "products/batch", "request": { "$ref": "ProductsCustomBatchRequest" }, @@ -3666,7 +3666,7 @@ }, "delete": { "description": "Deletes a product from your Merchant Center account.", - "flatPath": "content/v2.1/{merchantId}/products/{productId}", + "flatPath": "{merchantId}/products/{productId}", "httpMethod": "DELETE", "id": "content.products.delete", "parameterOrder": [ @@ -3694,14 +3694,14 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/products/{productId}", + "path": "{merchantId}/products/{productId}", "scopes": [ "https://www.googleapis.com/auth/content" ] }, "get": { "description": "Retrieves a product from your Merchant Center account.", - "flatPath": "content/v2.1/{merchantId}/products/{productId}", + "flatPath": "{merchantId}/products/{productId}", "httpMethod": "GET", "id": "content.products.get", "parameterOrder": [ @@ -3723,7 +3723,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/products/{productId}", + "path": "{merchantId}/products/{productId}", "response": { "$ref": "Product" }, @@ -3733,7 +3733,7 @@ }, "insert": { "description": "Uploads a product to your Merchant Center account. If an item with the same channel, contentLanguage, offerId, and targetCountry already exists, this method updates that entry.", - "flatPath": "content/v2.1/{merchantId}/products", + "flatPath": "{merchantId}/products", "httpMethod": "POST", "id": "content.products.insert", "parameterOrder": [ @@ -3754,7 +3754,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/products", + "path": "{merchantId}/products", "request": { "$ref": "Product" }, @@ -3767,7 +3767,7 @@ }, "list": { "description": "Lists the products in your Merchant Center account. The response might contain fewer items than specified by maxResults. Rely on nextPageToken to determine if there are more items to be requested.", - "flatPath": "content/v2.1/{merchantId}/products", + "flatPath": "{merchantId}/products", "httpMethod": "GET", "id": "content.products.list", "parameterOrder": [ @@ -3793,7 +3793,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/products", + "path": "{merchantId}/products", "response": { "$ref": "ProductsListResponse" }, @@ -3807,12 +3807,12 @@ "methods": { "custombatch": { "description": "Gets the statuses of multiple products in a single request.", - "flatPath": "content/v2.1/productstatuses/batch", + "flatPath": "productstatuses/batch", "httpMethod": "POST", "id": "content.productstatuses.custombatch", "parameterOrder": [], "parameters": {}, - "path": "content/v2.1/productstatuses/batch", + "path": "productstatuses/batch", "request": { "$ref": "ProductstatusesCustomBatchRequest" }, @@ -3825,7 +3825,7 @@ }, "get": { "description": "Gets the status of a product from your Merchant Center account.", - "flatPath": "content/v2.1/{merchantId}/productstatuses/{productId}", + "flatPath": "{merchantId}/productstatuses/{productId}", "httpMethod": "GET", "id": "content.productstatuses.get", "parameterOrder": [ @@ -3853,7 +3853,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/productstatuses/{productId}", + "path": "{merchantId}/productstatuses/{productId}", "response": { "$ref": "ProductStatus" }, @@ -3863,7 +3863,7 @@ }, "list": { "description": "Lists the statuses of the products in your Merchant Center account.", - "flatPath": "content/v2.1/{merchantId}/productstatuses", + "flatPath": "{merchantId}/productstatuses", "httpMethod": "GET", "id": "content.productstatuses.list", "parameterOrder": [ @@ -3895,7 +3895,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/productstatuses", + "path": "{merchantId}/productstatuses", "response": { "$ref": "ProductstatusesListResponse" }, @@ -3909,7 +3909,7 @@ "methods": { "list": { "description": "Lists the metrics report for a given Repricing product.", - "flatPath": "content/v2.1/{merchantId}/productstatuses/{productId}/repricingreports", + "flatPath": "{merchantId}/productstatuses/{productId}/repricingreports", "httpMethod": "GET", "id": "content.productstatuses.repricingreports.list", "parameterOrder": [ @@ -3957,7 +3957,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/productstatuses/{productId}/repricingreports", + "path": "{merchantId}/productstatuses/{productId}/repricingreports", "response": { "$ref": "ListRepricingProductReportsResponse" }, @@ -3973,7 +3973,7 @@ "methods": { "get": { "description": "Retrieves a Merchant Center account's pubsub notification settings.", - "flatPath": "content/v2.1/{merchantId}/pubsubnotificationsettings", + "flatPath": "{merchantId}/pubsubnotificationsettings", "httpMethod": "GET", "id": "content.pubsubnotificationsettings.get", "parameterOrder": [ @@ -3988,7 +3988,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/pubsubnotificationsettings", + "path": "{merchantId}/pubsubnotificationsettings", "response": { "$ref": "PubsubNotificationSettings" }, @@ -3998,7 +3998,7 @@ }, "update": { "description": "Register a Merchant Center account for pubsub notifications. Note that cloud topic name should not be provided as part of the request.", - "flatPath": "content/v2.1/{merchantId}/pubsubnotificationsettings", + "flatPath": "{merchantId}/pubsubnotificationsettings", "httpMethod": "PUT", "id": "content.pubsubnotificationsettings.update", "parameterOrder": [ @@ -4013,7 +4013,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/pubsubnotificationsettings", + "path": "{merchantId}/pubsubnotificationsettings", "request": { "$ref": "PubsubNotificationSettings" }, @@ -4030,12 +4030,12 @@ "methods": { "custombatch": { "description": "Updates regional inventory for multiple products or regions in a single request.", - "flatPath": "content/v2.1/regionalinventory/batch", + "flatPath": "regionalinventory/batch", "httpMethod": "POST", "id": "content.regionalinventory.custombatch", "parameterOrder": [], "parameters": {}, - "path": "content/v2.1/regionalinventory/batch", + "path": "regionalinventory/batch", "request": { "$ref": "RegionalinventoryCustomBatchRequest" }, @@ -4048,7 +4048,7 @@ }, "insert": { "description": "Update the regional inventory of a product in your Merchant Center account. If a regional inventory with the same region ID already exists, this method updates that entry.", - "flatPath": "content/v2.1/{merchantId}/products/{productId}/regionalinventory", + "flatPath": "{merchantId}/products/{productId}/regionalinventory", "httpMethod": "POST", "id": "content.regionalinventory.insert", "parameterOrder": [ @@ -4070,7 +4070,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/products/{productId}/regionalinventory", + "path": "{merchantId}/products/{productId}/regionalinventory", "request": { "$ref": "RegionalInventory" }, @@ -4087,7 +4087,7 @@ "methods": { "create": { "description": "Creates a region definition in your Merchant Center account.", - "flatPath": "content/v2.1/{merchantId}/regions", + "flatPath": "{merchantId}/regions", "httpMethod": "POST", "id": "content.regions.create", "parameterOrder": [ @@ -4107,7 +4107,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/regions", + "path": "{merchantId}/regions", "request": { "$ref": "Region" }, @@ -4120,7 +4120,7 @@ }, "delete": { "description": "Deletes a region definition from your Merchant Center account.", - "flatPath": "content/v2.1/{merchantId}/regions/{regionId}", + "flatPath": "{merchantId}/regions/{regionId}", "httpMethod": "DELETE", "id": "content.regions.delete", "parameterOrder": [ @@ -4142,14 +4142,14 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/regions/{regionId}", + "path": "{merchantId}/regions/{regionId}", "scopes": [ "https://www.googleapis.com/auth/content" ] }, "get": { "description": "Retrieves a region defined in your Merchant Center account.", - "flatPath": "content/v2.1/{merchantId}/regions/{regionId}", + "flatPath": "{merchantId}/regions/{regionId}", "httpMethod": "GET", "id": "content.regions.get", "parameterOrder": [ @@ -4171,7 +4171,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/regions/{regionId}", + "path": "{merchantId}/regions/{regionId}", "response": { "$ref": "Region" }, @@ -4181,7 +4181,7 @@ }, "list": { "description": "Lists the regions in your Merchant Center account.", - "flatPath": "content/v2.1/{merchantId}/regions", + "flatPath": "{merchantId}/regions", "httpMethod": "GET", "id": "content.regions.list", "parameterOrder": [ @@ -4207,7 +4207,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/regions", + "path": "{merchantId}/regions", "response": { "$ref": "ListRegionsResponse" }, @@ -4217,7 +4217,7 @@ }, "patch": { "description": "Updates a region definition in your Merchant Center account.", - "flatPath": "content/v2.1/{merchantId}/regions/{regionId}", + "flatPath": "{merchantId}/regions/{regionId}", "httpMethod": "PATCH", "id": "content.regions.patch", "parameterOrder": [ @@ -4245,7 +4245,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/regions/{regionId}", + "path": "{merchantId}/regions/{regionId}", "request": { "$ref": "Region" }, @@ -4262,7 +4262,7 @@ "methods": { "search": { "description": "Retrieves merchant performance mertrics matching the search query and optionally segmented by selected dimensions.", - "flatPath": "content/v2.1/{merchantId}/reports/search", + "flatPath": "{merchantId}/reports/search", "httpMethod": "POST", "id": "content.reports.search", "parameterOrder": [ @@ -4277,7 +4277,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/reports/search", + "path": "{merchantId}/reports/search", "request": { "$ref": "SearchRequest" }, @@ -4294,7 +4294,7 @@ "methods": { "create": { "description": "Creates a repricing rule for your Merchant Center account.", - "flatPath": "content/v2.1/{merchantId}/repricingrules", + "flatPath": "{merchantId}/repricingrules", "httpMethod": "POST", "id": "content.repricingrules.create", "parameterOrder": [ @@ -4314,7 +4314,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/repricingrules", + "path": "{merchantId}/repricingrules", "request": { "$ref": "RepricingRule" }, @@ -4327,7 +4327,7 @@ }, "delete": { "description": "Deletes a repricing rule in your Merchant Center account.", - "flatPath": "content/v2.1/{merchantId}/repricingrules/{ruleId}", + "flatPath": "{merchantId}/repricingrules/{ruleId}", "httpMethod": "DELETE", "id": "content.repricingrules.delete", "parameterOrder": [ @@ -4349,14 +4349,14 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/repricingrules/{ruleId}", + "path": "{merchantId}/repricingrules/{ruleId}", "scopes": [ "https://www.googleapis.com/auth/content" ] }, "get": { "description": "Retrieves a repricing rule from your Merchant Center account.", - "flatPath": "content/v2.1/{merchantId}/repricingrules/{ruleId}", + "flatPath": "{merchantId}/repricingrules/{ruleId}", "httpMethod": "GET", "id": "content.repricingrules.get", "parameterOrder": [ @@ -4378,7 +4378,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/repricingrules/{ruleId}", + "path": "{merchantId}/repricingrules/{ruleId}", "response": { "$ref": "RepricingRule" }, @@ -4388,7 +4388,7 @@ }, "list": { "description": "Lists the repricing rules in your Merchant Center account.", - "flatPath": "content/v2.1/{merchantId}/repricingrules", + "flatPath": "{merchantId}/repricingrules", "httpMethod": "GET", "id": "content.repricingrules.list", "parameterOrder": [ @@ -4424,7 +4424,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/repricingrules", + "path": "{merchantId}/repricingrules", "response": { "$ref": "ListRepricingRulesResponse" }, @@ -4434,7 +4434,7 @@ }, "patch": { "description": "Updates a repricing rule in your Merchant Center account. All mutable fields will be overwritten in each update request. In each update, you must provide all required mutable fields, or an error will be thrown. If you do not provide an optional field in the update request, if that field currently exists, it will be deleted from the rule.", - "flatPath": "content/v2.1/{merchantId}/repricingrules/{ruleId}", + "flatPath": "{merchantId}/repricingrules/{ruleId}", "httpMethod": "PATCH", "id": "content.repricingrules.patch", "parameterOrder": [ @@ -4456,7 +4456,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/repricingrules/{ruleId}", + "path": "{merchantId}/repricingrules/{ruleId}", "request": { "$ref": "RepricingRule" }, @@ -4473,7 +4473,7 @@ "methods": { "list": { "description": "Lists the metrics report for a given Repricing rule.", - "flatPath": "content/v2.1/{merchantId}/repricingrules/{ruleId}/repricingreports", + "flatPath": "{merchantId}/repricingrules/{ruleId}/repricingreports", "httpMethod": "GET", "id": "content.repricingrules.repricingreports.list", "parameterOrder": [ @@ -4516,7 +4516,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/repricingrules/{ruleId}/repricingreports", + "path": "{merchantId}/repricingrules/{ruleId}/repricingreports", "response": { "$ref": "ListRepricingRuleReportsResponse" }, @@ -4532,12 +4532,12 @@ "methods": { "custombatch": { "description": "Batches multiple return address related calls in a single request.", - "flatPath": "content/v2.1/returnaddress/batch", + "flatPath": "returnaddress/batch", "httpMethod": "POST", "id": "content.returnaddress.custombatch", "parameterOrder": [], "parameters": {}, - "path": "content/v2.1/returnaddress/batch", + "path": "returnaddress/batch", "request": { "$ref": "ReturnaddressCustomBatchRequest" }, @@ -4550,7 +4550,7 @@ }, "delete": { "description": "Deletes a return address for the given Merchant Center account.", - "flatPath": "content/v2.1/{merchantId}/returnaddress/{returnAddressId}", + "flatPath": "{merchantId}/returnaddress/{returnAddressId}", "httpMethod": "DELETE", "id": "content.returnaddress.delete", "parameterOrder": [ @@ -4572,14 +4572,14 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/returnaddress/{returnAddressId}", + "path": "{merchantId}/returnaddress/{returnAddressId}", "scopes": [ "https://www.googleapis.com/auth/content" ] }, "get": { "description": "Gets a return address of the Merchant Center account.", - "flatPath": "content/v2.1/{merchantId}/returnaddress/{returnAddressId}", + "flatPath": "{merchantId}/returnaddress/{returnAddressId}", "httpMethod": "GET", "id": "content.returnaddress.get", "parameterOrder": [ @@ -4601,7 +4601,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/returnaddress/{returnAddressId}", + "path": "{merchantId}/returnaddress/{returnAddressId}", "response": { "$ref": "ReturnAddress" }, @@ -4611,7 +4611,7 @@ }, "insert": { "description": "Inserts a return address for the Merchant Center account.", - "flatPath": "content/v2.1/{merchantId}/returnaddress", + "flatPath": "{merchantId}/returnaddress", "httpMethod": "POST", "id": "content.returnaddress.insert", "parameterOrder": [ @@ -4626,7 +4626,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/returnaddress", + "path": "{merchantId}/returnaddress", "request": { "$ref": "ReturnAddress" }, @@ -4639,7 +4639,7 @@ }, "list": { "description": "Lists the return addresses of the Merchant Center account.", - "flatPath": "content/v2.1/{merchantId}/returnaddress", + "flatPath": "{merchantId}/returnaddress", "httpMethod": "GET", "id": "content.returnaddress.list", "parameterOrder": [ @@ -4670,7 +4670,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/returnaddress", + "path": "{merchantId}/returnaddress", "response": { "$ref": "ReturnaddressListResponse" }, @@ -4684,12 +4684,12 @@ "methods": { "custombatch": { "description": "Batches multiple return policy related calls in a single request.", - "flatPath": "content/v2.1/returnpolicy/batch", + "flatPath": "returnpolicy/batch", "httpMethod": "POST", "id": "content.returnpolicy.custombatch", "parameterOrder": [], "parameters": {}, - "path": "content/v2.1/returnpolicy/batch", + "path": "returnpolicy/batch", "request": { "$ref": "ReturnpolicyCustomBatchRequest" }, @@ -4702,7 +4702,7 @@ }, "delete": { "description": "Deletes a return policy for the given Merchant Center account.", - "flatPath": "content/v2.1/{merchantId}/returnpolicy/{returnPolicyId}", + "flatPath": "{merchantId}/returnpolicy/{returnPolicyId}", "httpMethod": "DELETE", "id": "content.returnpolicy.delete", "parameterOrder": [ @@ -4724,14 +4724,14 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/returnpolicy/{returnPolicyId}", + "path": "{merchantId}/returnpolicy/{returnPolicyId}", "scopes": [ "https://www.googleapis.com/auth/content" ] }, "get": { "description": "Gets a return policy of the Merchant Center account.", - "flatPath": "content/v2.1/{merchantId}/returnpolicy/{returnPolicyId}", + "flatPath": "{merchantId}/returnpolicy/{returnPolicyId}", "httpMethod": "GET", "id": "content.returnpolicy.get", "parameterOrder": [ @@ -4753,7 +4753,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/returnpolicy/{returnPolicyId}", + "path": "{merchantId}/returnpolicy/{returnPolicyId}", "response": { "$ref": "ReturnPolicy" }, @@ -4763,7 +4763,7 @@ }, "insert": { "description": "Inserts a return policy for the Merchant Center account.", - "flatPath": "content/v2.1/{merchantId}/returnpolicy", + "flatPath": "{merchantId}/returnpolicy", "httpMethod": "POST", "id": "content.returnpolicy.insert", "parameterOrder": [ @@ -4778,7 +4778,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/returnpolicy", + "path": "{merchantId}/returnpolicy", "request": { "$ref": "ReturnPolicy" }, @@ -4791,7 +4791,7 @@ }, "list": { "description": "Lists the return policies of the Merchant Center account.", - "flatPath": "content/v2.1/{merchantId}/returnpolicy", + "flatPath": "{merchantId}/returnpolicy", "httpMethod": "GET", "id": "content.returnpolicy.list", "parameterOrder": [ @@ -4806,7 +4806,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/returnpolicy", + "path": "{merchantId}/returnpolicy", "response": { "$ref": "ReturnpolicyListResponse" }, @@ -4820,7 +4820,7 @@ "methods": { "create": { "description": "Creates a new return policy.", - "flatPath": "content/v2.1/{merchantId}/returnpolicyonline", + "flatPath": "{merchantId}/returnpolicyonline", "httpMethod": "POST", "id": "content.returnpolicyonline.create", "parameterOrder": [ @@ -4835,7 +4835,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/returnpolicyonline", + "path": "{merchantId}/returnpolicyonline", "request": { "$ref": "ReturnPolicyOnline" }, @@ -4848,7 +4848,7 @@ }, "delete": { "description": "Deletes an existing return policy.", - "flatPath": "content/v2.1/{merchantId}/returnpolicyonline/{returnPolicyId}", + "flatPath": "{merchantId}/returnpolicyonline/{returnPolicyId}", "httpMethod": "DELETE", "id": "content.returnpolicyonline.delete", "parameterOrder": [ @@ -4870,14 +4870,14 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/returnpolicyonline/{returnPolicyId}", + "path": "{merchantId}/returnpolicyonline/{returnPolicyId}", "scopes": [ "https://www.googleapis.com/auth/content" ] }, "get": { "description": "Gets an existing return policy.", - "flatPath": "content/v2.1/{merchantId}/returnpolicyonline/{returnPolicyId}", + "flatPath": "{merchantId}/returnpolicyonline/{returnPolicyId}", "httpMethod": "GET", "id": "content.returnpolicyonline.get", "parameterOrder": [ @@ -4899,7 +4899,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/returnpolicyonline/{returnPolicyId}", + "path": "{merchantId}/returnpolicyonline/{returnPolicyId}", "response": { "$ref": "ReturnPolicyOnline" }, @@ -4909,7 +4909,7 @@ }, "list": { "description": "Lists all existing return policies.", - "flatPath": "content/v2.1/{merchantId}/returnpolicyonline", + "flatPath": "{merchantId}/returnpolicyonline", "httpMethod": "GET", "id": "content.returnpolicyonline.list", "parameterOrder": [ @@ -4924,7 +4924,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/returnpolicyonline", + "path": "{merchantId}/returnpolicyonline", "response": { "$ref": "ListReturnPolicyOnlineResponse" }, @@ -4934,7 +4934,7 @@ }, "patch": { "description": "Updates an existing return policy.", - "flatPath": "content/v2.1/{merchantId}/returnpolicyonline/{returnPolicyId}", + "flatPath": "{merchantId}/returnpolicyonline/{returnPolicyId}", "httpMethod": "PATCH", "id": "content.returnpolicyonline.patch", "parameterOrder": [ @@ -4956,7 +4956,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/returnpolicyonline/{returnPolicyId}", + "path": "{merchantId}/returnpolicyonline/{returnPolicyId}", "request": { "$ref": "ReturnPolicyOnline" }, @@ -4973,7 +4973,7 @@ "methods": { "get": { "description": "Retrieves a settlement report from your Merchant Center account.", - "flatPath": "content/v2.1/{merchantId}/settlementreports/{settlementId}", + "flatPath": "{merchantId}/settlementreports/{settlementId}", "httpMethod": "GET", "id": "content.settlementreports.get", "parameterOrder": [ @@ -4995,7 +4995,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/settlementreports/{settlementId}", + "path": "{merchantId}/settlementreports/{settlementId}", "response": { "$ref": "SettlementReport" }, @@ -5005,7 +5005,7 @@ }, "list": { "description": "Retrieves a list of settlement reports from your Merchant Center account.", - "flatPath": "content/v2.1/{merchantId}/settlementreports", + "flatPath": "{merchantId}/settlementreports", "httpMethod": "GET", "id": "content.settlementreports.list", "parameterOrder": [ @@ -5041,7 +5041,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/settlementreports", + "path": "{merchantId}/settlementreports", "response": { "$ref": "SettlementreportsListResponse" }, @@ -5055,7 +5055,7 @@ "methods": { "list": { "description": "Retrieves a list of transactions for the settlement.", - "flatPath": "content/v2.1/{merchantId}/settlementreports/{settlementId}/transactions", + "flatPath": "{merchantId}/settlementreports/{settlementId}/transactions", "httpMethod": "GET", "id": "content.settlementtransactions.list", "parameterOrder": [ @@ -5094,7 +5094,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/settlementreports/{settlementId}/transactions", + "path": "{merchantId}/settlementreports/{settlementId}/transactions", "response": { "$ref": "SettlementtransactionsListResponse" }, @@ -5108,12 +5108,12 @@ "methods": { "custombatch": { "description": "Retrieves and updates the shipping settings of multiple accounts in a single request.", - "flatPath": "content/v2.1/shippingsettings/batch", + "flatPath": "shippingsettings/batch", "httpMethod": "POST", "id": "content.shippingsettings.custombatch", "parameterOrder": [], "parameters": {}, - "path": "content/v2.1/shippingsettings/batch", + "path": "shippingsettings/batch", "request": { "$ref": "ShippingsettingsCustomBatchRequest" }, @@ -5126,7 +5126,7 @@ }, "get": { "description": "Retrieves the shipping settings of the account.", - "flatPath": "content/v2.1/{merchantId}/shippingsettings/{accountId}", + "flatPath": "{merchantId}/shippingsettings/{accountId}", "httpMethod": "GET", "id": "content.shippingsettings.get", "parameterOrder": [ @@ -5149,7 +5149,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/shippingsettings/{accountId}", + "path": "{merchantId}/shippingsettings/{accountId}", "response": { "$ref": "ShippingSettings" }, @@ -5159,7 +5159,7 @@ }, "getsupportedcarriers": { "description": "Retrieves supported carriers and carrier services for an account.", - "flatPath": "content/v2.1/{merchantId}/supportedCarriers", + "flatPath": "{merchantId}/supportedCarriers", "httpMethod": "GET", "id": "content.shippingsettings.getsupportedcarriers", "parameterOrder": [ @@ -5174,7 +5174,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/supportedCarriers", + "path": "{merchantId}/supportedCarriers", "response": { "$ref": "ShippingsettingsGetSupportedCarriersResponse" }, @@ -5184,7 +5184,7 @@ }, "getsupportedholidays": { "description": "Retrieves supported holidays for an account.", - "flatPath": "content/v2.1/{merchantId}/supportedHolidays", + "flatPath": "{merchantId}/supportedHolidays", "httpMethod": "GET", "id": "content.shippingsettings.getsupportedholidays", "parameterOrder": [ @@ -5199,7 +5199,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/supportedHolidays", + "path": "{merchantId}/supportedHolidays", "response": { "$ref": "ShippingsettingsGetSupportedHolidaysResponse" }, @@ -5209,7 +5209,7 @@ }, "getsupportedpickupservices": { "description": "Retrieves supported pickup services for an account.", - "flatPath": "content/v2.1/{merchantId}/supportedPickupServices", + "flatPath": "{merchantId}/supportedPickupServices", "httpMethod": "GET", "id": "content.shippingsettings.getsupportedpickupservices", "parameterOrder": [ @@ -5224,7 +5224,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/supportedPickupServices", + "path": "{merchantId}/supportedPickupServices", "response": { "$ref": "ShippingsettingsGetSupportedPickupServicesResponse" }, @@ -5234,7 +5234,7 @@ }, "list": { "description": "Lists the shipping settings of the sub-accounts in your Merchant Center account.", - "flatPath": "content/v2.1/{merchantId}/shippingsettings", + "flatPath": "{merchantId}/shippingsettings", "httpMethod": "GET", "id": "content.shippingsettings.list", "parameterOrder": [ @@ -5260,7 +5260,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/shippingsettings", + "path": "{merchantId}/shippingsettings", "response": { "$ref": "ShippingsettingsListResponse" }, @@ -5270,7 +5270,7 @@ }, "update": { "description": "Updates the shipping settings of the account. Any fields that are not provided are deleted from the resource.", - "flatPath": "content/v2.1/{merchantId}/shippingsettings/{accountId}", + "flatPath": "{merchantId}/shippingsettings/{accountId}", "httpMethod": "PUT", "id": "content.shippingsettings.update", "parameterOrder": [ @@ -5293,7 +5293,7 @@ "type": "string" } }, - "path": "content/v2.1/{merchantId}/shippingsettings/{accountId}", + "path": "{merchantId}/shippingsettings/{accountId}", "request": { "$ref": "ShippingSettings" }, @@ -5307,7 +5307,7 @@ } } }, - "revision": "20210303", + "revision": "20210318", "rootUrl": "https://shoppingcontent.googleapis.com/", "schemas": { "Account": { @@ -13564,7 +13564,7 @@ "$ref": "SettlementTransactionAmountCommission" }, "description": { - "description": "The description of the event. Acceptable values are: - \"`taxWithhold`\" - \"`principal`\" - \"`principalAdjustment`\" - \"`shippingFee`\" - \"`merchantRemittedSalesTax`\" - \"`googleRemittedSalesTax`\" - \"`merchantCoupon`\" - \"`merchantCouponTax`\" - \"`merchantRemittedDisposalTax`\" - \"`googleRemittedDisposalTax`\" - \"`merchantRemittedRedemptionFee`\" - \"`googleRemittedRedemptionFee`\" - \"`eeeEcoFee`\" - \"`furnitureEcoFee`\" - \"`copyPrivateFee`\" - \"`eeeEcoFeeCommission`\" - \"`furnitureEcoFeeCommission`\" - \"`copyPrivateFeeCommission`\" - \"`principalRefund`\" - \"`principalRefundTax`\" - \"`itemCommission`\" - \"`adjustmentCommission`\" - \"`shippingFeeCommission`\" - \"`commissionRefund`\" - \"`damaged`\" - \"`damagedOrDefectiveItem`\" - \"`expiredItem`\" - \"`faultyItem`\" - \"`incorrectItemReceived`\" - \"`itemMissing`\" - \"`qualityNotExpected`\" - \"`receivedTooLate`\" - \"`storePackageMissing`\" - \"`transitPackageMissing`\" - \"`unsuccessfulDeliveryUndeliverable`\" - \"`wrongChargeInStore`\" - \"`wrongItem`\" - \"`returns`\" - \"`undeliverable`\" - \"`refundFromMerchant`\" - \"`returnLabelShippingFee`\" - \"`pspFee`\" ", + "description": "The description of the event. Acceptable values are: - \"`taxWithhold`\" - \"`principal`\" - \"`principalAdjustment`\" - \"`shippingFee`\" - \"`merchantRemittedSalesTax`\" - \"`googleRemittedSalesTax`\" - \"`merchantCoupon`\" - \"`merchantCouponTax`\" - \"`merchantRemittedDisposalTax`\" - \"`googleRemittedDisposalTax`\" - \"`merchantRemittedRedemptionFee`\" - \"`googleRemittedRedemptionFee`\" - \"`eeeEcoFee`\" - \"`furnitureEcoFee`\" - \"`copyPrivateFee`\" - \"`eeeEcoFeeCommission`\" - \"`furnitureEcoFeeCommission`\" - \"`copyPrivateFeeCommission`\" - \"`principalRefund`\" - \"`principalRefundTax`\" - \"`itemCommission`\" - \"`adjustmentCommission`\" - \"`shippingFeeCommission`\" - \"`commissionRefund`\" - \"`damaged`\" - \"`damagedOrDefectiveItem`\" - \"`expiredItem`\" - \"`faultyItem`\" - \"`incorrectItemReceived`\" - \"`itemMissing`\" - \"`qualityNotExpected`\" - \"`receivedTooLate`\" - \"`storePackageMissing`\" - \"`transitPackageMissing`\" - \"`unsuccessfulDeliveryUndeliverable`\" - \"`wrongChargeInStore`\" - \"`wrongItem`\" - \"`returns`\" - \"`undeliverable`\" - \"`issueRelatedRefundAndReplacementAmountDescription`\" - \"`refundFromMerchant`\" - \"`returnLabelShippingFee`\" - \"`lumpSumCorrection`\" - \"`pspFee`\" ", "type": "string" }, "transactionAmount": { @@ -13572,7 +13572,7 @@ "description": "The amount that contributes to the line item price." }, "type": { - "description": "The type of the amount. Acceptable values are: - \"`itemPrice`\" - \"`orderPrice`\" - \"`refund`\" - \"`earlyRefund`\" - \"`courtesyRefund`\" - \"`returnRefund`\" - \"`returnLabelShippingFeeAmount`\" ", + "description": "The type of the amount. Acceptable values are: - \"`itemPrice`\" - \"`orderPrice`\" - \"`refund`\" - \"`earlyRefund`\" - \"`courtesyRefund`\" - \"`returnRefund`\" - \"`returnLabelShippingFeeAmount`\" - \"`lumpSumCorrectionAmount`\" ", "type": "string" } }, @@ -14364,7 +14364,7 @@ "type": "object" } }, - "servicePath": "", + "servicePath": "content/v2.1/", "title": "Content API for Shopping", "version": "v2.1" } \ No newline at end of file diff --git a/discovery/content-v2.json b/discovery/content-v2.json index afe7bb1cc67..97a6d5117ad 100644 --- a/discovery/content-v2.json +++ b/discovery/content-v2.json @@ -8,8 +8,8 @@ } } }, - "basePath": "", - "baseUrl": "https://shoppingcontent.googleapis.com/", + "basePath": "/content/v2/", + "baseUrl": "https://shoppingcontent.googleapis.com/content/v2/", "batchPath": "batch", "canonicalName": "Shopping Content", "description": "Manage your product listings and accounts for Google Shopping", @@ -109,12 +109,12 @@ "methods": { "authinfo": { "description": "Returns information about the authenticated user.", - "flatPath": "content/v2/accounts/authinfo", + "flatPath": "accounts/authinfo", "httpMethod": "GET", "id": "content.accounts.authinfo", "parameterOrder": [], "parameters": {}, - "path": "content/v2/accounts/authinfo", + "path": "accounts/authinfo", "response": { "$ref": "AccountsAuthInfoResponse" }, @@ -124,7 +124,7 @@ }, "claimwebsite": { "description": "Claims the website of a Merchant Center sub-account.", - "flatPath": "content/v2/{merchantId}/accounts/{accountId}/claimwebsite", + "flatPath": "{merchantId}/accounts/{accountId}/claimwebsite", "httpMethod": "POST", "id": "content.accounts.claimwebsite", "parameterOrder": [ @@ -152,7 +152,7 @@ "type": "boolean" } }, - "path": "content/v2/{merchantId}/accounts/{accountId}/claimwebsite", + "path": "{merchantId}/accounts/{accountId}/claimwebsite", "response": { "$ref": "AccountsClaimWebsiteResponse" }, @@ -162,7 +162,7 @@ }, "custombatch": { "description": "Retrieves, inserts, updates, and deletes multiple Merchant Center (sub-)accounts in a single request.", - "flatPath": "content/v2/accounts/batch", + "flatPath": "accounts/batch", "httpMethod": "POST", "id": "content.accounts.custombatch", "parameterOrder": [], @@ -173,7 +173,7 @@ "type": "boolean" } }, - "path": "content/v2/accounts/batch", + "path": "accounts/batch", "request": { "$ref": "AccountsCustomBatchRequest" }, @@ -186,7 +186,7 @@ }, "delete": { "description": "Deletes a Merchant Center sub-account.", - "flatPath": "content/v2/{merchantId}/accounts/{accountId}", + "flatPath": "{merchantId}/accounts/{accountId}", "httpMethod": "DELETE", "id": "content.accounts.delete", "parameterOrder": [ @@ -220,14 +220,14 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/accounts/{accountId}", + "path": "{merchantId}/accounts/{accountId}", "scopes": [ "https://www.googleapis.com/auth/content" ] }, "get": { "description": "Retrieves a Merchant Center account.", - "flatPath": "content/v2/{merchantId}/accounts/{accountId}", + "flatPath": "{merchantId}/accounts/{accountId}", "httpMethod": "GET", "id": "content.accounts.get", "parameterOrder": [ @@ -250,7 +250,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/accounts/{accountId}", + "path": "{merchantId}/accounts/{accountId}", "response": { "$ref": "Account" }, @@ -260,7 +260,7 @@ }, "insert": { "description": "Creates a Merchant Center sub-account.", - "flatPath": "content/v2/{merchantId}/accounts", + "flatPath": "{merchantId}/accounts", "httpMethod": "POST", "id": "content.accounts.insert", "parameterOrder": [ @@ -280,7 +280,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/accounts", + "path": "{merchantId}/accounts", "request": { "$ref": "Account" }, @@ -293,7 +293,7 @@ }, "link": { "description": "Performs an action on a link between two Merchant Center accounts, namely accountId and linkedAccountId.", - "flatPath": "content/v2/{merchantId}/accounts/{accountId}/link", + "flatPath": "{merchantId}/accounts/{accountId}/link", "httpMethod": "POST", "id": "content.accounts.link", "parameterOrder": [ @@ -316,7 +316,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/accounts/{accountId}/link", + "path": "{merchantId}/accounts/{accountId}/link", "request": { "$ref": "AccountsLinkRequest" }, @@ -329,7 +329,7 @@ }, "list": { "description": "Lists the sub-accounts in your Merchant Center account.", - "flatPath": "content/v2/{merchantId}/accounts", + "flatPath": "{merchantId}/accounts", "httpMethod": "GET", "id": "content.accounts.list", "parameterOrder": [ @@ -355,7 +355,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/accounts", + "path": "{merchantId}/accounts", "response": { "$ref": "AccountsListResponse" }, @@ -365,7 +365,7 @@ }, "update": { "description": "Updates a Merchant Center account. Any fields that are not provided are deleted from the resource.", - "flatPath": "content/v2/{merchantId}/accounts/{accountId}", + "flatPath": "{merchantId}/accounts/{accountId}", "httpMethod": "PUT", "id": "content.accounts.update", "parameterOrder": [ @@ -393,7 +393,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/accounts/{accountId}", + "path": "{merchantId}/accounts/{accountId}", "request": { "$ref": "Account" }, @@ -410,12 +410,12 @@ "methods": { "custombatch": { "description": "Retrieves multiple Merchant Center account statuses in a single request.", - "flatPath": "content/v2/accountstatuses/batch", + "flatPath": "accountstatuses/batch", "httpMethod": "POST", "id": "content.accountstatuses.custombatch", "parameterOrder": [], "parameters": {}, - "path": "content/v2/accountstatuses/batch", + "path": "accountstatuses/batch", "request": { "$ref": "AccountstatusesCustomBatchRequest" }, @@ -428,7 +428,7 @@ }, "get": { "description": "Retrieves the status of a Merchant Center account. No itemLevelIssues are returned for multi-client accounts.", - "flatPath": "content/v2/{merchantId}/accountstatuses/{accountId}", + "flatPath": "{merchantId}/accountstatuses/{accountId}", "httpMethod": "GET", "id": "content.accountstatuses.get", "parameterOrder": [ @@ -457,7 +457,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/accountstatuses/{accountId}", + "path": "{merchantId}/accountstatuses/{accountId}", "response": { "$ref": "AccountStatus" }, @@ -467,7 +467,7 @@ }, "list": { "description": "Lists the statuses of the sub-accounts in your Merchant Center account.", - "flatPath": "content/v2/{merchantId}/accountstatuses", + "flatPath": "{merchantId}/accountstatuses", "httpMethod": "GET", "id": "content.accountstatuses.list", "parameterOrder": [ @@ -499,7 +499,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/accountstatuses", + "path": "{merchantId}/accountstatuses", "response": { "$ref": "AccountstatusesListResponse" }, @@ -513,7 +513,7 @@ "methods": { "custombatch": { "description": "Retrieves and updates tax settings of multiple accounts in a single request.", - "flatPath": "content/v2/accounttax/batch", + "flatPath": "accounttax/batch", "httpMethod": "POST", "id": "content.accounttax.custombatch", "parameterOrder": [], @@ -524,7 +524,7 @@ "type": "boolean" } }, - "path": "content/v2/accounttax/batch", + "path": "accounttax/batch", "request": { "$ref": "AccounttaxCustomBatchRequest" }, @@ -537,7 +537,7 @@ }, "get": { "description": "Retrieves the tax settings of the account.", - "flatPath": "content/v2/{merchantId}/accounttax/{accountId}", + "flatPath": "{merchantId}/accounttax/{accountId}", "httpMethod": "GET", "id": "content.accounttax.get", "parameterOrder": [ @@ -560,7 +560,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/accounttax/{accountId}", + "path": "{merchantId}/accounttax/{accountId}", "response": { "$ref": "AccountTax" }, @@ -570,7 +570,7 @@ }, "list": { "description": "Lists the tax settings of the sub-accounts in your Merchant Center account.", - "flatPath": "content/v2/{merchantId}/accounttax", + "flatPath": "{merchantId}/accounttax", "httpMethod": "GET", "id": "content.accounttax.list", "parameterOrder": [ @@ -596,7 +596,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/accounttax", + "path": "{merchantId}/accounttax", "response": { "$ref": "AccounttaxListResponse" }, @@ -606,7 +606,7 @@ }, "update": { "description": "Updates the tax settings of the account. Any fields that are not provided are deleted from the resource.", - "flatPath": "content/v2/{merchantId}/accounttax/{accountId}", + "flatPath": "{merchantId}/accounttax/{accountId}", "httpMethod": "PUT", "id": "content.accounttax.update", "parameterOrder": [ @@ -634,7 +634,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/accounttax/{accountId}", + "path": "{merchantId}/accounttax/{accountId}", "request": { "$ref": "AccountTax" }, @@ -651,7 +651,7 @@ "methods": { "custombatch": { "description": "Deletes, fetches, gets, inserts and updates multiple datafeeds in a single request.", - "flatPath": "content/v2/datafeeds/batch", + "flatPath": "datafeeds/batch", "httpMethod": "POST", "id": "content.datafeeds.custombatch", "parameterOrder": [], @@ -662,7 +662,7 @@ "type": "boolean" } }, - "path": "content/v2/datafeeds/batch", + "path": "datafeeds/batch", "request": { "$ref": "DatafeedsCustomBatchRequest" }, @@ -675,7 +675,7 @@ }, "delete": { "description": "Deletes a datafeed configuration from your Merchant Center account.", - "flatPath": "content/v2/{merchantId}/datafeeds/{datafeedId}", + "flatPath": "{merchantId}/datafeeds/{datafeedId}", "httpMethod": "DELETE", "id": "content.datafeeds.delete", "parameterOrder": [ @@ -703,14 +703,14 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/datafeeds/{datafeedId}", + "path": "{merchantId}/datafeeds/{datafeedId}", "scopes": [ "https://www.googleapis.com/auth/content" ] }, "fetchnow": { "description": "Invokes a fetch for the datafeed in your Merchant Center account. If you need to call this method more than once per day, we recommend you use the Products service to update your product data.", - "flatPath": "content/v2/{merchantId}/datafeeds/{datafeedId}/fetchNow", + "flatPath": "{merchantId}/datafeeds/{datafeedId}/fetchNow", "httpMethod": "POST", "id": "content.datafeeds.fetchnow", "parameterOrder": [ @@ -738,7 +738,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/datafeeds/{datafeedId}/fetchNow", + "path": "{merchantId}/datafeeds/{datafeedId}/fetchNow", "response": { "$ref": "DatafeedsFetchNowResponse" }, @@ -748,7 +748,7 @@ }, "get": { "description": "Retrieves a datafeed configuration from your Merchant Center account.", - "flatPath": "content/v2/{merchantId}/datafeeds/{datafeedId}", + "flatPath": "{merchantId}/datafeeds/{datafeedId}", "httpMethod": "GET", "id": "content.datafeeds.get", "parameterOrder": [ @@ -771,7 +771,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/datafeeds/{datafeedId}", + "path": "{merchantId}/datafeeds/{datafeedId}", "response": { "$ref": "Datafeed" }, @@ -781,7 +781,7 @@ }, "insert": { "description": "Registers a datafeed configuration with your Merchant Center account.", - "flatPath": "content/v2/{merchantId}/datafeeds", + "flatPath": "{merchantId}/datafeeds", "httpMethod": "POST", "id": "content.datafeeds.insert", "parameterOrder": [ @@ -801,7 +801,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/datafeeds", + "path": "{merchantId}/datafeeds", "request": { "$ref": "Datafeed" }, @@ -814,7 +814,7 @@ }, "list": { "description": "Lists the configurations for datafeeds in your Merchant Center account.", - "flatPath": "content/v2/{merchantId}/datafeeds", + "flatPath": "{merchantId}/datafeeds", "httpMethod": "GET", "id": "content.datafeeds.list", "parameterOrder": [ @@ -840,7 +840,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/datafeeds", + "path": "{merchantId}/datafeeds", "response": { "$ref": "DatafeedsListResponse" }, @@ -850,7 +850,7 @@ }, "update": { "description": "Updates a datafeed configuration of your Merchant Center account. Any fields that are not provided are deleted from the resource.", - "flatPath": "content/v2/{merchantId}/datafeeds/{datafeedId}", + "flatPath": "{merchantId}/datafeeds/{datafeedId}", "httpMethod": "PUT", "id": "content.datafeeds.update", "parameterOrder": [ @@ -878,7 +878,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/datafeeds/{datafeedId}", + "path": "{merchantId}/datafeeds/{datafeedId}", "request": { "$ref": "Datafeed" }, @@ -895,12 +895,12 @@ "methods": { "custombatch": { "description": "Gets multiple Merchant Center datafeed statuses in a single request.", - "flatPath": "content/v2/datafeedstatuses/batch", + "flatPath": "datafeedstatuses/batch", "httpMethod": "POST", "id": "content.datafeedstatuses.custombatch", "parameterOrder": [], "parameters": {}, - "path": "content/v2/datafeedstatuses/batch", + "path": "datafeedstatuses/batch", "request": { "$ref": "DatafeedstatusesCustomBatchRequest" }, @@ -913,7 +913,7 @@ }, "get": { "description": "Retrieves the status of a datafeed from your Merchant Center account.", - "flatPath": "content/v2/{merchantId}/datafeedstatuses/{datafeedId}", + "flatPath": "{merchantId}/datafeedstatuses/{datafeedId}", "httpMethod": "GET", "id": "content.datafeedstatuses.get", "parameterOrder": [ @@ -946,7 +946,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/datafeedstatuses/{datafeedId}", + "path": "{merchantId}/datafeedstatuses/{datafeedId}", "response": { "$ref": "DatafeedStatus" }, @@ -956,7 +956,7 @@ }, "list": { "description": "Lists the statuses of the datafeeds in your Merchant Center account.", - "flatPath": "content/v2/{merchantId}/datafeedstatuses", + "flatPath": "{merchantId}/datafeedstatuses", "httpMethod": "GET", "id": "content.datafeedstatuses.list", "parameterOrder": [ @@ -982,7 +982,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/datafeedstatuses", + "path": "{merchantId}/datafeedstatuses", "response": { "$ref": "DatafeedstatusesListResponse" }, @@ -996,7 +996,7 @@ "methods": { "custombatch": { "description": "Updates price and availability for multiple products or stores in a single request. This operation does not update the expiration date of the products.", - "flatPath": "content/v2/inventory/batch", + "flatPath": "inventory/batch", "httpMethod": "POST", "id": "content.inventory.custombatch", "parameterOrder": [], @@ -1007,7 +1007,7 @@ "type": "boolean" } }, - "path": "content/v2/inventory/batch", + "path": "inventory/batch", "request": { "$ref": "InventoryCustomBatchRequest" }, @@ -1020,7 +1020,7 @@ }, "set": { "description": "Updates price and availability of a product in your Merchant Center account.", - "flatPath": "content/v2/{merchantId}/inventory/{storeCode}/products/{productId}", + "flatPath": "{merchantId}/inventory/{storeCode}/products/{productId}", "httpMethod": "POST", "id": "content.inventory.set", "parameterOrder": [ @@ -1054,7 +1054,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/inventory/{storeCode}/products/{productId}", + "path": "{merchantId}/inventory/{storeCode}/products/{productId}", "request": { "$ref": "InventorySetRequest" }, @@ -1071,7 +1071,7 @@ "methods": { "custombatch": { "description": "Retrieves and/or updates the LIA settings of multiple accounts in a single request.", - "flatPath": "content/v2/liasettings/batch", + "flatPath": "liasettings/batch", "httpMethod": "POST", "id": "content.liasettings.custombatch", "parameterOrder": [], @@ -1082,7 +1082,7 @@ "type": "boolean" } }, - "path": "content/v2/liasettings/batch", + "path": "liasettings/batch", "request": { "$ref": "LiasettingsCustomBatchRequest" }, @@ -1095,7 +1095,7 @@ }, "get": { "description": "Retrieves the LIA settings of the account.", - "flatPath": "content/v2/{merchantId}/liasettings/{accountId}", + "flatPath": "{merchantId}/liasettings/{accountId}", "httpMethod": "GET", "id": "content.liasettings.get", "parameterOrder": [ @@ -1118,7 +1118,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/liasettings/{accountId}", + "path": "{merchantId}/liasettings/{accountId}", "response": { "$ref": "LiaSettings" }, @@ -1128,7 +1128,7 @@ }, "getaccessiblegmbaccounts": { "description": "Retrieves the list of accessible Google My Business accounts.", - "flatPath": "content/v2/{merchantId}/liasettings/{accountId}/accessiblegmbaccounts", + "flatPath": "{merchantId}/liasettings/{accountId}/accessiblegmbaccounts", "httpMethod": "GET", "id": "content.liasettings.getaccessiblegmbaccounts", "parameterOrder": [ @@ -1151,7 +1151,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/liasettings/{accountId}/accessiblegmbaccounts", + "path": "{merchantId}/liasettings/{accountId}/accessiblegmbaccounts", "response": { "$ref": "LiasettingsGetAccessibleGmbAccountsResponse" }, @@ -1161,7 +1161,7 @@ }, "list": { "description": "Lists the LIA settings of the sub-accounts in your Merchant Center account.", - "flatPath": "content/v2/{merchantId}/liasettings", + "flatPath": "{merchantId}/liasettings", "httpMethod": "GET", "id": "content.liasettings.list", "parameterOrder": [ @@ -1187,7 +1187,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/liasettings", + "path": "{merchantId}/liasettings", "response": { "$ref": "LiasettingsListResponse" }, @@ -1197,12 +1197,12 @@ }, "listposdataproviders": { "description": "Retrieves the list of POS data providers that have active settings for the all eiligible countries.", - "flatPath": "content/v2/liasettings/posdataproviders", + "flatPath": "liasettings/posdataproviders", "httpMethod": "GET", "id": "content.liasettings.listposdataproviders", "parameterOrder": [], "parameters": {}, - "path": "content/v2/liasettings/posdataproviders", + "path": "liasettings/posdataproviders", "response": { "$ref": "LiasettingsListPosDataProvidersResponse" }, @@ -1212,7 +1212,7 @@ }, "requestgmbaccess": { "description": "Requests access to a specified Google My Business account.", - "flatPath": "content/v2/{merchantId}/liasettings/{accountId}/requestgmbaccess", + "flatPath": "{merchantId}/liasettings/{accountId}/requestgmbaccess", "httpMethod": "POST", "id": "content.liasettings.requestgmbaccess", "parameterOrder": [ @@ -1242,7 +1242,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/liasettings/{accountId}/requestgmbaccess", + "path": "{merchantId}/liasettings/{accountId}/requestgmbaccess", "response": { "$ref": "LiasettingsRequestGmbAccessResponse" }, @@ -1252,7 +1252,7 @@ }, "requestinventoryverification": { "description": "Requests inventory validation for the specified country.", - "flatPath": "content/v2/{merchantId}/liasettings/{accountId}/requestinventoryverification/{country}", + "flatPath": "{merchantId}/liasettings/{accountId}/requestinventoryverification/{country}", "httpMethod": "POST", "id": "content.liasettings.requestinventoryverification", "parameterOrder": [ @@ -1282,7 +1282,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/liasettings/{accountId}/requestinventoryverification/{country}", + "path": "{merchantId}/liasettings/{accountId}/requestinventoryverification/{country}", "response": { "$ref": "LiasettingsRequestInventoryVerificationResponse" }, @@ -1292,7 +1292,7 @@ }, "setinventoryverificationcontact": { "description": "Sets the inventory verification contract for the specified country.", - "flatPath": "content/v2/{merchantId}/liasettings/{accountId}/setinventoryverificationcontact", + "flatPath": "{merchantId}/liasettings/{accountId}/setinventoryverificationcontact", "httpMethod": "POST", "id": "content.liasettings.setinventoryverificationcontact", "parameterOrder": [ @@ -1343,7 +1343,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/liasettings/{accountId}/setinventoryverificationcontact", + "path": "{merchantId}/liasettings/{accountId}/setinventoryverificationcontact", "response": { "$ref": "LiasettingsSetInventoryVerificationContactResponse" }, @@ -1353,7 +1353,7 @@ }, "setposdataprovider": { "description": "Sets the POS data provider for the specified country.", - "flatPath": "content/v2/{merchantId}/liasettings/{accountId}/setposdataprovider", + "flatPath": "{merchantId}/liasettings/{accountId}/setposdataprovider", "httpMethod": "POST", "id": "content.liasettings.setposdataprovider", "parameterOrder": [ @@ -1394,7 +1394,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/liasettings/{accountId}/setposdataprovider", + "path": "{merchantId}/liasettings/{accountId}/setposdataprovider", "response": { "$ref": "LiasettingsSetPosDataProviderResponse" }, @@ -1404,7 +1404,7 @@ }, "update": { "description": "Updates the LIA settings of the account. Any fields that are not provided are deleted from the resource.", - "flatPath": "content/v2/{merchantId}/liasettings/{accountId}", + "flatPath": "{merchantId}/liasettings/{accountId}", "httpMethod": "PUT", "id": "content.liasettings.update", "parameterOrder": [ @@ -1432,7 +1432,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/liasettings/{accountId}", + "path": "{merchantId}/liasettings/{accountId}", "request": { "$ref": "LiaSettings" }, @@ -1449,7 +1449,7 @@ "methods": { "createchargeinvoice": { "description": "Creates a charge invoice for a shipment group, and triggers a charge capture for orderinvoice enabled orders.", - "flatPath": "content/v2/{merchantId}/orderinvoices/{orderId}/createChargeInvoice", + "flatPath": "{merchantId}/orderinvoices/{orderId}/createChargeInvoice", "httpMethod": "POST", "id": "content.orderinvoices.createchargeinvoice", "parameterOrder": [ @@ -1471,7 +1471,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/orderinvoices/{orderId}/createChargeInvoice", + "path": "{merchantId}/orderinvoices/{orderId}/createChargeInvoice", "request": { "$ref": "OrderinvoicesCreateChargeInvoiceRequest" }, @@ -1484,7 +1484,7 @@ }, "createrefundinvoice": { "description": "Creates a refund invoice for one or more shipment groups, and triggers a refund for orderinvoice enabled orders. This can only be used for line items that have previously been charged using `createChargeInvoice`. All amounts (except for the summary) are incremental with respect to the previous invoice.", - "flatPath": "content/v2/{merchantId}/orderinvoices/{orderId}/createRefundInvoice", + "flatPath": "{merchantId}/orderinvoices/{orderId}/createRefundInvoice", "httpMethod": "POST", "id": "content.orderinvoices.createrefundinvoice", "parameterOrder": [ @@ -1506,7 +1506,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/orderinvoices/{orderId}/createRefundInvoice", + "path": "{merchantId}/orderinvoices/{orderId}/createRefundInvoice", "request": { "$ref": "OrderinvoicesCreateRefundInvoiceRequest" }, @@ -1523,7 +1523,7 @@ "methods": { "listdisbursements": { "description": "Retrieves a report for disbursements from your Merchant Center account.", - "flatPath": "content/v2/{merchantId}/orderreports/disbursements", + "flatPath": "{merchantId}/orderreports/disbursements", "httpMethod": "GET", "id": "content.orderreports.listdisbursements", "parameterOrder": [ @@ -1559,7 +1559,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/orderreports/disbursements", + "path": "{merchantId}/orderreports/disbursements", "response": { "$ref": "OrderreportsListDisbursementsResponse" }, @@ -1569,7 +1569,7 @@ }, "listtransactions": { "description": "Retrieves a list of transactions for a disbursement from your Merchant Center account.", - "flatPath": "content/v2/{merchantId}/orderreports/disbursements/{disbursementId}/transactions", + "flatPath": "{merchantId}/orderreports/disbursements/{disbursementId}/transactions", "httpMethod": "GET", "id": "content.orderreports.listtransactions", "parameterOrder": [ @@ -1612,7 +1612,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/orderreports/disbursements/{disbursementId}/transactions", + "path": "{merchantId}/orderreports/disbursements/{disbursementId}/transactions", "response": { "$ref": "OrderreportsListTransactionsResponse" }, @@ -1626,7 +1626,7 @@ "methods": { "get": { "description": "Retrieves an order return from your Merchant Center account.", - "flatPath": "content/v2/{merchantId}/orderreturns/{returnId}", + "flatPath": "{merchantId}/orderreturns/{returnId}", "httpMethod": "GET", "id": "content.orderreturns.get", "parameterOrder": [ @@ -1648,7 +1648,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/orderreturns/{returnId}", + "path": "{merchantId}/orderreturns/{returnId}", "response": { "$ref": "MerchantOrderReturn" }, @@ -1658,7 +1658,7 @@ }, "list": { "description": "Lists order returns in your Merchant Center account.", - "flatPath": "content/v2/{merchantId}/orderreturns", + "flatPath": "{merchantId}/orderreturns", "httpMethod": "GET", "id": "content.orderreturns.list", "parameterOrder": [ @@ -1707,7 +1707,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/orderreturns", + "path": "{merchantId}/orderreturns", "response": { "$ref": "OrderreturnsListResponse" }, @@ -1721,7 +1721,7 @@ "methods": { "acknowledge": { "description": "Marks an order as acknowledged.", - "flatPath": "content/v2/{merchantId}/orders/{orderId}/acknowledge", + "flatPath": "{merchantId}/orders/{orderId}/acknowledge", "httpMethod": "POST", "id": "content.orders.acknowledge", "parameterOrder": [ @@ -1743,7 +1743,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/orders/{orderId}/acknowledge", + "path": "{merchantId}/orders/{orderId}/acknowledge", "request": { "$ref": "OrdersAcknowledgeRequest" }, @@ -1756,7 +1756,7 @@ }, "advancetestorder": { "description": "Sandbox only. Moves a test order from state \"`inProgress`\" to state \"`pendingShipment`\".", - "flatPath": "content/v2/{merchantId}/testorders/{orderId}/advance", + "flatPath": "{merchantId}/testorders/{orderId}/advance", "httpMethod": "POST", "id": "content.orders.advancetestorder", "parameterOrder": [ @@ -1778,7 +1778,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/testorders/{orderId}/advance", + "path": "{merchantId}/testorders/{orderId}/advance", "response": { "$ref": "OrdersAdvanceTestOrderResponse" }, @@ -1788,7 +1788,7 @@ }, "cancel": { "description": "Cancels all line items in an order, making a full refund.", - "flatPath": "content/v2/{merchantId}/orders/{orderId}/cancel", + "flatPath": "{merchantId}/orders/{orderId}/cancel", "httpMethod": "POST", "id": "content.orders.cancel", "parameterOrder": [ @@ -1810,7 +1810,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/orders/{orderId}/cancel", + "path": "{merchantId}/orders/{orderId}/cancel", "request": { "$ref": "OrdersCancelRequest" }, @@ -1823,7 +1823,7 @@ }, "cancellineitem": { "description": "Cancels a line item, making a full refund.", - "flatPath": "content/v2/{merchantId}/orders/{orderId}/cancelLineItem", + "flatPath": "{merchantId}/orders/{orderId}/cancelLineItem", "httpMethod": "POST", "id": "content.orders.cancellineitem", "parameterOrder": [ @@ -1845,7 +1845,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/orders/{orderId}/cancelLineItem", + "path": "{merchantId}/orders/{orderId}/cancelLineItem", "request": { "$ref": "OrdersCancelLineItemRequest" }, @@ -1858,7 +1858,7 @@ }, "canceltestorderbycustomer": { "description": "Sandbox only. Cancels a test order for customer-initiated cancellation.", - "flatPath": "content/v2/{merchantId}/testorders/{orderId}/cancelByCustomer", + "flatPath": "{merchantId}/testorders/{orderId}/cancelByCustomer", "httpMethod": "POST", "id": "content.orders.canceltestorderbycustomer", "parameterOrder": [ @@ -1880,7 +1880,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/testorders/{orderId}/cancelByCustomer", + "path": "{merchantId}/testorders/{orderId}/cancelByCustomer", "request": { "$ref": "OrdersCancelTestOrderByCustomerRequest" }, @@ -1893,7 +1893,7 @@ }, "createtestorder": { "description": "Sandbox only. Creates a test order.", - "flatPath": "content/v2/{merchantId}/testorders", + "flatPath": "{merchantId}/testorders", "httpMethod": "POST", "id": "content.orders.createtestorder", "parameterOrder": [ @@ -1908,7 +1908,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/testorders", + "path": "{merchantId}/testorders", "request": { "$ref": "OrdersCreateTestOrderRequest" }, @@ -1921,7 +1921,7 @@ }, "createtestreturn": { "description": "Sandbox only. Creates a test return.", - "flatPath": "content/v2/{merchantId}/orders/{orderId}/testreturn", + "flatPath": "{merchantId}/orders/{orderId}/testreturn", "httpMethod": "POST", "id": "content.orders.createtestreturn", "parameterOrder": [ @@ -1943,7 +1943,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/orders/{orderId}/testreturn", + "path": "{merchantId}/orders/{orderId}/testreturn", "request": { "$ref": "OrdersCreateTestReturnRequest" }, @@ -1956,12 +1956,12 @@ }, "custombatch": { "description": "Retrieves or modifies multiple orders in a single request.", - "flatPath": "content/v2/orders/batch", + "flatPath": "orders/batch", "httpMethod": "POST", "id": "content.orders.custombatch", "parameterOrder": [], "parameters": {}, - "path": "content/v2/orders/batch", + "path": "orders/batch", "request": { "$ref": "OrdersCustomBatchRequest" }, @@ -1974,7 +1974,7 @@ }, "get": { "description": "Retrieves an order from your Merchant Center account.", - "flatPath": "content/v2/{merchantId}/orders/{orderId}", + "flatPath": "{merchantId}/orders/{orderId}", "httpMethod": "GET", "id": "content.orders.get", "parameterOrder": [ @@ -1996,7 +1996,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/orders/{orderId}", + "path": "{merchantId}/orders/{orderId}", "response": { "$ref": "Order" }, @@ -2006,7 +2006,7 @@ }, "getbymerchantorderid": { "description": "Retrieves an order using merchant order ID.", - "flatPath": "content/v2/{merchantId}/ordersbymerchantid/{merchantOrderId}", + "flatPath": "{merchantId}/ordersbymerchantid/{merchantOrderId}", "httpMethod": "GET", "id": "content.orders.getbymerchantorderid", "parameterOrder": [ @@ -2028,7 +2028,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/ordersbymerchantid/{merchantOrderId}", + "path": "{merchantId}/ordersbymerchantid/{merchantOrderId}", "response": { "$ref": "OrdersGetByMerchantOrderIdResponse" }, @@ -2038,7 +2038,7 @@ }, "gettestordertemplate": { "description": "Sandbox only. Retrieves an order template that can be used to quickly create a new order in sandbox.", - "flatPath": "content/v2/{merchantId}/testordertemplates/{templateName}", + "flatPath": "{merchantId}/testordertemplates/{templateName}", "httpMethod": "GET", "id": "content.orders.gettestordertemplate", "parameterOrder": [ @@ -2079,7 +2079,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/testordertemplates/{templateName}", + "path": "{merchantId}/testordertemplates/{templateName}", "response": { "$ref": "OrdersGetTestOrderTemplateResponse" }, @@ -2089,7 +2089,7 @@ }, "instorerefundlineitem": { "description": "Deprecated. Notifies that item return and refund was handled directly by merchant outside of Google payments processing (e.g. cash refund done in store). Note: We recommend calling the returnrefundlineitem method to refund in-store returns. We will issue the refund directly to the customer. This helps to prevent possible differences arising between merchant and Google transaction records. We also recommend having the point of sale system communicate with Google to ensure that customers do not receive a double refund by first refunding via Google then via an in-store return.", - "flatPath": "content/v2/{merchantId}/orders/{orderId}/inStoreRefundLineItem", + "flatPath": "{merchantId}/orders/{orderId}/inStoreRefundLineItem", "httpMethod": "POST", "id": "content.orders.instorerefundlineitem", "parameterOrder": [ @@ -2111,7 +2111,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/orders/{orderId}/inStoreRefundLineItem", + "path": "{merchantId}/orders/{orderId}/inStoreRefundLineItem", "request": { "$ref": "OrdersInStoreRefundLineItemRequest" }, @@ -2124,7 +2124,7 @@ }, "list": { "description": "Lists the orders in your Merchant Center account.", - "flatPath": "content/v2/{merchantId}/orders", + "flatPath": "{merchantId}/orders", "httpMethod": "GET", "id": "content.orders.list", "parameterOrder": [ @@ -2202,7 +2202,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/orders", + "path": "{merchantId}/orders", "response": { "$ref": "OrdersListResponse" }, @@ -2212,7 +2212,7 @@ }, "refund": { "description": "Deprecated, please use returnRefundLineItem instead.", - "flatPath": "content/v2/{merchantId}/orders/{orderId}/refund", + "flatPath": "{merchantId}/orders/{orderId}/refund", "httpMethod": "POST", "id": "content.orders.refund", "parameterOrder": [ @@ -2234,7 +2234,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/orders/{orderId}/refund", + "path": "{merchantId}/orders/{orderId}/refund", "request": { "$ref": "OrdersRefundRequest" }, @@ -2247,7 +2247,7 @@ }, "rejectreturnlineitem": { "description": "Rejects return on an line item.", - "flatPath": "content/v2/{merchantId}/orders/{orderId}/rejectReturnLineItem", + "flatPath": "{merchantId}/orders/{orderId}/rejectReturnLineItem", "httpMethod": "POST", "id": "content.orders.rejectreturnlineitem", "parameterOrder": [ @@ -2269,7 +2269,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/orders/{orderId}/rejectReturnLineItem", + "path": "{merchantId}/orders/{orderId}/rejectReturnLineItem", "request": { "$ref": "OrdersRejectReturnLineItemRequest" }, @@ -2282,7 +2282,7 @@ }, "returnlineitem": { "description": "Returns a line item.", - "flatPath": "content/v2/{merchantId}/orders/{orderId}/returnLineItem", + "flatPath": "{merchantId}/orders/{orderId}/returnLineItem", "httpMethod": "POST", "id": "content.orders.returnlineitem", "parameterOrder": [ @@ -2304,7 +2304,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/orders/{orderId}/returnLineItem", + "path": "{merchantId}/orders/{orderId}/returnLineItem", "request": { "$ref": "OrdersReturnLineItemRequest" }, @@ -2317,7 +2317,7 @@ }, "returnrefundlineitem": { "description": "Returns and refunds a line item. Note that this method can only be called on fully shipped orders. Please also note that the Orderreturns API is the preferred way to handle returns after you receive a return from a customer. You can use Orderreturns.list or Orderreturns.get to search for the return, and then use Orderreturns.processreturn to issue the refund. If the return cannot be found, then we recommend using this API to issue a refund.", - "flatPath": "content/v2/{merchantId}/orders/{orderId}/returnRefundLineItem", + "flatPath": "{merchantId}/orders/{orderId}/returnRefundLineItem", "httpMethod": "POST", "id": "content.orders.returnrefundlineitem", "parameterOrder": [ @@ -2339,7 +2339,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/orders/{orderId}/returnRefundLineItem", + "path": "{merchantId}/orders/{orderId}/returnRefundLineItem", "request": { "$ref": "OrdersReturnRefundLineItemRequest" }, @@ -2352,7 +2352,7 @@ }, "setlineitemmetadata": { "description": "Sets (or overrides if it already exists) merchant provided annotations in the form of key-value pairs. A common use case would be to supply us with additional structured information about a line item that cannot be provided via other methods. Submitted key-value pairs can be retrieved as part of the orders resource.", - "flatPath": "content/v2/{merchantId}/orders/{orderId}/setLineItemMetadata", + "flatPath": "{merchantId}/orders/{orderId}/setLineItemMetadata", "httpMethod": "POST", "id": "content.orders.setlineitemmetadata", "parameterOrder": [ @@ -2374,7 +2374,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/orders/{orderId}/setLineItemMetadata", + "path": "{merchantId}/orders/{orderId}/setLineItemMetadata", "request": { "$ref": "OrdersSetLineItemMetadataRequest" }, @@ -2387,7 +2387,7 @@ }, "shiplineitems": { "description": "Marks line item(s) as shipped.", - "flatPath": "content/v2/{merchantId}/orders/{orderId}/shipLineItems", + "flatPath": "{merchantId}/orders/{orderId}/shipLineItems", "httpMethod": "POST", "id": "content.orders.shiplineitems", "parameterOrder": [ @@ -2409,7 +2409,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/orders/{orderId}/shipLineItems", + "path": "{merchantId}/orders/{orderId}/shipLineItems", "request": { "$ref": "OrdersShipLineItemsRequest" }, @@ -2422,7 +2422,7 @@ }, "updatelineitemshippingdetails": { "description": "Updates ship by and delivery by dates for a line item.", - "flatPath": "content/v2/{merchantId}/orders/{orderId}/updateLineItemShippingDetails", + "flatPath": "{merchantId}/orders/{orderId}/updateLineItemShippingDetails", "httpMethod": "POST", "id": "content.orders.updatelineitemshippingdetails", "parameterOrder": [ @@ -2444,7 +2444,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/orders/{orderId}/updateLineItemShippingDetails", + "path": "{merchantId}/orders/{orderId}/updateLineItemShippingDetails", "request": { "$ref": "OrdersUpdateLineItemShippingDetailsRequest" }, @@ -2457,7 +2457,7 @@ }, "updatemerchantorderid": { "description": "Updates the merchant order ID for a given order.", - "flatPath": "content/v2/{merchantId}/orders/{orderId}/updateMerchantOrderId", + "flatPath": "{merchantId}/orders/{orderId}/updateMerchantOrderId", "httpMethod": "POST", "id": "content.orders.updatemerchantorderid", "parameterOrder": [ @@ -2479,7 +2479,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/orders/{orderId}/updateMerchantOrderId", + "path": "{merchantId}/orders/{orderId}/updateMerchantOrderId", "request": { "$ref": "OrdersUpdateMerchantOrderIdRequest" }, @@ -2492,7 +2492,7 @@ }, "updateshipment": { "description": "Updates a shipment's status, carrier, and/or tracking ID.", - "flatPath": "content/v2/{merchantId}/orders/{orderId}/updateShipment", + "flatPath": "{merchantId}/orders/{orderId}/updateShipment", "httpMethod": "POST", "id": "content.orders.updateshipment", "parameterOrder": [ @@ -2514,7 +2514,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/orders/{orderId}/updateShipment", + "path": "{merchantId}/orders/{orderId}/updateShipment", "request": { "$ref": "OrdersUpdateShipmentRequest" }, @@ -2531,7 +2531,7 @@ "methods": { "custombatch": { "description": "Batches multiple POS-related calls in a single request.", - "flatPath": "content/v2/pos/batch", + "flatPath": "pos/batch", "httpMethod": "POST", "id": "content.pos.custombatch", "parameterOrder": [], @@ -2542,7 +2542,7 @@ "type": "boolean" } }, - "path": "content/v2/pos/batch", + "path": "pos/batch", "request": { "$ref": "PosCustomBatchRequest" }, @@ -2555,7 +2555,7 @@ }, "delete": { "description": "Deletes a store for the given merchant.", - "flatPath": "content/v2/{merchantId}/pos/{targetMerchantId}/store/{storeCode}", + "flatPath": "{merchantId}/pos/{targetMerchantId}/store/{storeCode}", "httpMethod": "DELETE", "id": "content.pos.delete", "parameterOrder": [ @@ -2590,14 +2590,14 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/pos/{targetMerchantId}/store/{storeCode}", + "path": "{merchantId}/pos/{targetMerchantId}/store/{storeCode}", "scopes": [ "https://www.googleapis.com/auth/content" ] }, "get": { "description": "Retrieves information about the given store.", - "flatPath": "content/v2/{merchantId}/pos/{targetMerchantId}/store/{storeCode}", + "flatPath": "{merchantId}/pos/{targetMerchantId}/store/{storeCode}", "httpMethod": "GET", "id": "content.pos.get", "parameterOrder": [ @@ -2627,7 +2627,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/pos/{targetMerchantId}/store/{storeCode}", + "path": "{merchantId}/pos/{targetMerchantId}/store/{storeCode}", "response": { "$ref": "PosStore" }, @@ -2637,7 +2637,7 @@ }, "insert": { "description": "Creates a store for the given merchant.", - "flatPath": "content/v2/{merchantId}/pos/{targetMerchantId}/store", + "flatPath": "{merchantId}/pos/{targetMerchantId}/store", "httpMethod": "POST", "id": "content.pos.insert", "parameterOrder": [ @@ -2665,7 +2665,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/pos/{targetMerchantId}/store", + "path": "{merchantId}/pos/{targetMerchantId}/store", "request": { "$ref": "PosStore" }, @@ -2678,7 +2678,7 @@ }, "inventory": { "description": "Submit inventory for the given merchant.", - "flatPath": "content/v2/{merchantId}/pos/{targetMerchantId}/inventory", + "flatPath": "{merchantId}/pos/{targetMerchantId}/inventory", "httpMethod": "POST", "id": "content.pos.inventory", "parameterOrder": [ @@ -2706,7 +2706,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/pos/{targetMerchantId}/inventory", + "path": "{merchantId}/pos/{targetMerchantId}/inventory", "request": { "$ref": "PosInventoryRequest" }, @@ -2719,7 +2719,7 @@ }, "list": { "description": "Lists the stores of the target merchant.", - "flatPath": "content/v2/{merchantId}/pos/{targetMerchantId}/store", + "flatPath": "{merchantId}/pos/{targetMerchantId}/store", "httpMethod": "GET", "id": "content.pos.list", "parameterOrder": [ @@ -2742,7 +2742,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/pos/{targetMerchantId}/store", + "path": "{merchantId}/pos/{targetMerchantId}/store", "response": { "$ref": "PosListResponse" }, @@ -2752,7 +2752,7 @@ }, "sale": { "description": "Submit a sale event for the given merchant.", - "flatPath": "content/v2/{merchantId}/pos/{targetMerchantId}/sale", + "flatPath": "{merchantId}/pos/{targetMerchantId}/sale", "httpMethod": "POST", "id": "content.pos.sale", "parameterOrder": [ @@ -2780,7 +2780,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/pos/{targetMerchantId}/sale", + "path": "{merchantId}/pos/{targetMerchantId}/sale", "request": { "$ref": "PosSaleRequest" }, @@ -2797,7 +2797,7 @@ "methods": { "custombatch": { "description": "Retrieves, inserts, and deletes multiple products in a single request.", - "flatPath": "content/v2/products/batch", + "flatPath": "products/batch", "httpMethod": "POST", "id": "content.products.custombatch", "parameterOrder": [], @@ -2808,7 +2808,7 @@ "type": "boolean" } }, - "path": "content/v2/products/batch", + "path": "products/batch", "request": { "$ref": "ProductsCustomBatchRequest" }, @@ -2821,7 +2821,7 @@ }, "delete": { "description": "Deletes a product from your Merchant Center account.", - "flatPath": "content/v2/{merchantId}/products/{productId}", + "flatPath": "{merchantId}/products/{productId}", "httpMethod": "DELETE", "id": "content.products.delete", "parameterOrder": [ @@ -2848,14 +2848,14 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/products/{productId}", + "path": "{merchantId}/products/{productId}", "scopes": [ "https://www.googleapis.com/auth/content" ] }, "get": { "description": "Retrieves a product from your Merchant Center account.", - "flatPath": "content/v2/{merchantId}/products/{productId}", + "flatPath": "{merchantId}/products/{productId}", "httpMethod": "GET", "id": "content.products.get", "parameterOrder": [ @@ -2877,7 +2877,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/products/{productId}", + "path": "{merchantId}/products/{productId}", "response": { "$ref": "Product" }, @@ -2887,7 +2887,7 @@ }, "insert": { "description": "Uploads a product to your Merchant Center account. If an item with the same channel, contentLanguage, offerId, and targetCountry already exists, this method updates that entry.", - "flatPath": "content/v2/{merchantId}/products", + "flatPath": "{merchantId}/products", "httpMethod": "POST", "id": "content.products.insert", "parameterOrder": [ @@ -2907,7 +2907,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/products", + "path": "{merchantId}/products", "request": { "$ref": "Product" }, @@ -2920,7 +2920,7 @@ }, "list": { "description": "Lists the products in your Merchant Center account. The response might contain fewer items than specified by maxResults. Rely on nextPageToken to determine if there are more items to be requested.", - "flatPath": "content/v2/{merchantId}/products", + "flatPath": "{merchantId}/products", "httpMethod": "GET", "id": "content.products.list", "parameterOrder": [ @@ -2951,7 +2951,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/products", + "path": "{merchantId}/products", "response": { "$ref": "ProductsListResponse" }, @@ -2965,7 +2965,7 @@ "methods": { "custombatch": { "description": "Gets the statuses of multiple products in a single request.", - "flatPath": "content/v2/productstatuses/batch", + "flatPath": "productstatuses/batch", "httpMethod": "POST", "id": "content.productstatuses.custombatch", "parameterOrder": [], @@ -2976,7 +2976,7 @@ "type": "boolean" } }, - "path": "content/v2/productstatuses/batch", + "path": "productstatuses/batch", "request": { "$ref": "ProductstatusesCustomBatchRequest" }, @@ -2989,7 +2989,7 @@ }, "get": { "description": "Gets the status of a product from your Merchant Center account.", - "flatPath": "content/v2/{merchantId}/productstatuses/{productId}", + "flatPath": "{merchantId}/productstatuses/{productId}", "httpMethod": "GET", "id": "content.productstatuses.get", "parameterOrder": [ @@ -3022,7 +3022,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/productstatuses/{productId}", + "path": "{merchantId}/productstatuses/{productId}", "response": { "$ref": "ProductStatus" }, @@ -3032,7 +3032,7 @@ }, "list": { "description": "Lists the statuses of the products in your Merchant Center account.", - "flatPath": "content/v2/{merchantId}/productstatuses", + "flatPath": "{merchantId}/productstatuses", "httpMethod": "GET", "id": "content.productstatuses.list", "parameterOrder": [ @@ -3074,7 +3074,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/productstatuses", + "path": "{merchantId}/productstatuses", "response": { "$ref": "ProductstatusesListResponse" }, @@ -3088,7 +3088,7 @@ "methods": { "custombatch": { "description": "Retrieves and updates the shipping settings of multiple accounts in a single request.", - "flatPath": "content/v2/shippingsettings/batch", + "flatPath": "shippingsettings/batch", "httpMethod": "POST", "id": "content.shippingsettings.custombatch", "parameterOrder": [], @@ -3099,7 +3099,7 @@ "type": "boolean" } }, - "path": "content/v2/shippingsettings/batch", + "path": "shippingsettings/batch", "request": { "$ref": "ShippingsettingsCustomBatchRequest" }, @@ -3112,7 +3112,7 @@ }, "get": { "description": "Retrieves the shipping settings of the account.", - "flatPath": "content/v2/{merchantId}/shippingsettings/{accountId}", + "flatPath": "{merchantId}/shippingsettings/{accountId}", "httpMethod": "GET", "id": "content.shippingsettings.get", "parameterOrder": [ @@ -3135,7 +3135,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/shippingsettings/{accountId}", + "path": "{merchantId}/shippingsettings/{accountId}", "response": { "$ref": "ShippingSettings" }, @@ -3145,7 +3145,7 @@ }, "getsupportedcarriers": { "description": "Retrieves supported carriers and carrier services for an account.", - "flatPath": "content/v2/{merchantId}/supportedCarriers", + "flatPath": "{merchantId}/supportedCarriers", "httpMethod": "GET", "id": "content.shippingsettings.getsupportedcarriers", "parameterOrder": [ @@ -3160,7 +3160,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/supportedCarriers", + "path": "{merchantId}/supportedCarriers", "response": { "$ref": "ShippingsettingsGetSupportedCarriersResponse" }, @@ -3170,7 +3170,7 @@ }, "getsupportedholidays": { "description": "Retrieves supported holidays for an account.", - "flatPath": "content/v2/{merchantId}/supportedHolidays", + "flatPath": "{merchantId}/supportedHolidays", "httpMethod": "GET", "id": "content.shippingsettings.getsupportedholidays", "parameterOrder": [ @@ -3185,7 +3185,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/supportedHolidays", + "path": "{merchantId}/supportedHolidays", "response": { "$ref": "ShippingsettingsGetSupportedHolidaysResponse" }, @@ -3195,7 +3195,7 @@ }, "getsupportedpickupservices": { "description": "Retrieves supported pickup services for an account.", - "flatPath": "content/v2/{merchantId}/supportedPickupServices", + "flatPath": "{merchantId}/supportedPickupServices", "httpMethod": "GET", "id": "content.shippingsettings.getsupportedpickupservices", "parameterOrder": [ @@ -3210,7 +3210,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/supportedPickupServices", + "path": "{merchantId}/supportedPickupServices", "response": { "$ref": "ShippingsettingsGetSupportedPickupServicesResponse" }, @@ -3220,7 +3220,7 @@ }, "list": { "description": "Lists the shipping settings of the sub-accounts in your Merchant Center account.", - "flatPath": "content/v2/{merchantId}/shippingsettings", + "flatPath": "{merchantId}/shippingsettings", "httpMethod": "GET", "id": "content.shippingsettings.list", "parameterOrder": [ @@ -3246,7 +3246,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/shippingsettings", + "path": "{merchantId}/shippingsettings", "response": { "$ref": "ShippingsettingsListResponse" }, @@ -3256,7 +3256,7 @@ }, "update": { "description": "Updates the shipping settings of the account. Any fields that are not provided are deleted from the resource.", - "flatPath": "content/v2/{merchantId}/shippingsettings/{accountId}", + "flatPath": "{merchantId}/shippingsettings/{accountId}", "httpMethod": "PUT", "id": "content.shippingsettings.update", "parameterOrder": [ @@ -3284,7 +3284,7 @@ "type": "string" } }, - "path": "content/v2/{merchantId}/shippingsettings/{accountId}", + "path": "{merchantId}/shippingsettings/{accountId}", "request": { "$ref": "ShippingSettings" }, @@ -3298,7 +3298,7 @@ } } }, - "revision": "20210303", + "revision": "20210318", "rootUrl": "https://shoppingcontent.googleapis.com/", "schemas": { "Account": { @@ -10272,7 +10272,7 @@ "type": "object" } }, - "servicePath": "", + "servicePath": "content/v2/", "title": "Content API for Shopping", "version": "v2" } \ No newline at end of file diff --git a/discovery/dataflow-v1b3.json b/discovery/dataflow-v1b3.json index a47eb753fbd..7fdfe44bb93 100644 --- a/discovery/dataflow-v1b3.json +++ b/discovery/dataflow-v1b3.json @@ -185,184 +185,6 @@ } }, "resources": { - "catalogTemplates": { - "methods": { - "commit": { - "description": "Creates a new TemplateVersion (Important: not new Template) entry in the spanner table. Requires project_id and display_name (template).", - "flatPath": "v1b3/projects/{projectsId}/catalogTemplates/{catalogTemplatesId}:commit", - "httpMethod": "POST", - "id": "dataflow.projects.catalogTemplates.commit", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The location of the template, name includes project_id and display_name. Commit using project_id(pid1) and display_name(tid1). Format: projects/{pid1}/catalogTemplates/{tid1}", - "location": "path", - "pattern": "^projects/[^/]+/catalogTemplates/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1b3/{+name}:commit", - "request": { - "$ref": "CommitTemplateVersionRequest" - }, - "response": { - "$ref": "TemplateVersion" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/userinfo.email" - ] - }, - "delete": { - "description": "Deletes an existing Template. Do nothing if Template does not exist.", - "flatPath": "v1b3/projects/{projectsId}/catalogTemplates/{catalogTemplatesId}", - "httpMethod": "DELETE", - "id": "dataflow.projects.catalogTemplates.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "name includes project_id and display_name. Delete by project_id(pid1) and display_name(tid1). Format: projects/{pid1}/catalogTemplates/{tid1}", - "location": "path", - "pattern": "^projects/[^/]+/catalogTemplates/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1b3/{+name}", - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/userinfo.email" - ] - }, - "get": { - "description": "Get TemplateVersion using project_id and display_name with an optional version_id field. Get latest (has tag \"latest\") TemplateVersion if version_id not set.", - "flatPath": "v1b3/projects/{projectsId}/catalogTemplates/{catalogTemplatesId}", - "httpMethod": "GET", - "id": "dataflow.projects.catalogTemplates.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Resource name includes project_id and display_name. version_id is optional. Get the latest TemplateVersion if version_id not set. Get by project_id(pid1) and display_name(tid1): Format: projects/{pid1}/catalogTemplates/{tid1} Get by project_id(pid1), display_name(tid1), and version_id(vid1): Format: projects/{pid1}/catalogTemplates/{tid1@vid}", - "location": "path", - "pattern": "^projects/[^/]+/catalogTemplates/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1b3/{+name}", - "response": { - "$ref": "TemplateVersion" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/userinfo.email" - ] - }, - "label": { - "description": "Updates the label of the TemplateVersion. Label can be duplicated in Template, so either add or remove the label in the TemplateVersion.", - "flatPath": "v1b3/projects/{projectsId}/catalogTemplates/{catalogTemplatesId}:label", - "httpMethod": "POST", - "id": "dataflow.projects.catalogTemplates.label", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Resource name includes project_id, display_name, and version_id. Updates by project_id(pid1), display_name(tid1), and version_id(vid1): Format: projects/{pid1}/catalogTemplates/{tid1@vid}", - "location": "path", - "pattern": "^projects/[^/]+/catalogTemplates/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1b3/{+name}:label", - "request": { - "$ref": "ModifyTemplateVersionLabelRequest" - }, - "response": { - "$ref": "ModifyTemplateVersionLabelResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/userinfo.email" - ] - }, - "tag": { - "description": "Updates the tag of the TemplateVersion, and tag is unique in Template. If tag exists in another TemplateVersion in the Template, updates the tag to this TemplateVersion will remove it from the old TemplateVersion and add it to this TemplateVersion. If request is remove_only (remove_only = true), remove the tag from this TemplateVersion.", - "flatPath": "v1b3/projects/{projectsId}/catalogTemplates/{catalogTemplatesId}:tag", - "httpMethod": "POST", - "id": "dataflow.projects.catalogTemplates.tag", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Resource name includes project_id, display_name, and version_id. Updates by project_id(pid1), display_name(tid1), and version_id(vid1): Format: projects/{pid1}/catalogTemplates/{tid1@vid}", - "location": "path", - "pattern": "^projects/[^/]+/catalogTemplates/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1b3/{+name}:tag", - "request": { - "$ref": "ModifyTemplateVersionTagRequest" - }, - "response": { - "$ref": "ModifyTemplateVersionTagResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/userinfo.email" - ] - } - }, - "resources": { - "templateVersions": { - "methods": { - "create": { - "description": "Creates a new Template with TemplateVersion. Requires project_id(projects) and template display_name(catalogTemplates). The template display_name is set by the user.", - "flatPath": "v1b3/projects/{projectsId}/catalogTemplates/{catalogTemplatesId}/templateVersions", - "httpMethod": "POST", - "id": "dataflow.projects.catalogTemplates.templateVersions.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "The parent project and template that the TemplateVersion will be created under. Create using project_id(pid1) and display_name(tid1). Format: projects/{pid1}/catalogTemplates/{tid1}", - "location": "path", - "pattern": "^projects/[^/]+/catalogTemplates/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1b3/{+parent}/templateVersions", - "request": { - "$ref": "CreateTemplateVersionRequest" - }, - "response": { - "$ref": "TemplateVersion" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/userinfo.email" - ] - } - } - } - } - }, "jobs": { "methods": { "aggregated": { @@ -2263,47 +2085,6 @@ } } }, - "templateVersions": { - "methods": { - "list": { - "description": "List TemplateVersions using project_id and an optional display_name field. List all the TemplateVersions in the Template if display set. List all the TemplateVersions in the Project if display_name not set.", - "flatPath": "v1b3/projects/{projectsId}/templateVersions", - "httpMethod": "GET", - "id": "dataflow.projects.templateVersions.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "pageSize": { - "description": "The maximum number of TemplateVersions to return per page.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "The page token, received from a previous ListTemplateVersions call. Provide this to retrieve the subsequent page.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "parent includes project_id, and display_name is optional. List by project_id(pid1) and display_name(tid1). Format: projects/{pid1}/catalogTemplates/{tid1} List by project_id(pid1). Format: projects/{pid1}", - "location": "path", - "pattern": "^projects/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1b3/{+parent}/templateVersions", - "response": { - "$ref": "ListTemplateVersionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/userinfo.email" - ] - } - } - }, "templates": { "methods": { "create": { @@ -2444,7 +2225,7 @@ } } }, - "revision": "20210217", + "revision": "20210314", "rootUrl": "https://dataflow.googleapis.com/", "schemas": { "ApproximateProgress": { @@ -2513,25 +2294,6 @@ }, "type": "object" }, - "Artifact": { - "description": "Job information for templates.", - "id": "Artifact", - "properties": { - "containerSpec": { - "$ref": "ContainerSpec", - "description": "Container image path set for flex Template." - }, - "jobGraphGcsPath": { - "description": "job_graph_gcs_path set for legacy Template.", - "type": "string" - }, - "metadata": { - "$ref": "TemplateMetadata", - "description": "Metadata set for legacy Template." - } - }, - "type": "object" - }, "AutoscalingEvent": { "description": "A structured message reporting an autoscaling decision made by the Dataflow service.", "id": "AutoscalingEvent", @@ -2670,17 +2432,6 @@ }, "type": "object" }, - "CommitTemplateVersionRequest": { - "description": "Commit will add a new TemplateVersion to an existing template.", - "id": "CommitTemplateVersionRequest", - "properties": { - "templateVersion": { - "$ref": "TemplateVersion", - "description": "TemplateVersion obejct to create." - } - }, - "type": "object" - }, "ComponentSource": { "description": "Description of an interstitial value between transforms in an execution stage.", "id": "ComponentSource", @@ -3048,17 +2799,6 @@ }, "type": "object" }, - "CreateTemplateVersionRequest": { - "description": "Creates a new Template with TemplateVersions.", - "id": "CreateTemplateVersionRequest", - "properties": { - "templateVersion": { - "$ref": "TemplateVersion", - "description": "The TemplateVersion object to create." - } - }, - "type": "object" - }, "CustomSourceLocation": { "description": "Identifies the location of a custom souce.", "id": "CustomSourceLocation", @@ -3103,6 +2843,17 @@ }, "type": "object" }, + "DebugOptions": { + "description": "Describes any options that have an effect on the debugging of pipelines.", + "id": "DebugOptions", + "properties": { + "enableHotKeyLogging": { + "description": "When true, enables the logging of the literal hot key to the user's Cloud Logging.", + "type": "boolean" + } + }, + "type": "object" + }, "DeleteSnapshotResponse": { "description": "Response from deleting a snapshot.", "id": "DeleteSnapshotResponse", @@ -3262,12 +3013,6 @@ }, "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); } The JSON representation for `Empty` is empty JSON object `{}`.", - "id": "Empty", - "properties": {}, - "type": "object" - }, "Environment": { "description": "Describes the environment in which a Dataflow Job runs.", "id": "Environment", @@ -3280,6 +3025,10 @@ "description": "The dataset for the current project where various workflow related tables are stored. The supported resource type is: Google BigQuery: bigquery.googleapis.com/{dataset}", "type": "string" }, + "debugOptions": { + "$ref": "DebugOptions", + "description": "Any debugging options to be supplied to the job." + }, "experiments": { "description": "The list of experiments to enable. This field should be used for SDK related experiments and not for service related experiments. The proper field for service related experiments is service_options. For more details see the rationale at go/user-specified-service-options.", "items": { @@ -4527,24 +4276,6 @@ }, "type": "object" }, - "ListTemplateVersionsResponse": { - "description": "Respond a list of TemplateVersions.", - "id": "ListTemplateVersionsResponse", - "properties": { - "nextPageToken": { - "description": "A token that can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", - "type": "string" - }, - "templateVersions": { - "description": "A list of TemplateVersions.", - "items": { - "$ref": "TemplateVersion" - }, - "type": "array" - } - }, - "type": "object" - }, "MapTask": { "description": "MapTask consists of an ordered set of instructions, each of which describes one particular low-level operation for the worker to perform in order to accomplish the MapTask's WorkItem. Each instruction must appear in the list before any instructions which depends on its output.", "id": "MapTask", @@ -4689,78 +4420,6 @@ }, "type": "object" }, - "ModifyTemplateVersionLabelRequest": { - "description": "Either add the label to TemplateVersion or remove it from the TemplateVersion.", - "id": "ModifyTemplateVersionLabelRequest", - "properties": { - "key": { - "description": "The label key for update.", - "type": "string" - }, - "op": { - "description": "Requests for add label to TemplateVersion or remove label from TemplateVersion.", - "enum": [ - "OPERATION_UNSPECIFIED", - "ADD", - "REMOVE" - ], - "enumDescriptions": [ - "Default value.", - "Add the label to the TemplateVersion object.", - "Remove the label from the TemplateVersion object." - ], - "type": "string" - }, - "value": { - "description": "The label value for update.", - "type": "string" - } - }, - "type": "object" - }, - "ModifyTemplateVersionLabelResponse": { - "description": "Respond the labels in the TemplateVersion.", - "id": "ModifyTemplateVersionLabelResponse", - "properties": { - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "All the label in the TemplateVersion.", - "type": "object" - } - }, - "type": "object" - }, - "ModifyTemplateVersionTagRequest": { - "description": "Add a tag to the current TemplateVersion. If tag exist in another TemplateVersion in the Template, remove the tag before add it to the current TemplateVersion. If remove_only set, remove the tag from the current TemplateVersion.", - "id": "ModifyTemplateVersionTagRequest", - "properties": { - "removeOnly": { - "description": "The flag that indicates if the request is only for remove tag from TemplateVersion.", - "type": "boolean" - }, - "tag": { - "description": "The tag for update.", - "type": "string" - } - }, - "type": "object" - }, - "ModifyTemplateVersionTagResponse": { - "description": "Respond the current tags in the TemplateVersion.", - "id": "ModifyTemplateVersionTagResponse", - "properties": { - "tags": { - "description": "All the tags in the TemplateVersion.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, "MountedDataDisk": { "description": "Describes mounted data disk.", "id": "MountedDataDisk", @@ -6608,66 +6267,6 @@ }, "type": "object" }, - "TemplateVersion": { - "description": "///////////////////////////////////////////////////////////////////////////// //// Template Catalog is used to organize user TemplateVersions. //// TemplateVersions that have the same project_id and display_name are //// belong to the same Template. //// Templates with the same project_id belong to the same Project. //// TemplateVersion may have labels and multiple labels are allowed. //// Duplicated labels in the same `TemplateVersion` are not allowed. //// TemplateVersion may have tags and multiple tags are allowed. Duplicated //// tags in the same `Template` are not allowed!", - "id": "TemplateVersion", - "properties": { - "artifact": { - "$ref": "Artifact", - "description": "Job graph and metadata if it is a legacy Template. Container image path and metadata if it is flex Template." - }, - "createTime": { - "description": "Creation time of this TemplateVersion.", - "format": "google-datetime", - "type": "string" - }, - "description": { - "description": "Template description from the user.", - "type": "string" - }, - "displayName": { - "description": "A customized name for Template. Multiple TemplateVersions per Template.", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Labels for the Template Version. Labels can be duplicate within Template.", - "type": "object" - }, - "projectId": { - "description": "A unique project_id. Multiple Templates per Project.", - "type": "string" - }, - "tags": { - "description": "Alias for version_id, helps locate a TemplateVersion.", - "items": { - "type": "string" - }, - "type": "array" - }, - "type": { - "description": "Either LEGACY or FLEX. This should match with the type of artifact.", - "enum": [ - "TEMPLATE_TYPE_UNSPECIFIED", - "LEGACY", - "FLEX" - ], - "enumDescriptions": [ - "Default value. Not a useful zero case.", - "Legacy Template.", - "Flex Template." - ], - "type": "string" - }, - "versionId": { - "description": "An auto generated version_id for TemplateVersion.", - "type": "string" - } - }, - "type": "object" - }, "TopologyConfig": { "description": "Global topology of the streaming Dataflow job, including all computations and their sharded locations.", "id": "TopologyConfig", diff --git a/discovery/datafusion-v1.json b/discovery/datafusion-v1.json index d58ebb2d013..50295fb2916 100644 --- a/discovery/datafusion-v1.json +++ b/discovery/datafusion-v1.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" } } } @@ -144,7 +144,7 @@ ], "parameters": { "filter": { - "description": "The standard list 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" }, @@ -161,13 +161,13 @@ "type": "string" }, "pageSize": { - "description": "The standard list page size.", + "description": "The maximum number of results to return. If not set, the service will select a default.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "The standard list page token.", + "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" } @@ -637,7 +637,7 @@ } } }, - "revision": "20210218", + "revision": "20210311", "rootUrl": "https://datafusion.googleapis.com/", "schemas": { "Accelerator": { diff --git a/discovery/datafusion-v1beta1.json b/discovery/datafusion-v1beta1.json index a9cc4487844..4a8870d4c5a 100644 --- a/discovery/datafusion-v1beta1.json +++ b/discovery/datafusion-v1beta1.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" } } } @@ -144,7 +144,7 @@ ], "parameters": { "filter": { - "description": "The standard list 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" }, @@ -161,13 +161,13 @@ "type": "string" }, "pageSize": { - "description": "The standard list page size.", + "description": "The maximum number of results to return. If not set, the service will select a default.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "The standard list page token.", + "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" } @@ -786,7 +786,7 @@ } } }, - "revision": "20210218", + "revision": "20210311", "rootUrl": "https://datafusion.googleapis.com/", "schemas": { "Accelerator": { diff --git a/discovery/datamigration-v1.json b/discovery/datamigration-v1.json new file mode 100644 index 00000000000..16707710592 --- /dev/null +++ b/discovery/datamigration-v1.json @@ -0,0 +1,2259 @@ +{ + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "See, edit, configure, and delete your Google Cloud Platform data" + } + } + } + }, + "basePath": "", + "baseUrl": "https://datamigration.googleapis.com/", + "batchPath": "batch", + "canonicalName": "Database Migration Service", + "description": "Manage Cloud Database Migration Service resources on Google Cloud Platform.", + "discoveryVersion": "v1", + "documentationLink": "https://cloud.google.com/database-migration/", + "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": "datamigration:v1", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://datamigration.mtls.googleapis.com/", + "name": "datamigration", + "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": "datamigration.projects.locations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Resource name for the location.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Location" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists information about the supported locations for this service.", + "flatPath": "v1/projects/{projectsId}/locations", + "httpMethod": "GET", + "id": "datamigration.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 will select a default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}/locations", + "response": { + "$ref": "ListLocationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "connectionProfiles": { + "methods": { + "create": { + "description": "Creates a new connection profile in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/connectionProfiles", + "httpMethod": "POST", + "id": "datamigration.projects.locations.connectionProfiles.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "connectionProfileId": { + "description": "Required. The connection profile identifier.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent, which owns this collection of connection profiles.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "A unique id used to identify the request. If the server receives two requests with the same id, then the second request will be ignored. It is recommended to always set this value to a UUID. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/connectionProfiles", + "request": { + "$ref": "ConnectionProfile" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single Database Migration Service connection profile. A connection profile can only be deleted if it is not in use by any active migration jobs.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/connectionProfiles/{connectionProfilesId}", + "httpMethod": "DELETE", + "id": "datamigration.projects.locations.connectionProfiles.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "force": { + "description": "In case of force delete, the CloudSQL replica database is also deleted (only for CloudSQL connection profile).", + "location": "query", + "type": "boolean" + }, + "name": { + "description": "Required. Name of the connection profile resource to delete.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/connectionProfiles/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "A unique id used to identify the request. If the server receives two requests with the same id, then the second request will be ignored. It is recommended to always set this value to a UUID. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single connection profile.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/connectionProfiles/{connectionProfilesId}", + "httpMethod": "GET", + "id": "datamigration.projects.locations.connectionProfiles.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the connection profile resource to get.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/connectionProfiles/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "ConnectionProfile" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/connectionProfiles/{connectionProfilesId}:getIamPolicy", + "httpMethod": "GET", + "id": "datamigration.projects.locations.connectionProfiles.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "options.requestedPolicyVersion": { + "description": "Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "location": "query", + "type": "integer" + }, + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/connectionProfiles/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Retrieve a list of all connection profiles in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/connectionProfiles", + "httpMethod": "GET", + "id": "datamigration.projects.locations.connectionProfiles.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters connection profiles listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <. For example, list connection profiles created this year by specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z**. You can also filter nested fields. For example, you could specify **mySql.username = %lt;my_username%gt;** to list all connection profiles configured to connect with a specific username.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "the order by fields for the result.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "The maximum number of connection profiles to return. The service may return fewer than this value. If unspecified, at most 50 connection profiles will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous `ListConnectionProfiles` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListConnectionProfiles` must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent, which owns this collection of connection profiles.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/connectionProfiles", + "response": { + "$ref": "ListConnectionProfilesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Update the configuration of a single connection profile.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/connectionProfiles/{connectionProfilesId}", + "httpMethod": "PATCH", + "id": "datamigration.projects.locations.connectionProfiles.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of this connection profile resource in the form of projects/{project}/locations/{location}/instances/{instance}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/connectionProfiles/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "A unique id used to identify the request. If the server receives two requests with the same id, then the second request will be ignored. It is recommended to always set this value to a UUID. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.", + "location": "query", + "type": "string" + }, + "updateMask": { + "description": "Required. Field mask is used to specify the fields to be overwritten in the connection profile resource by the update.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "ConnectionProfile" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/connectionProfiles/{connectionProfilesId}:setIamPolicy", + "httpMethod": "POST", + "id": "datamigration.projects.locations.connectionProfiles.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/connectionProfiles/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/connectionProfiles/{connectionProfilesId}:testIamPermissions", + "httpMethod": "POST", + "id": "datamigration.projects.locations.connectionProfiles.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/connectionProfiles/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "migrationJobs": { + "methods": { + "create": { + "description": "Creates a new migration job in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs", + "httpMethod": "POST", + "id": "datamigration.projects.locations.migrationJobs.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "migrationJobId": { + "description": "Required. The ID of the instance to create.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent, which owns this collection of migration jobs.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "A unique id used to identify the request. If the server receives two requests with the same id, then the second request will be ignored. It is recommended to always set this value to a UUID. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/migrationJobs", + "request": { + "$ref": "MigrationJob" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single migration job.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}", + "httpMethod": "DELETE", + "id": "datamigration.projects.locations.migrationJobs.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "force": { + "description": "The destination CloudSQL connection profile is always deleted with the migration job. In case of force delete, the destination CloudSQL replica database is also deleted.", + "location": "query", + "type": "boolean" + }, + "name": { + "description": "Required. Name of the migration job resource to delete.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/migrationJobs/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "A unique id used to identify the request. If the server receives two requests with the same id, then the second request will be ignored. It is recommended to always set this value to a UUID. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "generateSshScript": { + "description": "Generate a SSH configuration script to configure the reverse SSH connectivity.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}:generateSshScript", + "httpMethod": "POST", + "id": "datamigration.projects.locations.migrationJobs.generateSshScript", + "parameterOrder": [ + "migrationJob" + ], + "parameters": { + "migrationJob": { + "description": "Name of the migration job resource to generate the SSH script.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/migrationJobs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+migrationJob}:generateSshScript", + "request": { + "$ref": "GenerateSshScriptRequest" + }, + "response": { + "$ref": "SshScript" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single migration job.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}", + "httpMethod": "GET", + "id": "datamigration.projects.locations.migrationJobs.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the migration job resource to get.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/migrationJobs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "MigrationJob" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}:getIamPolicy", + "httpMethod": "GET", + "id": "datamigration.projects.locations.migrationJobs.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "options.requestedPolicyVersion": { + "description": "Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "location": "query", + "type": "integer" + }, + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/migrationJobs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists migration jobs in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs", + "httpMethod": "GET", + "id": "datamigration.projects.locations.migrationJobs.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters migration jobs listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <. For example, list migration jobs created this year by specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z.** You can also filter nested fields. For example, you could specify **reverseSshConnectivity.vmIp = \"1.2.3.4\"** to select all migration jobs connecting through the specific SSH tunnel bastion.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Sort the results based on the migration job name. Valid values are: \"name\", \"name asc\", and \"name desc\".", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "The maximum number of migration jobs to return. The service may return fewer than this value. If unspecified, at most 50 migration jobs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The nextPageToken value received in the previous call to migrationJobs.list, used in the subsequent request to retrieve the next page of results. On first call this should be left blank. When paginating, all other parameters provided to migrationJobs.list must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent, which owns this collection of migrationJobs.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/migrationJobs", + "response": { + "$ref": "ListMigrationJobsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the parameters of a single migration job.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}", + "httpMethod": "PATCH", + "id": "datamigration.projects.locations.migrationJobs.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name (URI) of this migration job resource, in the form of: projects/{project}/locations/{location}/instances/{instance}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/migrationJobs/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "A unique id used to identify the request. If the server receives two requests with the same id, then the second request will be ignored. It is recommended to always set this value to a UUID. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.", + "location": "query", + "type": "string" + }, + "updateMask": { + "description": "Required. Field mask is used to specify the fields to be overwritten in the migration job resource by the update.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "MigrationJob" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "promote": { + "description": "Promote a migration job, stopping replication to the destination and promoting the destination to be a standalone database.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}:promote", + "httpMethod": "POST", + "id": "datamigration.projects.locations.migrationJobs.promote", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Name of the migration job resource to promote.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/migrationJobs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:promote", + "request": { + "$ref": "PromoteMigrationJobRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "restart": { + "description": "Restart a stopped or failed migration job, resetting the destination instance to its original state and starting the migration process from scratch.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}:restart", + "httpMethod": "POST", + "id": "datamigration.projects.locations.migrationJobs.restart", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Name of the migration job resource to restart.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/migrationJobs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:restart", + "request": { + "$ref": "RestartMigrationJobRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "resume": { + "description": "Resume a migration job that is currently stopped and is resumable (was stopped during CDC phase).", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}:resume", + "httpMethod": "POST", + "id": "datamigration.projects.locations.migrationJobs.resume", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Name of the migration job resource to resume.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/migrationJobs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:resume", + "request": { + "$ref": "ResumeMigrationJobRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}:setIamPolicy", + "httpMethod": "POST", + "id": "datamigration.projects.locations.migrationJobs.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/migrationJobs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "start": { + "description": "Start an already created migration job.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}:start", + "httpMethod": "POST", + "id": "datamigration.projects.locations.migrationJobs.start", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Name of the migration job resource to start.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/migrationJobs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:start", + "request": { + "$ref": "StartMigrationJobRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "stop": { + "description": "Stops a running migration job.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}:stop", + "httpMethod": "POST", + "id": "datamigration.projects.locations.migrationJobs.stop", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Name of the migration job resource to stop.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/migrationJobs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:stop", + "request": { + "$ref": "StopMigrationJobRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}:testIamPermissions", + "httpMethod": "POST", + "id": "datamigration.projects.locations.migrationJobs.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/migrationJobs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "verify": { + "description": "Verify a migration job, making sure the destination can reach the source and that all configuration and prerequisites are met.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}:verify", + "httpMethod": "POST", + "id": "datamigration.projects.locations.migrationJobs.verify", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Name of the migration job resource to verify.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/migrationJobs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:verify", + "request": { + "$ref": "VerifyMigrationJobRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "operations": { + "methods": { + "cancel": { + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", + "httpMethod": "POST", + "id": "datamigration.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": "datamigration.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": "datamigration.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`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations", + "httpMethod": "GET", + "id": "datamigration.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" + ] + } + } + } + } + } + } + } + }, + "revision": "20210317", + "rootUrl": "https://datamigration.googleapis.com/", + "schemas": { + "AuditConfig": { + "description": "Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { \"audit_configs\": [ { \"service\": \"allServices\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\" }, { \"log_type\": \"ADMIN_READ\" } ] }, { \"service\": \"sampleservice.googleapis.com\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\" }, { \"log_type\": \"DATA_WRITE\", \"exempted_members\": [ \"user:aliya@example.com\" ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging.", + "id": "AuditConfig", + "properties": { + "auditLogConfigs": { + "description": "The configuration for logging of each type of permission.", + "items": { + "$ref": "AuditLogConfig" + }, + "type": "array" + }, + "service": { + "description": "Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.", + "type": "string" + } + }, + "type": "object" + }, + "AuditLogConfig": { + "description": "Provides the configuration for logging a type of permissions. Example: { \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging.", + "id": "AuditLogConfig", + "properties": { + "exemptedMembers": { + "description": "Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.", + "items": { + "type": "string" + }, + "type": "array" + }, + "logType": { + "description": "The log type that this config enables.", + "enum": [ + "LOG_TYPE_UNSPECIFIED", + "ADMIN_READ", + "DATA_WRITE", + "DATA_READ" + ], + "enumDescriptions": [ + "Default case. Should never be this.", + "Admin reads. Example: CloudIAM getIamPolicy", + "Data writes. Example: CloudSQL Users create", + "Data reads. Example: CloudSQL Users list" + ], + "type": "string" + } + }, + "type": "object" + }, + "Binding": { + "description": "Associates `members` with a `role`.", + "id": "Binding", + "properties": { + "condition": { + "$ref": "Expr", + "description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." + }, + "members": { + "description": "Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. ", + "items": { + "type": "string" + }, + "type": "array" + }, + "role": { + "description": "Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.", + "type": "string" + } + }, + "type": "object" + }, + "CancelOperationRequest": { + "description": "The request message for Operations.CancelOperation.", + "id": "CancelOperationRequest", + "properties": {}, + "type": "object" + }, + "CloudSqlConnectionProfile": { + "description": "Specifies required connection parameters, and, optionally, the parameters required to create a Cloud SQL destination database instance.", + "id": "CloudSqlConnectionProfile", + "properties": { + "cloudSqlId": { + "description": "Output only. The Cloud SQL instance ID that this connection profile is associated with.", + "readOnly": true, + "type": "string" + }, + "privateIp": { + "description": "Output only. The Cloud SQL database instance's private IP.", + "readOnly": true, + "type": "string" + }, + "publicIp": { + "description": "Output only. The Cloud SQL database instance's public IP.", + "readOnly": true, + "type": "string" + }, + "settings": { + "$ref": "CloudSqlSettings", + "description": "Immutable. Metadata used to create the destination Cloud SQL database." + } + }, + "type": "object" + }, + "CloudSqlSettings": { + "description": "Settings for creating a Cloud SQL database instance.", + "id": "CloudSqlSettings", + "properties": { + "activationPolicy": { + "description": "The activation policy specifies when the instance is activated; it is applicable only when the instance state is 'RUNNABLE'. Valid values: 'ALWAYS': The instance is on, and remains so even in the absence of connection requests. `NEVER`: The instance is off; it is not activated, even if a connection request arrives.", + "enum": [ + "SQL_ACTIVATION_POLICY_UNSPECIFIED", + "ALWAYS", + "NEVER" + ], + "enumDescriptions": [ + "unspecified policy.", + "The instance is always up and running.", + "The instance should never spin up." + ], + "type": "string" + }, + "autoStorageIncrease": { + "description": "[default: ON] If you enable this setting, Cloud SQL checks your available storage every 30 seconds. If the available storage falls below a threshold size, Cloud SQL automatically adds additional storage capacity. If the available storage repeatedly falls below the threshold size, Cloud SQL continues to add storage until it reaches the maximum of 30 TB.", + "type": "boolean" + }, + "collation": { + "description": "The Cloud SQL default instance level collation.", + "type": "string" + }, + "dataDiskSizeGb": { + "description": "The storage capacity available to the database, in GB. The minimum (and default) size is 10GB.", + "format": "int64", + "type": "string" + }, + "dataDiskType": { + "description": "The type of storage: `PD_SSD` (default) or `PD_HDD`.", + "enum": [ + "SQL_DATA_DISK_TYPE_UNSPECIFIED", + "PD_SSD", + "PD_HDD" + ], + "enumDescriptions": [ + "Unspecified.", + "SSD disk.", + "HDD disk." + ], + "type": "string" + }, + "databaseFlags": { + "additionalProperties": { + "type": "string" + }, + "description": "The database flags passed to the Cloud SQL instance at startup. An object containing a list of \"key\": value pairs. Example: { \"name\": \"wrench\", \"mass\": \"1.3kg\", \"count\": \"3\" }.", + "type": "object" + }, + "databaseVersion": { + "description": "The database engine type and version.", + "enum": [ + "SQL_DATABASE_VERSION_UNSPECIFIED", + "MYSQL_5_6", + "MYSQL_5_7", + "POSTGRES_9_6", + "POSTGRES_11", + "POSTGRES_10", + "MYSQL_8_0", + "POSTGRES_12", + "POSTGRES_13" + ], + "enumDescriptions": [ + "Unspecified version.", + "MySQL 5.6.", + "MySQL 5.7.", + "PostgreSQL 9.6.", + "PostgreSQL 11.", + "PostgreSQL 10.", + "MySQL 8.0.", + "PostgreSQL 12.", + "PostgreSQL 13." + ], + "type": "string" + }, + "ipConfig": { + "$ref": "SqlIpConfig", + "description": "The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance. The IPv4 address cannot be disabled." + }, + "rootPassword": { + "description": "Input only. Initial root password.", + "type": "string" + }, + "rootPasswordSet": { + "description": "Output only. Indicates If this connection profile root password is stored.", + "readOnly": true, + "type": "boolean" + }, + "sourceId": { + "description": "The Database Migration Service source connection profile ID, in the format: `projects/my_project_name/locations/us-central1/connectionProfiles/connection_profile_ID`", + "type": "string" + }, + "storageAutoResizeLimit": { + "description": "The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit.", + "format": "int64", + "type": "string" + }, + "tier": { + "description": "The tier (or machine type) for this instance, for example: `db-n1-standard-1` (MySQL instances) or `db-custom-1-3840` (PostgreSQL instances). For more information, see [Cloud SQL Instance Settings](https://cloud.google.com/sql/docs/mysql/instance-settings).", + "type": "string" + }, + "userLabels": { + "additionalProperties": { + "type": "string" + }, + "description": "The resource labels for a Cloud SQL instance to use to annotate any related underlying resources such as Compute Engine VMs. An object containing a list of \"key\": \"value\" pairs. Example: `{ \"name\": \"wrench\", \"mass\": \"18kg\", \"count\": \"3\" }`.", + "type": "object" + }, + "zone": { + "description": "The Google Cloud Platform zone where your Cloud SQL datdabse instance is located.", + "type": "string" + } + }, + "type": "object" + }, + "ConnectionProfile": { + "description": "A connection profile definition.", + "id": "ConnectionProfile", + "properties": { + "cloudsql": { + "$ref": "CloudSqlConnectionProfile", + "description": "A CloudSQL database connection profile." + }, + "createTime": { + "description": "Output only. The timestamp when the resource was created. A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds. Example: \"2014-10-02T15:01:23.045123456Z\".", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "The connection profile display name.", + "type": "string" + }, + "error": { + "$ref": "Status", + "description": "Output only. The error details in case of state FAILED.", + "readOnly": true + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "The resource labels for connection profile to use to annotate any related underlying resources such as Compute Engine VMs. An object containing a list of \"key\": \"value\" pairs. Example: `{ \"name\": \"wrench\", \"mass\": \"1.3kg\", \"count\": \"3\" }`.", + "type": "object" + }, + "mysql": { + "$ref": "MySqlConnectionProfile", + "description": "A MySQL database connection profile." + }, + "name": { + "description": "The name of this connection profile resource in the form of projects/{project}/locations/{location}/instances/{instance}.", + "type": "string" + }, + "postgresql": { + "$ref": "PostgreSqlConnectionProfile", + "description": "A PostgreSQL database connection profile." + }, + "provider": { + "description": "The database provider.", + "enum": [ + "DATABASE_PROVIDER_UNSPECIFIED", + "CLOUDSQL", + "RDS" + ], + "enumDescriptions": [ + "The database provider is unknown.", + "CloudSQL runs the database.", + "RDS runs the database." + ], + "type": "string" + }, + "state": { + "description": "The current connection profile state (e.g. DRAFT, READY, or FAILED).", + "enum": [ + "STATE_UNSPECIFIED", + "DRAFT", + "CREATING", + "READY", + "UPDATING", + "DELETING", + "DELETED", + "FAILED" + ], + "enumDescriptions": [ + "The state of the connection profile is unknown.", + "The connection profile is in draft mode and fully editable.", + "The connection profile is being created.", + "The connection profile is ready.", + "The connection profile is being updated.", + "The connection profile is being deleted.", + "The connection profile has been deleted.", + "The last action on the connection profile failed." + ], + "type": "string" + }, + "updateTime": { + "description": "Output only. The timestamp when the resource was last updated. A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds. Example: \"2014-10-02T15:01:23.045123456Z\".", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "DatabaseType": { + "description": "A message defining the database engine and provider.", + "id": "DatabaseType", + "properties": { + "engine": { + "description": "The database engine.", + "enum": [ + "DATABASE_ENGINE_UNSPECIFIED", + "MYSQL", + "POSTGRESQL" + ], + "enumDescriptions": [ + "The source database engine of the migration job is unknown.", + "The source engine is MySQL.", + "The source engine is PostgreSQL." + ], + "type": "string" + }, + "provider": { + "description": "The database provider.", + "enum": [ + "DATABASE_PROVIDER_UNSPECIFIED", + "CLOUDSQL", + "RDS" + ], + "enumDescriptions": [ + "The database provider is unknown.", + "CloudSQL runs the database.", + "RDS runs the database." + ], + "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "id": "Empty", + "properties": {}, + "type": "object" + }, + "Expr": { + "description": "Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: \"Summary size limit\" description: \"Determines if a summary is less than 100 chars\" expression: \"document.summary.size() < 100\" Example (Equality): title: \"Requestor is owner\" description: \"Determines if requestor is the document owner\" expression: \"document.owner == request.auth.claims.email\" Example (Logic): title: \"Public documents\" description: \"Determine whether the document should be publicly visible\" expression: \"document.type != 'private' && document.type != 'internal'\" Example (Data Manipulation): title: \"Notification string\" description: \"Create a notification string with a timestamp.\" expression: \"'New message received at ' + string(document.create_time)\" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.", + "id": "Expr", + "properties": { + "description": { + "description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", + "type": "string" + }, + "expression": { + "description": "Textual representation of an expression in Common Expression Language syntax.", + "type": "string" + }, + "location": { + "description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", + "type": "string" + }, + "title": { + "description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", + "type": "string" + } + }, + "type": "object" + }, + "GenerateSshScriptRequest": { + "description": "Request message for 'GenerateSshScript' request.", + "id": "GenerateSshScriptRequest", + "properties": { + "vm": { + "description": "Required. Bastion VM Instance name to use or to create.", + "type": "string" + }, + "vmCreationConfig": { + "$ref": "VmCreationConfig", + "description": "The VM creation configuration" + }, + "vmPort": { + "description": "The port that will be open on the bastion host", + "format": "int32", + "type": "integer" + }, + "vmSelectionConfig": { + "$ref": "VmSelectionConfig", + "description": "The VM selection configuration" + } + }, + "type": "object" + }, + "GoogleCloudClouddmsV1OperationMetadata": { + "description": "Represents the metadata of the long-running operation.", + "id": "GoogleCloudClouddmsV1OperationMetadata", + "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" + }, + "ListConnectionProfilesResponse": { + "description": "Response message for 'ListConnectionProfiles' request.", + "id": "ListConnectionProfilesResponse", + "properties": { + "connectionProfiles": { + "description": "The response list of connection profiles.", + "items": { + "$ref": "ConnectionProfile" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListLocationsResponse": { + "description": "The response message for Locations.ListLocations.", + "id": "ListLocationsResponse", + "properties": { + "locations": { + "description": "A list of locations that matches the specified filter in the request.", + "items": { + "$ref": "Location" + }, + "type": "array" + }, + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + } + }, + "type": "object" + }, + "ListMigrationJobsResponse": { + "description": "Response message for 'ListMigrationJobs' request.", + "id": "ListMigrationJobsResponse", + "properties": { + "migrationJobs": { + "description": "The list of migration jobs objects.", + "items": { + "$ref": "MigrationJob" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "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" + }, + "Location": { + "description": "A resource that represents Google Cloud Platform location.", + "id": "Location", + "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" + }, + "MigrationJob": { + "description": "Represents a Database Migration Service migration job object.", + "id": "MigrationJob", + "properties": { + "createTime": { + "description": "Output only. The timestamp when the migration job resource was created. A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds. Example: \"2014-10-02T15:01:23.045123456Z\".", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "destination": { + "description": "Required. The resource name (URI) of the destination connection profile.", + "type": "string" + }, + "destinationDatabase": { + "$ref": "DatabaseType", + "description": "The database engine type and provider of the destination." + }, + "displayName": { + "description": "The migration job display name.", + "type": "string" + }, + "dumpPath": { + "description": "The path to the dump file in Google Cloud Storage, in the format: (gs://[BUCKET_NAME]/[OBJECT_NAME]).", + "type": "string" + }, + "duration": { + "description": "Output only. The duration of the migration job (in seconds). A duration in seconds with up to nine fractional digits, terminated by 's'. Example: \"3.5s\".", + "format": "google-duration", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. If the migration job is completed, the time when it was completed.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "error": { + "$ref": "Status", + "description": "Output only. The error details in case of state FAILED.", + "readOnly": true + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "The resource labels for migration job to use to annotate any related underlying resources such as Compute Engine VMs. An object containing a list of \"key\": \"value\" pairs. Example: `{ \"name\": \"wrench\", \"mass\": \"1.3kg\", \"count\": \"3\" }`.", + "type": "object" + }, + "name": { + "description": "The name (URI) of this migration job resource, in the form of: projects/{project}/locations/{location}/instances/{instance}.", + "type": "string" + }, + "phase": { + "description": "Output only. The current migration job phase.", + "enum": [ + "PHASE_UNSPECIFIED", + "FULL_DUMP", + "CDC", + "PROMOTE_IN_PROGRESS", + "WAITING_FOR_SOURCE_WRITES_TO_STOP", + "PREPARING_THE_DUMP" + ], + "enumDescriptions": [ + "The phase of the migration job is unknown.", + "The migration job is in the full dump phase.", + "The migration job is CDC phase.", + "The migration job is running the promote phase.", + "Only RDS flow - waiting for source writes to stop", + "Only RDS flow - the sources writes stopped, waiting for dump to begin" + ], + "readOnly": true, + "type": "string" + }, + "reverseSshConnectivity": { + "$ref": "ReverseSshConnectivity", + "description": "The details needed to communicate to the source over Reverse SSH tunnel connectivity." + }, + "source": { + "description": "Required. The resource name (URI) of the source connection profile.", + "type": "string" + }, + "sourceDatabase": { + "$ref": "DatabaseType", + "description": "The database engine type and provider of the source." + }, + "state": { + "description": "The current migration job state.", + "enum": [ + "STATE_UNSPECIFIED", + "MAINTENANCE", + "DRAFT", + "CREATING", + "NOT_STARTED", + "RUNNING", + "FAILED", + "COMPLETED", + "DELETING", + "STOPPING", + "STOPPED", + "DELETED", + "UPDATING", + "STARTING", + "RESTARTING", + "RESUMING" + ], + "enumDescriptions": [ + "The state of the migration job is unknown.", + "The migration job is down for maintenance.", + "The migration job is in draft mode and no resources are created.", + "The migration job is being created.", + "The migration job is created, not started and is fully editable.", + "The migration job is running.", + "The migration job failed.", + "The migration job has been completed.", + "The migration job is being deleted.", + "The migration job is being stopped.", + "The migration job is currently stopped.", + "The migration job has been deleted.", + "The migration job is being updated.", + "The migration job is starting.", + "The migration job is restarting.", + "The migration job is resuming." + ], + "type": "string" + }, + "staticIpConnectivity": { + "$ref": "StaticIpConnectivity", + "description": "static ip connectivity data (default, no additional details needed)." + }, + "type": { + "description": "Required. The migration job type.", + "enum": [ + "TYPE_UNSPECIFIED", + "ONE_TIME", + "CONTINUOUS" + ], + "enumDescriptions": [ + "The type of the migration job is unknown.", + "The migration job is a one time migration.", + "The migration job is a continuous migration." + ], + "type": "string" + }, + "updateTime": { + "description": "Output only. The timestamp when the migration job resource was last updated. A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds. Example: \"2014-10-02T15:01:23.045123456Z\".", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "vpcPeeringConnectivity": { + "$ref": "VpcPeeringConnectivity", + "description": "The details of the VPC network that the source database is located in." + } + }, + "type": "object" + }, + "MigrationJobVerificationError": { + "description": "Error message of a verification Migration job.", + "id": "MigrationJobVerificationError", + "properties": { + "errorCode": { + "description": "Output only. An instance of ErrorCode specifying the error that occurred.", + "enum": [ + "ERROR_CODE_UNSPECIFIED", + "CONNECTION_FAILURE", + "AUTHENTICATION_FAILURE", + "INVALID_CONNECTION_PROFILE_CONFIG", + "VERSION_INCOMPATIBILITY", + "CONNECTION_PROFILE_TYPES_INCOMPATIBILITY", + "NO_PGLOGICAL_INSTALLED", + "PGLOGICAL_NODE_ALREADY_EXISTS", + "INVALID_WAL_LEVEL", + "INVALID_SHARED_PRELOAD_LIBRARY", + "INSUFFICIENT_MAX_REPLICATION_SLOTS", + "INSUFFICIENT_MAX_WAL_SENDERS", + "INSUFFICIENT_MAX_WORKER_PROCESSES", + "UNSUPPORTED_EXTENSIONS", + "UNSUPPORTED_MIGRATION_TYPE", + "INVALID_RDS_LOGICAL_REPLICATION", + "UNSUPPORTED_GTID_MODE", + "UNSUPPORTED_TABLE_DEFINITION", + "UNSUPPORTED_DEFINER", + "CANT_RESTART_RUNNING_MIGRATION" + ], + "enumDescriptions": [ + "An unknown error occurred", + "We failed to connect to one of the connection profile.", + "We failed to authenticate to one of the connection profile.", + "One of the involved connection profiles has an invalid configuration.", + "The versions of the source and the destination are incompatible.", + "The types of the source and the destination are incompatible.", + "No pglogical extension installed on databases, applicable for postgres.", + "pglogical node already exists on databases, applicable for postgres.", + "The value of parameter wal_level is not set to logical.", + "The value of parameter shared_preload_libraries does not include pglogical.", + "The value of parameter max_replication_slots is not sufficient.", + "The value of parameter max_wal_senders is not sufficient.", + "The value of parameter max_worker_processes is not sufficient.", + "Extensions installed are either not supported or having unsupported versions.", + "Unsupported migration type.", + "Invalid RDS logical replication.", + "The gtid_mode is not supported, applicable for MySQL.", + "The table definition is not support due to missing primary key or replica identity.", + "The definer is not supported.", + "Migration is already running at the time of restart request." + ], + "readOnly": true, + "type": "string" + }, + "errorDetailMessage": { + "description": "Output only. A specific detailed error message, if supplied by the engine.", + "readOnly": true, + "type": "string" + }, + "errorMessage": { + "description": "Output only. A formatted message with further details about the error and a CTA.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "MySqlConnectionProfile": { + "description": "Specifies connection parameters required specifically for MySQL databases.", + "id": "MySqlConnectionProfile", + "properties": { + "cloudSqlId": { + "description": "If the source is a Cloud SQL database, use this field to provide the Cloud SQL instance ID of the source.", + "type": "string" + }, + "host": { + "description": "Required. The IP or hostname of the source MySQL database.", + "type": "string" + }, + "password": { + "description": "Required. Input only. The password for the user that Database Migration Service will be using to connect to the database. This field is not returned on request, and the value is encrypted when stored in Database Migration Service.", + "type": "string" + }, + "passwordSet": { + "description": "Output only. Indicates If this connection profile password is stored.", + "readOnly": true, + "type": "boolean" + }, + "port": { + "description": "Required. The network port of the source MySQL database.", + "format": "int32", + "type": "integer" + }, + "ssl": { + "$ref": "SslConfig", + "description": "SSL configuration for the destination to connect to the source database." + }, + "username": { + "description": "Required. The username that Database Migration Service will use to connect to the database. The value is encrypted when stored in Database Migration Service.", + "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 response of the operation in case of success. 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" + }, + "Policy": { + "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time < timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", + "id": "Policy", + "properties": { + "auditConfigs": { + "description": "Specifies cloud audit logging configuration for this policy.", + "items": { + "$ref": "AuditConfig" + }, + "type": "array" + }, + "bindings": { + "description": "Associates a list of `members` to a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one member.", + "items": { + "$ref": "Binding" + }, + "type": "array" + }, + "etag": { + "description": "`etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.", + "format": "byte", + "type": "string" + }, + "version": { + "description": "Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "PostgreSqlConnectionProfile": { + "description": "Specifies connection parameters required specifically for PostgreSQL databases.", + "id": "PostgreSqlConnectionProfile", + "properties": { + "cloudSqlId": { + "description": "If the source is a Cloud SQL database, use this field to provide the Cloud SQL instance ID of the source.", + "type": "string" + }, + "host": { + "description": "Required. The IP or hostname of the source PostgreSQL database.", + "type": "string" + }, + "password": { + "description": "Required. Input only. The password for the user that Database Migration Service will be using to connect to the database. This field is not returned on request, and the value is encrypted when stored in Database Migration Service.", + "type": "string" + }, + "passwordSet": { + "description": "Output only. Indicates If this connection profile password is stored.", + "readOnly": true, + "type": "boolean" + }, + "port": { + "description": "Required. The network port of the source PostgreSQL database.", + "format": "int32", + "type": "integer" + }, + "ssl": { + "$ref": "SslConfig", + "description": "SSL configuration for the destination to connect to the source database." + }, + "username": { + "description": "Required. The username that Database Migration Service will use to connect to the database. The value is encrypted when stored in Database Migration Service.", + "type": "string" + } + }, + "type": "object" + }, + "PromoteMigrationJobRequest": { + "description": "Request message for 'PromoteMigrationJob' request.", + "id": "PromoteMigrationJobRequest", + "properties": {}, + "type": "object" + }, + "RestartMigrationJobRequest": { + "description": "Request message for 'RestartMigrationJob' request.", + "id": "RestartMigrationJobRequest", + "properties": {}, + "type": "object" + }, + "ResumeMigrationJobRequest": { + "description": "Request message for 'ResumeMigrationJob' request.", + "id": "ResumeMigrationJobRequest", + "properties": {}, + "type": "object" + }, + "ReverseSshConnectivity": { + "description": "The details needed to configure a reverse SSH tunnel between the source and destination databases. These details will be used when calling the generateSshScript method (see https://cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.migrationJobs/generateSshScript) to produce the script that will help set up the reverse SSH tunnel, and to set up the VPC peering between the Cloud SQL private network and the VPC.", + "id": "ReverseSshConnectivity", + "properties": { + "vm": { + "description": "The name of the virtual machine (Compute Engine) used as the bastion server for the SSH tunnel.", + "type": "string" + }, + "vmIp": { + "description": "Required. The IP of the virtual machine (Compute Engine) used as the bastion server for the SSH tunnel.", + "type": "string" + }, + "vmPort": { + "description": "Required. The forwarding port of the virtual machine (Compute Engine) used as the bastion server for the SSH tunnel.", + "format": "int32", + "type": "integer" + }, + "vpc": { + "description": "The name of the VPC to peer with the Cloud SQL private network.", + "type": "string" + } + }, + "type": "object" + }, + "SetIamPolicyRequest": { + "description": "Request message for `SetIamPolicy` method.", + "id": "SetIamPolicyRequest", + "properties": { + "policy": { + "$ref": "Policy", + "description": "REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them." + }, + "updateMask": { + "description": "OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used: `paths: \"bindings, etag\"`", + "format": "google-fieldmask", + "type": "string" + } + }, + "type": "object" + }, + "SqlAclEntry": { + "description": "An entry for an Access Control list.", + "id": "SqlAclEntry", + "properties": { + "expireTime": { + "description": "The time when this access control entry expires in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example: `2012-11-15T16:19:00.094Z`.", + "format": "google-datetime", + "type": "string" + }, + "label": { + "description": "A label to identify this entry.", + "type": "string" + }, + "ttl": { + "description": "Input only. The time-to-leave of this access control entry.", + "format": "google-duration", + "type": "string" + }, + "value": { + "description": "The allowlisted value for the access control list.", + "type": "string" + } + }, + "type": "object" + }, + "SqlIpConfig": { + "description": "IP Management configuration.", + "id": "SqlIpConfig", + "properties": { + "authorizedNetworks": { + "description": "The list of external networks that are allowed to connect to the instance using the IP. See https://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation, also known as 'slash' notation (e.g. `192.168.100.0/24`).", + "items": { + "$ref": "SqlAclEntry" + }, + "type": "array" + }, + "enableIpv4": { + "description": "Whether the instance should be assigned an IPv4 address or not.", + "type": "boolean" + }, + "privateNetwork": { + "description": "The resource link for the VPC network from which the Cloud SQL instance is accessible for private IP. For example, `/projects/myProject/global/networks/default`. This setting can be updated, but it cannot be removed after it is set.", + "type": "string" + }, + "requireSsl": { + "description": "Whether SSL connections over IP should be enforced or not.", + "type": "boolean" + } + }, + "type": "object" + }, + "SshScript": { + "description": "Response message for 'GenerateSshScript' request.", + "id": "SshScript", + "properties": { + "script": { + "description": "The ssh configuration script.", + "type": "string" + } + }, + "type": "object" + }, + "SslConfig": { + "description": "SSL configuration information.", + "id": "SslConfig", + "properties": { + "caCertificate": { + "description": "Required. Input only. The x509 PEM-encoded certificate of the CA that signed the source database server's certificate. The replica will use this certificate to verify it's connecting to the right host.", + "type": "string" + }, + "clientCertificate": { + "description": "Input only. The x509 PEM-encoded certificate that will be used by the replica to authenticate against the source database server.If this field is used then the 'client_key' field is mandatory.", + "type": "string" + }, + "clientKey": { + "description": "Input only. The unencrypted PKCS#1 or PKCS#8 PEM-encoded private key associated with the Client Certificate. If this field is used then the 'client_certificate' field is mandatory.", + "type": "string" + }, + "type": { + "description": "Output only. The ssl config type according to 'client_key', 'client_certificate' and 'ca_certificate'.", + "enum": [ + "SSL_TYPE_UNSPECIFIED", + "SERVER_ONLY", + "SERVER_CLIENT" + ], + "enumDescriptions": [ + "Unspecified.", + "Only 'ca_certificate' specified.", + "Both server ('ca_certificate'), and client ('client_key', 'client_certificate') specified." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "StartMigrationJobRequest": { + "description": "Request message for 'StartMigrationJob' request.", + "id": "StartMigrationJobRequest", + "properties": {}, + "type": "object" + }, + "StaticIpConnectivity": { + "description": "The source database will allow incoming connections from the destination database's public IP. You can retrieve the Cloud SQL instance's public IP from the Cloud SQL console or using Cloud SQL APIs. No additional configuration is required.", + "id": "StaticIpConnectivity", + "properties": {}, + "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" + }, + "StopMigrationJobRequest": { + "description": "Request message for 'StopMigrationJob' request.", + "id": "StopMigrationJobRequest", + "properties": {}, + "type": "object" + }, + "TestIamPermissionsRequest": { + "description": "Request message for `TestIamPermissions` method.", + "id": "TestIamPermissionsRequest", + "properties": { + "permissions": { + "description": "The set of permissions to check for the `resource`. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "TestIamPermissionsResponse": { + "description": "Response message for `TestIamPermissions` method.", + "id": "TestIamPermissionsResponse", + "properties": { + "permissions": { + "description": "A subset of `TestPermissionsRequest.permissions` that the caller is allowed.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "VerifyMigrationJobRequest": { + "description": "Request message for 'VerifyMigrationJob' request.", + "id": "VerifyMigrationJobRequest", + "properties": {}, + "type": "object" + }, + "VmCreationConfig": { + "description": "VM creation configuration message", + "id": "VmCreationConfig", + "properties": { + "subnet": { + "description": "The subnet name the vm needs to be created in.", + "type": "string" + }, + "vmMachineType": { + "description": "Required. VM instance machine type to create.", + "type": "string" + }, + "vmZone": { + "description": "The Google Cloud Platform zone to create the VM in.", + "type": "string" + } + }, + "type": "object" + }, + "VmSelectionConfig": { + "description": "VM selection configuration message", + "id": "VmSelectionConfig", + "properties": { + "vmZone": { + "description": "Required. The Google Cloud Platform zone the VM is located.", + "type": "string" + } + }, + "type": "object" + }, + "VpcPeeringConnectivity": { + "description": "The details of the VPC where the source database is located in Google Cloud. We will use this information to set up the VPC peering connection between Cloud SQL and this VPC.", + "id": "VpcPeeringConnectivity", + "properties": { + "vpc": { + "description": "The name of the VPC network to peer with the Cloud SQL private network.", + "type": "string" + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "Database Migration API", + "version": "v1", + "version_module": true +} \ No newline at end of file diff --git a/discovery/datamigration-v1beta1.json b/discovery/datamigration-v1beta1.json index 2fc4f86abe0..86e96d52a1c 100644 --- a/discovery/datamigration-v1beta1.json +++ b/discovery/datamigration-v1beta1.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" } } } @@ -144,7 +144,7 @@ ], "parameters": { "filter": { - "description": "The standard list 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" }, @@ -156,13 +156,13 @@ "type": "string" }, "pageSize": { - "description": "The standard list page size.", + "description": "The maximum number of results to return. If not set, the service will select a default.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "The standard list page token.", + "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" } @@ -1049,7 +1049,7 @@ } } }, - "revision": "20210216", + "revision": "20210317", "rootUrl": "https://datamigration.googleapis.com/", "schemas": { "AuditConfig": { @@ -1765,7 +1765,8 @@ "VERSION_INCOMPATIBILITY", "CONNECTION_PROFILE_TYPES_INCOMPATIBILITY", "UNSUPPORTED_GTID_MODE", - "UNSUPPORTED_DEFINER" + "UNSUPPORTED_DEFINER", + "CANT_RESTART_RUNNING_MIGRATION" ], "enumDescriptions": [ "An unknown error occurred", @@ -1775,7 +1776,8 @@ "The versions of the source and the destination are incompatible.", "The types of the source and the destination are incompatible.", "The gtid_mode is not supported, applicable for MySQL.", - "The definer is not supported." + "The definer is not supported.", + "Migration is already running at the time of restart request." ], "readOnly": true, "type": "string" diff --git a/discovery/dataproc-v1.json b/discovery/dataproc-v1.json index 2006c59843b..a443438dde6 100644 --- a/discovery/dataproc-v1.json +++ b/discovery/dataproc-v1.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" } } } @@ -2260,7 +2260,7 @@ } } }, - "revision": "20210225", + "revision": "20210315", "rootUrl": "https://dataproc.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -2684,7 +2684,10 @@ "RUNNING", "ERROR", "DELETING", - "UPDATING" + "UPDATING", + "STOPPING", + "STOPPED", + "STARTING" ], "enumDescriptions": [ "The cluster state is unknown.", @@ -2692,7 +2695,10 @@ "The cluster is currently running and healthy. It is ready for use.", "The cluster encountered an error. It is not ready for use.", "The cluster is being deleted. It cannot be used.", - "The cluster is being updated. It continues to accept and process jobs." + "The cluster is being updated. It continues to accept and process jobs.", + "The cluster is being stopped. It cannot be used.", + "The cluster is currently stopped. It is not ready for use.", + "The cluster is being started. It is not ready for use." ], "readOnly": true, "type": "string" @@ -3103,7 +3109,7 @@ "type": "string" }, "numInstances": { - "description": "Optional. The number of VM instances in the instance group. For master instance groups, must be set to 1.", + "description": "Optional. The number of VM instances in the instance group. For HA cluster master_config groups, must be set to 3. For standard cluster master_config groups, must be set to 1.", "format": "int32", "type": "integer" }, @@ -4113,7 +4119,9 @@ "COMPONENT_UNSPECIFIED", "ANACONDA", "DOCKER", + "DRUID", "FLINK", + "HBASE", "HIVE_WEBHCAT", "JUPYTER", "PRESTO", @@ -4126,7 +4134,9 @@ "Unspecified component. Specifying this will cause Cluster creation to fail.", "The Anaconda python distribution. The Anaconda component is not supported in the Dataproc 2.0 image. The 2.0 image is pre-installed with Miniconda.", "Docker", + "The Druid query engine. (beta)", "Flink", + "HBase. (beta)", "The Hive Web HCatalog (the REST service for accessing HCatalog).", "The Jupyter Notebook.", "The Presto query engine.", diff --git a/discovery/dataproc-v1beta2.json b/discovery/dataproc-v1beta2.json index 29ed072ad37..196784fa39b 100644 --- a/discovery/dataproc-v1beta2.json +++ b/discovery/dataproc-v1beta2.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" } } } @@ -2291,7 +2291,7 @@ } } }, - "revision": "20210225", + "revision": "20210315", "rootUrl": "https://dataproc.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -3143,7 +3143,7 @@ "type": "string" }, "numInstances": { - "description": "Optional. The number of VM instances in the instance group. For master instance groups, must be set to 1.", + "description": "Optional. The number of VM instances in the instance group. For HA cluster master_config groups, must be set to 3. For standard cluster master_config groups, must be set to 1.", "format": "int32", "type": "integer" }, diff --git a/discovery/datastore-v1.json b/discovery/datastore-v1.json index e67affc3ed7..544a741d62a 100644 --- a/discovery/datastore-v1.json +++ b/discovery/datastore-v1.json @@ -625,7 +625,7 @@ } } }, - "revision": "20201003", + "revision": "20210220", "rootUrl": "https://datastore.googleapis.com/", "schemas": { "AllocateIdsRequest": { @@ -1460,7 +1460,7 @@ "type": "object" }, "LatLng": { - "description": "An object representing a latitude/longitude pair. This is expressed as a pair of doubles representing degrees latitude and degrees longitude. Unless specified otherwise, this must conform to the WGS84 standard. Values must be within normalized ranges.", + "description": "An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this must conform to the WGS84 standard. Values must be within normalized ranges.", "id": "LatLng", "properties": { "latitude": { diff --git a/discovery/datastore-v1beta3.json b/discovery/datastore-v1beta3.json index 72084ea9ed8..552a6691531 100644 --- a/discovery/datastore-v1beta3.json +++ b/discovery/datastore-v1beta3.json @@ -307,7 +307,7 @@ } } }, - "revision": "20201003", + "revision": "20210220", "rootUrl": "https://datastore.googleapis.com/", "schemas": { "AllocateIdsRequest": { @@ -935,7 +935,7 @@ "type": "object" }, "LatLng": { - "description": "An object representing a latitude/longitude pair. This is expressed as a pair of doubles representing degrees latitude and degrees longitude. Unless specified otherwise, this must conform to the WGS84 standard. Values must be within normalized ranges.", + "description": "An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this must conform to the WGS84 standard. Values must be within normalized ranges.", "id": "LatLng", "properties": { "latitude": { diff --git a/discovery/deploymentmanager-alpha.json b/discovery/deploymentmanager-alpha.json index 17e7c3d5611..2c62c5181c5 100644 --- a/discovery/deploymentmanager-alpha.json +++ b/discovery/deploymentmanager-alpha.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" }, "https://www.googleapis.com/auth/cloud-platform.read-only": { "description": "View your data across Google Cloud Platform services" @@ -1588,7 +1588,7 @@ } } }, - "revision": "20210225", + "revision": "20210311", "rootUrl": "https://deploymentmanager.googleapis.com/", "schemas": { "AsyncOptions": { diff --git a/discovery/deploymentmanager-v2.json b/discovery/deploymentmanager-v2.json index b40275b7e7c..4306a461604 100644 --- a/discovery/deploymentmanager-v2.json +++ b/discovery/deploymentmanager-v2.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" }, "https://www.googleapis.com/auth/cloud-platform.read-only": { "description": "View your data across Google Cloud Platform services" @@ -988,7 +988,7 @@ } } }, - "revision": "20210225", + "revision": "20210311", "rootUrl": "https://deploymentmanager.googleapis.com/", "schemas": { "AuditConfig": { diff --git a/discovery/deploymentmanager-v2beta.json b/discovery/deploymentmanager-v2beta.json index a20ee3fedb8..7c7dc20531a 100644 --- a/discovery/deploymentmanager-v2beta.json +++ b/discovery/deploymentmanager-v2beta.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" }, "https://www.googleapis.com/auth/cloud-platform.read-only": { "description": "View your data across Google Cloud Platform services" @@ -1552,7 +1552,7 @@ } } }, - "revision": "20210225", + "revision": "20210311", "rootUrl": "https://deploymentmanager.googleapis.com/", "schemas": { "AsyncOptions": { diff --git a/discovery/dialogflow-v2.json b/discovery/dialogflow-v2.json index 97a4749a831..1f70d6400d7 100644 --- a/discovery/dialogflow-v2.json +++ b/discovery/dialogflow-v2.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" }, "https://www.googleapis.com/auth/dialogflow": { "description": "View, manage and query your Dialogflow agents" @@ -1544,26 +1544,60 @@ } } }, - "sessions": { + "knowledgeBases": { "methods": { - "deleteContexts": { - "description": "Deletes all active contexts in the specified session.", - "flatPath": "v2/projects/{projectsId}/agent/sessions/{sessionsId}/contexts", - "httpMethod": "DELETE", - "id": "dialogflow.projects.agent.sessions.deleteContexts", + "create": { + "description": "Creates a knowledge base.", + "flatPath": "v2/projects/{projectsId}/agent/knowledgeBases", + "httpMethod": "POST", + "id": "dialogflow.projects.agent.knowledgeBases.create", "parameterOrder": [ "parent" ], "parameters": { "parent": { - "description": "Required. The name of the session to delete all contexts from. Format: `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", + "description": "Required. The project to create a knowledge base for. Format: `projects//locations/`.", "location": "path", - "pattern": "^projects/[^/]+/agent/sessions/[^/]+$", + "pattern": "^projects/[^/]+/agent$", "required": true, "type": "string" } }, - "path": "v2/{+parent}/contexts", + "path": "v2/{+parent}/knowledgeBases", + "request": { + "$ref": "GoogleCloudDialogflowV2KnowledgeBase" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2KnowledgeBase" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "delete": { + "description": "Deletes the specified knowledge base.", + "flatPath": "v2/projects/{projectsId}/agent/knowledgeBases/{knowledgeBasesId}", + "httpMethod": "DELETE", + "id": "dialogflow.projects.agent.knowledgeBases.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "force": { + "description": "Optional. Force deletes the knowledge base. When set to true, any documents in the knowledge base are also deleted.", + "location": "query", + "type": "boolean" + }, + "name": { + "description": "Required. The name of the knowledge base to delete. Format: `projects//locations//knowledgeBases/`.", + "location": "path", + "pattern": "^projects/[^/]+/agent/knowledgeBases/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", "response": { "$ref": "GoogleProtobufEmpty" }, @@ -1572,29 +1606,98 @@ "https://www.googleapis.com/auth/dialogflow" ] }, - "detectIntent": { - "description": "Processes a natural language query and returns structured, actionable data as a result. This method is not idempotent, because it may cause contexts and session entity types to be updated, which in turn might affect results of future queries. Note: Always use agent versions for production traffic. See [Versions and environments](https://cloud.google.com/dialogflow/es/docs/agents-versions).", - "flatPath": "v2/projects/{projectsId}/agent/sessions/{sessionsId}:detectIntent", - "httpMethod": "POST", - "id": "dialogflow.projects.agent.sessions.detectIntent", + "get": { + "description": "Retrieves the specified knowledge base.", + "flatPath": "v2/projects/{projectsId}/agent/knowledgeBases/{knowledgeBasesId}", + "httpMethod": "GET", + "id": "dialogflow.projects.agent.knowledgeBases.get", "parameterOrder": [ - "session" + "name" ], "parameters": { - "session": { - "description": "Required. The name of the session this query is sent to. Format: `projects//agent/sessions/`, or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment (`Environment ID` might be referred to as environment name at some places). If `User ID` is not specified, we are using \"-\". It's up to the API caller to choose an appropriate `Session ID` and `User Id`. They can be a random number or some type of user and session identifiers (preferably hashed). The length of the `Session ID` and `User ID` must not exceed 36 characters. For more information, see the [API interactions guide](https://cloud.google.com/dialogflow/docs/api-overview). Note: Always use agent versions for production traffic. See [Versions and environments](https://cloud.google.com/dialogflow/es/docs/agents-versions).", + "name": { + "description": "Required. The name of the knowledge base to retrieve. Format `projects//locations//knowledgeBases/`.", "location": "path", - "pattern": "^projects/[^/]+/agent/sessions/[^/]+$", + "pattern": "^projects/[^/]+/agent/knowledgeBases/[^/]+$", "required": true, "type": "string" } }, - "path": "v2/{+session}:detectIntent", + "path": "v2/{+name}", + "response": { + "$ref": "GoogleCloudDialogflowV2KnowledgeBase" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "list": { + "description": "Returns the list of all knowledge bases of the specified agent.", + "flatPath": "v2/projects/{projectsId}/agent/knowledgeBases", + "httpMethod": "GET", + "id": "dialogflow.projects.agent.knowledgeBases.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "The maximum number of items to return in a single page. By default 10 and at most 100.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The next_page_token value returned from a previous list request.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The project to list of knowledge bases for. Format: `projects//locations/`.", + "location": "path", + "pattern": "^projects/[^/]+/agent$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/knowledgeBases", + "response": { + "$ref": "GoogleCloudDialogflowV2ListKnowledgeBasesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "patch": { + "description": "Updates the specified knowledge base.", + "flatPath": "v2/projects/{projectsId}/agent/knowledgeBases/{knowledgeBasesId}", + "httpMethod": "PATCH", + "id": "dialogflow.projects.agent.knowledgeBases.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The knowledge base resource name. The name must be empty when creating a knowledge base. Format: `projects//locations//knowledgeBases/`.", + "location": "path", + "pattern": "^projects/[^/]+/agent/knowledgeBases/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. Not specified means `update all`. Currently, only `display_name` can be updated, an InvalidArgument will be returned for attempting to update other fields.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2/{+name}", "request": { - "$ref": "GoogleCloudDialogflowV2DetectIntentRequest" + "$ref": "GoogleCloudDialogflowV2KnowledgeBase" }, "response": { - "$ref": "GoogleCloudDialogflowV2DetectIntentResponse" + "$ref": "GoogleCloudDialogflowV2KnowledgeBase" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", @@ -1603,31 +1706,31 @@ } }, "resources": { - "contexts": { + "documents": { "methods": { "create": { - "description": "Creates a context. If the specified context already exists, overrides the context.", - "flatPath": "v2/projects/{projectsId}/agent/sessions/{sessionsId}/contexts", + "description": "Creates a new document. Operation ", + "flatPath": "v2/projects/{projectsId}/agent/knowledgeBases/{knowledgeBasesId}/documents", "httpMethod": "POST", - "id": "dialogflow.projects.agent.sessions.contexts.create", + "id": "dialogflow.projects.agent.knowledgeBases.documents.create", "parameterOrder": [ "parent" ], "parameters": { "parent": { - "description": "Required. The session to create a context for. Format: `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", + "description": "Required. The knowledge base to create a document for. Format: `projects//locations//knowledgeBases/`.", "location": "path", - "pattern": "^projects/[^/]+/agent/sessions/[^/]+$", + "pattern": "^projects/[^/]+/agent/knowledgeBases/[^/]+$", "required": true, "type": "string" } }, - "path": "v2/{+parent}/contexts", + "path": "v2/{+parent}/documents", "request": { - "$ref": "GoogleCloudDialogflowV2Context" + "$ref": "GoogleCloudDialogflowV2Document" }, "response": { - "$ref": "GoogleCloudDialogflowV2Context" + "$ref": "GoogleLongrunningOperation" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", @@ -1635,25 +1738,25 @@ ] }, "delete": { - "description": "Deletes the specified context.", - "flatPath": "v2/projects/{projectsId}/agent/sessions/{sessionsId}/contexts/{contextsId}", + "description": "Deletes the specified document. Operation ", + "flatPath": "v2/projects/{projectsId}/agent/knowledgeBases/{knowledgeBasesId}/documents/{documentsId}", "httpMethod": "DELETE", - "id": "dialogflow.projects.agent.sessions.contexts.delete", + "id": "dialogflow.projects.agent.knowledgeBases.documents.delete", "parameterOrder": [ "name" ], "parameters": { "name": { - "description": "Required. The name of the context to delete. Format: `projects//agent/sessions//contexts/` or `projects//agent/environments//users//sessions//contexts/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", + "description": "Required. The name of the document to delete. Format: `projects//locations//knowledgeBases//documents/`.", "location": "path", - "pattern": "^projects/[^/]+/agent/sessions/[^/]+/contexts/[^/]+$", + "pattern": "^projects/[^/]+/agent/knowledgeBases/[^/]+/documents/[^/]+$", "required": true, "type": "string" } }, "path": "v2/{+name}", "response": { - "$ref": "GoogleProtobufEmpty" + "$ref": "GoogleLongrunningOperation" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", @@ -1661,25 +1764,25 @@ ] }, "get": { - "description": "Retrieves the specified context.", - "flatPath": "v2/projects/{projectsId}/agent/sessions/{sessionsId}/contexts/{contextsId}", + "description": "Retrieves the specified document.", + "flatPath": "v2/projects/{projectsId}/agent/knowledgeBases/{knowledgeBasesId}/documents/{documentsId}", "httpMethod": "GET", - "id": "dialogflow.projects.agent.sessions.contexts.get", + "id": "dialogflow.projects.agent.knowledgeBases.documents.get", "parameterOrder": [ "name" ], "parameters": { "name": { - "description": "Required. The name of the context. Format: `projects//agent/sessions//contexts/` or `projects//agent/environments//users//sessions//contexts/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", + "description": "Required. The name of the document to retrieve. Format `projects//locations//knowledgeBases//documents/`.", "location": "path", - "pattern": "^projects/[^/]+/agent/sessions/[^/]+/contexts/[^/]+$", + "pattern": "^projects/[^/]+/agent/knowledgeBases/[^/]+/documents/[^/]+$", "required": true, "type": "string" } }, "path": "v2/{+name}", "response": { - "$ref": "GoogleCloudDialogflowV2Context" + "$ref": "GoogleCloudDialogflowV2Document" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", @@ -1687,36 +1790,36 @@ ] }, "list": { - "description": "Returns the list of all contexts in the specified session.", - "flatPath": "v2/projects/{projectsId}/agent/sessions/{sessionsId}/contexts", + "description": "Returns the list of all documents of the knowledge base.", + "flatPath": "v2/projects/{projectsId}/agent/knowledgeBases/{knowledgeBasesId}/documents", "httpMethod": "GET", - "id": "dialogflow.projects.agent.sessions.contexts.list", + "id": "dialogflow.projects.agent.knowledgeBases.documents.list", "parameterOrder": [ "parent" ], "parameters": { "pageSize": { - "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.", + "description": "The maximum number of items to return in a single page. By default 10 and at most 100.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "Optional. The next_page_token value returned from a previous list request.", + "description": "The next_page_token value returned from a previous list request.", "location": "query", "type": "string" }, "parent": { - "description": "Required. The session to list all contexts from. Format: `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", + "description": "Required. The knowledge base to list all documents for. Format: `projects//locations//knowledgeBases/`.", "location": "path", - "pattern": "^projects/[^/]+/agent/sessions/[^/]+$", + "pattern": "^projects/[^/]+/agent/knowledgeBases/[^/]+$", "required": true, "type": "string" } }, - "path": "v2/{+parent}/contexts", + "path": "v2/{+parent}/documents", "response": { - "$ref": "GoogleCloudDialogflowV2ListContextsResponse" + "$ref": "GoogleCloudDialogflowV2ListDocumentsResponse" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", @@ -1724,23 +1827,23 @@ ] }, "patch": { - "description": "Updates the specified context.", - "flatPath": "v2/projects/{projectsId}/agent/sessions/{sessionsId}/contexts/{contextsId}", + "description": "Updates the specified document. Operation ", + "flatPath": "v2/projects/{projectsId}/agent/knowledgeBases/{knowledgeBasesId}/documents/{documentsId}", "httpMethod": "PATCH", - "id": "dialogflow.projects.agent.sessions.contexts.patch", + "id": "dialogflow.projects.agent.knowledgeBases.documents.patch", "parameterOrder": [ "name" ], "parameters": { "name": { - "description": "Required. The unique identifier of the context. Format: `projects//agent/sessions//contexts/`, or `projects//agent/environments//users//sessions//contexts/`. The `Context ID` is always converted to lowercase, may only contain characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. The following context names are reserved for internal use by Dialogflow. You should not use these contexts or create contexts with these names: * `__system_counters__` * `*_id_dialog_context` * `*_dialog_params_size`", + "description": "Optional. The document resource name. The name must be empty when creating a document. Format: `projects//locations//knowledgeBases//documents/`.", "location": "path", - "pattern": "^projects/[^/]+/agent/sessions/[^/]+/contexts/[^/]+$", + "pattern": "^projects/[^/]+/agent/knowledgeBases/[^/]+/documents/[^/]+$", "required": true, "type": "string" }, "updateMask": { - "description": "Optional. The mask to control which fields get updated.", + "description": "Optional. Not specified means `update all`. Currently, only `display_name` can be updated, an InvalidArgument will be returned for attempting to update other fields.", "format": "google-fieldmask", "location": "query", "type": "string" @@ -1748,43 +1851,4007 @@ }, "path": "v2/{+name}", "request": { - "$ref": "GoogleCloudDialogflowV2Context" + "$ref": "GoogleCloudDialogflowV2Document" }, "response": { - "$ref": "GoogleCloudDialogflowV2Context" + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "reload": { + "description": "Reloads the specified document from its specified source, content_uri or content. The previously loaded content of the document will be deleted. Note: Even when the content of the document has not changed, there still may be side effects because of internal implementation changes. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`. Operation ", + "flatPath": "v2/projects/{projectsId}/agent/knowledgeBases/{knowledgeBasesId}/documents/{documentsId}:reload", + "httpMethod": "POST", + "id": "dialogflow.projects.agent.knowledgeBases.documents.reload", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the document to reload. Format: `projects//locations//knowledgeBases//documents/`", + "location": "path", + "pattern": "^projects/[^/]+/agent/knowledgeBases/[^/]+/documents/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}:reload", + "request": { + "$ref": "GoogleCloudDialogflowV2ReloadDocumentRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/dialogflow" ] } - } - }, - "entityTypes": { + } + } + } + }, + "sessions": { + "methods": { + "deleteContexts": { + "description": "Deletes all active contexts in the specified session.", + "flatPath": "v2/projects/{projectsId}/agent/sessions/{sessionsId}/contexts", + "httpMethod": "DELETE", + "id": "dialogflow.projects.agent.sessions.deleteContexts", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The name of the session to delete all contexts from. Format: `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", + "location": "path", + "pattern": "^projects/[^/]+/agent/sessions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/contexts", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "detectIntent": { + "description": "Processes a natural language query and returns structured, actionable data as a result. This method is not idempotent, because it may cause contexts and session entity types to be updated, which in turn might affect results of future queries. Note: Always use agent versions for production traffic. See [Versions and environments](https://cloud.google.com/dialogflow/es/docs/agents-versions).", + "flatPath": "v2/projects/{projectsId}/agent/sessions/{sessionsId}:detectIntent", + "httpMethod": "POST", + "id": "dialogflow.projects.agent.sessions.detectIntent", + "parameterOrder": [ + "session" + ], + "parameters": { + "session": { + "description": "Required. The name of the session this query is sent to. Format: `projects//agent/sessions/`, or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment (`Environment ID` might be referred to as environment name at some places). If `User ID` is not specified, we are using \"-\". It's up to the API caller to choose an appropriate `Session ID` and `User Id`. They can be a random number or some type of user and session identifiers (preferably hashed). The length of the `Session ID` and `User ID` must not exceed 36 characters. For more information, see the [API interactions guide](https://cloud.google.com/dialogflow/docs/api-overview). Note: Always use agent versions for production traffic. See [Versions and environments](https://cloud.google.com/dialogflow/es/docs/agents-versions).", + "location": "path", + "pattern": "^projects/[^/]+/agent/sessions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+session}:detectIntent", + "request": { + "$ref": "GoogleCloudDialogflowV2DetectIntentRequest" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2DetectIntentResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + } + }, + "resources": { + "contexts": { + "methods": { + "create": { + "description": "Creates a context. If the specified context already exists, overrides the context.", + "flatPath": "v2/projects/{projectsId}/agent/sessions/{sessionsId}/contexts", + "httpMethod": "POST", + "id": "dialogflow.projects.agent.sessions.contexts.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The session to create a context for. Format: `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", + "location": "path", + "pattern": "^projects/[^/]+/agent/sessions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/contexts", + "request": { + "$ref": "GoogleCloudDialogflowV2Context" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2Context" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "delete": { + "description": "Deletes the specified context.", + "flatPath": "v2/projects/{projectsId}/agent/sessions/{sessionsId}/contexts/{contextsId}", + "httpMethod": "DELETE", + "id": "dialogflow.projects.agent.sessions.contexts.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the context to delete. Format: `projects//agent/sessions//contexts/` or `projects//agent/environments//users//sessions//contexts/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", + "location": "path", + "pattern": "^projects/[^/]+/agent/sessions/[^/]+/contexts/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "get": { + "description": "Retrieves the specified context.", + "flatPath": "v2/projects/{projectsId}/agent/sessions/{sessionsId}/contexts/{contextsId}", + "httpMethod": "GET", + "id": "dialogflow.projects.agent.sessions.contexts.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the context. Format: `projects//agent/sessions//contexts/` or `projects//agent/environments//users//sessions//contexts/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", + "location": "path", + "pattern": "^projects/[^/]+/agent/sessions/[^/]+/contexts/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "GoogleCloudDialogflowV2Context" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "list": { + "description": "Returns the list of all contexts in the specified session.", + "flatPath": "v2/projects/{projectsId}/agent/sessions/{sessionsId}/contexts", + "httpMethod": "GET", + "id": "dialogflow.projects.agent.sessions.contexts.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. The next_page_token value returned from a previous list request.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The session to list all contexts from. Format: `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", + "location": "path", + "pattern": "^projects/[^/]+/agent/sessions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/contexts", + "response": { + "$ref": "GoogleCloudDialogflowV2ListContextsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "patch": { + "description": "Updates the specified context.", + "flatPath": "v2/projects/{projectsId}/agent/sessions/{sessionsId}/contexts/{contextsId}", + "httpMethod": "PATCH", + "id": "dialogflow.projects.agent.sessions.contexts.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The unique identifier of the context. Format: `projects//agent/sessions//contexts/`, or `projects//agent/environments//users//sessions//contexts/`. The `Context ID` is always converted to lowercase, may only contain characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. The following context names are reserved for internal use by Dialogflow. You should not use these contexts or create contexts with these names: * `__system_counters__` * `*_id_dialog_context` * `*_dialog_params_size`", + "location": "path", + "pattern": "^projects/[^/]+/agent/sessions/[^/]+/contexts/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. The mask to control which fields get updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2/{+name}", + "request": { + "$ref": "GoogleCloudDialogflowV2Context" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2Context" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + } + } + }, + "entityTypes": { + "methods": { + "create": { + "description": "Creates a session entity type. If the specified session entity type already exists, overrides the session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.", + "flatPath": "v2/projects/{projectsId}/agent/sessions/{sessionsId}/entityTypes", + "httpMethod": "POST", + "id": "dialogflow.projects.agent.sessions.entityTypes.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The session to create a session entity type for. Format: `projects//agent/sessions/` or `projects//agent/environments//users// sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", + "location": "path", + "pattern": "^projects/[^/]+/agent/sessions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/entityTypes", + "request": { + "$ref": "GoogleCloudDialogflowV2SessionEntityType" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2SessionEntityType" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "delete": { + "description": "Deletes the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.", + "flatPath": "v2/projects/{projectsId}/agent/sessions/{sessionsId}/entityTypes/{entityTypesId}", + "httpMethod": "DELETE", + "id": "dialogflow.projects.agent.sessions.entityTypes.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the entity type to delete. Format: `projects//agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", + "location": "path", + "pattern": "^projects/[^/]+/agent/sessions/[^/]+/entityTypes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "get": { + "description": "Retrieves the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.", + "flatPath": "v2/projects/{projectsId}/agent/sessions/{sessionsId}/entityTypes/{entityTypesId}", + "httpMethod": "GET", + "id": "dialogflow.projects.agent.sessions.entityTypes.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the session entity type. Format: `projects//agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", + "location": "path", + "pattern": "^projects/[^/]+/agent/sessions/[^/]+/entityTypes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "GoogleCloudDialogflowV2SessionEntityType" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "list": { + "description": "Returns the list of all session entity types in the specified session. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.", + "flatPath": "v2/projects/{projectsId}/agent/sessions/{sessionsId}/entityTypes", + "httpMethod": "GET", + "id": "dialogflow.projects.agent.sessions.entityTypes.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. The next_page_token value returned from a previous list request.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The session to list all session entity types from. Format: `projects//agent/sessions/` or `projects//agent/environments//users// sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", + "location": "path", + "pattern": "^projects/[^/]+/agent/sessions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/entityTypes", + "response": { + "$ref": "GoogleCloudDialogflowV2ListSessionEntityTypesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "patch": { + "description": "Updates the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.", + "flatPath": "v2/projects/{projectsId}/agent/sessions/{sessionsId}/entityTypes/{entityTypesId}", + "httpMethod": "PATCH", + "id": "dialogflow.projects.agent.sessions.entityTypes.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The unique identifier of this session entity type. Format: `projects//agent/sessions//entityTypes/`, or `projects//agent/environments//users//sessions//entityTypes/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. `` must be the display name of an existing entity type in the same agent that will be overridden or supplemented.", + "location": "path", + "pattern": "^projects/[^/]+/agent/sessions/[^/]+/entityTypes/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. The mask to control which fields get updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2/{+name}", + "request": { + "$ref": "GoogleCloudDialogflowV2SessionEntityType" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2SessionEntityType" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + } + } + } + } + } + } + }, + "answerRecords": { + "methods": { + "list": { + "description": "Returns the list of all answer records in the specified project in reverse chronological order.", + "flatPath": "v2/projects/{projectsId}/answerRecords", + "httpMethod": "GET", + "id": "dialogflow.projects.answerRecords.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Required. Filters to restrict results to specific answer records. Filter on answer record type. Currently predicates on `type` is supported, valid values are `ARTICLE_ANSWER`, `FAQ_ANSWER`. For more information about filtering, see [API Filtering](https://aip.dev/160).", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of records to return in a single page. The server may return fewer records than this. If unspecified, we use 10. The maximum is 100.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. The ListAnswerRecordsResponse.next_page_token value returned from a previous list request used to continue listing on the next page.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The project to list all answer records for in reverse chronological order. Format: `projects//locations/`.", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/answerRecords", + "response": { + "$ref": "GoogleCloudDialogflowV2ListAnswerRecordsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "patch": { + "description": "Updates the specified answer record.", + "flatPath": "v2/projects/{projectsId}/answerRecords/{answerRecordsId}", + "httpMethod": "PATCH", + "id": "dialogflow.projects.answerRecords.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The unique identifier of this answer record. Format: `projects//locations//answerRecords/`.", + "location": "path", + "pattern": "^projects/[^/]+/answerRecords/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. The mask to control which fields get updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2/{+name}", + "request": { + "$ref": "GoogleCloudDialogflowV2AnswerRecord" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2AnswerRecord" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + } + } + }, + "conversationProfiles": { + "methods": { + "create": { + "description": "Creates a conversation profile in the specified project. ConversationProfile.CreateTime and ConversationProfile.UpdateTime aren't populated in the response. You can retrieve them via GetConversationProfile API.", + "flatPath": "v2/projects/{projectsId}/conversationProfiles", + "httpMethod": "POST", + "id": "dialogflow.projects.conversationProfiles.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The project to create a conversation profile for. Format: `projects//locations/`.", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/conversationProfiles", + "request": { + "$ref": "GoogleCloudDialogflowV2ConversationProfile" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2ConversationProfile" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "delete": { + "description": "Deletes the specified conversation profile.", + "flatPath": "v2/projects/{projectsId}/conversationProfiles/{conversationProfilesId}", + "httpMethod": "DELETE", + "id": "dialogflow.projects.conversationProfiles.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the conversation profile to delete. Format: `projects//locations//conversationProfiles/`.", + "location": "path", + "pattern": "^projects/[^/]+/conversationProfiles/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "get": { + "description": "Retrieves the specified conversation profile.", + "flatPath": "v2/projects/{projectsId}/conversationProfiles/{conversationProfilesId}", + "httpMethod": "GET", + "id": "dialogflow.projects.conversationProfiles.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the conversation profile. Format: `projects//locations//conversationProfiles/`.", + "location": "path", + "pattern": "^projects/[^/]+/conversationProfiles/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "GoogleCloudDialogflowV2ConversationProfile" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "list": { + "description": "Returns the list of all conversation profiles in the specified project.", + "flatPath": "v2/projects/{projectsId}/conversationProfiles", + "httpMethod": "GET", + "id": "dialogflow.projects.conversationProfiles.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "The maximum number of items to return in a single page. By default 100 and at most 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The next_page_token value returned from a previous list request.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The project to list all conversation profiles from. Format: `projects//locations/`.", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/conversationProfiles", + "response": { + "$ref": "GoogleCloudDialogflowV2ListConversationProfilesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "patch": { + "description": "Updates the specified conversation profile. ConversationProfile.CreateTime and ConversationProfile.UpdateTime aren't populated in the response. You can retrieve them via GetConversationProfile API.", + "flatPath": "v2/projects/{projectsId}/conversationProfiles/{conversationProfilesId}", + "httpMethod": "PATCH", + "id": "dialogflow.projects.conversationProfiles.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The unique identifier of this conversation profile. Format: `projects//locations//conversationProfiles/`.", + "location": "path", + "pattern": "^projects/[^/]+/conversationProfiles/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. The mask to control which fields to update.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2/{+name}", + "request": { + "$ref": "GoogleCloudDialogflowV2ConversationProfile" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2ConversationProfile" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + } + } + }, + "conversations": { + "methods": { + "complete": { + "description": "Completes the specified conversation. Finished conversations are purged from the database after 30 days.", + "flatPath": "v2/projects/{projectsId}/conversations/{conversationsId}:complete", + "httpMethod": "POST", + "id": "dialogflow.projects.conversations.complete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Resource identifier of the conversation to close. Format: `projects//locations//conversations/`.", + "location": "path", + "pattern": "^projects/[^/]+/conversations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}:complete", + "request": { + "$ref": "GoogleCloudDialogflowV2CompleteConversationRequest" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2Conversation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "create": { + "description": "Creates a new conversation. Conversations are auto-completed after 24 hours. Conversation Lifecycle: There are two stages during a conversation: Automated Agent Stage and Assist Stage. For Automated Agent Stage, there will be a dialogflow agent responding to user queries. For Assist Stage, there's no dialogflow agent responding to user queries. But we will provide suggestions which are generated from conversation. If Conversation.conversation_profile is configured for a dialogflow agent, conversation will start from `Automated Agent Stage`, otherwise, it will start from `Assist Stage`. And during `Automated Agent Stage`, once an Intent with Intent.live_agent_handoff is triggered, conversation will transfer to Assist Stage.", + "flatPath": "v2/projects/{projectsId}/conversations", + "httpMethod": "POST", + "id": "dialogflow.projects.conversations.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "conversationId": { + "description": "Optional. Identifier of the conversation. Generally it's auto generated by Google. Only set it if you cannot wait for the response to return a auto-generated one to you. The conversation ID must be compliant with the regression fomula \"a-zA-Z*\" with the characters length in range of [3,64]. If the field is provided, the caller is resposible for 1. the uniqueness of the ID, otherwise the request will be rejected. 2. the consistency for whether to use custom ID or not under a project to better ensure uniqueness.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Resource identifier of the project creating the conversation. Format: `projects//locations/`.", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/conversations", + "request": { + "$ref": "GoogleCloudDialogflowV2Conversation" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2Conversation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "get": { + "description": "Retrieves the specific conversation.", + "flatPath": "v2/projects/{projectsId}/conversations/{conversationsId}", + "httpMethod": "GET", + "id": "dialogflow.projects.conversations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the conversation. Format: `projects//locations//conversations/`.", + "location": "path", + "pattern": "^projects/[^/]+/conversations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "GoogleCloudDialogflowV2Conversation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "list": { + "description": "Returns the list of all conversations in the specified project.", + "flatPath": "v2/projects/{projectsId}/conversations", + "httpMethod": "GET", + "id": "dialogflow.projects.conversations.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters conversations listed in the response. In general, the expression must specify the field name, a comparison operator, and the value to use for filtering: - The value must be a string, a number, or a boolean. - The comparison operator must be either `=`,`!=`, `>`, or `<`. - To filter on multiple expressions, separate the expressions with `AND` or `OR` (omitting both implies `AND`). - For clarity, expressions can be enclosed in parentheses. Only `lifecycle_state` can be filtered on in this way. For example, the following expression only returns `COMPLETED` conversations: `lifecycle_state = \"COMPLETED\"` For more information about filtering, see [API Filtering](https://aip.dev/160).", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. The next_page_token value returned from a previous list request.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The project from which to list all conversation. Format: `projects//locations/`.", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/conversations", + "response": { + "$ref": "GoogleCloudDialogflowV2ListConversationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + } + }, + "resources": { + "messages": { + "methods": { + "list": { + "description": "Lists messages that belong to a given conversation. `messages` are ordered by `create_time` in descending order. To fetch updates without duplication, send request with filter `create_time_epoch_microseconds > [first item's create_time of previous request]` and empty page_token.", + "flatPath": "v2/projects/{projectsId}/conversations/{conversationsId}/messages", + "httpMethod": "GET", + "id": "dialogflow.projects.conversations.messages.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Filter on message fields. Currently predicates on `create_time` and `create_time_epoch_microseconds` are supported. `create_time` only support milliseconds accuracy. E.g., `create_time_epoch_microseconds > 1551790877964485` or `create_time > 2017-01-15T01:30:15.01Z`. For more information about filtering, see [API Filtering](https://aip.dev/160).", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. The next_page_token value returned from a previous list request.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The name of the conversation to list messages for. Format: `projects//locations//conversations/`", + "location": "path", + "pattern": "^projects/[^/]+/conversations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/messages", + "response": { + "$ref": "GoogleCloudDialogflowV2ListMessagesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + } + } + }, + "participants": { + "methods": { + "analyzeContent": { + "description": "Adds a text (chat, for example), or audio (phone recording, for example) message from a participant into the conversation. Note: Always use agent versions for production traffic sent to virtual agents. See [Versions and environments](https://cloud.google.com/dialogflow/es/docs/agents-versions).", + "flatPath": "v2/projects/{projectsId}/conversations/{conversationsId}/participants/{participantsId}:analyzeContent", + "httpMethod": "POST", + "id": "dialogflow.projects.conversations.participants.analyzeContent", + "parameterOrder": [ + "participant" + ], + "parameters": { + "participant": { + "description": "Required. The name of the participant this text comes from. Format: `projects//locations//conversations//participants/`.", + "location": "path", + "pattern": "^projects/[^/]+/conversations/[^/]+/participants/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+participant}:analyzeContent", + "request": { + "$ref": "GoogleCloudDialogflowV2AnalyzeContentRequest" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2AnalyzeContentResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "create": { + "description": "Creates a new participant in a conversation.", + "flatPath": "v2/projects/{projectsId}/conversations/{conversationsId}/participants", + "httpMethod": "POST", + "id": "dialogflow.projects.conversations.participants.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Resource identifier of the conversation adding the participant. Format: `projects//locations//conversations/`.", + "location": "path", + "pattern": "^projects/[^/]+/conversations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/participants", + "request": { + "$ref": "GoogleCloudDialogflowV2Participant" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2Participant" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "get": { + "description": "Retrieves a conversation participant.", + "flatPath": "v2/projects/{projectsId}/conversations/{conversationsId}/participants/{participantsId}", + "httpMethod": "GET", + "id": "dialogflow.projects.conversations.participants.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the participant. Format: `projects//locations//conversations//participants/`.", + "location": "path", + "pattern": "^projects/[^/]+/conversations/[^/]+/participants/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "GoogleCloudDialogflowV2Participant" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "list": { + "description": "Returns the list of all participants in the specified conversation.", + "flatPath": "v2/projects/{projectsId}/conversations/{conversationsId}/participants", + "httpMethod": "GET", + "id": "dialogflow.projects.conversations.participants.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. The next_page_token value returned from a previous list request.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The conversation to list all participants from. Format: `projects//locations//conversations/`.", + "location": "path", + "pattern": "^projects/[^/]+/conversations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/participants", + "response": { + "$ref": "GoogleCloudDialogflowV2ListParticipantsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "patch": { + "description": "Updates the specified participant.", + "flatPath": "v2/projects/{projectsId}/conversations/{conversationsId}/participants/{participantsId}", + "httpMethod": "PATCH", + "id": "dialogflow.projects.conversations.participants.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Optional. The unique identifier of this participant. Format: `projects//locations//conversations//participants/`.", + "location": "path", + "pattern": "^projects/[^/]+/conversations/[^/]+/participants/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. The mask to specify which fields to update.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2/{+name}", + "request": { + "$ref": "GoogleCloudDialogflowV2Participant" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2Participant" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + } + }, + "resources": { + "suggestions": { + "methods": { + "suggestArticles": { + "description": "Gets suggested articles for a participant based on specific historical messages.", + "flatPath": "v2/projects/{projectsId}/conversations/{conversationsId}/participants/{participantsId}/suggestions:suggestArticles", + "httpMethod": "POST", + "id": "dialogflow.projects.conversations.participants.suggestions.suggestArticles", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The name of the participant to fetch suggestion for. Format: `projects//locations//conversations//participants/`.", + "location": "path", + "pattern": "^projects/[^/]+/conversations/[^/]+/participants/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/suggestions:suggestArticles", + "request": { + "$ref": "GoogleCloudDialogflowV2SuggestArticlesRequest" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2SuggestArticlesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "suggestFaqAnswers": { + "description": "Gets suggested faq answers for a participant based on specific historical messages.", + "flatPath": "v2/projects/{projectsId}/conversations/{conversationsId}/participants/{participantsId}/suggestions:suggestFaqAnswers", + "httpMethod": "POST", + "id": "dialogflow.projects.conversations.participants.suggestions.suggestFaqAnswers", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The name of the participant to fetch suggestion for. Format: `projects//locations//conversations//participants/`.", + "location": "path", + "pattern": "^projects/[^/]+/conversations/[^/]+/participants/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/suggestions:suggestFaqAnswers", + "request": { + "$ref": "GoogleCloudDialogflowV2SuggestFaqAnswersRequest" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2SuggestFaqAnswersResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + } + } + } + } + } + } + }, + "knowledgeBases": { + "methods": { + "create": { + "description": "Creates a knowledge base.", + "flatPath": "v2/projects/{projectsId}/knowledgeBases", + "httpMethod": "POST", + "id": "dialogflow.projects.knowledgeBases.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The project to create a knowledge base for. Format: `projects//locations/`.", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/knowledgeBases", + "request": { + "$ref": "GoogleCloudDialogflowV2KnowledgeBase" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2KnowledgeBase" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "delete": { + "description": "Deletes the specified knowledge base.", + "flatPath": "v2/projects/{projectsId}/knowledgeBases/{knowledgeBasesId}", + "httpMethod": "DELETE", + "id": "dialogflow.projects.knowledgeBases.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "force": { + "description": "Optional. Force deletes the knowledge base. When set to true, any documents in the knowledge base are also deleted.", + "location": "query", + "type": "boolean" + }, + "name": { + "description": "Required. The name of the knowledge base to delete. Format: `projects//locations//knowledgeBases/`.", + "location": "path", + "pattern": "^projects/[^/]+/knowledgeBases/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "get": { + "description": "Retrieves the specified knowledge base.", + "flatPath": "v2/projects/{projectsId}/knowledgeBases/{knowledgeBasesId}", + "httpMethod": "GET", + "id": "dialogflow.projects.knowledgeBases.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the knowledge base to retrieve. Format `projects//locations//knowledgeBases/`.", + "location": "path", + "pattern": "^projects/[^/]+/knowledgeBases/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "GoogleCloudDialogflowV2KnowledgeBase" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "list": { + "description": "Returns the list of all knowledge bases of the specified agent.", + "flatPath": "v2/projects/{projectsId}/knowledgeBases", + "httpMethod": "GET", + "id": "dialogflow.projects.knowledgeBases.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "The maximum number of items to return in a single page. By default 10 and at most 100.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The next_page_token value returned from a previous list request.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The project to list of knowledge bases for. Format: `projects//locations/`.", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/knowledgeBases", + "response": { + "$ref": "GoogleCloudDialogflowV2ListKnowledgeBasesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "patch": { + "description": "Updates the specified knowledge base.", + "flatPath": "v2/projects/{projectsId}/knowledgeBases/{knowledgeBasesId}", + "httpMethod": "PATCH", + "id": "dialogflow.projects.knowledgeBases.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The knowledge base resource name. The name must be empty when creating a knowledge base. Format: `projects//locations//knowledgeBases/`.", + "location": "path", + "pattern": "^projects/[^/]+/knowledgeBases/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. Not specified means `update all`. Currently, only `display_name` can be updated, an InvalidArgument will be returned for attempting to update other fields.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2/{+name}", + "request": { + "$ref": "GoogleCloudDialogflowV2KnowledgeBase" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2KnowledgeBase" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + } + }, + "resources": { + "documents": { + "methods": { + "create": { + "description": "Creates a new document. Operation ", + "flatPath": "v2/projects/{projectsId}/knowledgeBases/{knowledgeBasesId}/documents", + "httpMethod": "POST", + "id": "dialogflow.projects.knowledgeBases.documents.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The knowledge base to create a document for. Format: `projects//locations//knowledgeBases/`.", + "location": "path", + "pattern": "^projects/[^/]+/knowledgeBases/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/documents", + "request": { + "$ref": "GoogleCloudDialogflowV2Document" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "delete": { + "description": "Deletes the specified document. Operation ", + "flatPath": "v2/projects/{projectsId}/knowledgeBases/{knowledgeBasesId}/documents/{documentsId}", + "httpMethod": "DELETE", + "id": "dialogflow.projects.knowledgeBases.documents.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the document to delete. Format: `projects//locations//knowledgeBases//documents/`.", + "location": "path", + "pattern": "^projects/[^/]+/knowledgeBases/[^/]+/documents/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "get": { + "description": "Retrieves the specified document.", + "flatPath": "v2/projects/{projectsId}/knowledgeBases/{knowledgeBasesId}/documents/{documentsId}", + "httpMethod": "GET", + "id": "dialogflow.projects.knowledgeBases.documents.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the document to retrieve. Format `projects//locations//knowledgeBases//documents/`.", + "location": "path", + "pattern": "^projects/[^/]+/knowledgeBases/[^/]+/documents/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "GoogleCloudDialogflowV2Document" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "list": { + "description": "Returns the list of all documents of the knowledge base.", + "flatPath": "v2/projects/{projectsId}/knowledgeBases/{knowledgeBasesId}/documents", + "httpMethod": "GET", + "id": "dialogflow.projects.knowledgeBases.documents.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "The maximum number of items to return in a single page. By default 10 and at most 100.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The next_page_token value returned from a previous list request.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The knowledge base to list all documents for. Format: `projects//locations//knowledgeBases/`.", + "location": "path", + "pattern": "^projects/[^/]+/knowledgeBases/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/documents", + "response": { + "$ref": "GoogleCloudDialogflowV2ListDocumentsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "patch": { + "description": "Updates the specified document. Operation ", + "flatPath": "v2/projects/{projectsId}/knowledgeBases/{knowledgeBasesId}/documents/{documentsId}", + "httpMethod": "PATCH", + "id": "dialogflow.projects.knowledgeBases.documents.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Optional. The document resource name. The name must be empty when creating a document. Format: `projects//locations//knowledgeBases//documents/`.", + "location": "path", + "pattern": "^projects/[^/]+/knowledgeBases/[^/]+/documents/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. Not specified means `update all`. Currently, only `display_name` can be updated, an InvalidArgument will be returned for attempting to update other fields.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2/{+name}", + "request": { + "$ref": "GoogleCloudDialogflowV2Document" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "reload": { + "description": "Reloads the specified document from its specified source, content_uri or content. The previously loaded content of the document will be deleted. Note: Even when the content of the document has not changed, there still may be side effects because of internal implementation changes. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`. Operation ", + "flatPath": "v2/projects/{projectsId}/knowledgeBases/{knowledgeBasesId}/documents/{documentsId}:reload", + "httpMethod": "POST", + "id": "dialogflow.projects.knowledgeBases.documents.reload", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the document to reload. Format: `projects//locations//knowledgeBases//documents/`", + "location": "path", + "pattern": "^projects/[^/]+/knowledgeBases/[^/]+/documents/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}:reload", + "request": { + "$ref": "GoogleCloudDialogflowV2ReloadDocumentRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + } + } + } + } + }, + "locations": { + "methods": { + "deleteAgent": { + "description": "Deletes the specified agent.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent", + "httpMethod": "DELETE", + "id": "dialogflow.projects.locations.deleteAgent", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The project that the agent to delete is associated with. Format: `projects/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/agent", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "getAgent": { + "description": "Retrieves the specified agent.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent", + "httpMethod": "GET", + "id": "dialogflow.projects.locations.getAgent", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The project that the agent to fetch is associated with. Format: `projects/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/agent", + "response": { + "$ref": "GoogleCloudDialogflowV2Agent" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "setAgent": { + "description": "Creates/updates the specified agent.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.setAgent", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The project of this agent. Format: `projects/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. The mask to control which fields get updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2/{+parent}/agent", + "request": { + "$ref": "GoogleCloudDialogflowV2Agent" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2Agent" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + } + }, + "resources": { + "agent": { + "methods": { + "export": { + "description": "Exports the specified agent to a ZIP file. Operation ", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent:export", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.agent.export", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The project that the agent to export is associated with. Format: `projects/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/agent:export", + "request": { + "$ref": "GoogleCloudDialogflowV2ExportAgentRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "getFulfillment": { + "description": "Retrieves the fulfillment.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/fulfillment", + "httpMethod": "GET", + "id": "dialogflow.projects.locations.agent.getFulfillment", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the fulfillment. Format: `projects//agent/fulfillment`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/fulfillment$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "GoogleCloudDialogflowV2Fulfillment" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "getValidationResult": { + "description": "Gets agent validation result. Agent validation is performed during training time and is updated automatically when training is completed.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/validationResult", + "httpMethod": "GET", + "id": "dialogflow.projects.locations.agent.getValidationResult", + "parameterOrder": [ + "parent" + ], + "parameters": { + "languageCode": { + "description": "Optional. The language for which you want a validation result. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The project that the agent is associated with. Format: `projects/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/agent/validationResult", + "response": { + "$ref": "GoogleCloudDialogflowV2ValidationResult" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "import": { + "description": "Imports the specified agent from a ZIP file. Uploads new intents and entity types without deleting the existing ones. Intents and entity types with the same name are replaced with the new versions from ImportAgentRequest. After the import, the imported draft agent will be trained automatically (unless disabled in agent settings). However, once the import is done, training may not be completed yet. Please call TrainAgent and wait for the operation it returns in order to train explicitly. Operation An operation which tracks when importing is complete. It only tracks when the draft agent is updated not when it is done training.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent:import", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.agent.import", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The project that the agent to import is associated with. Format: `projects/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/agent:import", + "request": { + "$ref": "GoogleCloudDialogflowV2ImportAgentRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "restore": { + "description": "Restores the specified agent from a ZIP file. Replaces the current agent version with a new one. All the intents and entity types in the older version are deleted. After the restore, the restored draft agent will be trained automatically (unless disabled in agent settings). However, once the restore is done, training may not be completed yet. Please call TrainAgent and wait for the operation it returns in order to train explicitly. Operation An operation which tracks when restoring is complete. It only tracks when the draft agent is updated not when it is done training.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent:restore", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.agent.restore", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The project that the agent to restore is associated with. Format: `projects/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/agent:restore", + "request": { + "$ref": "GoogleCloudDialogflowV2RestoreAgentRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "search": { + "description": "Returns the list of agents. Since there is at most one conversational agent per project, this method is useful primarily for listing all agents across projects the caller has access to. One can achieve that with a wildcard project collection id \"-\". Refer to [List Sub-Collections](https://cloud.google.com/apis/design/design_patterns#list_sub-collections).", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent:search", + "httpMethod": "GET", + "id": "dialogflow.projects.locations.agent.search", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The next_page_token value returned from a previous list request.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The project to list agents from. Format: `projects/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/agent:search", + "response": { + "$ref": "GoogleCloudDialogflowV2SearchAgentsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "train": { + "description": "Trains the specified agent. Operation ", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent:train", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.agent.train", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The project that the agent to train is associated with. Format: `projects/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/agent:train", + "request": { + "$ref": "GoogleCloudDialogflowV2TrainAgentRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "updateFulfillment": { + "description": "Updates the fulfillment.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/fulfillment", + "httpMethod": "PATCH", + "id": "dialogflow.projects.locations.agent.updateFulfillment", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The unique identifier of the fulfillment. Format: `projects//agent/fulfillment`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/fulfillment$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. The mask to control which fields get updated. If the mask is not present, all fields will be updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2/{+name}", + "request": { + "$ref": "GoogleCloudDialogflowV2Fulfillment" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2Fulfillment" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + } + }, + "resources": { + "entityTypes": { + "methods": { + "batchDelete": { + "description": "Deletes entity types in the specified agent. Operation ", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/entityTypes:batchDelete", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.agent.entityTypes.batchDelete", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The name of the agent to delete all entities types for. Format: `projects//agent`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/entityTypes:batchDelete", + "request": { + "$ref": "GoogleCloudDialogflowV2BatchDeleteEntityTypesRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "batchUpdate": { + "description": "Updates/Creates multiple entity types in the specified agent. Operation ", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/entityTypes:batchUpdate", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.agent.entityTypes.batchUpdate", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The name of the agent to update or create entity types in. Format: `projects//agent`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/entityTypes:batchUpdate", + "request": { + "$ref": "GoogleCloudDialogflowV2BatchUpdateEntityTypesRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "create": { + "description": "Creates an entity type in the specified agent.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/entityTypes", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.agent.entityTypes.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "languageCode": { + "description": "Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The agent to create a entity type for. Format: `projects//agent`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/entityTypes", + "request": { + "$ref": "GoogleCloudDialogflowV2EntityType" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2EntityType" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "delete": { + "description": "Deletes the specified entity type.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/entityTypes/{entityTypesId}", + "httpMethod": "DELETE", + "id": "dialogflow.projects.locations.agent.entityTypes.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the entity type to delete. Format: `projects//agent/entityTypes/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/entityTypes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "get": { + "description": "Retrieves the specified entity type.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/entityTypes/{entityTypesId}", + "httpMethod": "GET", + "id": "dialogflow.projects.locations.agent.entityTypes.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "languageCode": { + "description": "Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).", + "location": "query", + "type": "string" + }, + "name": { + "description": "Required. The name of the entity type. Format: `projects//agent/entityTypes/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/entityTypes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "GoogleCloudDialogflowV2EntityType" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "list": { + "description": "Returns the list of all entity types in the specified agent.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/entityTypes", + "httpMethod": "GET", + "id": "dialogflow.projects.locations.agent.entityTypes.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "languageCode": { + "description": "Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. The next_page_token value returned from a previous list request.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The agent to list all entity types from. Format: `projects//agent`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/entityTypes", + "response": { + "$ref": "GoogleCloudDialogflowV2ListEntityTypesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "patch": { + "description": "Updates the specified entity type.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/entityTypes/{entityTypesId}", + "httpMethod": "PATCH", + "id": "dialogflow.projects.locations.agent.entityTypes.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "languageCode": { + "description": "Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).", + "location": "query", + "type": "string" + }, + "name": { + "description": "The unique identifier of the entity type. Required for EntityTypes.UpdateEntityType and EntityTypes.BatchUpdateEntityTypes methods. Format: `projects//agent/entityTypes/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/entityTypes/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. The mask to control which fields get updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2/{+name}", + "request": { + "$ref": "GoogleCloudDialogflowV2EntityType" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2EntityType" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + } + }, + "resources": { + "entities": { + "methods": { + "batchCreate": { + "description": "Creates multiple new entities in the specified entity type. Operation ", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/entityTypes/{entityTypesId}/entities:batchCreate", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.agent.entityTypes.entities.batchCreate", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The name of the entity type to create entities in. Format: `projects//agent/entityTypes/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/entityTypes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/entities:batchCreate", + "request": { + "$ref": "GoogleCloudDialogflowV2BatchCreateEntitiesRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "batchDelete": { + "description": "Deletes entities in the specified entity type. Operation ", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/entityTypes/{entityTypesId}/entities:batchDelete", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.agent.entityTypes.entities.batchDelete", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The name of the entity type to delete entries for. Format: `projects//agent/entityTypes/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/entityTypes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/entities:batchDelete", + "request": { + "$ref": "GoogleCloudDialogflowV2BatchDeleteEntitiesRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "batchUpdate": { + "description": "Updates or creates multiple entities in the specified entity type. This method does not affect entities in the entity type that aren't explicitly specified in the request. Operation ", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/entityTypes/{entityTypesId}/entities:batchUpdate", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.agent.entityTypes.entities.batchUpdate", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The name of the entity type to update or create entities in. Format: `projects//agent/entityTypes/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/entityTypes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/entities:batchUpdate", + "request": { + "$ref": "GoogleCloudDialogflowV2BatchUpdateEntitiesRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + } + } + } + } + }, + "environments": { + "methods": { + "list": { + "description": "Returns the list of all non-draft environments of the specified agent.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/environments", + "httpMethod": "GET", + "id": "dialogflow.projects.locations.agent.environments.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. The next_page_token value returned from a previous list request.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The agent to list all environments from. Format: `projects//agent`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/environments", + "response": { + "$ref": "GoogleCloudDialogflowV2ListEnvironmentsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + } + }, + "resources": { + "users": { + "resources": { + "sessions": { + "methods": { + "deleteContexts": { + "description": "Deletes all active contexts in the specified session.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts", + "httpMethod": "DELETE", + "id": "dialogflow.projects.locations.agent.environments.users.sessions.deleteContexts", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The name of the session to delete all contexts from. Format: `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/contexts", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "detectIntent": { + "description": "Processes a natural language query and returns structured, actionable data as a result. This method is not idempotent, because it may cause contexts and session entity types to be updated, which in turn might affect results of future queries. Note: Always use agent versions for production traffic. See [Versions and environments](https://cloud.google.com/dialogflow/es/docs/agents-versions).", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}:detectIntent", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.agent.environments.users.sessions.detectIntent", + "parameterOrder": [ + "session" + ], + "parameters": { + "session": { + "description": "Required. The name of the session this query is sent to. Format: `projects//agent/sessions/`, or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment (`Environment ID` might be referred to as environment name at some places). If `User ID` is not specified, we are using \"-\". It's up to the API caller to choose an appropriate `Session ID` and `User Id`. They can be a random number or some type of user and session identifiers (preferably hashed). The length of the `Session ID` and `User ID` must not exceed 36 characters. For more information, see the [API interactions guide](https://cloud.google.com/dialogflow/docs/api-overview). Note: Always use agent versions for production traffic. See [Versions and environments](https://cloud.google.com/dialogflow/es/docs/agents-versions).", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+session}:detectIntent", + "request": { + "$ref": "GoogleCloudDialogflowV2DetectIntentRequest" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2DetectIntentResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + } + }, + "resources": { + "contexts": { + "methods": { + "create": { + "description": "Creates a context. If the specified context already exists, overrides the context.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.agent.environments.users.sessions.contexts.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The session to create a context for. Format: `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/contexts", + "request": { + "$ref": "GoogleCloudDialogflowV2Context" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2Context" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "delete": { + "description": "Deletes the specified context.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts/{contextsId}", + "httpMethod": "DELETE", + "id": "dialogflow.projects.locations.agent.environments.users.sessions.contexts.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the context to delete. Format: `projects//agent/sessions//contexts/` or `projects//agent/environments//users//sessions//contexts/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/contexts/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "get": { + "description": "Retrieves the specified context.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts/{contextsId}", + "httpMethod": "GET", + "id": "dialogflow.projects.locations.agent.environments.users.sessions.contexts.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the context. Format: `projects//agent/sessions//contexts/` or `projects//agent/environments//users//sessions//contexts/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/contexts/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "GoogleCloudDialogflowV2Context" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "list": { + "description": "Returns the list of all contexts in the specified session.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts", + "httpMethod": "GET", + "id": "dialogflow.projects.locations.agent.environments.users.sessions.contexts.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. The next_page_token value returned from a previous list request.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The session to list all contexts from. Format: `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/contexts", + "response": { + "$ref": "GoogleCloudDialogflowV2ListContextsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "patch": { + "description": "Updates the specified context.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts/{contextsId}", + "httpMethod": "PATCH", + "id": "dialogflow.projects.locations.agent.environments.users.sessions.contexts.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The unique identifier of the context. Format: `projects//agent/sessions//contexts/`, or `projects//agent/environments//users//sessions//contexts/`. The `Context ID` is always converted to lowercase, may only contain characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. The following context names are reserved for internal use by Dialogflow. You should not use these contexts or create contexts with these names: * `__system_counters__` * `*_id_dialog_context` * `*_dialog_params_size`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/contexts/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. The mask to control which fields get updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2/{+name}", + "request": { + "$ref": "GoogleCloudDialogflowV2Context" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2Context" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + } + } + }, + "entityTypes": { + "methods": { + "create": { + "description": "Creates a session entity type. If the specified session entity type already exists, overrides the session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/entityTypes", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The session to create a session entity type for. Format: `projects//agent/sessions/` or `projects//agent/environments//users// sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/entityTypes", + "request": { + "$ref": "GoogleCloudDialogflowV2SessionEntityType" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2SessionEntityType" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "delete": { + "description": "Deletes the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/entityTypes/{entityTypesId}", + "httpMethod": "DELETE", + "id": "dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the entity type to delete. Format: `projects//agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/entityTypes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "get": { + "description": "Retrieves the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/entityTypes/{entityTypesId}", + "httpMethod": "GET", + "id": "dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the session entity type. Format: `projects//agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/entityTypes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "GoogleCloudDialogflowV2SessionEntityType" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "list": { + "description": "Returns the list of all session entity types in the specified session. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/entityTypes", + "httpMethod": "GET", + "id": "dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. The next_page_token value returned from a previous list request.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The session to list all session entity types from. Format: `projects//agent/sessions/` or `projects//agent/environments//users// sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/entityTypes", + "response": { + "$ref": "GoogleCloudDialogflowV2ListSessionEntityTypesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "patch": { + "description": "Updates the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/entityTypes/{entityTypesId}", + "httpMethod": "PATCH", + "id": "dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The unique identifier of this session entity type. Format: `projects//agent/sessions//entityTypes/`, or `projects//agent/environments//users//sessions//entityTypes/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. `` must be the display name of an existing entity type in the same agent that will be overridden or supplemented.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/entityTypes/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. The mask to control which fields get updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2/{+name}", + "request": { + "$ref": "GoogleCloudDialogflowV2SessionEntityType" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2SessionEntityType" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + } + } + } + } + } + } + } + } + }, + "intents": { + "methods": { + "batchDelete": { + "description": "Deletes intents in the specified agent. Operation ", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/intents:batchDelete", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.agent.intents.batchDelete", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The name of the agent to delete all entities types for. Format: `projects//agent`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/intents:batchDelete", + "request": { + "$ref": "GoogleCloudDialogflowV2BatchDeleteIntentsRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "batchUpdate": { + "description": "Updates/Creates multiple intents in the specified agent. Operation ", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/intents:batchUpdate", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.agent.intents.batchUpdate", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The name of the agent to update or create intents in. Format: `projects//agent`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/intents:batchUpdate", + "request": { + "$ref": "GoogleCloudDialogflowV2BatchUpdateIntentsRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "create": { + "description": "Creates an intent in the specified agent.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/intents", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.agent.intents.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "intentView": { + "description": "Optional. The resource view to apply to the returned intent.", + "enum": [ + "INTENT_VIEW_UNSPECIFIED", + "INTENT_VIEW_FULL" + ], + "enumDescriptions": [ + "Training phrases field is not populated in the response.", + "All fields are populated." + ], + "location": "query", + "type": "string" + }, + "languageCode": { + "description": "Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The agent to create a intent for. Format: `projects//agent`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/intents", + "request": { + "$ref": "GoogleCloudDialogflowV2Intent" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2Intent" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "delete": { + "description": "Deletes the specified intent and its direct or indirect followup intents.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/intents/{intentsId}", + "httpMethod": "DELETE", + "id": "dialogflow.projects.locations.agent.intents.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the intent to delete. If this intent has direct or indirect followup intents, we also delete them. Format: `projects//agent/intents/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/intents/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "get": { + "description": "Retrieves the specified intent.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/intents/{intentsId}", + "httpMethod": "GET", + "id": "dialogflow.projects.locations.agent.intents.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "intentView": { + "description": "Optional. The resource view to apply to the returned intent.", + "enum": [ + "INTENT_VIEW_UNSPECIFIED", + "INTENT_VIEW_FULL" + ], + "enumDescriptions": [ + "Training phrases field is not populated in the response.", + "All fields are populated." + ], + "location": "query", + "type": "string" + }, + "languageCode": { + "description": "Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).", + "location": "query", + "type": "string" + }, + "name": { + "description": "Required. The name of the intent. Format: `projects//agent/intents/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/intents/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "GoogleCloudDialogflowV2Intent" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "list": { + "description": "Returns the list of all intents in the specified agent.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/intents", + "httpMethod": "GET", + "id": "dialogflow.projects.locations.agent.intents.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "intentView": { + "description": "Optional. The resource view to apply to the returned intent.", + "enum": [ + "INTENT_VIEW_UNSPECIFIED", + "INTENT_VIEW_FULL" + ], + "enumDescriptions": [ + "Training phrases field is not populated in the response.", + "All fields are populated." + ], + "location": "query", + "type": "string" + }, + "languageCode": { + "description": "Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. The next_page_token value returned from a previous list request.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The agent to list all intents from. Format: `projects//agent`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/intents", + "response": { + "$ref": "GoogleCloudDialogflowV2ListIntentsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "patch": { + "description": "Updates the specified intent.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/intents/{intentsId}", + "httpMethod": "PATCH", + "id": "dialogflow.projects.locations.agent.intents.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "intentView": { + "description": "Optional. The resource view to apply to the returned intent.", + "enum": [ + "INTENT_VIEW_UNSPECIFIED", + "INTENT_VIEW_FULL" + ], + "enumDescriptions": [ + "Training phrases field is not populated in the response.", + "All fields are populated." + ], + "location": "query", + "type": "string" + }, + "languageCode": { + "description": "Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).", + "location": "query", + "type": "string" + }, + "name": { + "description": "Optional. The unique identifier of this intent. Required for Intents.UpdateIntent and Intents.BatchUpdateIntents methods. Format: `projects//agent/intents/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/intents/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. The mask to control which fields get updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2/{+name}", + "request": { + "$ref": "GoogleCloudDialogflowV2Intent" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2Intent" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + } + } + }, + "sessions": { + "methods": { + "deleteContexts": { + "description": "Deletes all active contexts in the specified session.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/contexts", + "httpMethod": "DELETE", + "id": "dialogflow.projects.locations.agent.sessions.deleteContexts", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The name of the session to delete all contexts from. Format: `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/contexts", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "detectIntent": { + "description": "Processes a natural language query and returns structured, actionable data as a result. This method is not idempotent, because it may cause contexts and session entity types to be updated, which in turn might affect results of future queries. Note: Always use agent versions for production traffic. See [Versions and environments](https://cloud.google.com/dialogflow/es/docs/agents-versions).", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}:detectIntent", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.agent.sessions.detectIntent", + "parameterOrder": [ + "session" + ], + "parameters": { + "session": { + "description": "Required. The name of the session this query is sent to. Format: `projects//agent/sessions/`, or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment (`Environment ID` might be referred to as environment name at some places). If `User ID` is not specified, we are using \"-\". It's up to the API caller to choose an appropriate `Session ID` and `User Id`. They can be a random number or some type of user and session identifiers (preferably hashed). The length of the `Session ID` and `User ID` must not exceed 36 characters. For more information, see the [API interactions guide](https://cloud.google.com/dialogflow/docs/api-overview). Note: Always use agent versions for production traffic. See [Versions and environments](https://cloud.google.com/dialogflow/es/docs/agents-versions).", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+session}:detectIntent", + "request": { + "$ref": "GoogleCloudDialogflowV2DetectIntentRequest" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2DetectIntentResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + } + }, + "resources": { + "contexts": { + "methods": { + "create": { + "description": "Creates a context. If the specified context already exists, overrides the context.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/contexts", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.agent.sessions.contexts.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The session to create a context for. Format: `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/contexts", + "request": { + "$ref": "GoogleCloudDialogflowV2Context" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2Context" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "delete": { + "description": "Deletes the specified context.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/contexts/{contextsId}", + "httpMethod": "DELETE", + "id": "dialogflow.projects.locations.agent.sessions.contexts.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the context to delete. Format: `projects//agent/sessions//contexts/` or `projects//agent/environments//users//sessions//contexts/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+/contexts/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "get": { + "description": "Retrieves the specified context.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/contexts/{contextsId}", + "httpMethod": "GET", + "id": "dialogflow.projects.locations.agent.sessions.contexts.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the context. Format: `projects//agent/sessions//contexts/` or `projects//agent/environments//users//sessions//contexts/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+/contexts/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "GoogleCloudDialogflowV2Context" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "list": { + "description": "Returns the list of all contexts in the specified session.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/contexts", + "httpMethod": "GET", + "id": "dialogflow.projects.locations.agent.sessions.contexts.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. The next_page_token value returned from a previous list request.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The session to list all contexts from. Format: `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/contexts", + "response": { + "$ref": "GoogleCloudDialogflowV2ListContextsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "patch": { + "description": "Updates the specified context.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/contexts/{contextsId}", + "httpMethod": "PATCH", + "id": "dialogflow.projects.locations.agent.sessions.contexts.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The unique identifier of the context. Format: `projects//agent/sessions//contexts/`, or `projects//agent/environments//users//sessions//contexts/`. The `Context ID` is always converted to lowercase, may only contain characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. The following context names are reserved for internal use by Dialogflow. You should not use these contexts or create contexts with these names: * `__system_counters__` * `*_id_dialog_context` * `*_dialog_params_size`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+/contexts/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. The mask to control which fields get updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2/{+name}", + "request": { + "$ref": "GoogleCloudDialogflowV2Context" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2Context" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + } + } + }, + "entityTypes": { + "methods": { + "create": { + "description": "Creates a session entity type. If the specified session entity type already exists, overrides the session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/entityTypes", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.agent.sessions.entityTypes.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The session to create a session entity type for. Format: `projects//agent/sessions/` or `projects//agent/environments//users// sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/entityTypes", + "request": { + "$ref": "GoogleCloudDialogflowV2SessionEntityType" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2SessionEntityType" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "delete": { + "description": "Deletes the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/entityTypes/{entityTypesId}", + "httpMethod": "DELETE", + "id": "dialogflow.projects.locations.agent.sessions.entityTypes.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the entity type to delete. Format: `projects//agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+/entityTypes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "get": { + "description": "Retrieves the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/entityTypes/{entityTypesId}", + "httpMethod": "GET", + "id": "dialogflow.projects.locations.agent.sessions.entityTypes.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the session entity type. Format: `projects//agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+/entityTypes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "GoogleCloudDialogflowV2SessionEntityType" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "list": { + "description": "Returns the list of all session entity types in the specified session. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/entityTypes", + "httpMethod": "GET", + "id": "dialogflow.projects.locations.agent.sessions.entityTypes.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. The next_page_token value returned from a previous list request.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The session to list all session entity types from. Format: `projects//agent/sessions/` or `projects//agent/environments//users// sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/entityTypes", + "response": { + "$ref": "GoogleCloudDialogflowV2ListSessionEntityTypesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "patch": { + "description": "Updates the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/entityTypes/{entityTypesId}", + "httpMethod": "PATCH", + "id": "dialogflow.projects.locations.agent.sessions.entityTypes.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The unique identifier of this session entity type. Format: `projects//agent/sessions//entityTypes/`, or `projects//agent/environments//users//sessions//entityTypes/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. `` must be the display name of an existing entity type in the same agent that will be overridden or supplemented.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+/entityTypes/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. The mask to control which fields get updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2/{+name}", + "request": { + "$ref": "GoogleCloudDialogflowV2SessionEntityType" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2SessionEntityType" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + } + } + } + } + } + } + }, + "answerRecords": { + "methods": { + "list": { + "description": "Returns the list of all answer records in the specified project in reverse chronological order.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/answerRecords", + "httpMethod": "GET", + "id": "dialogflow.projects.locations.answerRecords.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Required. Filters to restrict results to specific answer records. Filter on answer record type. Currently predicates on `type` is supported, valid values are `ARTICLE_ANSWER`, `FAQ_ANSWER`. For more information about filtering, see [API Filtering](https://aip.dev/160).", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of records to return in a single page. The server may return fewer records than this. If unspecified, we use 10. The maximum is 100.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. The ListAnswerRecordsResponse.next_page_token value returned from a previous list request used to continue listing on the next page.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The project to list all answer records for in reverse chronological order. Format: `projects//locations/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/answerRecords", + "response": { + "$ref": "GoogleCloudDialogflowV2ListAnswerRecordsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "patch": { + "description": "Updates the specified answer record.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/answerRecords/{answerRecordsId}", + "httpMethod": "PATCH", + "id": "dialogflow.projects.locations.answerRecords.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The unique identifier of this answer record. Format: `projects//locations//answerRecords/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/answerRecords/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. The mask to control which fields get updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2/{+name}", + "request": { + "$ref": "GoogleCloudDialogflowV2AnswerRecord" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2AnswerRecord" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + } + } + }, + "conversationProfiles": { + "methods": { + "create": { + "description": "Creates a conversation profile in the specified project. ConversationProfile.CreateTime and ConversationProfile.UpdateTime aren't populated in the response. You can retrieve them via GetConversationProfile API.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/conversationProfiles", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.conversationProfiles.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The project to create a conversation profile for. Format: `projects//locations/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/conversationProfiles", + "request": { + "$ref": "GoogleCloudDialogflowV2ConversationProfile" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2ConversationProfile" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "delete": { + "description": "Deletes the specified conversation profile.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/conversationProfiles/{conversationProfilesId}", + "httpMethod": "DELETE", + "id": "dialogflow.projects.locations.conversationProfiles.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the conversation profile to delete. Format: `projects//locations//conversationProfiles/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/conversationProfiles/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "get": { + "description": "Retrieves the specified conversation profile.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/conversationProfiles/{conversationProfilesId}", + "httpMethod": "GET", + "id": "dialogflow.projects.locations.conversationProfiles.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the conversation profile. Format: `projects//locations//conversationProfiles/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/conversationProfiles/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "GoogleCloudDialogflowV2ConversationProfile" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "list": { + "description": "Returns the list of all conversation profiles in the specified project.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/conversationProfiles", + "httpMethod": "GET", + "id": "dialogflow.projects.locations.conversationProfiles.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "The maximum number of items to return in a single page. By default 100 and at most 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The next_page_token value returned from a previous list request.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The project to list all conversation profiles from. Format: `projects//locations/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/conversationProfiles", + "response": { + "$ref": "GoogleCloudDialogflowV2ListConversationProfilesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "patch": { + "description": "Updates the specified conversation profile. ConversationProfile.CreateTime and ConversationProfile.UpdateTime aren't populated in the response. You can retrieve them via GetConversationProfile API.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/conversationProfiles/{conversationProfilesId}", + "httpMethod": "PATCH", + "id": "dialogflow.projects.locations.conversationProfiles.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The unique identifier of this conversation profile. Format: `projects//locations//conversationProfiles/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/conversationProfiles/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. The mask to control which fields to update.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2/{+name}", + "request": { + "$ref": "GoogleCloudDialogflowV2ConversationProfile" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2ConversationProfile" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + } + } + }, + "conversations": { + "methods": { + "complete": { + "description": "Completes the specified conversation. Finished conversations are purged from the database after 30 days.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/conversations/{conversationsId}:complete", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.conversations.complete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Resource identifier of the conversation to close. Format: `projects//locations//conversations/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/conversations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}:complete", + "request": { + "$ref": "GoogleCloudDialogflowV2CompleteConversationRequest" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2Conversation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "create": { + "description": "Creates a new conversation. Conversations are auto-completed after 24 hours. Conversation Lifecycle: There are two stages during a conversation: Automated Agent Stage and Assist Stage. For Automated Agent Stage, there will be a dialogflow agent responding to user queries. For Assist Stage, there's no dialogflow agent responding to user queries. But we will provide suggestions which are generated from conversation. If Conversation.conversation_profile is configured for a dialogflow agent, conversation will start from `Automated Agent Stage`, otherwise, it will start from `Assist Stage`. And during `Automated Agent Stage`, once an Intent with Intent.live_agent_handoff is triggered, conversation will transfer to Assist Stage.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/conversations", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.conversations.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "conversationId": { + "description": "Optional. Identifier of the conversation. Generally it's auto generated by Google. Only set it if you cannot wait for the response to return a auto-generated one to you. The conversation ID must be compliant with the regression fomula \"a-zA-Z*\" with the characters length in range of [3,64]. If the field is provided, the caller is resposible for 1. the uniqueness of the ID, otherwise the request will be rejected. 2. the consistency for whether to use custom ID or not under a project to better ensure uniqueness.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Resource identifier of the project creating the conversation. Format: `projects//locations/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/conversations", + "request": { + "$ref": "GoogleCloudDialogflowV2Conversation" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2Conversation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "get": { + "description": "Retrieves the specific conversation.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/conversations/{conversationsId}", + "httpMethod": "GET", + "id": "dialogflow.projects.locations.conversations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the conversation. Format: `projects//locations//conversations/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/conversations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "GoogleCloudDialogflowV2Conversation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "list": { + "description": "Returns the list of all conversations in the specified project.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/conversations", + "httpMethod": "GET", + "id": "dialogflow.projects.locations.conversations.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters conversations listed in the response. In general, the expression must specify the field name, a comparison operator, and the value to use for filtering: - The value must be a string, a number, or a boolean. - The comparison operator must be either `=`,`!=`, `>`, or `<`. - To filter on multiple expressions, separate the expressions with `AND` or `OR` (omitting both implies `AND`). - For clarity, expressions can be enclosed in parentheses. Only `lifecycle_state` can be filtered on in this way. For example, the following expression only returns `COMPLETED` conversations: `lifecycle_state = \"COMPLETED\"` For more information about filtering, see [API Filtering](https://aip.dev/160).", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. The next_page_token value returned from a previous list request.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The project from which to list all conversation. Format: `projects//locations/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/conversations", + "response": { + "$ref": "GoogleCloudDialogflowV2ListConversationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + } + }, + "resources": { + "messages": { + "methods": { + "list": { + "description": "Lists messages that belong to a given conversation. `messages` are ordered by `create_time` in descending order. To fetch updates without duplication, send request with filter `create_time_epoch_microseconds > [first item's create_time of previous request]` and empty page_token.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/conversations/{conversationsId}/messages", + "httpMethod": "GET", + "id": "dialogflow.projects.locations.conversations.messages.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Filter on message fields. Currently predicates on `create_time` and `create_time_epoch_microseconds` are supported. `create_time` only support milliseconds accuracy. E.g., `create_time_epoch_microseconds > 1551790877964485` or `create_time > 2017-01-15T01:30:15.01Z`. For more information about filtering, see [API Filtering](https://aip.dev/160).", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. The next_page_token value returned from a previous list request.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The name of the conversation to list messages for. Format: `projects//locations//conversations/`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/conversations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/messages", + "response": { + "$ref": "GoogleCloudDialogflowV2ListMessagesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + } + } + }, + "participants": { + "methods": { + "analyzeContent": { + "description": "Adds a text (chat, for example), or audio (phone recording, for example) message from a participant into the conversation. Note: Always use agent versions for production traffic sent to virtual agents. See [Versions and environments](https://cloud.google.com/dialogflow/es/docs/agents-versions).", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/conversations/{conversationsId}/participants/{participantsId}:analyzeContent", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.conversations.participants.analyzeContent", + "parameterOrder": [ + "participant" + ], + "parameters": { + "participant": { + "description": "Required. The name of the participant this text comes from. Format: `projects//locations//conversations//participants/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/conversations/[^/]+/participants/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+participant}:analyzeContent", + "request": { + "$ref": "GoogleCloudDialogflowV2AnalyzeContentRequest" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2AnalyzeContentResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "create": { + "description": "Creates a new participant in a conversation.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/conversations/{conversationsId}/participants", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.conversations.participants.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Resource identifier of the conversation adding the participant. Format: `projects//locations//conversations/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/conversations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/participants", + "request": { + "$ref": "GoogleCloudDialogflowV2Participant" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2Participant" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "get": { + "description": "Retrieves a conversation participant.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/conversations/{conversationsId}/participants/{participantsId}", + "httpMethod": "GET", + "id": "dialogflow.projects.locations.conversations.participants.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the participant. Format: `projects//locations//conversations//participants/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/conversations/[^/]+/participants/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "GoogleCloudDialogflowV2Participant" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "list": { + "description": "Returns the list of all participants in the specified conversation.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/conversations/{conversationsId}/participants", + "httpMethod": "GET", + "id": "dialogflow.projects.locations.conversations.participants.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. The next_page_token value returned from a previous list request.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The conversation to list all participants from. Format: `projects//locations//conversations/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/conversations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/participants", + "response": { + "$ref": "GoogleCloudDialogflowV2ListParticipantsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "patch": { + "description": "Updates the specified participant.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/conversations/{conversationsId}/participants/{participantsId}", + "httpMethod": "PATCH", + "id": "dialogflow.projects.locations.conversations.participants.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Optional. The unique identifier of this participant. Format: `projects//locations//conversations//participants/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/conversations/[^/]+/participants/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. The mask to specify which fields to update.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2/{+name}", + "request": { + "$ref": "GoogleCloudDialogflowV2Participant" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2Participant" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + } + }, + "resources": { + "suggestions": { + "methods": { + "suggestArticles": { + "description": "Gets suggested articles for a participant based on specific historical messages.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/conversations/{conversationsId}/participants/{participantsId}/suggestions:suggestArticles", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.conversations.participants.suggestions.suggestArticles", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The name of the participant to fetch suggestion for. Format: `projects//locations//conversations//participants/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/conversations/[^/]+/participants/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/suggestions:suggestArticles", + "request": { + "$ref": "GoogleCloudDialogflowV2SuggestArticlesRequest" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2SuggestArticlesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "suggestFaqAnswers": { + "description": "Gets suggested faq answers for a participant based on specific historical messages.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/conversations/{conversationsId}/participants/{participantsId}/suggestions:suggestFaqAnswers", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.conversations.participants.suggestions.suggestFaqAnswers", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The name of the participant to fetch suggestion for. Format: `projects//locations//conversations//participants/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/conversations/[^/]+/participants/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/suggestions:suggestFaqAnswers", + "request": { + "$ref": "GoogleCloudDialogflowV2SuggestFaqAnswersRequest" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2SuggestFaqAnswersResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + } + } + } + } + } + } + }, + "knowledgeBases": { + "methods": { + "create": { + "description": "Creates a knowledge base.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/knowledgeBases", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.knowledgeBases.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The project to create a knowledge base for. Format: `projects//locations/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/knowledgeBases", + "request": { + "$ref": "GoogleCloudDialogflowV2KnowledgeBase" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2KnowledgeBase" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "delete": { + "description": "Deletes the specified knowledge base.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/knowledgeBases/{knowledgeBasesId}", + "httpMethod": "DELETE", + "id": "dialogflow.projects.locations.knowledgeBases.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "force": { + "description": "Optional. Force deletes the knowledge base. When set to true, any documents in the knowledge base are also deleted.", + "location": "query", + "type": "boolean" + }, + "name": { + "description": "Required. The name of the knowledge base to delete. Format: `projects//locations//knowledgeBases/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/knowledgeBases/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "get": { + "description": "Retrieves the specified knowledge base.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/knowledgeBases/{knowledgeBasesId}", + "httpMethod": "GET", + "id": "dialogflow.projects.locations.knowledgeBases.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the knowledge base to retrieve. Format `projects//locations//knowledgeBases/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/knowledgeBases/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "GoogleCloudDialogflowV2KnowledgeBase" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "list": { + "description": "Returns the list of all knowledge bases of the specified agent.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/knowledgeBases", + "httpMethod": "GET", + "id": "dialogflow.projects.locations.knowledgeBases.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "The maximum number of items to return in a single page. By default 10 and at most 100.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The next_page_token value returned from a previous list request.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The project to list of knowledge bases for. Format: `projects//locations/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/knowledgeBases", + "response": { + "$ref": "GoogleCloudDialogflowV2ListKnowledgeBasesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "patch": { + "description": "Updates the specified knowledge base.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/knowledgeBases/{knowledgeBasesId}", + "httpMethod": "PATCH", + "id": "dialogflow.projects.locations.knowledgeBases.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The knowledge base resource name. The name must be empty when creating a knowledge base. Format: `projects//locations//knowledgeBases/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/knowledgeBases/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. Not specified means `update all`. Currently, only `display_name` can be updated, an InvalidArgument will be returned for attempting to update other fields.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2/{+name}", + "request": { + "$ref": "GoogleCloudDialogflowV2KnowledgeBase" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2KnowledgeBase" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + } + }, + "resources": { + "documents": { "methods": { "create": { - "description": "Creates a session entity type. If the specified session entity type already exists, overrides the session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.", - "flatPath": "v2/projects/{projectsId}/agent/sessions/{sessionsId}/entityTypes", + "description": "Creates a new document. Operation ", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/knowledgeBases/{knowledgeBasesId}/documents", "httpMethod": "POST", - "id": "dialogflow.projects.agent.sessions.entityTypes.create", + "id": "dialogflow.projects.locations.knowledgeBases.documents.create", "parameterOrder": [ "parent" ], "parameters": { "parent": { - "description": "Required. The session to create a session entity type for. Format: `projects//agent/sessions/` or `projects//agent/environments//users// sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", + "description": "Required. The knowledge base to create a document for. Format: `projects//locations//knowledgeBases/`.", "location": "path", - "pattern": "^projects/[^/]+/agent/sessions/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/knowledgeBases/[^/]+$", "required": true, "type": "string" } }, - "path": "v2/{+parent}/entityTypes", + "path": "v2/{+parent}/documents", "request": { - "$ref": "GoogleCloudDialogflowV2SessionEntityType" + "$ref": "GoogleCloudDialogflowV2Document" }, "response": { - "$ref": "GoogleCloudDialogflowV2SessionEntityType" + "$ref": "GoogleLongrunningOperation" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", @@ -1792,25 +5859,25 @@ ] }, "delete": { - "description": "Deletes the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.", - "flatPath": "v2/projects/{projectsId}/agent/sessions/{sessionsId}/entityTypes/{entityTypesId}", + "description": "Deletes the specified document. Operation ", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/knowledgeBases/{knowledgeBasesId}/documents/{documentsId}", "httpMethod": "DELETE", - "id": "dialogflow.projects.agent.sessions.entityTypes.delete", + "id": "dialogflow.projects.locations.knowledgeBases.documents.delete", "parameterOrder": [ "name" ], "parameters": { "name": { - "description": "Required. The name of the entity type to delete. Format: `projects//agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", + "description": "Required. The name of the document to delete. Format: `projects//locations//knowledgeBases//documents/`.", "location": "path", - "pattern": "^projects/[^/]+/agent/sessions/[^/]+/entityTypes/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/knowledgeBases/[^/]+/documents/[^/]+$", "required": true, "type": "string" } }, "path": "v2/{+name}", "response": { - "$ref": "GoogleProtobufEmpty" + "$ref": "GoogleLongrunningOperation" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", @@ -1818,25 +5885,25 @@ ] }, "get": { - "description": "Retrieves the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.", - "flatPath": "v2/projects/{projectsId}/agent/sessions/{sessionsId}/entityTypes/{entityTypesId}", + "description": "Retrieves the specified document.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/knowledgeBases/{knowledgeBasesId}/documents/{documentsId}", "httpMethod": "GET", - "id": "dialogflow.projects.agent.sessions.entityTypes.get", + "id": "dialogflow.projects.locations.knowledgeBases.documents.get", "parameterOrder": [ "name" ], "parameters": { "name": { - "description": "Required. The name of the session entity type. Format: `projects//agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", + "description": "Required. The name of the document to retrieve. Format `projects//locations//knowledgeBases//documents/`.", "location": "path", - "pattern": "^projects/[^/]+/agent/sessions/[^/]+/entityTypes/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/knowledgeBases/[^/]+/documents/[^/]+$", "required": true, "type": "string" } }, "path": "v2/{+name}", "response": { - "$ref": "GoogleCloudDialogflowV2SessionEntityType" + "$ref": "GoogleCloudDialogflowV2Document" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", @@ -1844,36 +5911,36 @@ ] }, "list": { - "description": "Returns the list of all session entity types in the specified session. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.", - "flatPath": "v2/projects/{projectsId}/agent/sessions/{sessionsId}/entityTypes", + "description": "Returns the list of all documents of the knowledge base.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/knowledgeBases/{knowledgeBasesId}/documents", "httpMethod": "GET", - "id": "dialogflow.projects.agent.sessions.entityTypes.list", + "id": "dialogflow.projects.locations.knowledgeBases.documents.list", "parameterOrder": [ "parent" ], "parameters": { "pageSize": { - "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.", + "description": "The maximum number of items to return in a single page. By default 10 and at most 100.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "Optional. The next_page_token value returned from a previous list request.", + "description": "The next_page_token value returned from a previous list request.", "location": "query", "type": "string" }, "parent": { - "description": "Required. The session to list all session entity types from. Format: `projects//agent/sessions/` or `projects//agent/environments//users// sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", + "description": "Required. The knowledge base to list all documents for. Format: `projects//locations//knowledgeBases/`.", "location": "path", - "pattern": "^projects/[^/]+/agent/sessions/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/knowledgeBases/[^/]+$", "required": true, "type": "string" } }, - "path": "v2/{+parent}/entityTypes", + "path": "v2/{+parent}/documents", "response": { - "$ref": "GoogleCloudDialogflowV2ListSessionEntityTypesResponse" + "$ref": "GoogleCloudDialogflowV2ListDocumentsResponse" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", @@ -1881,23 +5948,23 @@ ] }, "patch": { - "description": "Updates the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.", - "flatPath": "v2/projects/{projectsId}/agent/sessions/{sessionsId}/entityTypes/{entityTypesId}", + "description": "Updates the specified document. Operation ", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/knowledgeBases/{knowledgeBasesId}/documents/{documentsId}", "httpMethod": "PATCH", - "id": "dialogflow.projects.agent.sessions.entityTypes.patch", + "id": "dialogflow.projects.locations.knowledgeBases.documents.patch", "parameterOrder": [ "name" ], "parameters": { "name": { - "description": "Required. The unique identifier of this session entity type. Format: `projects//agent/sessions//entityTypes/`, or `projects//agent/environments//users//sessions//entityTypes/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. `` must be the display name of an existing entity type in the same agent that will be overridden or supplemented.", + "description": "Optional. The document resource name. The name must be empty when creating a document. Format: `projects//locations//knowledgeBases//documents/`.", "location": "path", - "pattern": "^projects/[^/]+/agent/sessions/[^/]+/entityTypes/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/knowledgeBases/[^/]+/documents/[^/]+$", "required": true, "type": "string" }, "updateMask": { - "description": "Optional. The mask to control which fields get updated.", + "description": "Optional. Not specified means `update all`. Currently, only `display_name` can be updated, an InvalidArgument will be returned for attempting to update other fields.", "format": "google-fieldmask", "location": "query", "type": "string" @@ -1905,10 +5972,39 @@ }, "path": "v2/{+name}", "request": { - "$ref": "GoogleCloudDialogflowV2SessionEntityType" + "$ref": "GoogleCloudDialogflowV2Document" }, "response": { - "$ref": "GoogleCloudDialogflowV2SessionEntityType" + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "reload": { + "description": "Reloads the specified document from its specified source, content_uri or content. The previously loaded content of the document will be deleted. Note: Even when the content of the document has not changed, there still may be side effects because of internal implementation changes. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`. Operation ", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/knowledgeBases/{knowledgeBasesId}/documents/{documentsId}:reload", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.knowledgeBases.documents.reload", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the document to reload. Format: `projects//locations//knowledgeBases//documents/`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/knowledgeBases/[^/]+/documents/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}:reload", + "request": { + "$ref": "GoogleCloudDialogflowV2ReloadDocumentRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", @@ -1918,11 +6014,7 @@ } } } - } - } - }, - "locations": { - "resources": { + }, "operations": { "methods": { "cancel": { @@ -2124,7 +6216,7 @@ } } }, - "revision": "20210227", + "revision": "20210320", "rootUrl": "https://dialogflow.googleapis.com/", "schemas": { "GoogleCloudDialogflowCxV3AudioInput": { @@ -3403,7 +7495,7 @@ "type": "object" }, "GoogleCloudDialogflowCxV3WebhookRequest": { - "description": "The request message for a webhook call.", + "description": "The request message for a webhook call. The request is sent as a JSON object and the field names will be presented in camel cases.", "id": "GoogleCloudDialogflowCxV3WebhookRequest", "properties": { "detectIntentResponseId": { @@ -4857,7 +8949,7 @@ "type": "object" }, "GoogleCloudDialogflowCxV3beta1WebhookRequest": { - "description": "The request message for a webhook call.", + "description": "The request message for a webhook call. The request is sent as a JSON object and the field names will be presented in camel cases.", "id": "GoogleCloudDialogflowCxV3beta1WebhookRequest", "properties": { "detectIntentResponseId": { @@ -5128,6 +9220,140 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2AgentAssistantFeedback": { + "description": "Detail feedback of Agent Assist result.", + "id": "GoogleCloudDialogflowV2AgentAssistantFeedback", + "properties": { + "answerRelevance": { + "description": "Optional. Whether or not the suggested answer is relevant. For example: * Query: \"Can I change my mailing address?\" * Suggested document says: \"Items must be returned/exchanged within 60 days of the purchase date.\" * answer_relevance: AnswerRelevance.IRRELEVANT", + "enum": [ + "ANSWER_RELEVANCE_UNSPECIFIED", + "IRRELEVANT", + "RELEVANT" + ], + "enumDescriptions": [ + "Answer relevance unspecified.", + "Answer is irrelevant to query.", + "Answer is relevant to query." + ], + "type": "string" + }, + "documentCorrectness": { + "description": "Optional. Whether or not the information in the document is correct. For example: * Query: \"Can I return the package in 2 days once received?\" * Suggested document says: \"Items must be returned/exchanged within 60 days of the purchase date.\" * Ground truth: \"No return or exchange is allowed.\" * [document_correctness]: INCORRECT", + "enum": [ + "DOCUMENT_CORRECTNESS_UNSPECIFIED", + "INCORRECT", + "CORRECT" + ], + "enumDescriptions": [ + "Document correctness unspecified.", + "Information in document is incorrect.", + "Information in document is correct." + ], + "type": "string" + }, + "documentEfficiency": { + "description": "Optional. Whether or not the suggested document is efficient. For example, if the document is poorly written, hard to understand, hard to use or too long to find useful information, document_efficiency is DocumentEfficiency.INEFFICIENT.", + "enum": [ + "DOCUMENT_EFFICIENCY_UNSPECIFIED", + "INEFFICIENT", + "EFFICIENT" + ], + "enumDescriptions": [ + "Document efficiency unspecified.", + "Document is inefficient.", + "Document is efficient." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2AgentAssistantRecord": { + "description": "Represents a record of a human agent assist answer.", + "id": "GoogleCloudDialogflowV2AgentAssistantRecord", + "properties": { + "articleSuggestionAnswer": { + "$ref": "GoogleCloudDialogflowV2ArticleAnswer", + "description": "Output only. The article suggestion answer.", + "readOnly": true + }, + "faqAnswer": { + "$ref": "GoogleCloudDialogflowV2FaqAnswer", + "description": "Output only. The FAQ answer.", + "readOnly": true + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2AnalyzeContentRequest": { + "description": "The request message for Participants.AnalyzeContent.", + "id": "GoogleCloudDialogflowV2AnalyzeContentRequest", + "properties": { + "eventInput": { + "$ref": "GoogleCloudDialogflowV2EventInput", + "description": "An input event to send to Dialogflow." + }, + "queryParams": { + "$ref": "GoogleCloudDialogflowV2QueryParameters", + "description": "Parameters for a Dialogflow virtual-agent query." + }, + "replyAudioConfig": { + "$ref": "GoogleCloudDialogflowV2OutputAudioConfig", + "description": "Speech synthesis configuration. The speech synthesis settings for a virtual agent that may be configured for the associated conversation profile are not used when calling AnalyzeContent. If this configuration is not supplied, speech synthesis is disabled." + }, + "requestId": { + "description": "A unique identifier for this request. Restricted to 36 ASCII characters. A random UUID is recommended. This request is only idempotent if a `request_id` is provided.", + "type": "string" + }, + "textInput": { + "$ref": "GoogleCloudDialogflowV2TextInput", + "description": "The natural language text to be processed." + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2AnalyzeContentResponse": { + "description": "The response message for Participants.AnalyzeContent.", + "id": "GoogleCloudDialogflowV2AnalyzeContentResponse", + "properties": { + "automatedAgentReply": { + "$ref": "GoogleCloudDialogflowV2AutomatedAgentReply", + "description": "Only set if a Dialogflow automated agent has responded. Note that: AutomatedAgentReply.detect_intent_response.output_audio and AutomatedAgentReply.detect_intent_response.output_audio_config are always empty, use reply_audio instead." + }, + "dtmfParameters": { + "$ref": "GoogleCloudDialogflowV2DtmfParameters", + "description": "Indicates the parameters of DTMF." + }, + "endUserSuggestionResults": { + "description": "The suggestions for end user. The order is the same as HumanAgentAssistantConfig.SuggestionConfig.feature_configs of HumanAgentAssistantConfig.end_user_suggestion_config.", + "items": { + "$ref": "GoogleCloudDialogflowV2SuggestionResult" + }, + "type": "array" + }, + "humanAgentSuggestionResults": { + "description": "The suggestions for most recent human agent. The order is the same as HumanAgentAssistantConfig.SuggestionConfig.feature_configs of HumanAgentAssistantConfig.human_agent_suggestion_config.", + "items": { + "$ref": "GoogleCloudDialogflowV2SuggestionResult" + }, + "type": "array" + }, + "message": { + "$ref": "GoogleCloudDialogflowV2Message", + "description": "Message analyzed by CCAI." + }, + "replyAudio": { + "$ref": "GoogleCloudDialogflowV2OutputAudio", + "description": "The audio data bytes encoded as specified in the request. This field is set if: - `reply_audio_config` was specified in the request, or - The automated agent responded with audio to play to the user. In such case, `reply_audio.config` contains settings used to synthesize the speech. In some scenarios, multiple output audio fields may be present in the response structure. In these cases, only the top-most-level audio output has content." + }, + "replyText": { + "description": "The output text content. This field is set if the automated agent responded with text to show to the user.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2AnnotatedMessagePart": { "description": "Represents a part of a message possibly annotated with an entity. The part can be an entity or purely a part of the message between two entities or message start/end.", "id": "GoogleCloudDialogflowV2AnnotatedMessagePart", @@ -5147,6 +9373,131 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2AnswerFeedback": { + "description": "Represents feedback the customer has about the quality & correctness of a certain answer in a conversation.", + "id": "GoogleCloudDialogflowV2AnswerFeedback", + "properties": { + "agentAssistantDetailFeedback": { + "$ref": "GoogleCloudDialogflowV2AgentAssistantFeedback", + "description": "Detail feedback of agent assist suggestions." + }, + "clickTime": { + "description": "Time when the answer/item was clicked.", + "format": "google-datetime", + "type": "string" + }, + "clicked": { + "description": "Indicates whether the answer/item was clicked by the human agent or not. Default to false.", + "type": "boolean" + }, + "correctnessLevel": { + "description": "The correctness level of the specific answer.", + "enum": [ + "CORRECTNESS_LEVEL_UNSPECIFIED", + "NOT_CORRECT", + "PARTIALLY_CORRECT", + "FULLY_CORRECT" + ], + "enumDescriptions": [ + "Correctness level unspecified.", + "Answer is totally wrong.", + "Answer is partially correct.", + "Answer is fully correct." + ], + "type": "string" + }, + "displayTime": { + "description": "Time when the answer/item was displayed.", + "format": "google-datetime", + "type": "string" + }, + "displayed": { + "description": "Indicates whether the answer/item was displayed to the human agent in the agent desktop UI. Default to false.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2AnswerRecord": { + "description": "Answer records are records to manage answer history and feedbacks for Dialogflow. Currently, answer record includes: - human agent assistant article suggestion - human agent assistant faq article It doesn't include: - `DetectIntent` intent matching - `DetectIntent` knowledge Answer records are not related to the conversation history in the Dialogflow Console. A Record is generated even when the end-user disables conversation history in the console. Records are created when there's a human agent assistant suggestion generated. A typical workflow for customers provide feedback to an answer is: 1. For human agent assistant, customers get suggestion via ListSuggestions API. Together with the answers, AnswerRecord.name are returned to the customers. 2. The customer uses the AnswerRecord.name to call the UpdateAnswerRecord method to send feedback about a specific answer that they believe is wrong.", + "id": "GoogleCloudDialogflowV2AnswerRecord", + "properties": { + "agentAssistantRecord": { + "$ref": "GoogleCloudDialogflowV2AgentAssistantRecord", + "description": "Output only. The record for human agent assistant.", + "readOnly": true + }, + "answerFeedback": { + "$ref": "GoogleCloudDialogflowV2AnswerFeedback", + "description": "Required. The AnswerFeedback for this record. You can set this with AnswerRecords.UpdateAnswerRecord in order to give us feedback about this answer." + }, + "name": { + "description": "The unique identifier of this answer record. Format: `projects//locations//answerRecords/`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2ArticleAnswer": { + "description": "Represents article answer.", + "id": "GoogleCloudDialogflowV2ArticleAnswer", + "properties": { + "answerRecord": { + "description": "The name of answer record, in the format of \"projects//locations//answerRecords/\"", + "type": "string" + }, + "confidence": { + "description": "Article match confidence. The system's confidence score that this article is a good match for this conversation, as a value from 0.0 (completely uncertain) to 1.0 (completely certain).", + "format": "float", + "type": "number" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "A map that contains metadata about the answer and the document from which it originates.", + "type": "object" + }, + "snippets": { + "description": "Article snippets.", + "items": { + "type": "string" + }, + "type": "array" + }, + "title": { + "description": "The article title.", + "type": "string" + }, + "uri": { + "description": "The article URI.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2AutomatedAgentConfig": { + "description": "Defines the Automated Agent to connect to a conversation.", + "id": "GoogleCloudDialogflowV2AutomatedAgentConfig", + "properties": { + "agent": { + "description": "Required. ID of the Dialogflow agent environment to use. This project needs to either be the same project as the conversation or you need to grant `service-@gcp-sa-dialogflow.iam.gserviceaccount.com` the `Dialogflow API Service Agent` role in this project. Format: `projects//locations//agent/environments/`. If environment is not specified, the default `draft` environment is used. Refer to [DetectIntentRequest](/dialogflow/docs/reference/rpc/google.cloud.dialogflow.v2#google.cloud.dialogflow.v2.DetectIntentRequest) for more details.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2AutomatedAgentReply": { + "description": "Represents a response from an automated agent.", + "id": "GoogleCloudDialogflowV2AutomatedAgentReply", + "properties": { + "detectIntentResponse": { + "$ref": "GoogleCloudDialogflowV2DetectIntentResponse", + "description": "Response of the Dialogflow Sessions.DetectIntent call." + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2BatchCreateEntitiesRequest": { "description": "The request message for EntityTypes.BatchCreateEntities.", "id": "GoogleCloudDialogflowV2BatchCreateEntitiesRequest", @@ -5321,6 +9672,12 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2CompleteConversationRequest": { + "description": "The request message for Conversations.CompleteConversation.", + "id": "GoogleCloudDialogflowV2CompleteConversationRequest", + "properties": {}, + "type": "object" + }, "GoogleCloudDialogflowV2Context": { "description": "Dialogflow contexts are similar to natural language context. If a person says to you \"they are orange\", you need context in order to understand what \"they\" is referring to. Similarly, for Dialogflow to handle an end-user expression like that, it needs to be provided with context in order to correctly match an intent. Using contexts, you can control the flow of a conversation. You can configure contexts for an intent by setting input and output contexts, which are identified by string names. When an intent is matched, any configured output contexts for that intent become active. While any contexts are active, Dialogflow is more likely to match intents that are configured with input contexts that correspond to the currently active contexts. For more information about context, see the [Contexts guide](https://cloud.google.com/dialogflow/docs/contexts-overview).", "id": "GoogleCloudDialogflowV2Context", @@ -5331,16 +9688,78 @@ "type": "integer" }, "name": { - "description": "Required. The unique identifier of the context. Format: `projects//agent/sessions//contexts/`, or `projects//agent/environments//users//sessions//contexts/`. The `Context ID` is always converted to lowercase, may only contain characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. The following context names are reserved for internal use by Dialogflow. You should not use these contexts or create contexts with these names: * `__system_counters__` * `*_id_dialog_context` * `*_dialog_params_size`", + "description": "Required. The unique identifier of the context. Format: `projects//agent/sessions//contexts/`, or `projects//agent/environments//users//sessions//contexts/`. The `Context ID` is always converted to lowercase, may only contain characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. The following context names are reserved for internal use by Dialogflow. You should not use these contexts or create contexts with these names: * `__system_counters__` * `*_id_dialog_context` * `*_dialog_params_size`", + "type": "string" + }, + "parameters": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Optional. The collection of parameters associated with this context. Depending on your protocol or client library language, this is a map, associative array, symbol table, dictionary, or JSON object composed of a collection of (MapKey, MapValue) pairs: - MapKey type: string - MapKey value: parameter name - MapValue type: - If parameter's entity type is a composite entity: map - Else: depending on parameter value type, could be one of string, number, boolean, null, list or map - MapValue value: - If parameter's entity type is a composite entity: map from composite entity property names to property values - Else: parameter value", + "type": "object" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2Conversation": { + "description": "Represents a conversation. A conversation is an interaction between an agent, including live agents and Dialogflow agents, and a support customer. Conversations can include phone calls and text-based chat sessions.", + "id": "GoogleCloudDialogflowV2Conversation", + "properties": { + "conversationProfile": { + "description": "Required. The Conversation Profile to be used to configure this Conversation. This field cannot be updated. Format: `projects//locations//conversationProfiles/`.", + "type": "string" + }, + "conversationStage": { + "description": "The stage of a conversation. It indicates whether the virtual agent or a human agent is handling the conversation. If the conversation is created with the conversation profile that has Dialogflow config set, defaults to ConversationStage.VIRTUAL_AGENT_STAGE; Otherwise, defaults to ConversationStage.HUMAN_ASSIST_STAGE. If the conversation is created with the conversation profile that has Dialogflow config set but explicitly sets conversation_stage to ConversationStage.HUMAN_ASSIST_STAGE, it skips ConversationStage.VIRTUAL_AGENT_STAGE stage and directly goes to ConversationStage.HUMAN_ASSIST_STAGE.", + "enum": [ + "CONVERSATION_STAGE_UNSPECIFIED", + "VIRTUAL_AGENT_STAGE", + "HUMAN_ASSIST_STAGE" + ], + "enumDescriptions": [ + "Unknown. Should never be used after a conversation is successfully created.", + "The conversation should return virtual agent responses into the conversation.", + "The conversation should not provide responses, just listen and provide suggestions." + ], + "type": "string" + }, + "endTime": { + "description": "Output only. The time the conversation was finished.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "lifecycleState": { + "description": "Output only. The current state of the Conversation.", + "enum": [ + "LIFECYCLE_STATE_UNSPECIFIED", + "IN_PROGRESS", + "COMPLETED" + ], + "enumDescriptions": [ + "Unknown.", + "Conversation is currently open for media analysis.", + "Conversation has been completed." + ], + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Output only. The unique identifier of this conversation. Format: `projects//locations//conversations/`.", + "readOnly": true, "type": "string" }, - "parameters": { - "additionalProperties": { - "description": "Properties of the object.", - "type": "any" - }, - "description": "Optional. The collection of parameters associated with this context. Depending on your protocol or client library language, this is a map, associative array, symbol table, dictionary, or JSON object composed of a collection of (MapKey, MapValue) pairs: - MapKey type: string - MapKey value: parameter name - MapValue type: - If parameter's entity type is a composite entity: map - Else: depending on parameter value type, could be one of string, number, boolean, null, list or map - MapValue value: - If parameter's entity type is a composite entity: map from composite entity property names to property values - Else: parameter value", - "type": "object" + "phoneNumber": { + "$ref": "GoogleCloudDialogflowV2ConversationPhoneNumber", + "description": "Output only. It will not be empty if the conversation is to be connected over telephony.", + "readOnly": true + }, + "startTime": { + "description": "Output only. The time the conversation was started.", + "format": "google-datetime", + "readOnly": true, + "type": "string" } }, "type": "object" @@ -5384,6 +9803,73 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2ConversationPhoneNumber": { + "description": "Represents a phone number for telephony integration. It allows for connecting a particular conversation over telephony.", + "id": "GoogleCloudDialogflowV2ConversationPhoneNumber", + "properties": { + "phoneNumber": { + "description": "Output only. The phone number to connect to this conversation.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2ConversationProfile": { + "description": "Defines the services to connect to incoming Dialogflow conversations.", + "id": "GoogleCloudDialogflowV2ConversationProfile", + "properties": { + "automatedAgentConfig": { + "$ref": "GoogleCloudDialogflowV2AutomatedAgentConfig", + "description": "Configuration for an automated agent to use with this profile." + }, + "createTime": { + "description": "Output only. Create time of the conversation profile.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "Required. Human readable name for this profile. Max length 1024 bytes.", + "type": "string" + }, + "humanAgentAssistantConfig": { + "$ref": "GoogleCloudDialogflowV2HumanAgentAssistantConfig", + "description": "Configuration for agent assistance to use with this profile." + }, + "languageCode": { + "description": "Language which represents the conversationProfile. If unspecified, the default language code en-us applies. Users need to create a ConversationProfile for each language they want to support.", + "type": "string" + }, + "loggingConfig": { + "$ref": "GoogleCloudDialogflowV2LoggingConfig", + "description": "Configuration for logging conversation lifecycle events." + }, + "name": { + "description": "The unique identifier of this conversation profile. Format: `projects//locations//conversationProfiles/`.", + "type": "string" + }, + "newMessageEventNotificationConfig": { + "$ref": "GoogleCloudDialogflowV2NotificationConfig", + "description": "Configuration for publishing new message events. Event will be sent in format of ConversationEvent" + }, + "notificationConfig": { + "$ref": "GoogleCloudDialogflowV2NotificationConfig", + "description": "Configuration for publishing conversation lifecycle events." + }, + "sttConfig": { + "$ref": "GoogleCloudDialogflowV2SpeechToTextConfig", + "description": "Settings for speech transcription." + }, + "updateTime": { + "description": "Output only. Update time of the conversation profile.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2DetectIntentRequest": { "description": "The request to detect user's intent.", "id": "GoogleCloudDialogflowV2DetectIntentRequest", @@ -5441,6 +9927,96 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2Document": { + "description": "A knowledge document to be used by a KnowledgeBase. For more information, see the [knowledge base guide](https://cloud.google.com/dialogflow/docs/how/knowledge-bases). Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`.", + "id": "GoogleCloudDialogflowV2Document", + "properties": { + "contentUri": { + "description": "The URI where the file content is located. For documents stored in Google Cloud Storage, these URIs must have the form `gs:///`. NOTE: External URLs must correspond to public webpages, i.e., they must be indexed by Google Search. In particular, URLs for showing documents in Google Cloud Storage (i.e. the URL in your browser) are not supported. Instead use the `gs://` format URI described above.", + "type": "string" + }, + "displayName": { + "description": "Required. The display name of the document. The name must be 1024 bytes or less; otherwise, the creation request fails.", + "type": "string" + }, + "enableAutoReload": { + "description": "Optional. If true, we try to automatically reload the document every day (at a time picked by the system). If false or unspecified, we don't try to automatically reload the document. Currently you can only enable automatic reload for documents sourced from a public url, see `source` field for the source types. Reload status can be tracked in `latest_reload_status`. If a reload fails, we will keep the document unchanged. If a reload fails with internal errors, the system will try to reload the document on the next day. If a reload fails with non-retriable errors (e.g. PERMISION_DENIED), the system will not try to reload the document anymore. You need to manually reload the document successfully by calling `ReloadDocument` and clear the errors.", + "type": "boolean" + }, + "knowledgeTypes": { + "description": "Required. The knowledge type of document content.", + "items": { + "enum": [ + "KNOWLEDGE_TYPE_UNSPECIFIED", + "FAQ", + "EXTRACTIVE_QA", + "ARTICLE_SUGGESTION" + ], + "enumDescriptions": [ + "The type is unspecified or arbitrary.", + "The document content contains question and answer pairs as either HTML or CSV. Typical FAQ HTML formats are parsed accurately, but unusual formats may fail to be parsed. CSV must have questions in the first column and answers in the second, with no header. Because of this explicit format, they are always parsed accurately.", + "Documents for which unstructured text is extracted and used for question answering.", + "The entire document content as a whole can be used for query results. Only for Contact Center Solutions on Dialogflow." + ], + "type": "string" + }, + "type": "array" + }, + "latestReloadStatus": { + "$ref": "GoogleCloudDialogflowV2DocumentReloadStatus", + "description": "Output only. The time and status of the latest reload. This reload may have been triggered automatically or manually and may not have succeeded.", + "readOnly": true + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Metadata for the document. The metadata supports arbitrary key-value pairs. Suggested use cases include storing a document's title, an external URL distinct from the document's content_uri, etc. The max size of a `key` or a `value` of the metadata is 1024 bytes.", + "type": "object" + }, + "mimeType": { + "description": "Required. The MIME type of this document.", + "type": "string" + }, + "name": { + "description": "Optional. The document resource name. The name must be empty when creating a document. Format: `projects//locations//knowledgeBases//documents/`.", + "type": "string" + }, + "rawContent": { + "description": "The raw content of the document. This field is only permitted for EXTRACTIVE_QA and FAQ knowledge types.", + "format": "byte", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2DocumentReloadStatus": { + "description": "The status of a reload attempt.", + "id": "GoogleCloudDialogflowV2DocumentReloadStatus", + "properties": { + "status": { + "$ref": "GoogleRpcStatus", + "description": "The status of a reload attempt or the initial load." + }, + "time": { + "description": "The time of a reload attempt. This reload may have been triggered automatically or manually and may not have succeeded.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2DtmfParameters": { + "description": "The message in the response that indicates the parameters of DTMF.", + "id": "GoogleCloudDialogflowV2DtmfParameters", + "properties": { + "acceptsDtmfInput": { + "description": "Indicates whether DTMF input can be handled in the next request.", + "type": "boolean" + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2EntityType": { "description": "Each intent parameter has a type, called the entity type, which dictates exactly how data from an end-user expression is extracted. Dialogflow provides predefined system entities that can match many common types of data. For example, there are system entities for matching dates, times, colors, email addresses, and so on. You can also create your own custom entities for matching custom data. For example, you could define a vegetable entity that can match the types of vegetables available for purchase with a grocery store agent. For more information, see the [Entity guide](https://cloud.google.com/dialogflow/docs/entities-overview).", "id": "GoogleCloudDialogflowV2EntityType", @@ -5620,6 +10196,41 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2FaqAnswer": { + "description": "Represents answer from \"frequently asked questions\".", + "id": "GoogleCloudDialogflowV2FaqAnswer", + "properties": { + "answer": { + "description": "The piece of text from the `source` knowledge base document.", + "type": "string" + }, + "answerRecord": { + "description": "The name of answer record, in the format of \"projects//locations//answerRecords/\"", + "type": "string" + }, + "confidence": { + "description": "The system's confidence score that this Knowledge answer is a good match for this conversational query, range from 0.0 (completely uncertain) to 1.0 (completely certain).", + "format": "float", + "type": "number" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "A map that contains metadata about the answer and the document from which it originates.", + "type": "object" + }, + "question": { + "description": "The corresponding FAQ question.", + "type": "string" + }, + "source": { + "description": "Indicates which Knowledge Document this answer was extracted from. Format: `projects//locations//agent/knowledgeBases//documents/`.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2Fulfillment": { "description": "By default, your agent responds to a matched intent with a static response. As an alternative, you can provide a more dynamic response by using fulfillment. When you enable fulfillment for an intent, Dialogflow responds to that intent by calling a service that you define. For example, if an end-user wants to schedule a haircut on Friday, your service can check your database and respond to the end-user with availability information for Friday. For more information, see the [fulfillment guide](https://cloud.google.com/dialogflow/docs/fulfillment-overview).", "id": "GoogleCloudDialogflowV2Fulfillment", @@ -5699,6 +10310,220 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2HumanAgentAssistantConfig": { + "description": "Defines the Human Agent Assist to connect to a conversation.", + "id": "GoogleCloudDialogflowV2HumanAgentAssistantConfig", + "properties": { + "humanAgentSuggestionConfig": { + "$ref": "GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionConfig", + "description": "Configuration for agent assistance of human agent participant." + }, + "messageAnalysisConfig": { + "$ref": "GoogleCloudDialogflowV2HumanAgentAssistantConfigMessageAnalysisConfig", + "description": "Configuration for message analysis." + }, + "notificationConfig": { + "$ref": "GoogleCloudDialogflowV2NotificationConfig", + "description": "Pub/Sub topic on which to publish new agent assistant events." + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2HumanAgentAssistantConfigConversationModelConfig": { + "description": "Custom conversation models used in agent assist feature. Supported feature: ARTICLE_SUGGESTION, SMART_COMPOSE, SMART_REPLY.", + "id": "GoogleCloudDialogflowV2HumanAgentAssistantConfigConversationModelConfig", + "properties": { + "model": { + "description": "Required. Conversation model resource name. Format: `projects//conversationModels/`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2HumanAgentAssistantConfigMessageAnalysisConfig": { + "description": "Configuration for analyses to run on each conversation message.", + "id": "GoogleCloudDialogflowV2HumanAgentAssistantConfigMessageAnalysisConfig", + "properties": { + "enableSentimentAnalysis": { + "description": "Enable sentiment analysis in conversation messages on [agent assist stage](https://cloud.google.com/dialogflow/priv/docs/contact-center/basics#stages). If unspecified, defaults to false. Sentiment analysis inspects user input and identifies the prevailing subjective opinion, especially to determine a user's attitude as positive, negative, or neutral: https://cloud.google.com/natural-language/docs/basics#sentiment_analysis For Participants.StreamingAnalyzeContent method, result will be in StreamingAnalyzeContentResponse.message.SentimentAnalysisResult. For Participants.AnalyzeContent method, result will be in AnalyzeContentResponse.message.SentimentAnalysisResult For Conversations.ListMessages method, result will be in ListMessagesResponse.messages.SentimentAnalysisResult If Pub/Sub notification is configured, result will be in ConversationEvent.new_message_payload.SentimentAnalysisResult.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionConfig": { + "description": "Detail human agent assistant config.", + "id": "GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionConfig", + "properties": { + "featureConfigs": { + "description": "Configuration of different suggestion features. One feature can have only one config.", + "items": { + "$ref": "GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionFeatureConfig" + }, + "type": "array" + }, + "groupSuggestionResponses": { + "description": "If `group_suggestion_responses` is false, and there are multiple `feature_configs` in `event based suggestion` or StreamingAnalyzeContent, we will try to deliver suggestions to customers as soon as we get new suggestion. Different type of suggestions based on the same context will be in separate Pub/Sub event or `StreamingAnalyzeContentResponse`. If `group_suggestion_responses` set to true. All the suggestions to the same participant based on the same context will be grouped into a single Pub/Sub event or StreamingAnalyzeContentResponse.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionFeatureConfig": { + "description": "Config for suggestion features.", + "id": "GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionFeatureConfig", + "properties": { + "conversationModelConfig": { + "$ref": "GoogleCloudDialogflowV2HumanAgentAssistantConfigConversationModelConfig", + "description": "Configs of custom conversation model." + }, + "enableEventBasedSuggestion": { + "description": "Automatically iterates all participants and tries to compile suggestions. Supported features: ARTICLE_SUGGESTION, FAQ, DIALOGFLOW_ASSIST.", + "type": "boolean" + }, + "queryConfig": { + "$ref": "GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfig", + "description": "Configs of query." + }, + "suggestionFeature": { + "$ref": "GoogleCloudDialogflowV2SuggestionFeature", + "description": "The suggestion feature." + }, + "suggestionTriggerSettings": { + "$ref": "GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionTriggerSettings", + "description": "Settings of suggestion trigger. Currently, only ARTICLE_SUGGESTION and FAQ will use this field." + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfig": { + "description": "Config for suggestion query.", + "id": "GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfig", + "properties": { + "confidenceThreshold": { + "description": "Confidence threshold of query result. Agent Assist gives each suggestion a score in the range [0.0, 1.0], based on the relevance between the suggestion and the current conversation context. A score of 0.0 has no relevance, while a score of 1.0 has high relevance. Only suggestions with a score greater than or equal to the value of this field are included in the results. For a baseline model (the default), the recommended value is in the range [0.05, 0.1]. For a custom model, there is no recommended value. Tune this value by starting from a very low value and slowly increasing until you have desired results. If this field is not set, it defaults to 0.0, which means that all suggestions are returned. Supported features: ARTICLE_SUGGESTION.", + "format": "float", + "type": "number" + }, + "contextFilterSettings": { + "$ref": "GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigContextFilterSettings", + "description": "Determines how recent conversation context is filtered when generating suggestions. If unspecified, no messages will be dropped." + }, + "dialogflowQuerySource": { + "$ref": "GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDialogflowQuerySource", + "description": "Query from Dialogflow agent. It is used by DIALOGFLOW_ASSIST." + }, + "documentQuerySource": { + "$ref": "GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDocumentQuerySource", + "description": "Query from knowledge base document. It is used by: SMART_REPLY, SMART_COMPOSE." + }, + "knowledgeBaseQuerySource": { + "$ref": "GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigKnowledgeBaseQuerySource", + "description": "Query from knowledgebase. It is used by: ARTICLE_SUGGESTION, FAQ." + }, + "maxResults": { + "description": "Maximum number of results to return. Currently, if unset, defaults to 10. And the max number is 20.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigContextFilterSettings": { + "description": "Settings that determine how to filter recent conversation context when generating suggestions.", + "id": "GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigContextFilterSettings", + "properties": { + "dropHandoffMessages": { + "description": "If set to true, the last message from virtual agent (hand off message) and the message before it (trigger message of hand off) are dropped.", + "type": "boolean" + }, + "dropIvrMessages": { + "description": "If set to true, all messages from ivr stage are dropped.", + "type": "boolean" + }, + "dropVirtualAgentMessages": { + "description": "If set to true, all messages from virtual agent are dropped.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDialogflowQuerySource": { + "description": "Dialogflow source setting. Supported feature: DIALOGFLOW_ASSIST.", + "id": "GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDialogflowQuerySource", + "properties": { + "agent": { + "description": "Required. The name of a Dialogflow virtual agent used for end user side intent detection and suggestion. Format: `projects//locations//agent`. When multiple agents are allowed in the same Dialogflow project.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDocumentQuerySource": { + "description": "Document source settings. Supported features: SMART_REPLY, SMART_COMPOSE.", + "id": "GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDocumentQuerySource", + "properties": { + "documents": { + "description": "Required. Knowledge documents to query from. Format: `projects//locations//knowledgeBases//documents/`. Currently, at most 5 documents are supported.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigKnowledgeBaseQuerySource": { + "description": "Knowledge base source settings. Supported features: ARTICLE_SUGGESTION, FAQ.", + "id": "GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigKnowledgeBaseQuerySource", + "properties": { + "knowledgeBases": { + "description": "Required. Knowledge bases to query. Format: `projects//locations//knowledgeBases/`. Currently, at most 5 knowledge bases are supported.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionTriggerSettings": { + "description": "Settings of suggestion trigger.", + "id": "GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionTriggerSettings", + "properties": { + "noSmalltalk": { + "description": "Do not trigger if last utterance is small talk.", + "type": "boolean" + }, + "onlyEndUser": { + "description": "Only trigger suggestion if participant role of last utterance is END_USER.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2HumanAgentAssistantEvent": { + "description": "Represents a notification sent to Cloud Pub/Sub subscribers for human agent assistant events in a specific conversation.", + "id": "GoogleCloudDialogflowV2HumanAgentAssistantEvent", + "properties": { + "conversation": { + "description": "The conversation this notification refers to. Format: `projects//conversations/`.", + "type": "string" + }, + "participant": { + "description": "The participant that the suggestion is compiled for. Format: `projects//conversations//participants/`. It will not be set in legacy workflow.", + "type": "string" + }, + "suggestionResults": { + "description": "The suggestion results payload that this notification refers to.", + "items": { + "$ref": "GoogleCloudDialogflowV2SuggestionResult" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2ImportAgentRequest": { "description": "The request message for Agents.ImportAgent.", "id": "GoogleCloudDialogflowV2ImportAgentRequest", @@ -5743,6 +10568,10 @@ ], "type": "string" }, + "disableNoSpeechRecognizedEvent": { + "description": "Only used in Participants.AnalyzeContent and Participants.StreamingAnalyzeContent. If `false` and recognition doesn't return any result, trigger `NO_SPEECH_RECOGNIZED` event to Dialogflow agent.", + "type": "boolean" + }, "enableWordInfo": { "description": "If `true`, Dialogflow returns SpeechWordInfo in StreamingRecognitionResult with information about the recognized speech words, e.g. start and end time offsets. If false or unspecified, Speech doesn't return any word-level information.", "type": "boolean" @@ -5840,6 +10669,10 @@ "description": "Required. The name of this intent.", "type": "string" }, + "endInteraction": { + "description": "Optional. Indicates that this intent ends an interaction. Some integrations (e.g., Actions on Google or Dialogflow phone gateway) use this information to close interaction with an end user. Default is false.", + "type": "boolean" + }, "events": { "description": "Optional. The collection of event names that trigger the intent. If the collection of input contexts is not empty, all of the contexts must be present in the active user session for an event to trigger this intent. Event names are limited to 150 characters.", "items": { @@ -5865,6 +10698,10 @@ "description": "Optional. Indicates whether this is a fallback intent.", "type": "boolean" }, + "liveAgentHandoff": { + "description": "Optional. Indicates that a live agent should be brought in to handle the interaction with the user. In most cases, when you set this flag to true, you would also want to set end_interaction to true as well. Default is false.", + "type": "boolean" + }, "messages": { "description": "Optional. The collection of rich messages corresponding to the `Response` field in the Dialogflow console.", "items": { @@ -6711,6 +11548,67 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2KnowledgeBase": { + "description": "A knowledge base represents a collection of knowledge documents that you provide to Dialogflow. Your knowledge documents contain information that may be useful during conversations with end-users. Some Dialogflow features use knowledge bases when looking for a response to an end-user input. For more information, see the [knowledge base guide](https://cloud.google.com/dialogflow/docs/how/knowledge-bases). Note: The `projects.agent.knowledgeBases` resource is deprecated; only use `projects.knowledgeBases`.", + "id": "GoogleCloudDialogflowV2KnowledgeBase", + "properties": { + "displayName": { + "description": "Required. The display name of the knowledge base. The name must be 1024 bytes or less; otherwise, the creation request fails.", + "type": "string" + }, + "languageCode": { + "description": "Language which represents the KnowledgeBase. When the KnowledgeBase is created/updated, expect this to be present for non en-us languages. When unspecified, the default language code en-us applies.", + "type": "string" + }, + "name": { + "description": "The knowledge base resource name. The name must be empty when creating a knowledge base. Format: `projects//locations//knowledgeBases/`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2KnowledgeOperationMetadata": { + "description": "Metadata in google::longrunning::Operation for Knowledge operations.", + "id": "GoogleCloudDialogflowV2KnowledgeOperationMetadata", + "properties": { + "state": { + "description": "Output only. The current state of this operation.", + "enum": [ + "STATE_UNSPECIFIED", + "PENDING", + "RUNNING", + "DONE" + ], + "enumDescriptions": [ + "State unspecified.", + "The operation has been created.", + "The operation is currently running.", + "The operation is done, either cancelled or completed." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2ListAnswerRecordsResponse": { + "description": "Response message for AnswerRecords.ListAnswerRecords.", + "id": "GoogleCloudDialogflowV2ListAnswerRecordsResponse", + "properties": { + "answerRecords": { + "description": "The list of answer records.", + "items": { + "$ref": "GoogleCloudDialogflowV2AnswerRecord" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token to retrieve next page of results. Or empty if there are no more results. Pass this value in the ListAnswerRecordsRequest.page_token field in the subsequent call to `ListAnswerRecords` method to retrieve the next page of results.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2ListContextsResponse": { "description": "The response message for Contexts.ListContexts.", "id": "GoogleCloudDialogflowV2ListContextsResponse", @@ -6729,6 +11627,60 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2ListConversationProfilesResponse": { + "description": "The response message for ConversationProfiles.ListConversationProfiles.", + "id": "GoogleCloudDialogflowV2ListConversationProfilesResponse", + "properties": { + "conversationProfiles": { + "description": "The list of project conversation profiles. There is a maximum number of items returned based on the page_size field in the request.", + "items": { + "$ref": "GoogleCloudDialogflowV2ConversationProfile" + }, + "type": "array" + }, + "nextPageToken": { + "description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2ListConversationsResponse": { + "description": "The response message for Conversations.ListConversations.", + "id": "GoogleCloudDialogflowV2ListConversationsResponse", + "properties": { + "conversations": { + "description": "The list of conversations. There will be a maximum number of items returned based on the page_size field in the request.", + "items": { + "$ref": "GoogleCloudDialogflowV2Conversation" + }, + "type": "array" + }, + "nextPageToken": { + "description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2ListDocumentsResponse": { + "description": "Response message for Documents.ListDocuments.", + "id": "GoogleCloudDialogflowV2ListDocumentsResponse", + "properties": { + "documents": { + "description": "The list of documents.", + "items": { + "$ref": "GoogleCloudDialogflowV2Document" + }, + "type": "array" + }, + "nextPageToken": { + "description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2ListEntityTypesResponse": { "description": "The response message for EntityTypes.ListEntityTypes.", "id": "GoogleCloudDialogflowV2ListEntityTypesResponse", @@ -6783,6 +11735,60 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2ListKnowledgeBasesResponse": { + "description": "Response message for KnowledgeBases.ListKnowledgeBases.", + "id": "GoogleCloudDialogflowV2ListKnowledgeBasesResponse", + "properties": { + "knowledgeBases": { + "description": "The list of knowledge bases.", + "items": { + "$ref": "GoogleCloudDialogflowV2KnowledgeBase" + }, + "type": "array" + }, + "nextPageToken": { + "description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2ListMessagesResponse": { + "description": "The response message for Conversations.ListMessages.", + "id": "GoogleCloudDialogflowV2ListMessagesResponse", + "properties": { + "messages": { + "description": "The list of messages. There will be a maximum number of items returned based on the page_size field in the request. `messages` is sorted by `create_time` in descending order.", + "items": { + "$ref": "GoogleCloudDialogflowV2Message" + }, + "type": "array" + }, + "nextPageToken": { + "description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2ListParticipantsResponse": { + "description": "The response message for Participants.ListParticipants.", + "id": "GoogleCloudDialogflowV2ListParticipantsResponse", + "properties": { + "nextPageToken": { + "description": "Token to retrieve the next page of results or empty if there are no more results in the list.", + "type": "string" + }, + "participants": { + "description": "The list of participants. There is a maximum number of items returned based on the page_size field in the request.", + "items": { + "$ref": "GoogleCloudDialogflowV2Participant" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2ListSessionEntityTypesResponse": { "description": "The response message for SessionEntityTypes.ListSessionEntityTypes.", "id": "GoogleCloudDialogflowV2ListSessionEntityTypesResponse", @@ -6801,6 +11807,17 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2LoggingConfig": { + "description": "Defines logging behavior for conversation lifecycle events.", + "id": "GoogleCloudDialogflowV2LoggingConfig", + "properties": { + "enableStackdriverLogging": { + "description": "Whether to log conversation events like CONVERSATION_STARTED to Stackdriver in the conversation project as JSON format ConversationEvent protos.", + "type": "boolean" + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2Message": { "description": "Represents a message posted into a conversation.", "id": "GoogleCloudDialogflowV2Message", @@ -6871,6 +11888,31 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2NotificationConfig": { + "description": "Defines notification behavior.", + "id": "GoogleCloudDialogflowV2NotificationConfig", + "properties": { + "messageFormat": { + "description": "Format of message.", + "enum": [ + "MESSAGE_FORMAT_UNSPECIFIED", + "PROTO", + "JSON" + ], + "enumDescriptions": [ + "If it is unspeified, PROTO will be used.", + "Pubsub message will be serialized proto.", + "Pubsub message will be json." + ], + "type": "string" + }, + "topic": { + "description": "Name of the Pub/Sub topic to publish conversation events like CONVERSATION_STARTED as serialized ConversationEvent protos. Notification works for phone calls, if this topic either is in the same project as the conversation or you grant `service-@gcp-sa-dialogflow.iam.gserviceaccount.com` the `Dialogflow Service Agent` role in the topic project. Format: `projects//locations//topics/`.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2OriginalDetectIntentRequest": { "description": "Represents the contents of the original request that was passed to the `[Streaming]DetectIntent` call.", "id": "GoogleCloudDialogflowV2OriginalDetectIntentRequest", @@ -6894,6 +11936,22 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2OutputAudio": { + "description": "Represents the natural language speech audio to be played to the end user.", + "id": "GoogleCloudDialogflowV2OutputAudio", + "properties": { + "audio": { + "description": "The natural language speech audio.", + "format": "byte", + "type": "string" + }, + "config": { + "$ref": "GoogleCloudDialogflowV2OutputAudioConfig", + "description": "Instructs the speech synthesizer how to generate the speech audio." + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2OutputAudioConfig": { "description": "Instructs the speech synthesizer on how to generate the output audio content. If this audio config is supplied in a request, it overrides all existing text-to-speech settings applied to the agent.", "id": "GoogleCloudDialogflowV2OutputAudioConfig", @@ -6904,13 +11962,17 @@ "OUTPUT_AUDIO_ENCODING_UNSPECIFIED", "OUTPUT_AUDIO_ENCODING_LINEAR_16", "OUTPUT_AUDIO_ENCODING_MP3", - "OUTPUT_AUDIO_ENCODING_OGG_OPUS" + "OUTPUT_AUDIO_ENCODING_MP3_64_KBPS", + "OUTPUT_AUDIO_ENCODING_OGG_OPUS", + "OUTPUT_AUDIO_ENCODING_MULAW" ], "enumDescriptions": [ "Not specified.", "Uncompressed 16-bit signed little-endian samples (Linear PCM). Audio content returned as LINEAR16 also contains a WAV header.", "MP3 audio at 32kbps.", - "Opus encoded audio wrapped in an ogg container. The result will be a file which can be played natively on Android, and in browsers (at least Chrome and Firefox). The quality of the encoding is considerably higher than MP3 while using approximately the same bitrate." + "MP3 audio at 64kbps.", + "Opus encoded audio wrapped in an ogg container. The result will be a file which can be played natively on Android, and in browsers (at least Chrome and Firefox). The quality of the encoding is considerably higher than MP3 while using approximately the same bitrate.", + "8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law." ], "type": "string" }, @@ -6926,6 +11988,37 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2Participant": { + "description": "Represents a conversation participant (human agent, virtual agent, end-user).", + "id": "GoogleCloudDialogflowV2Participant", + "properties": { + "name": { + "description": "Optional. The unique identifier of this participant. Format: `projects//locations//conversations//participants/`.", + "type": "string" + }, + "role": { + "description": "Immutable. The role this participant plays in the conversation. This field must be set during participant creation and is then immutable.", + "enum": [ + "ROLE_UNSPECIFIED", + "HUMAN_AGENT", + "AUTOMATED_AGENT", + "END_USER" + ], + "enumDescriptions": [ + "Participant role not set.", + "Participant is a human agent.", + "Participant is an automated agent, such as a Dialogflow agent.", + "Participant is an end user that has called or chatted with Dialogflow services." + ], + "type": "string" + }, + "sipRecordingMediaLabel": { + "description": "Optional. Label applied to streams representing this participant in SIPREC XML metadata and SDP. This is used to assign transcriptions from that media stream to this participant. This field can be updated.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2QueryInput": { "description": "Represents the query input. It can contain either: 1. An audio config which instructs the speech recognizer how to process the speech audio. 2. A conversational query in the form of text,. 3. An event that specifies which intent to trigger.", "id": "GoogleCloudDialogflowV2QueryInput", @@ -7084,6 +12177,17 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2ReloadDocumentRequest": { + "description": "Request message for Documents.ReloadDocument.", + "id": "GoogleCloudDialogflowV2ReloadDocumentRequest", + "properties": { + "contentUri": { + "description": "Optional. The path of gcs source file for reloading document content. For now, only gcs uri is supported. For documents stored in Google Cloud Storage, these URIs must have the form `gs:///`.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2RestoreAgentRequest": { "description": "The request message for Agents.RestoreAgent.", "id": "GoogleCloudDialogflowV2RestoreAgentRequest", @@ -7208,6 +12312,147 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2SpeechToTextConfig": { + "description": "Configures speech transcription for ConversationProfile.", + "id": "GoogleCloudDialogflowV2SpeechToTextConfig", + "properties": { + "speechModelVariant": { + "description": "Optional. The speech model used in speech to text. `SPEECH_MODEL_VARIANT_UNSPECIFIED`, `USE_BEST_AVAILABLE` will be treated as `USE_ENHANCED`. It can be overridden in AnalyzeContentRequest and StreamingAnalyzeContentRequest request.", + "enum": [ + "SPEECH_MODEL_VARIANT_UNSPECIFIED", + "USE_BEST_AVAILABLE", + "USE_STANDARD", + "USE_ENHANCED" + ], + "enumDescriptions": [ + "No model variant specified. In this case Dialogflow defaults to USE_BEST_AVAILABLE.", + "Use the best available variant of the Speech model that the caller is eligible for. Please see the [Dialogflow docs](https://cloud.google.com/dialogflow/docs/data-logging) for how to make your project eligible for enhanced models.", + "Use standard model variant even if an enhanced model is available. See the [Cloud Speech documentation](https://cloud.google.com/speech-to-text/docs/enhanced-models) for details about enhanced models.", + "Use an enhanced model variant: * If an enhanced variant does not exist for the given model and request language, Dialogflow falls back to the standard variant. The [Cloud Speech documentation](https://cloud.google.com/speech-to-text/docs/enhanced-models) describes which models have enhanced variants. * If the API caller isn't eligible for enhanced models, Dialogflow returns an error. Please see the [Dialogflow docs](https://cloud.google.com/dialogflow/docs/data-logging) for how to make your project eligible." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2SuggestArticlesRequest": { + "description": "The request message for Participants.SuggestArticles.", + "id": "GoogleCloudDialogflowV2SuggestArticlesRequest", + "properties": { + "contextSize": { + "description": "Max number of messages prior to and including latest_message to use as context when compiling the suggestion. By default 20 and at most 50.", + "format": "int32", + "type": "integer" + }, + "latestMessage": { + "description": "The name of the latest conversation message to compile suggestion for. If empty, it will be the latest message of the conversation. Format: `projects//locations//conversations//messages/`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2SuggestArticlesResponse": { + "description": "The response message for Participants.SuggestArticles.", + "id": "GoogleCloudDialogflowV2SuggestArticlesResponse", + "properties": { + "articleAnswers": { + "description": "Articles ordered by score in descending order.", + "items": { + "$ref": "GoogleCloudDialogflowV2ArticleAnswer" + }, + "type": "array" + }, + "contextSize": { + "description": "Number of messages prior to and including latest_message to compile the suggestion. It may be smaller than the SuggestArticlesRequest.context_size field in the request if there aren't that many messages in the conversation.", + "format": "int32", + "type": "integer" + }, + "latestMessage": { + "description": "The name of the latest conversation message used to compile suggestion for. Format: `projects//locations//conversations//messages/`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2SuggestFaqAnswersRequest": { + "description": "The request message for Participants.SuggestFaqAnswers.", + "id": "GoogleCloudDialogflowV2SuggestFaqAnswersRequest", + "properties": { + "contextSize": { + "description": "Max number of messages prior to and including [latest_message] to use as context when compiling the suggestion. By default 20 and at most 50.", + "format": "int32", + "type": "integer" + }, + "latestMessage": { + "description": "The name of the latest conversation message to compile suggestion for. If empty, it will be the latest message of the conversation. Format: `projects//locations//conversations//messages/`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2SuggestFaqAnswersResponse": { + "description": "The request message for Participants.SuggestFaqAnswers.", + "id": "GoogleCloudDialogflowV2SuggestFaqAnswersResponse", + "properties": { + "contextSize": { + "description": "Number of messages prior to and including latest_message to compile the suggestion. It may be smaller than the SuggestFaqAnswersRequest.context_size field in the request if there aren't that many messages in the conversation.", + "format": "int32", + "type": "integer" + }, + "faqAnswers": { + "description": "Answers extracted from FAQ documents.", + "items": { + "$ref": "GoogleCloudDialogflowV2FaqAnswer" + }, + "type": "array" + }, + "latestMessage": { + "description": "The name of the latest conversation message used to compile suggestion for. Format: `projects//locations//conversations//messages/`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2SuggestionFeature": { + "description": "The type of Human Agent Assistant API suggestion to perform, and the maximum number of results to return for that type. Multiple `Feature` objects can be specified in the `features` list.", + "id": "GoogleCloudDialogflowV2SuggestionFeature", + "properties": { + "type": { + "description": "Type of Human Agent Assistant API feature to request.", + "enum": [ + "TYPE_UNSPECIFIED", + "ARTICLE_SUGGESTION", + "FAQ" + ], + "enumDescriptions": [ + "Unspecified feature type.", + "Run article suggestion model.", + "Run FAQ model." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2SuggestionResult": { + "description": "One response of different type of suggestion response which is used in the response of Participants.AnalyzeContent and Participants.AnalyzeContent, as well as HumanAgentAssistantEvent.", + "id": "GoogleCloudDialogflowV2SuggestionResult", + "properties": { + "error": { + "$ref": "GoogleRpcStatus", + "description": "Error status if the request failed." + }, + "suggestArticlesResponse": { + "$ref": "GoogleCloudDialogflowV2SuggestArticlesResponse", + "description": "SuggestArticlesResponse if request is for ARTICLE_SUGGESTION." + }, + "suggestFaqAnswersResponse": { + "$ref": "GoogleCloudDialogflowV2SuggestFaqAnswersResponse", + "description": "SuggestFaqAnswersResponse if request is for FAQ_ANSWER." + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2SynthesizeSpeechConfig": { "description": "Configuration of how speech should be synthesized.", "id": "GoogleCloudDialogflowV2SynthesizeSpeechConfig", @@ -7410,6 +12655,58 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2beta1AnnotatedMessagePart": { + "description": "Represents a part of a message possibly annotated with an entity. The part can be an entity or purely a part of the message between two entities or message start/end.", + "id": "GoogleCloudDialogflowV2beta1AnnotatedMessagePart", + "properties": { + "entityType": { + "description": "Optional. The [Dialogflow system entity type](https://cloud.google.com/dialogflow/docs/reference/system-entities) of this message part. If this is empty, Dialogflow could not annotate the phrase part with a system entity.", + "type": "string" + }, + "formattedValue": { + "description": "Optional. The [Dialogflow system entity formatted value ](https://cloud.google.com/dialogflow/docs/reference/system-entities) of this message part. For example for a system entity of type `@sys.unit-currency`, this may contain: { \"amount\": 5, \"currency\": \"USD\" } ", + "type": "any" + }, + "text": { + "description": "Required. A part of a message possibly annotated with an entity.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1ArticleAnswer": { + "description": "Represents article answer.", + "id": "GoogleCloudDialogflowV2beta1ArticleAnswer", + "properties": { + "answerRecord": { + "description": "The name of answer record, in the format of \"projects//locations//answerRecords/\"", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "A map that contains metadata about the answer and the document from which it originates.", + "type": "object" + }, + "snippets": { + "description": "Output only. Article snippets.", + "items": { + "type": "string" + }, + "type": "array" + }, + "title": { + "description": "The article title.", + "type": "string" + }, + "uri": { + "description": "The article URI.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse": { "description": "The response message for EntityTypes.BatchUpdateEntityTypes.", "id": "GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse", @@ -7462,6 +12759,43 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2beta1ConversationEvent": { + "description": "Represents a notification sent to Pub/Sub subscribers for conversation lifecycle events.", + "id": "GoogleCloudDialogflowV2beta1ConversationEvent", + "properties": { + "conversation": { + "description": "Required. The unique identifier of the conversation this notification refers to. Format: `projects//conversations/`.", + "type": "string" + }, + "errorStatus": { + "$ref": "GoogleRpcStatus", + "description": "Optional. More detailed information about an error. Only set for type UNRECOVERABLE_ERROR_IN_PHONE_CALL." + }, + "newMessagePayload": { + "$ref": "GoogleCloudDialogflowV2beta1Message", + "description": "Payload of NEW_MESSAGE event." + }, + "type": { + "description": "Required. The type of the event that this notification refers to.", + "enum": [ + "TYPE_UNSPECIFIED", + "CONVERSATION_STARTED", + "CONVERSATION_FINISHED", + "NEW_MESSAGE", + "UNRECOVERABLE_ERROR" + ], + "enumDescriptions": [ + "Type not set.", + "A new conversation has been opened. This is fired when a telephone call is answered, or a conversation is created via the API.", + "An existing conversation has closed. This is fired when a telephone call is terminated, or a conversation is closed via the API.", + "An existing conversation has received a new message, either from API or telephony. It is configured in ConversationProfile.new_message_event_notification_config", + "Unrecoverable error during a telephone call. In general non-recoverable errors only occur if something was misconfigured in the ConversationProfile corresponding to the call. After a non-recoverable error, Dialogflow may stop responding. We don't fire this event: * in an API call because we can directly return the error, or, * when we can recover from an error." + ], + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2beta1EntityType": { "description": "Each intent parameter has a type, called the entity type, which dictates exactly how data from an end-user expression is extracted. Dialogflow provides predefined system entities that can match many common types of data. For example, there are system entities for matching dates, times, colors, email addresses, and so on. You can also create your own custom entities for matching custom data. For example, you could define a vegetable entity that can match the types of vegetables available for purchase with a grocery store agent. For more information, see the [Entity guide](https://cloud.google.com/dialogflow/docs/entities-overview).", "id": "GoogleCloudDialogflowV2beta1EntityType", @@ -7573,6 +12907,77 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2beta1FaqAnswer": { + "description": "Represents answer from \"frequently asked questions\".", + "id": "GoogleCloudDialogflowV2beta1FaqAnswer", + "properties": { + "answer": { + "description": "The piece of text from the `source` knowledge base document.", + "type": "string" + }, + "answerRecord": { + "description": "The name of answer record, in the format of \"projects//locations//answerRecords/\"", + "type": "string" + }, + "confidence": { + "description": "The system's confidence score that this Knowledge answer is a good match for this conversational query, range from 0.0 (completely uncertain) to 1.0 (completely certain).", + "format": "float", + "type": "number" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "A map that contains metadata about the answer and the document from which it originates.", + "type": "object" + }, + "question": { + "description": "The corresponding FAQ question.", + "type": "string" + }, + "source": { + "description": "Indicates which Knowledge Document this answer was extracted from. Format: `projects//locations//agent/knowledgeBases//documents/`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1HumanAgentAssistantEvent": { + "description": "Output only. Represents a notification sent to Pub/Sub subscribers for agent assistant events in a specific conversation.", + "id": "GoogleCloudDialogflowV2beta1HumanAgentAssistantEvent", + "properties": { + "conversation": { + "description": "The conversation this notification refers to. Format: `projects//conversations/`.", + "type": "string" + }, + "participant": { + "description": "The participant that the suggestion is compiled for. And This field is used to call Participants.ListSuggestions API. Format: `projects//conversations//participants/`. It will not be set in legacy workflow. HumanAgentAssistantConfig.name for more information.", + "type": "string" + }, + "suggestionResults": { + "description": "The suggestion results payload that this notification refers to. It will only be set when HumanAgentAssistantConfig.SuggestionConfig.group_suggestion_responses sets to true.", + "items": { + "$ref": "GoogleCloudDialogflowV2beta1SuggestionResult" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1ImportDocumentsResponse": { + "description": "Response message for Documents.ImportDocuments.", + "id": "GoogleCloudDialogflowV2beta1ImportDocumentsResponse", + "properties": { + "warnings": { + "description": "Includes details about skipped documents or any other warnings.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2beta1Intent": { "description": "An intent categorizes an end-user's intention for one conversation turn. For each agent, you define many intents, where your combined intents can handle a complete conversation. When an end-user writes or says something, referred to as an end-user expression or end-user input, Dialogflow matches the end-user input to the best intent in your agent. Matching an intent is also known as intent classification. For more information, see the [intent guide](https://cloud.google.com/dialogflow/docs/intents-overview).", "id": "GoogleCloudDialogflowV2beta1Intent", @@ -7648,6 +13053,10 @@ "description": "Optional. Indicates whether this is a fallback intent.", "type": "boolean" }, + "liveAgentHandoff": { + "description": "Optional. Indicates that a live agent should be brought in to handle the interaction with the user. In most cases, when you set this flag to true, you would also want to set end_interaction to true as well. Default is false.", + "type": "boolean" + }, "messages": { "description": "Optional. The collection of rich messages corresponding to the `Response` field in the Dialogflow console.", "items": { @@ -8853,6 +14262,86 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2beta1Message": { + "description": "Represents a message posted into a conversation.", + "id": "GoogleCloudDialogflowV2beta1Message", + "properties": { + "content": { + "description": "Required. The message content.", + "type": "string" + }, + "createTime": { + "description": "Output only. The time when the message was created in Contact Center AI.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "languageCode": { + "description": "Optional. The message language. This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. Example: \"en-US\".", + "type": "string" + }, + "messageAnnotation": { + "$ref": "GoogleCloudDialogflowV2beta1MessageAnnotation", + "description": "Output only. The annotation for the message.", + "readOnly": true + }, + "name": { + "description": "Optional. The unique identifier of the message. Format: `projects//locations//conversations//messages/`.", + "type": "string" + }, + "participant": { + "description": "Output only. The participant that sends this message.", + "readOnly": true, + "type": "string" + }, + "participantRole": { + "description": "Output only. The role of the participant.", + "enum": [ + "ROLE_UNSPECIFIED", + "HUMAN_AGENT", + "AUTOMATED_AGENT", + "END_USER" + ], + "enumDescriptions": [ + "Participant role not set.", + "Participant is a human agent.", + "Participant is an automated agent, such as a Dialogflow agent.", + "Participant is an end user that has called or chatted with Dialogflow services." + ], + "readOnly": true, + "type": "string" + }, + "sendTime": { + "description": "Optional. The time when the message was sent.", + "format": "google-datetime", + "type": "string" + }, + "sentimentAnalysis": { + "$ref": "GoogleCloudDialogflowV2beta1SentimentAnalysisResult", + "description": "Output only. The sentiment analysis result for the message.", + "readOnly": true + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1MessageAnnotation": { + "description": "Represents the result of annotation for the message.", + "id": "GoogleCloudDialogflowV2beta1MessageAnnotation", + "properties": { + "containEntities": { + "description": "Required. Indicates whether the text message contains entities.", + "type": "boolean" + }, + "parts": { + "description": "Optional. The collection of annotated message parts ordered by their position in the message. You can recover the annotated message by concatenating [AnnotatedMessagePart.text].", + "items": { + "$ref": "GoogleCloudDialogflowV2beta1AnnotatedMessagePart" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest": { "description": "Represents the contents of the original request that was passed to the `[Streaming]DetectIntent` call.", "id": "GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest", @@ -9027,6 +14516,118 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2beta1SmartReplyAnswer": { + "description": "Represents a smart reply answer.", + "id": "GoogleCloudDialogflowV2beta1SmartReplyAnswer", + "properties": { + "answerRecord": { + "description": "The name of answer record, in the format of \"projects//locations//answerRecords/\"", + "type": "string" + }, + "confidence": { + "description": "Smart reply confidence. The system's confidence score that this reply is a good match for this conversation, as a value from 0.0 (completely uncertain) to 1.0 (completely certain).", + "format": "float", + "type": "number" + }, + "reply": { + "description": "The content of the reply.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1SuggestArticlesResponse": { + "description": "The response message for Participants.SuggestArticles.", + "id": "GoogleCloudDialogflowV2beta1SuggestArticlesResponse", + "properties": { + "articleAnswers": { + "description": "Output only. Articles ordered by score in descending order.", + "items": { + "$ref": "GoogleCloudDialogflowV2beta1ArticleAnswer" + }, + "type": "array" + }, + "contextSize": { + "description": "Number of messages prior to and including latest_message to compile the suggestion. It may be smaller than the SuggestArticlesResponse.context_size field in the request if there aren't that many messages in the conversation.", + "format": "int32", + "type": "integer" + }, + "latestMessage": { + "description": "The name of the latest conversation message used to compile suggestion for. Format: `projects//locations//conversations//messages/`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1SuggestFaqAnswersResponse": { + "description": "The request message for Participants.SuggestFaqAnswers.", + "id": "GoogleCloudDialogflowV2beta1SuggestFaqAnswersResponse", + "properties": { + "contextSize": { + "description": "Number of messages prior to and including latest_message to compile the suggestion. It may be smaller than the SuggestFaqAnswersRequest.context_size field in the request if there aren't that many messages in the conversation.", + "format": "int32", + "type": "integer" + }, + "faqAnswers": { + "description": "Output only. Answers extracted from FAQ documents.", + "items": { + "$ref": "GoogleCloudDialogflowV2beta1FaqAnswer" + }, + "type": "array" + }, + "latestMessage": { + "description": "The name of the latest conversation message used to compile suggestion for. Format: `projects//locations//conversations//messages/`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1SuggestSmartRepliesResponse": { + "description": "The response message for Participants.SuggestSmartReplies.", + "id": "GoogleCloudDialogflowV2beta1SuggestSmartRepliesResponse", + "properties": { + "contextSize": { + "description": "Number of messages prior to and including latest_message to compile the suggestion. It may be smaller than the SuggestSmartRepliesRequest.context_size field in the request if there aren't that many messages in the conversation.", + "format": "int32", + "type": "integer" + }, + "latestMessage": { + "description": "The name of the latest conversation message used to compile suggestion for. Format: `projects//locations//conversations//messages/`.", + "type": "string" + }, + "smartReplyAnswers": { + "description": "Output only. Multiple reply options provided by smart reply service. The order is based on the rank of the model prediction. The maximum number of the returned replies is set in SmartReplyConfig.", + "items": { + "$ref": "GoogleCloudDialogflowV2beta1SmartReplyAnswer" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1SuggestionResult": { + "description": "One response of different type of suggestion response which is used in the response of Participants.AnalyzeContent and Participants.AnalyzeContent, as well as HumanAgentAssistantEvent.", + "id": "GoogleCloudDialogflowV2beta1SuggestionResult", + "properties": { + "error": { + "$ref": "GoogleRpcStatus", + "description": "Error status if the request failed." + }, + "suggestArticlesResponse": { + "$ref": "GoogleCloudDialogflowV2beta1SuggestArticlesResponse", + "description": "SuggestArticlesResponse if request is for ARTICLE_SUGGESTION." + }, + "suggestFaqAnswersResponse": { + "$ref": "GoogleCloudDialogflowV2beta1SuggestFaqAnswersResponse", + "description": "SuggestFaqAnswersResponse if request is for FAQ_ANSWER." + }, + "suggestSmartRepliesResponse": { + "$ref": "GoogleCloudDialogflowV2beta1SuggestSmartRepliesResponse", + "description": "SuggestSmartRepliesResponse if request is for SMART_REPLY." + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2beta1WebhookRequest": { "description": "The request message for a webhook call.", "id": "GoogleCloudDialogflowV2beta1WebhookRequest", @@ -9080,6 +14681,10 @@ "description": "Optional. The text response message intended for the end-user. It is recommended to use `fulfillment_messages.text.text[0]` instead. When provided, Dialogflow uses this field to populate QueryResult.fulfillment_text sent to the integration or API caller.", "type": "string" }, + "liveAgentHandoff": { + "description": "Indicates that a live agent should be brought in to handle the interaction with the user. In most cases, when you set this flag to true, you would also want to set end_interaction to true as well. Default is false.", + "type": "boolean" + }, "outputContexts": { "description": "Optional. The collection of output contexts that will overwrite currently active contexts for the session and reset their lifespans. When provided, Dialogflow uses this field to populate QueryResult.output_contexts sent to the integration or API caller.", "items": { diff --git a/discovery/dialogflow-v2beta1.json b/discovery/dialogflow-v2beta1.json index 6e0d349c52d..d3bf340fbe9 100644 --- a/discovery/dialogflow-v2beta1.json +++ b/discovery/dialogflow-v2beta1.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" }, "https://www.googleapis.com/auth/dialogflow": { "description": "View, manage and query your Dialogflow agents" @@ -421,7 +421,7 @@ ], "parameters": { "name": { - "description": "Required. The unique identifier of the fulfillment. Supported formats: - `projects//agent/fulfillment` - `projects//locations//agent/fulfillment`", + "description": "Required. The unique identifier of the fulfillment. Supported formats: - `projects//agent/fulfillment` - `projects//locations//agent/fulfillment` This field is not used for Fulfillment in an Environment.", "location": "path", "pattern": "^projects/[^/]+/agent/fulfillment$", "required": true, @@ -2286,31 +2286,133 @@ } } }, - "knowledgeBases": { + "answerRecords": { + "methods": { + "get": { + "description": "Deprecated. Retrieves a specific answer record.", + "flatPath": "v2beta1/projects/{projectsId}/answerRecords/{answerRecordsId}", + "httpMethod": "GET", + "id": "dialogflow.projects.answerRecords.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the answer record to retrieve. Format: `projects//locations//answerRecords/`.", + "location": "path", + "pattern": "^projects/[^/]+/answerRecords/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+name}", + "response": { + "$ref": "GoogleCloudDialogflowV2beta1AnswerRecord" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "list": { + "description": "Returns the list of all answer records in the specified project in reverse chronological order.", + "flatPath": "v2beta1/projects/{projectsId}/answerRecords", + "httpMethod": "GET", + "id": "dialogflow.projects.answerRecords.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. The maximum number of records to return in a single page. The server may return fewer records than this. If unspecified, we use 10. The maximum is 100.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. The ListAnswerRecordsResponse.next_page_token value returned from a previous list request used to continue listing on the next page.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The project to list all answer records for in reverse chronological order. Format: `projects//locations/`.", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+parent}/answerRecords", + "response": { + "$ref": "GoogleCloudDialogflowV2beta1ListAnswerRecordsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "patch": { + "description": "Updates the specified answer record.", + "flatPath": "v2beta1/projects/{projectsId}/answerRecords/{answerRecordsId}", + "httpMethod": "PATCH", + "id": "dialogflow.projects.answerRecords.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The unique identifier of this answer record. Required for AnswerRecords.UpdateAnswerRecord method. Format: `projects//locations//answerRecords/`.", + "location": "path", + "pattern": "^projects/[^/]+/answerRecords/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. The mask to control which fields get updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2beta1/{+name}", + "request": { + "$ref": "GoogleCloudDialogflowV2beta1AnswerRecord" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2beta1AnswerRecord" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + } + } + }, + "conversationProfiles": { "methods": { "create": { - "description": "Creates a knowledge base. Note: The `projects.agent.knowledgeBases` resource is deprecated; only use `projects.knowledgeBases`.", - "flatPath": "v2beta1/projects/{projectsId}/knowledgeBases", + "description": "Creates a conversation profile in the specified project. ConversationProfile.CreateTime and ConversationProfile.UpdateTime aren't populated in the response. You can retrieve them via GetConversationProfile API.", + "flatPath": "v2beta1/projects/{projectsId}/conversationProfiles", "httpMethod": "POST", - "id": "dialogflow.projects.knowledgeBases.create", + "id": "dialogflow.projects.conversationProfiles.create", "parameterOrder": [ "parent" ], "parameters": { "parent": { - "description": "Required. The project to create a knowledge base for. Format: `projects//locations/`.", + "description": "Required. The project to create a conversation profile for. Format: `projects//locations/`.", "location": "path", "pattern": "^projects/[^/]+$", "required": true, "type": "string" } }, - "path": "v2beta1/{+parent}/knowledgeBases", + "path": "v2beta1/{+parent}/conversationProfiles", "request": { - "$ref": "GoogleCloudDialogflowV2beta1KnowledgeBase" + "$ref": "GoogleCloudDialogflowV2beta1ConversationProfile" }, "response": { - "$ref": "GoogleCloudDialogflowV2beta1KnowledgeBase" + "$ref": "GoogleCloudDialogflowV2beta1ConversationProfile" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", @@ -2318,23 +2420,18 @@ ] }, "delete": { - "description": "Deletes the specified knowledge base. Note: The `projects.agent.knowledgeBases` resource is deprecated; only use `projects.knowledgeBases`.", - "flatPath": "v2beta1/projects/{projectsId}/knowledgeBases/{knowledgeBasesId}", + "description": "Deletes the specified conversation profile.", + "flatPath": "v2beta1/projects/{projectsId}/conversationProfiles/{conversationProfilesId}", "httpMethod": "DELETE", - "id": "dialogflow.projects.knowledgeBases.delete", + "id": "dialogflow.projects.conversationProfiles.delete", "parameterOrder": [ "name" ], "parameters": { - "force": { - "description": "Optional. Force deletes the knowledge base. When set to true, any documents in the knowledge base are also deleted.", - "location": "query", - "type": "boolean" - }, "name": { - "description": "Required. The name of the knowledge base to delete. Format: `projects//locations//knowledgeBases/`.", + "description": "Required. The name of the conversation profile to delete. Format: `projects//locations//conversationProfiles/`.", "location": "path", - "pattern": "^projects/[^/]+/knowledgeBases/[^/]+$", + "pattern": "^projects/[^/]+/conversationProfiles/[^/]+$", "required": true, "type": "string" } @@ -2349,25 +2446,25 @@ ] }, "get": { - "description": "Retrieves the specified knowledge base. Note: The `projects.agent.knowledgeBases` resource is deprecated; only use `projects.knowledgeBases`.", - "flatPath": "v2beta1/projects/{projectsId}/knowledgeBases/{knowledgeBasesId}", + "description": "Retrieves the specified conversation profile.", + "flatPath": "v2beta1/projects/{projectsId}/conversationProfiles/{conversationProfilesId}", "httpMethod": "GET", - "id": "dialogflow.projects.knowledgeBases.get", + "id": "dialogflow.projects.conversationProfiles.get", "parameterOrder": [ "name" ], "parameters": { "name": { - "description": "Required. The name of the knowledge base to retrieve. Format `projects//locations//knowledgeBases/`.", + "description": "Required. The resource name of the conversation profile. Format: `projects//locations//conversationProfiles/`.", "location": "path", - "pattern": "^projects/[^/]+/knowledgeBases/[^/]+$", + "pattern": "^projects/[^/]+/conversationProfiles/[^/]+$", "required": true, "type": "string" } }, "path": "v2beta1/{+name}", "response": { - "$ref": "GoogleCloudDialogflowV2beta1KnowledgeBase" + "$ref": "GoogleCloudDialogflowV2beta1ConversationProfile" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", @@ -2375,21 +2472,16 @@ ] }, "list": { - "description": "Returns the list of all knowledge bases of the specified agent. Note: The `projects.agent.knowledgeBases` resource is deprecated; only use `projects.knowledgeBases`.", - "flatPath": "v2beta1/projects/{projectsId}/knowledgeBases", + "description": "Returns the list of all conversation profiles in the specified project.", + "flatPath": "v2beta1/projects/{projectsId}/conversationProfiles", "httpMethod": "GET", - "id": "dialogflow.projects.knowledgeBases.list", + "id": "dialogflow.projects.conversationProfiles.list", "parameterOrder": [ "parent" ], "parameters": { - "filter": { - "description": "The filter expression used to filter knowledge bases returned by the list method. The expression has the following syntax: [AND ] ... The following fields and operators are supported: * display_name with has(:) operator * language_code with equals(=) operator Examples: * 'language_code=en-us' matches knowledge bases with en-us language code. * 'display_name:articles' matches knowledge bases whose display name contains \"articles\". * 'display_name:\"Best Articles\"' matches knowledge bases whose display name contains \"Best Articles\". * 'language_code=en-gb AND display_name=articles' matches all knowledge bases whose display name contains \"articles\" and whose language code is \"en-gb\". Note: An empty filter string (i.e. \"\") is a no-op and will result in no filtering. For more information about filtering, see [API Filtering](https://aip.dev/160).", - "location": "query", - "type": "string" - }, "pageSize": { - "description": "The maximum number of items to return in a single page. By default 10 and at most 100.", + "description": "The maximum number of items to return in a single page. By default 100 and at most 1000.", "format": "int32", "location": "query", "type": "integer" @@ -2400,16 +2492,16 @@ "type": "string" }, "parent": { - "description": "Required. The project to list of knowledge bases for. Format: `projects//locations/`.", + "description": "Required. The project to list all conversation profiles from. Format: `projects//locations/`.", "location": "path", "pattern": "^projects/[^/]+$", "required": true, "type": "string" } }, - "path": "v2beta1/{+parent}/knowledgeBases", + "path": "v2beta1/{+parent}/conversationProfiles", "response": { - "$ref": "GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse" + "$ref": "GoogleCloudDialogflowV2beta1ListConversationProfilesResponse" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", @@ -2417,23 +2509,23 @@ ] }, "patch": { - "description": "Updates the specified knowledge base. Note: The `projects.agent.knowledgeBases` resource is deprecated; only use `projects.knowledgeBases`.", - "flatPath": "v2beta1/projects/{projectsId}/knowledgeBases/{knowledgeBasesId}", + "description": "Updates the specified conversation profile. ConversationProfile.CreateTime and ConversationProfile.UpdateTime aren't populated in the response. You can retrieve them via GetConversationProfile API.", + "flatPath": "v2beta1/projects/{projectsId}/conversationProfiles/{conversationProfilesId}", "httpMethod": "PATCH", - "id": "dialogflow.projects.knowledgeBases.patch", + "id": "dialogflow.projects.conversationProfiles.patch", "parameterOrder": [ "name" ], "parameters": { "name": { - "description": "The knowledge base resource name. The name must be empty when creating a knowledge base. Format: `projects//locations//knowledgeBases/`.", + "description": "The unique identifier of this conversation profile. Format: `projects//locations//conversationProfiles/`.", "location": "path", - "pattern": "^projects/[^/]+/knowledgeBases/[^/]+$", + "pattern": "^projects/[^/]+/conversationProfiles/[^/]+$", "required": true, "type": "string" }, "updateMask": { - "description": "Optional. Not specified means `update all`. Currently, only `display_name` can be updated, an InvalidArgument will be returned for attempting to update other fields.", + "description": "Required. The mask to control which fields to update.", "format": "google-fieldmask", "location": "query", "type": "string" @@ -2441,10 +2533,145 @@ }, "path": "v2beta1/{+name}", "request": { - "$ref": "GoogleCloudDialogflowV2beta1KnowledgeBase" + "$ref": "GoogleCloudDialogflowV2beta1ConversationProfile" }, "response": { - "$ref": "GoogleCloudDialogflowV2beta1KnowledgeBase" + "$ref": "GoogleCloudDialogflowV2beta1ConversationProfile" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + } + } + }, + "conversations": { + "methods": { + "complete": { + "description": "Completes the specified conversation. Finished conversations are purged from the database after 30 days.", + "flatPath": "v2beta1/projects/{projectsId}/conversations/{conversationsId}:complete", + "httpMethod": "POST", + "id": "dialogflow.projects.conversations.complete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Resource identifier of the conversation to close. Format: `projects//locations//conversations/`.", + "location": "path", + "pattern": "^projects/[^/]+/conversations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+name}:complete", + "request": { + "$ref": "GoogleCloudDialogflowV2beta1CompleteConversationRequest" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2beta1Conversation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "create": { + "description": "Creates a new conversation. Conversations are auto-completed after 24 hours. Conversation Lifecycle: There are two stages during a conversation: Automated Agent Stage and Assist Stage. For Automated Agent Stage, there will be a dialogflow agent responding to user queries. For Assist Stage, there's no dialogflow agent responding to user queries. But we will provide suggestions which are generated from conversation. If Conversation.conversation_profile is configured for a dialogflow agent, conversation will start from `Automated Agent Stage`, otherwise, it will start from `Assist Stage`. And during `Automated Agent Stage`, once an Intent with Intent.live_agent_handoff is triggered, conversation will transfer to Assist Stage.", + "flatPath": "v2beta1/projects/{projectsId}/conversations", + "httpMethod": "POST", + "id": "dialogflow.projects.conversations.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "conversationId": { + "description": "Optional. Identifier of the conversation. Generally it's auto generated by Google. Only set it if you cannot wait for the response to return a auto-generated one to you. The conversation ID must be compliant with the regression fomula \"a-zA-Z*\" with the characters length in range of [3,64]. If the field is provided, the caller is resposible for 1. the uniqueness of the ID, otherwise the request will be rejected. 2. the consistency for whether to use custom ID or not under a project to better ensure uniqueness.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Resource identifier of the project creating the conversation. Format: `projects//locations/`.", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+parent}/conversations", + "request": { + "$ref": "GoogleCloudDialogflowV2beta1Conversation" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2beta1Conversation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "get": { + "description": "Retrieves the specific conversation.", + "flatPath": "v2beta1/projects/{projectsId}/conversations/{conversationsId}", + "httpMethod": "GET", + "id": "dialogflow.projects.conversations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the conversation. Format: `projects//locations//conversations/`.", + "location": "path", + "pattern": "^projects/[^/]+/conversations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+name}", + "response": { + "$ref": "GoogleCloudDialogflowV2beta1Conversation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "list": { + "description": "Returns the list of all conversations in the specified project.", + "flatPath": "v2beta1/projects/{projectsId}/conversations", + "httpMethod": "GET", + "id": "dialogflow.projects.conversations.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters conversations listed in the response. In general, the expression must specify the field name, a comparison operator, and the value to use for filtering: - The value must be a string, a number, or a boolean. - The comparison operator must be either `=`,`!=`, `>`, or `<`. - To filter on multiple expressions, separate the expressions with `AND` or `OR` (omitting both implies `AND`). - For clarity, expressions can be enclosed in parentheses. Only `lifecycle_state` can be filtered on in this way. For example, the following expression only returns `COMPLETED` conversations: `lifecycle_state = \"COMPLETED\"` For more information about filtering, see [API Filtering](https://aip.dev/160).", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. The next_page_token value returned from a previous list request.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The project from which to list all conversation. Format: `projects//locations/`.", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+parent}/conversations", + "response": { + "$ref": "GoogleCloudDialogflowV2beta1ListConversationsResponse" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", @@ -2453,525 +2680,222 @@ } }, "resources": { - "documents": { + "messages": { "methods": { - "create": { - "description": "Creates a new document. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`.", - "flatPath": "v2beta1/projects/{projectsId}/knowledgeBases/{knowledgeBasesId}/documents", + "batchCreate": { + "description": "Batch ingests messages to conversation. Customers can use this RPC to ingest historical messages to conversation.", + "flatPath": "v2beta1/projects/{projectsId}/conversations/{conversationsId}/messages:batchCreate", "httpMethod": "POST", - "id": "dialogflow.projects.knowledgeBases.documents.create", + "id": "dialogflow.projects.conversations.messages.batchCreate", "parameterOrder": [ "parent" ], "parameters": { - "importGcsCustomMetadata": { - "description": "Whether to import custom metadata from Google Cloud Storage. Only valid when the document source is Google Cloud Storage URI.", - "location": "query", - "type": "boolean" - }, "parent": { - "description": "Required. The knowledge base to create a document for. Format: `projects//locations//knowledgeBases/`.", + "description": "Required. Resource identifier of the conversation to create message. Format: `projects//locations//conversations/`.", "location": "path", - "pattern": "^projects/[^/]+/knowledgeBases/[^/]+$", + "pattern": "^projects/[^/]+/conversations/[^/]+$", "required": true, "type": "string" } }, - "path": "v2beta1/{+parent}/documents", + "path": "v2beta1/{+parent}/messages:batchCreate", "request": { - "$ref": "GoogleCloudDialogflowV2beta1Document" + "$ref": "GoogleCloudDialogflowV2beta1BatchCreateMessagesRequest" }, "response": { - "$ref": "GoogleLongrunningOperation" + "$ref": "GoogleCloudDialogflowV2beta1BatchCreateMessagesResponse" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/dialogflow" ] }, - "delete": { - "description": "Deletes the specified document. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`.", - "flatPath": "v2beta1/projects/{projectsId}/knowledgeBases/{knowledgeBasesId}/documents/{documentsId}", - "httpMethod": "DELETE", - "id": "dialogflow.projects.knowledgeBases.documents.delete", + "list": { + "description": "Lists messages that belong to a given conversation. `messages` are ordered by `create_time` in descending order. To fetch updates without duplication, send request with filter `create_time_epoch_microseconds > [first item's create_time of previous request]` and empty page_token.", + "flatPath": "v2beta1/projects/{projectsId}/conversations/{conversationsId}/messages", + "httpMethod": "GET", + "id": "dialogflow.projects.conversations.messages.list", "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the document to delete. Format: `projects//locations//knowledgeBases//documents/`.", - "location": "path", - "pattern": "^projects/[^/]+/knowledgeBases/[^/]+/documents/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2beta1/{+name}", - "response": { - "$ref": "GoogleLongrunningOperation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/dialogflow" - ] - }, - "get": { - "description": "Retrieves the specified document. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`.", - "flatPath": "v2beta1/projects/{projectsId}/knowledgeBases/{knowledgeBasesId}/documents/{documentsId}", - "httpMethod": "GET", - "id": "dialogflow.projects.knowledgeBases.documents.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the document to retrieve. Format `projects//locations//knowledgeBases//documents/`.", - "location": "path", - "pattern": "^projects/[^/]+/knowledgeBases/[^/]+/documents/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2beta1/{+name}", - "response": { - "$ref": "GoogleCloudDialogflowV2beta1Document" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/dialogflow" - ] - }, - "list": { - "description": "Returns the list of all documents of the knowledge base. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`.", - "flatPath": "v2beta1/projects/{projectsId}/knowledgeBases/{knowledgeBasesId}/documents", - "httpMethod": "GET", - "id": "dialogflow.projects.knowledgeBases.documents.list", - "parameterOrder": [ - "parent" + "parent" ], "parameters": { "filter": { - "description": "The filter expression used to filter documents returned by the list method. The expression has the following syntax: [AND ] ... The following fields and operators are supported: * knowledge_types with has(:) operator * display_name with has(:) operator * state with equals(=) operator Examples: * \"knowledge_types:FAQ\" matches documents with FAQ knowledge type. * \"display_name:customer\" matches documents whose display name contains \"customer\". * \"state=ACTIVE\" matches documents with ACTIVE state. * \"knowledge_types:FAQ AND state=ACTIVE\" matches all active FAQ documents. For more information about filtering, see [API Filtering](https://aip.dev/160).", + "description": "Optional. Filter on message fields. Currently predicates on `create_time` and `create_time_epoch_microseconds` are supported. `create_time` only support milliseconds accuracy. E.g., `create_time_epoch_microseconds > 1551790877964485` or `create_time > 2017-01-15T01:30:15.01Z`. For more information about filtering, see [API Filtering](https://aip.dev/160).", "location": "query", "type": "string" }, "pageSize": { - "description": "The maximum number of items to return in a single page. By default 10 and at most 100.", + "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "The next_page_token value returned from a previous list request.", + "description": "Optional. The next_page_token value returned from a previous list request.", "location": "query", "type": "string" }, "parent": { - "description": "Required. The knowledge base to list all documents for. Format: `projects//locations//knowledgeBases/`.", - "location": "path", - "pattern": "^projects/[^/]+/knowledgeBases/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2beta1/{+parent}/documents", - "response": { - "$ref": "GoogleCloudDialogflowV2beta1ListDocumentsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/dialogflow" - ] - }, - "patch": { - "description": "Updates the specified document. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`.", - "flatPath": "v2beta1/projects/{projectsId}/knowledgeBases/{knowledgeBasesId}/documents/{documentsId}", - "httpMethod": "PATCH", - "id": "dialogflow.projects.knowledgeBases.documents.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Optional. The document resource name. The name must be empty when creating a document. Format: `projects//locations//knowledgeBases//documents/`.", + "description": "Required. The name of the conversation to list messages for. Format: `projects//locations//conversations/`", "location": "path", - "pattern": "^projects/[^/]+/knowledgeBases/[^/]+/documents/[^/]+$", + "pattern": "^projects/[^/]+/conversations/[^/]+$", "required": true, "type": "string" - }, - "updateMask": { - "description": "Optional. Not specified means `update all`. Currently, only `display_name` can be updated, an InvalidArgument will be returned for attempting to update other fields.", - "format": "google-fieldmask", - "location": "query", - "type": "string" } }, - "path": "v2beta1/{+name}", - "request": { - "$ref": "GoogleCloudDialogflowV2beta1Document" - }, + "path": "v2beta1/{+parent}/messages", "response": { - "$ref": "GoogleLongrunningOperation" + "$ref": "GoogleCloudDialogflowV2beta1ListMessagesResponse" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/dialogflow" ] - }, - "reload": { - "description": "Reloads the specified document from its specified source, content_uri or content. The previously loaded content of the document will be deleted. Note: Even when the content of the document has not changed, there still may be side effects because of internal implementation changes. Note: If the document source is Google Cloud Storage URI, its metadata will be replaced with the custom metadata from Google Cloud Storage if the `import_gcs_custom_metadata` field is set to true in the request. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`.", - "flatPath": "v2beta1/projects/{projectsId}/knowledgeBases/{knowledgeBasesId}/documents/{documentsId}:reload", + } + } + }, + "participants": { + "methods": { + "analyzeContent": { + "description": "Adds a text (chat, for example), or audio (phone recording, for example) message from a participant into the conversation. Note: Always use agent versions for production traffic sent to virtual agents. See [Versions and environments](https://cloud.google.com/dialogflow/es/docs/agents-versions).", + "flatPath": "v2beta1/projects/{projectsId}/conversations/{conversationsId}/participants/{participantsId}:analyzeContent", "httpMethod": "POST", - "id": "dialogflow.projects.knowledgeBases.documents.reload", + "id": "dialogflow.projects.conversations.participants.analyzeContent", "parameterOrder": [ - "name" + "participant" ], "parameters": { - "name": { - "description": "Required. The name of the document to reload. Format: `projects//locations//knowledgeBases//documents/`", + "participant": { + "description": "Required. The name of the participant this text comes from. Format: `projects//locations//conversations//participants/`.", "location": "path", - "pattern": "^projects/[^/]+/knowledgeBases/[^/]+/documents/[^/]+$", + "pattern": "^projects/[^/]+/conversations/[^/]+/participants/[^/]+$", "required": true, "type": "string" } }, - "path": "v2beta1/{+name}:reload", + "path": "v2beta1/{+participant}:analyzeContent", "request": { - "$ref": "GoogleCloudDialogflowV2beta1ReloadDocumentRequest" + "$ref": "GoogleCloudDialogflowV2beta1AnalyzeContentRequest" }, "response": { - "$ref": "GoogleLongrunningOperation" + "$ref": "GoogleCloudDialogflowV2beta1AnalyzeContentResponse" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/dialogflow" ] - } - } - } - } - }, - "locations": { - "methods": { - "deleteAgent": { - "description": "Deletes the specified agent.", - "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent", - "httpMethod": "DELETE", - "id": "dialogflow.projects.locations.deleteAgent", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. The project that the agent to delete is associated with. Format: `projects/` or `projects//locations/`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2beta1/{+parent}/agent", - "response": { - "$ref": "GoogleProtobufEmpty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/dialogflow" - ] - }, - "getAgent": { - "description": "Retrieves the specified agent.", - "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent", - "httpMethod": "GET", - "id": "dialogflow.projects.locations.getAgent", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. The project that the agent to fetch is associated with. Format: `projects/` or `projects//locations/`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2beta1/{+parent}/agent", - "response": { - "$ref": "GoogleCloudDialogflowV2beta1Agent" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/dialogflow" - ] - }, - "setAgent": { - "description": "Creates/updates the specified agent.", - "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent", - "httpMethod": "POST", - "id": "dialogflow.projects.locations.setAgent", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. The project of this agent. Format: `projects/` or `projects//locations/`", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" }, - "updateMask": { - "description": "Optional. The mask to control which fields get updated.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "v2beta1/{+parent}/agent", - "request": { - "$ref": "GoogleCloudDialogflowV2beta1Agent" - }, - "response": { - "$ref": "GoogleCloudDialogflowV2beta1Agent" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/dialogflow" - ] - } - }, - "resources": { - "agent": { - "methods": { - "export": { - "description": "Exports the specified agent to a ZIP file. Operation ", - "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent:export", + "create": { + "description": "Creates a new participant in a conversation.", + "flatPath": "v2beta1/projects/{projectsId}/conversations/{conversationsId}/participants", "httpMethod": "POST", - "id": "dialogflow.projects.locations.agent.export", + "id": "dialogflow.projects.conversations.participants.create", "parameterOrder": [ "parent" ], "parameters": { "parent": { - "description": "Required. The project that the agent to export is associated with. Format: `projects/` or `projects//locations/`.", + "description": "Required. Resource identifier of the conversation adding the participant. Format: `projects//locations//conversations/`.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", + "pattern": "^projects/[^/]+/conversations/[^/]+$", "required": true, "type": "string" } }, - "path": "v2beta1/{+parent}/agent:export", + "path": "v2beta1/{+parent}/participants", "request": { - "$ref": "GoogleCloudDialogflowV2beta1ExportAgentRequest" + "$ref": "GoogleCloudDialogflowV2beta1Participant" }, "response": { - "$ref": "GoogleLongrunningOperation" + "$ref": "GoogleCloudDialogflowV2beta1Participant" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/dialogflow" ] }, - "getFulfillment": { - "description": "Retrieves the fulfillment.", - "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/fulfillment", + "get": { + "description": "Retrieves a conversation participant.", + "flatPath": "v2beta1/projects/{projectsId}/conversations/{conversationsId}/participants/{participantsId}", "httpMethod": "GET", - "id": "dialogflow.projects.locations.agent.getFulfillment", + "id": "dialogflow.projects.conversations.participants.get", "parameterOrder": [ "name" ], "parameters": { "name": { - "description": "Required. The name of the fulfillment. Supported formats: - `projects//agent/fulfillment` - `projects//locations//agent/fulfillment`", + "description": "Required. The name of the participant. Format: `projects//locations//conversations//participants/`.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/agent/fulfillment$", + "pattern": "^projects/[^/]+/conversations/[^/]+/participants/[^/]+$", "required": true, "type": "string" } }, "path": "v2beta1/{+name}", "response": { - "$ref": "GoogleCloudDialogflowV2beta1Fulfillment" + "$ref": "GoogleCloudDialogflowV2beta1Participant" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/dialogflow" ] }, - "getValidationResult": { - "description": "Gets agent validation result. Agent validation is performed during training time and is updated automatically when training is completed.", - "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/validationResult", + "list": { + "description": "Returns the list of all participants in the specified conversation.", + "flatPath": "v2beta1/projects/{projectsId}/conversations/{conversationsId}/participants", "httpMethod": "GET", - "id": "dialogflow.projects.locations.agent.getValidationResult", + "id": "dialogflow.projects.conversations.participants.list", "parameterOrder": [ "parent" ], "parameters": { - "languageCode": { - "description": "Optional. The language for which you want a validation result. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used.", + "pageSize": { + "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. The next_page_token value returned from a previous list request.", "location": "query", "type": "string" }, "parent": { - "description": "Required. The project that the agent is associated with. Format: `projects/` or `projects//locations/`.", + "description": "Required. The conversation to list all participants from. Format: `projects//locations//conversations/`.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", + "pattern": "^projects/[^/]+/conversations/[^/]+$", "required": true, "type": "string" } }, - "path": "v2beta1/{+parent}/agent/validationResult", + "path": "v2beta1/{+parent}/participants", "response": { - "$ref": "GoogleCloudDialogflowV2beta1ValidationResult" + "$ref": "GoogleCloudDialogflowV2beta1ListParticipantsResponse" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/dialogflow" ] }, - "import": { - "description": "Imports the specified agent from a ZIP file. Uploads new intents and entity types without deleting the existing ones. Intents and entity types with the same name are replaced with the new versions from ImportAgentRequest. After the import, the imported draft agent will be trained automatically (unless disabled in agent settings). However, once the import is done, training may not be completed yet. Please call TrainAgent and wait for the operation it returns in order to train explicitly. Operation An operation which tracks when importing is complete. It only tracks when the draft agent is updated not when it is done training.", - "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent:import", - "httpMethod": "POST", - "id": "dialogflow.projects.locations.agent.import", + "patch": { + "description": "Updates the specified participant.", + "flatPath": "v2beta1/projects/{projectsId}/conversations/{conversationsId}/participants/{participantsId}", + "httpMethod": "PATCH", + "id": "dialogflow.projects.conversations.participants.patch", "parameterOrder": [ - "parent" + "name" ], "parameters": { - "parent": { - "description": "Required. The project that the agent to import is associated with. Format: `projects/` or `projects//locations/`.", + "name": { + "description": "Optional. The unique identifier of this participant. Format: `projects//locations//conversations//participants/`.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2beta1/{+parent}/agent:import", - "request": { - "$ref": "GoogleCloudDialogflowV2beta1ImportAgentRequest" - }, - "response": { - "$ref": "GoogleLongrunningOperation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/dialogflow" - ] - }, - "restore": { - "description": "Restores the specified agent from a ZIP file. Replaces the current agent version with a new one. All the intents and entity types in the older version are deleted. After the restore, the restored draft agent will be trained automatically (unless disabled in agent settings). However, once the restore is done, training may not be completed yet. Please call TrainAgent and wait for the operation it returns in order to train explicitly. Operation An operation which tracks when restoring is complete. It only tracks when the draft agent is updated not when it is done training.", - "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent:restore", - "httpMethod": "POST", - "id": "dialogflow.projects.locations.agent.restore", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. The project that the agent to restore is associated with. Format: `projects/` or `projects//locations/`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2beta1/{+parent}/agent:restore", - "request": { - "$ref": "GoogleCloudDialogflowV2beta1RestoreAgentRequest" - }, - "response": { - "$ref": "GoogleLongrunningOperation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/dialogflow" - ] - }, - "search": { - "description": "Returns the list of agents. Since there is at most one conversational agent per project, this method is useful primarily for listing all agents across projects the caller has access to. One can achieve that with a wildcard project collection id \"-\". Refer to [List Sub-Collections](https://cloud.google.com/apis/design/design_patterns#list_sub-collections).", - "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent:search", - "httpMethod": "GET", - "id": "dialogflow.projects.locations.agent.search", - "parameterOrder": [ - "parent" - ], - "parameters": { - "pageSize": { - "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "Optional. The next_page_token value returned from a previous list request.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The project to list agents from. Format: `projects/` or `projects//locations/`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2beta1/{+parent}/agent:search", - "response": { - "$ref": "GoogleCloudDialogflowV2beta1SearchAgentsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/dialogflow" - ] - }, - "train": { - "description": "Trains the specified agent. Operation ", - "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent:train", - "httpMethod": "POST", - "id": "dialogflow.projects.locations.agent.train", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. The project that the agent to train is associated with. Format: `projects/` or `projects//locations/`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2beta1/{+parent}/agent:train", - "request": { - "$ref": "GoogleCloudDialogflowV2beta1TrainAgentRequest" - }, - "response": { - "$ref": "GoogleLongrunningOperation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/dialogflow" - ] - }, - "updateFulfillment": { - "description": "Updates the fulfillment.", - "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/fulfillment", - "httpMethod": "PATCH", - "id": "dialogflow.projects.locations.agent.updateFulfillment", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The unique identifier of the fulfillment. Supported formats: - `projects//agent/fulfillment` - `projects//locations//agent/fulfillment`", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/agent/fulfillment$", + "pattern": "^projects/[^/]+/conversations/[^/]+/participants/[^/]+$", "required": true, "type": "string" }, "updateMask": { - "description": "Required. The mask to control which fields get updated. If the mask is not present, all fields will be updated.", + "description": "Required. The mask to specify which fields to update.", "format": "google-fieldmask", "location": "query", "type": "string" @@ -2979,10 +2903,10 @@ }, "path": "v2beta1/{+name}", "request": { - "$ref": "GoogleCloudDialogflowV2beta1Fulfillment" + "$ref": "GoogleCloudDialogflowV2beta1Participant" }, "response": { - "$ref": "GoogleCloudDialogflowV2beta1Fulfillment" + "$ref": "GoogleCloudDialogflowV2beta1Participant" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", @@ -2991,927 +2915,2739 @@ } }, "resources": { - "entityTypes": { + "suggestions": { "methods": { - "batchDelete": { - "description": "Deletes entity types in the specified agent. Operation ", - "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/entityTypes:batchDelete", + "compile": { + "description": "Deprecated. use SuggestArticles and SuggestFaqAnswers instead. Gets suggestions for a participant based on specific historical messages. Note that ListSuggestions will only list the auto-generated suggestions, while CompileSuggestion will try to compile suggestion based on the provided conversation context in the real time.", + "flatPath": "v2beta1/projects/{projectsId}/conversations/{conversationsId}/participants/{participantsId}/suggestions:compile", "httpMethod": "POST", - "id": "dialogflow.projects.locations.agent.entityTypes.batchDelete", + "id": "dialogflow.projects.conversations.participants.suggestions.compile", "parameterOrder": [ "parent" ], "parameters": { "parent": { - "description": "Required. The name of the agent to delete all entities types for. Supported formats: - `projects//agent`, - `projects//locations//agent`.", + "description": "Required. The name of the participant to fetch suggestion for. Format: `projects//locations//conversations//participants/`.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/agent$", + "pattern": "^projects/[^/]+/conversations/[^/]+/participants/[^/]+$", "required": true, "type": "string" } }, - "path": "v2beta1/{+parent}/entityTypes:batchDelete", + "path": "v2beta1/{+parent}/suggestions:compile", "request": { - "$ref": "GoogleCloudDialogflowV2beta1BatchDeleteEntityTypesRequest" + "$ref": "GoogleCloudDialogflowV2beta1CompileSuggestionRequest" }, "response": { - "$ref": "GoogleLongrunningOperation" + "$ref": "GoogleCloudDialogflowV2beta1CompileSuggestionResponse" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/dialogflow" ] }, - "batchUpdate": { - "description": "Updates/Creates multiple entity types in the specified agent. Operation ", - "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/entityTypes:batchUpdate", - "httpMethod": "POST", - "id": "dialogflow.projects.locations.agent.entityTypes.batchUpdate", + "list": { + "description": "Deprecated: Use inline suggestion, event based suggestion or Suggestion* API instead. See HumanAgentAssistantConfig.name for more details. Removal Date: 2020-09-01. Retrieves suggestions for live agents. This method should be used by human agent client software to fetch auto generated suggestions in real-time, while the conversation with an end user is in progress. The functionality is implemented in terms of the [list pagination](/apis/design/design_patterns#list_pagination) design pattern. The client app should use the `next_page_token` field to fetch the next batch of suggestions. `suggestions` are sorted by `create_time` in descending order. To fetch latest suggestion, just set `page_size` to 1. To fetch new suggestions without duplication, send request with filter `create_time_epoch_microseconds > [first item's create_time of previous request]` and empty page_token.", + "flatPath": "v2beta1/projects/{projectsId}/conversations/{conversationsId}/participants/{participantsId}/suggestions", + "httpMethod": "GET", + "id": "dialogflow.projects.conversations.participants.suggestions.list", "parameterOrder": [ "parent" ], "parameters": { + "filter": { + "description": "Optional. Filter on suggestions fields. Currently predicates on `create_time` and `create_time_epoch_microseconds` are supported. `create_time` only support milliseconds accuracy. E.g., `create_time_epoch_microseconds > 1551790877964485` or `create_time > 2017-01-15T01:30:15.01Z` For more information about filtering, see [API Filtering](https://aip.dev/160).", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of items to return in a single page. The default value is 100; the maximum value is 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. The next_page_token value returned from a previous list request.", + "location": "query", + "type": "string" + }, "parent": { - "description": "Required. The name of the agent to update or create entity types in. Supported formats: - `projects//agent` - `projects//locations//agent`", + "description": "Required. The name of the participant to fetch suggestions for. Format: `projects//locations//conversations//participants/`.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/agent$", + "pattern": "^projects/[^/]+/conversations/[^/]+/participants/[^/]+$", "required": true, "type": "string" } }, - "path": "v2beta1/{+parent}/entityTypes:batchUpdate", - "request": { - "$ref": "GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesRequest" - }, + "path": "v2beta1/{+parent}/suggestions", "response": { - "$ref": "GoogleLongrunningOperation" + "$ref": "GoogleCloudDialogflowV2beta1ListSuggestionsResponse" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/dialogflow" ] }, - "create": { - "description": "Creates an entity type in the specified agent.", - "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/entityTypes", + "suggestArticles": { + "description": "Gets suggested articles for a participant based on specific historical messages. Note that ListSuggestions will only list the auto-generated suggestions, while CompileSuggestion will try to compile suggestion based on the provided conversation context in the real time.", + "flatPath": "v2beta1/projects/{projectsId}/conversations/{conversationsId}/participants/{participantsId}/suggestions:suggestArticles", "httpMethod": "POST", - "id": "dialogflow.projects.locations.agent.entityTypes.create", + "id": "dialogflow.projects.conversations.participants.suggestions.suggestArticles", "parameterOrder": [ "parent" ], "parameters": { - "languageCode": { - "description": "Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).", - "location": "query", - "type": "string" - }, "parent": { - "description": "Required. The agent to create a entity type for. Supported formats: - `projects//agent` - `projects//locations//agent`", + "description": "Required. The name of the participant to fetch suggestion for. Format: `projects//locations//conversations//participants/`.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/agent$", + "pattern": "^projects/[^/]+/conversations/[^/]+/participants/[^/]+$", "required": true, "type": "string" } }, - "path": "v2beta1/{+parent}/entityTypes", + "path": "v2beta1/{+parent}/suggestions:suggestArticles", "request": { - "$ref": "GoogleCloudDialogflowV2beta1EntityType" + "$ref": "GoogleCloudDialogflowV2beta1SuggestArticlesRequest" }, "response": { - "$ref": "GoogleCloudDialogflowV2beta1EntityType" + "$ref": "GoogleCloudDialogflowV2beta1SuggestArticlesResponse" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/dialogflow" ] }, - "delete": { - "description": "Deletes the specified entity type.", - "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/entityTypes/{entityTypesId}", - "httpMethod": "DELETE", - "id": "dialogflow.projects.locations.agent.entityTypes.delete", + "suggestFaqAnswers": { + "description": "Gets suggested faq answers for a participant based on specific historical messages.", + "flatPath": "v2beta1/projects/{projectsId}/conversations/{conversationsId}/participants/{participantsId}/suggestions:suggestFaqAnswers", + "httpMethod": "POST", + "id": "dialogflow.projects.conversations.participants.suggestions.suggestFaqAnswers", "parameterOrder": [ - "name" + "parent" ], "parameters": { - "name": { - "description": "Required. The name of the entity type to delete. Supported formats: - `projects//agent/entityTypes/` - `projects//locations//agent/entityTypes/`", + "parent": { + "description": "Required. The name of the participant to fetch suggestion for. Format: `projects//locations//conversations//participants/`.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/agent/entityTypes/[^/]+$", + "pattern": "^projects/[^/]+/conversations/[^/]+/participants/[^/]+$", "required": true, "type": "string" } }, - "path": "v2beta1/{+name}", - "response": { - "$ref": "GoogleProtobufEmpty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/dialogflow" - ] - }, - "get": { - "description": "Retrieves the specified entity type.", - "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/entityTypes/{entityTypesId}", - "httpMethod": "GET", - "id": "dialogflow.projects.locations.agent.entityTypes.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "languageCode": { - "description": "Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).", - "location": "query", - "type": "string" - }, - "name": { - "description": "Required. The name of the entity type. Supported formats: - `projects//agent/entityTypes/` - `projects//locations//agent/entityTypes/`", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/agent/entityTypes/[^/]+$", - "required": true, - "type": "string" - } + "path": "v2beta1/{+parent}/suggestions:suggestFaqAnswers", + "request": { + "$ref": "GoogleCloudDialogflowV2beta1SuggestFaqAnswersRequest" }, - "path": "v2beta1/{+name}", "response": { - "$ref": "GoogleCloudDialogflowV2beta1EntityType" + "$ref": "GoogleCloudDialogflowV2beta1SuggestFaqAnswersResponse" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/dialogflow" ] }, - "list": { - "description": "Returns the list of all entity types in the specified agent.", - "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/entityTypes", - "httpMethod": "GET", - "id": "dialogflow.projects.locations.agent.entityTypes.list", + "suggestSmartReplies": { + "description": "Gets smart replies for a participant based on specific historical messages.", + "flatPath": "v2beta1/projects/{projectsId}/conversations/{conversationsId}/participants/{participantsId}/suggestions:suggestSmartReplies", + "httpMethod": "POST", + "id": "dialogflow.projects.conversations.participants.suggestions.suggestSmartReplies", "parameterOrder": [ "parent" ], "parameters": { - "languageCode": { - "description": "Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).", - "location": "query", - "type": "string" - }, - "pageSize": { - "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "Optional. The next_page_token value returned from a previous list request.", - "location": "query", - "type": "string" - }, "parent": { - "description": "Required. The agent to list all entity types from. Supported formats: - `projects//agent` - `projects//locations//agent`", + "description": "Required. The name of the participant to fetch suggestion for. Format: `projects//locations//conversations//participants/`.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/agent$", + "pattern": "^projects/[^/]+/conversations/[^/]+/participants/[^/]+$", "required": true, "type": "string" } }, - "path": "v2beta1/{+parent}/entityTypes", + "path": "v2beta1/{+parent}/suggestions:suggestSmartReplies", + "request": { + "$ref": "GoogleCloudDialogflowV2beta1SuggestSmartRepliesRequest" + }, "response": { - "$ref": "GoogleCloudDialogflowV2beta1ListEntityTypesResponse" + "$ref": "GoogleCloudDialogflowV2beta1SuggestSmartRepliesResponse" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/dialogflow" ] - }, - "patch": { - "description": "Updates the specified entity type.", - "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/entityTypes/{entityTypesId}", - "httpMethod": "PATCH", - "id": "dialogflow.projects.locations.agent.entityTypes.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "languageCode": { - "description": "Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).", - "location": "query", - "type": "string" - }, - "name": { - "description": "The unique identifier of the entity type. Required for EntityTypes.UpdateEntityType and EntityTypes.BatchUpdateEntityTypes methods. Supported formats: - `projects//agent/entityTypes/` - `projects//locations//agent/entityTypes/`", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/agent/entityTypes/[^/]+$", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Optional. The mask to control which fields get updated.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "v2beta1/{+name}", - "request": { - "$ref": "GoogleCloudDialogflowV2beta1EntityType" - }, - "response": { - "$ref": "GoogleCloudDialogflowV2beta1EntityType" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/dialogflow" - ] - } - }, - "resources": { - "entities": { - "methods": { - "batchCreate": { - "description": "Creates multiple new entities in the specified entity type. Operation ", - "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/entityTypes/{entityTypesId}/entities:batchCreate", - "httpMethod": "POST", - "id": "dialogflow.projects.locations.agent.entityTypes.entities.batchCreate", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. The name of the entity type to create entities in. Supported formats: - `projects//agent/entityTypes/` - `projects//locations//agent/entityTypes/`", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/agent/entityTypes/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2beta1/{+parent}/entities:batchCreate", - "request": { - "$ref": "GoogleCloudDialogflowV2beta1BatchCreateEntitiesRequest" - }, - "response": { - "$ref": "GoogleLongrunningOperation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/dialogflow" - ] - }, - "batchDelete": { - "description": "Deletes entities in the specified entity type. Operation ", - "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/entityTypes/{entityTypesId}/entities:batchDelete", - "httpMethod": "POST", - "id": "dialogflow.projects.locations.agent.entityTypes.entities.batchDelete", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. The name of the entity type to delete entries for. Supported formats: - `projects//agent/entityTypes/` - `projects//locations//agent/entityTypes/`", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/agent/entityTypes/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2beta1/{+parent}/entities:batchDelete", - "request": { - "$ref": "GoogleCloudDialogflowV2beta1BatchDeleteEntitiesRequest" - }, - "response": { - "$ref": "GoogleLongrunningOperation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/dialogflow" - ] - }, - "batchUpdate": { - "description": "Updates or creates multiple entities in the specified entity type. This method does not affect entities in the entity type that aren't explicitly specified in the request. Operation ", - "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/entityTypes/{entityTypesId}/entities:batchUpdate", - "httpMethod": "POST", - "id": "dialogflow.projects.locations.agent.entityTypes.entities.batchUpdate", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. The name of the entity type to update or create entities in. Supported formats: - `projects//agent/entityTypes/` - `projects//locations//agent/entityTypes/`", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/agent/entityTypes/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2beta1/{+parent}/entities:batchUpdate", - "request": { - "$ref": "GoogleCloudDialogflowV2beta1BatchUpdateEntitiesRequest" - }, - "response": { - "$ref": "GoogleLongrunningOperation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/dialogflow" - ] - } - } } } + } + } + } + } + }, + "knowledgeBases": { + "methods": { + "create": { + "description": "Creates a knowledge base. Note: The `projects.agent.knowledgeBases` resource is deprecated; only use `projects.knowledgeBases`.", + "flatPath": "v2beta1/projects/{projectsId}/knowledgeBases", + "httpMethod": "POST", + "id": "dialogflow.projects.knowledgeBases.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The project to create a knowledge base for. Format: `projects//locations/`.", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+parent}/knowledgeBases", + "request": { + "$ref": "GoogleCloudDialogflowV2beta1KnowledgeBase" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2beta1KnowledgeBase" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "delete": { + "description": "Deletes the specified knowledge base. Note: The `projects.agent.knowledgeBases` resource is deprecated; only use `projects.knowledgeBases`.", + "flatPath": "v2beta1/projects/{projectsId}/knowledgeBases/{knowledgeBasesId}", + "httpMethod": "DELETE", + "id": "dialogflow.projects.knowledgeBases.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "force": { + "description": "Optional. Force deletes the knowledge base. When set to true, any documents in the knowledge base are also deleted.", + "location": "query", + "type": "boolean" }, - "environments": { - "methods": { - "list": { - "description": "Returns the list of all non-draft environments of the specified agent.", - "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/environments", - "httpMethod": "GET", - "id": "dialogflow.projects.locations.agent.environments.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "pageSize": { - "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "Optional. The next_page_token value returned from a previous list request.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The agent to list all environments from. Format: - `projects//agent` - `projects//locations//agent`", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/agent$", - "required": true, - "type": "string" - } - }, - "path": "v2beta1/{+parent}/environments", - "response": { - "$ref": "GoogleCloudDialogflowV2beta1ListEnvironmentsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/dialogflow" - ] - } - }, - "resources": { - "users": { - "resources": { - "sessions": { - "methods": { - "deleteContexts": { - "description": "Deletes all active contexts in the specified session.", - "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts", - "httpMethod": "DELETE", - "id": "dialogflow.projects.locations.agent.environments.users.sessions.deleteContexts", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. The name of the session to delete all contexts from. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2beta1/{+parent}/contexts", - "response": { - "$ref": "GoogleProtobufEmpty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/dialogflow" - ] - }, - "detectIntent": { - "description": "Processes a natural language query and returns structured, actionable data as a result. This method is not idempotent, because it may cause contexts and session entity types to be updated, which in turn might affect results of future queries. Note: Always use agent versions for production traffic. See [Versions and environments](https://cloud.google.com/dialogflow/es/docs/agents-versions).", - "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}:detectIntent", - "httpMethod": "POST", - "id": "dialogflow.projects.locations.agent.environments.users.sessions.detectIntent", - "parameterOrder": [ - "session" - ], - "parameters": { - "session": { - "description": "Required. The name of the session this query is sent to. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment (`Environment ID` might be referred to as environment name at some places). If `User ID` is not specified, we are using \"-\". It's up to the API caller to choose an appropriate `Session ID` and `User Id`. They can be a random number or some type of user and session identifiers (preferably hashed). The length of the `Session ID` and `User ID` must not exceed 36 characters. For more information, see the [API interactions guide](https://cloud.google.com/dialogflow/docs/api-overview). Note: Always use agent versions for production traffic. See [Versions and environments](https://cloud.google.com/dialogflow/es/docs/agents-versions).", + "name": { + "description": "Required. The name of the knowledge base to delete. Format: `projects//locations//knowledgeBases/`.", + "location": "path", + "pattern": "^projects/[^/]+/knowledgeBases/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "get": { + "description": "Retrieves the specified knowledge base. Note: The `projects.agent.knowledgeBases` resource is deprecated; only use `projects.knowledgeBases`.", + "flatPath": "v2beta1/projects/{projectsId}/knowledgeBases/{knowledgeBasesId}", + "httpMethod": "GET", + "id": "dialogflow.projects.knowledgeBases.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the knowledge base to retrieve. Format `projects//locations//knowledgeBases/`.", + "location": "path", + "pattern": "^projects/[^/]+/knowledgeBases/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+name}", + "response": { + "$ref": "GoogleCloudDialogflowV2beta1KnowledgeBase" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "list": { + "description": "Returns the list of all knowledge bases of the specified agent. Note: The `projects.agent.knowledgeBases` resource is deprecated; only use `projects.knowledgeBases`.", + "flatPath": "v2beta1/projects/{projectsId}/knowledgeBases", + "httpMethod": "GET", + "id": "dialogflow.projects.knowledgeBases.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "The filter expression used to filter knowledge bases returned by the list method. The expression has the following syntax: [AND ] ... The following fields and operators are supported: * display_name with has(:) operator * language_code with equals(=) operator Examples: * 'language_code=en-us' matches knowledge bases with en-us language code. * 'display_name:articles' matches knowledge bases whose display name contains \"articles\". * 'display_name:\"Best Articles\"' matches knowledge bases whose display name contains \"Best Articles\". * 'language_code=en-gb AND display_name=articles' matches all knowledge bases whose display name contains \"articles\" and whose language code is \"en-gb\". Note: An empty filter string (i.e. \"\") is a no-op and will result in no filtering. For more information about filtering, see [API Filtering](https://aip.dev/160).", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "The maximum number of items to return in a single page. By default 10 and at most 100.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The next_page_token value returned from a previous list request.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The project to list of knowledge bases for. Format: `projects//locations/`.", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+parent}/knowledgeBases", + "response": { + "$ref": "GoogleCloudDialogflowV2beta1ListKnowledgeBasesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "patch": { + "description": "Updates the specified knowledge base. Note: The `projects.agent.knowledgeBases` resource is deprecated; only use `projects.knowledgeBases`.", + "flatPath": "v2beta1/projects/{projectsId}/knowledgeBases/{knowledgeBasesId}", + "httpMethod": "PATCH", + "id": "dialogflow.projects.knowledgeBases.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The knowledge base resource name. The name must be empty when creating a knowledge base. Format: `projects//locations//knowledgeBases/`.", + "location": "path", + "pattern": "^projects/[^/]+/knowledgeBases/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. Not specified means `update all`. Currently, only `display_name` can be updated, an InvalidArgument will be returned for attempting to update other fields.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2beta1/{+name}", + "request": { + "$ref": "GoogleCloudDialogflowV2beta1KnowledgeBase" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2beta1KnowledgeBase" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + } + }, + "resources": { + "documents": { + "methods": { + "create": { + "description": "Creates a new document. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`.", + "flatPath": "v2beta1/projects/{projectsId}/knowledgeBases/{knowledgeBasesId}/documents", + "httpMethod": "POST", + "id": "dialogflow.projects.knowledgeBases.documents.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "importGcsCustomMetadata": { + "description": "Whether to import custom metadata from Google Cloud Storage. Only valid when the document source is Google Cloud Storage URI.", + "location": "query", + "type": "boolean" + }, + "parent": { + "description": "Required. The knowledge base to create a document for. Format: `projects//locations//knowledgeBases/`.", + "location": "path", + "pattern": "^projects/[^/]+/knowledgeBases/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+parent}/documents", + "request": { + "$ref": "GoogleCloudDialogflowV2beta1Document" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "delete": { + "description": "Deletes the specified document. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`.", + "flatPath": "v2beta1/projects/{projectsId}/knowledgeBases/{knowledgeBasesId}/documents/{documentsId}", + "httpMethod": "DELETE", + "id": "dialogflow.projects.knowledgeBases.documents.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the document to delete. Format: `projects//locations//knowledgeBases//documents/`.", + "location": "path", + "pattern": "^projects/[^/]+/knowledgeBases/[^/]+/documents/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "get": { + "description": "Retrieves the specified document. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`.", + "flatPath": "v2beta1/projects/{projectsId}/knowledgeBases/{knowledgeBasesId}/documents/{documentsId}", + "httpMethod": "GET", + "id": "dialogflow.projects.knowledgeBases.documents.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the document to retrieve. Format `projects//locations//knowledgeBases//documents/`.", + "location": "path", + "pattern": "^projects/[^/]+/knowledgeBases/[^/]+/documents/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+name}", + "response": { + "$ref": "GoogleCloudDialogflowV2beta1Document" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "import": { + "description": "Create documents by importing data from external sources.", + "flatPath": "v2beta1/projects/{projectsId}/knowledgeBases/{knowledgeBasesId}/documents:import", + "httpMethod": "POST", + "id": "dialogflow.projects.knowledgeBases.documents.import", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The knowledge base to import documents into. Format: `projects//locations//knowledgeBases/`.", + "location": "path", + "pattern": "^projects/[^/]+/knowledgeBases/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+parent}/documents:import", + "request": { + "$ref": "GoogleCloudDialogflowV2beta1ImportDocumentsRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "list": { + "description": "Returns the list of all documents of the knowledge base. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`.", + "flatPath": "v2beta1/projects/{projectsId}/knowledgeBases/{knowledgeBasesId}/documents", + "httpMethod": "GET", + "id": "dialogflow.projects.knowledgeBases.documents.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "The filter expression used to filter documents returned by the list method. The expression has the following syntax: [AND ] ... The following fields and operators are supported: * knowledge_types with has(:) operator * display_name with has(:) operator * state with equals(=) operator Examples: * \"knowledge_types:FAQ\" matches documents with FAQ knowledge type. * \"display_name:customer\" matches documents whose display name contains \"customer\". * \"state=ACTIVE\" matches documents with ACTIVE state. * \"knowledge_types:FAQ AND state=ACTIVE\" matches all active FAQ documents. For more information about filtering, see [API Filtering](https://aip.dev/160).", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "The maximum number of items to return in a single page. By default 10 and at most 100.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The next_page_token value returned from a previous list request.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The knowledge base to list all documents for. Format: `projects//locations//knowledgeBases/`.", + "location": "path", + "pattern": "^projects/[^/]+/knowledgeBases/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+parent}/documents", + "response": { + "$ref": "GoogleCloudDialogflowV2beta1ListDocumentsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "patch": { + "description": "Updates the specified document. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`.", + "flatPath": "v2beta1/projects/{projectsId}/knowledgeBases/{knowledgeBasesId}/documents/{documentsId}", + "httpMethod": "PATCH", + "id": "dialogflow.projects.knowledgeBases.documents.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Optional. The document resource name. The name must be empty when creating a document. Format: `projects//locations//knowledgeBases//documents/`.", + "location": "path", + "pattern": "^projects/[^/]+/knowledgeBases/[^/]+/documents/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. Not specified means `update all`. Currently, only `display_name` can be updated, an InvalidArgument will be returned for attempting to update other fields.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2beta1/{+name}", + "request": { + "$ref": "GoogleCloudDialogflowV2beta1Document" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "reload": { + "description": "Reloads the specified document from its specified source, content_uri or content. The previously loaded content of the document will be deleted. Note: Even when the content of the document has not changed, there still may be side effects because of internal implementation changes. Note: If the document source is Google Cloud Storage URI, its metadata will be replaced with the custom metadata from Google Cloud Storage if the `import_gcs_custom_metadata` field is set to true in the request. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`.", + "flatPath": "v2beta1/projects/{projectsId}/knowledgeBases/{knowledgeBasesId}/documents/{documentsId}:reload", + "httpMethod": "POST", + "id": "dialogflow.projects.knowledgeBases.documents.reload", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the document to reload. Format: `projects//locations//knowledgeBases//documents/`", + "location": "path", + "pattern": "^projects/[^/]+/knowledgeBases/[^/]+/documents/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+name}:reload", + "request": { + "$ref": "GoogleCloudDialogflowV2beta1ReloadDocumentRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + } + } + } + } + }, + "locations": { + "methods": { + "deleteAgent": { + "description": "Deletes the specified agent.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent", + "httpMethod": "DELETE", + "id": "dialogflow.projects.locations.deleteAgent", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The project that the agent to delete is associated with. Format: `projects/` or `projects//locations/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+parent}/agent", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "getAgent": { + "description": "Retrieves the specified agent.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent", + "httpMethod": "GET", + "id": "dialogflow.projects.locations.getAgent", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The project that the agent to fetch is associated with. Format: `projects/` or `projects//locations/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+parent}/agent", + "response": { + "$ref": "GoogleCloudDialogflowV2beta1Agent" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "setAgent": { + "description": "Creates/updates the specified agent.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.setAgent", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The project of this agent. Format: `projects/` or `projects//locations/`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. The mask to control which fields get updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2beta1/{+parent}/agent", + "request": { + "$ref": "GoogleCloudDialogflowV2beta1Agent" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2beta1Agent" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + } + }, + "resources": { + "agent": { + "methods": { + "export": { + "description": "Exports the specified agent to a ZIP file. Operation ", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent:export", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.agent.export", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The project that the agent to export is associated with. Format: `projects/` or `projects//locations/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+parent}/agent:export", + "request": { + "$ref": "GoogleCloudDialogflowV2beta1ExportAgentRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "getFulfillment": { + "description": "Retrieves the fulfillment.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/fulfillment", + "httpMethod": "GET", + "id": "dialogflow.projects.locations.agent.getFulfillment", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the fulfillment. Supported formats: - `projects//agent/fulfillment` - `projects//locations//agent/fulfillment`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/fulfillment$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+name}", + "response": { + "$ref": "GoogleCloudDialogflowV2beta1Fulfillment" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "getValidationResult": { + "description": "Gets agent validation result. Agent validation is performed during training time and is updated automatically when training is completed.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/validationResult", + "httpMethod": "GET", + "id": "dialogflow.projects.locations.agent.getValidationResult", + "parameterOrder": [ + "parent" + ], + "parameters": { + "languageCode": { + "description": "Optional. The language for which you want a validation result. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The project that the agent is associated with. Format: `projects/` or `projects//locations/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+parent}/agent/validationResult", + "response": { + "$ref": "GoogleCloudDialogflowV2beta1ValidationResult" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "import": { + "description": "Imports the specified agent from a ZIP file. Uploads new intents and entity types without deleting the existing ones. Intents and entity types with the same name are replaced with the new versions from ImportAgentRequest. After the import, the imported draft agent will be trained automatically (unless disabled in agent settings). However, once the import is done, training may not be completed yet. Please call TrainAgent and wait for the operation it returns in order to train explicitly. Operation An operation which tracks when importing is complete. It only tracks when the draft agent is updated not when it is done training.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent:import", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.agent.import", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The project that the agent to import is associated with. Format: `projects/` or `projects//locations/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+parent}/agent:import", + "request": { + "$ref": "GoogleCloudDialogflowV2beta1ImportAgentRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "restore": { + "description": "Restores the specified agent from a ZIP file. Replaces the current agent version with a new one. All the intents and entity types in the older version are deleted. After the restore, the restored draft agent will be trained automatically (unless disabled in agent settings). However, once the restore is done, training may not be completed yet. Please call TrainAgent and wait for the operation it returns in order to train explicitly. Operation An operation which tracks when restoring is complete. It only tracks when the draft agent is updated not when it is done training.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent:restore", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.agent.restore", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The project that the agent to restore is associated with. Format: `projects/` or `projects//locations/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+parent}/agent:restore", + "request": { + "$ref": "GoogleCloudDialogflowV2beta1RestoreAgentRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "search": { + "description": "Returns the list of agents. Since there is at most one conversational agent per project, this method is useful primarily for listing all agents across projects the caller has access to. One can achieve that with a wildcard project collection id \"-\". Refer to [List Sub-Collections](https://cloud.google.com/apis/design/design_patterns#list_sub-collections).", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent:search", + "httpMethod": "GET", + "id": "dialogflow.projects.locations.agent.search", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. The next_page_token value returned from a previous list request.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The project to list agents from. Format: `projects/` or `projects//locations/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+parent}/agent:search", + "response": { + "$ref": "GoogleCloudDialogflowV2beta1SearchAgentsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "train": { + "description": "Trains the specified agent. Operation ", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent:train", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.agent.train", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The project that the agent to train is associated with. Format: `projects/` or `projects//locations/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+parent}/agent:train", + "request": { + "$ref": "GoogleCloudDialogflowV2beta1TrainAgentRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "updateFulfillment": { + "description": "Updates the fulfillment.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/fulfillment", + "httpMethod": "PATCH", + "id": "dialogflow.projects.locations.agent.updateFulfillment", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The unique identifier of the fulfillment. Supported formats: - `projects//agent/fulfillment` - `projects//locations//agent/fulfillment` This field is not used for Fulfillment in an Environment.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/fulfillment$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. The mask to control which fields get updated. If the mask is not present, all fields will be updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2beta1/{+name}", + "request": { + "$ref": "GoogleCloudDialogflowV2beta1Fulfillment" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2beta1Fulfillment" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + } + }, + "resources": { + "entityTypes": { + "methods": { + "batchDelete": { + "description": "Deletes entity types in the specified agent. Operation ", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/entityTypes:batchDelete", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.agent.entityTypes.batchDelete", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The name of the agent to delete all entities types for. Supported formats: - `projects//agent`, - `projects//locations//agent`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+parent}/entityTypes:batchDelete", + "request": { + "$ref": "GoogleCloudDialogflowV2beta1BatchDeleteEntityTypesRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "batchUpdate": { + "description": "Updates/Creates multiple entity types in the specified agent. Operation ", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/entityTypes:batchUpdate", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.agent.entityTypes.batchUpdate", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The name of the agent to update or create entity types in. Supported formats: - `projects//agent` - `projects//locations//agent`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+parent}/entityTypes:batchUpdate", + "request": { + "$ref": "GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "create": { + "description": "Creates an entity type in the specified agent.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/entityTypes", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.agent.entityTypes.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "languageCode": { + "description": "Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The agent to create a entity type for. Supported formats: - `projects//agent` - `projects//locations//agent`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+parent}/entityTypes", + "request": { + "$ref": "GoogleCloudDialogflowV2beta1EntityType" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2beta1EntityType" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "delete": { + "description": "Deletes the specified entity type.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/entityTypes/{entityTypesId}", + "httpMethod": "DELETE", + "id": "dialogflow.projects.locations.agent.entityTypes.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the entity type to delete. Supported formats: - `projects//agent/entityTypes/` - `projects//locations//agent/entityTypes/`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/entityTypes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "get": { + "description": "Retrieves the specified entity type.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/entityTypes/{entityTypesId}", + "httpMethod": "GET", + "id": "dialogflow.projects.locations.agent.entityTypes.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "languageCode": { + "description": "Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).", + "location": "query", + "type": "string" + }, + "name": { + "description": "Required. The name of the entity type. Supported formats: - `projects//agent/entityTypes/` - `projects//locations//agent/entityTypes/`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/entityTypes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+name}", + "response": { + "$ref": "GoogleCloudDialogflowV2beta1EntityType" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "list": { + "description": "Returns the list of all entity types in the specified agent.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/entityTypes", + "httpMethod": "GET", + "id": "dialogflow.projects.locations.agent.entityTypes.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "languageCode": { + "description": "Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. The next_page_token value returned from a previous list request.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The agent to list all entity types from. Supported formats: - `projects//agent` - `projects//locations//agent`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+parent}/entityTypes", + "response": { + "$ref": "GoogleCloudDialogflowV2beta1ListEntityTypesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "patch": { + "description": "Updates the specified entity type.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/entityTypes/{entityTypesId}", + "httpMethod": "PATCH", + "id": "dialogflow.projects.locations.agent.entityTypes.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "languageCode": { + "description": "Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).", + "location": "query", + "type": "string" + }, + "name": { + "description": "The unique identifier of the entity type. Required for EntityTypes.UpdateEntityType and EntityTypes.BatchUpdateEntityTypes methods. Supported formats: - `projects//agent/entityTypes/` - `projects//locations//agent/entityTypes/`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/entityTypes/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. The mask to control which fields get updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2beta1/{+name}", + "request": { + "$ref": "GoogleCloudDialogflowV2beta1EntityType" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2beta1EntityType" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + } + }, + "resources": { + "entities": { + "methods": { + "batchCreate": { + "description": "Creates multiple new entities in the specified entity type. Operation ", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/entityTypes/{entityTypesId}/entities:batchCreate", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.agent.entityTypes.entities.batchCreate", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The name of the entity type to create entities in. Supported formats: - `projects//agent/entityTypes/` - `projects//locations//agent/entityTypes/`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/entityTypes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+parent}/entities:batchCreate", + "request": { + "$ref": "GoogleCloudDialogflowV2beta1BatchCreateEntitiesRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "batchDelete": { + "description": "Deletes entities in the specified entity type. Operation ", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/entityTypes/{entityTypesId}/entities:batchDelete", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.agent.entityTypes.entities.batchDelete", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The name of the entity type to delete entries for. Supported formats: - `projects//agent/entityTypes/` - `projects//locations//agent/entityTypes/`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/entityTypes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+parent}/entities:batchDelete", + "request": { + "$ref": "GoogleCloudDialogflowV2beta1BatchDeleteEntitiesRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "batchUpdate": { + "description": "Updates or creates multiple entities in the specified entity type. This method does not affect entities in the entity type that aren't explicitly specified in the request. Operation ", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/entityTypes/{entityTypesId}/entities:batchUpdate", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.agent.entityTypes.entities.batchUpdate", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The name of the entity type to update or create entities in. Supported formats: - `projects//agent/entityTypes/` - `projects//locations//agent/entityTypes/`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/entityTypes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+parent}/entities:batchUpdate", + "request": { + "$ref": "GoogleCloudDialogflowV2beta1BatchUpdateEntitiesRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + } + } + } + } + }, + "environments": { + "methods": { + "list": { + "description": "Returns the list of all non-draft environments of the specified agent.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/environments", + "httpMethod": "GET", + "id": "dialogflow.projects.locations.agent.environments.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. The next_page_token value returned from a previous list request.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The agent to list all environments from. Format: - `projects//agent` - `projects//locations//agent`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+parent}/environments", + "response": { + "$ref": "GoogleCloudDialogflowV2beta1ListEnvironmentsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + } + }, + "resources": { + "users": { + "resources": { + "sessions": { + "methods": { + "deleteContexts": { + "description": "Deletes all active contexts in the specified session.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts", + "httpMethod": "DELETE", + "id": "dialogflow.projects.locations.agent.environments.users.sessions.deleteContexts", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The name of the session to delete all contexts from. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+parent}/contexts", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "detectIntent": { + "description": "Processes a natural language query and returns structured, actionable data as a result. This method is not idempotent, because it may cause contexts and session entity types to be updated, which in turn might affect results of future queries. Note: Always use agent versions for production traffic. See [Versions and environments](https://cloud.google.com/dialogflow/es/docs/agents-versions).", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}:detectIntent", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.agent.environments.users.sessions.detectIntent", + "parameterOrder": [ + "session" + ], + "parameters": { + "session": { + "description": "Required. The name of the session this query is sent to. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment (`Environment ID` might be referred to as environment name at some places). If `User ID` is not specified, we are using \"-\". It's up to the API caller to choose an appropriate `Session ID` and `User Id`. They can be a random number or some type of user and session identifiers (preferably hashed). The length of the `Session ID` and `User ID` must not exceed 36 characters. For more information, see the [API interactions guide](https://cloud.google.com/dialogflow/docs/api-overview). Note: Always use agent versions for production traffic. See [Versions and environments](https://cloud.google.com/dialogflow/es/docs/agents-versions).", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+$", "required": true, "type": "string" } - }, - "path": "v2beta1/{+session}:detectIntent", - "request": { - "$ref": "GoogleCloudDialogflowV2beta1DetectIntentRequest" - }, - "response": { - "$ref": "GoogleCloudDialogflowV2beta1DetectIntentResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/dialogflow" - ] + }, + "path": "v2beta1/{+session}:detectIntent", + "request": { + "$ref": "GoogleCloudDialogflowV2beta1DetectIntentRequest" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2beta1DetectIntentResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + } + }, + "resources": { + "contexts": { + "methods": { + "create": { + "description": "Creates a context. If the specified context already exists, overrides the context.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.agent.environments.users.sessions.contexts.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The session to create a context for. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+parent}/contexts", + "request": { + "$ref": "GoogleCloudDialogflowV2beta1Context" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2beta1Context" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "delete": { + "description": "Deletes the specified context.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts/{contextsId}", + "httpMethod": "DELETE", + "id": "dialogflow.projects.locations.agent.environments.users.sessions.contexts.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the context to delete. Supported formats: - `projects//agent/sessions//contexts/`, - `projects//locations//agent/sessions//contexts/`, - `projects//agent/environments//users//sessions//contexts/`, - `projects//locations//agent/environments//users//sessions//contexts/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/contexts/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "get": { + "description": "Retrieves the specified context.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts/{contextsId}", + "httpMethod": "GET", + "id": "dialogflow.projects.locations.agent.environments.users.sessions.contexts.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the context. Supported formats: - `projects//agent/sessions//contexts/`, - `projects//locations//agent/sessions//contexts/`, - `projects//agent/environments//users//sessions//contexts/`, - `projects//locations//agent/environments//users//sessions//contexts/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/contexts/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+name}", + "response": { + "$ref": "GoogleCloudDialogflowV2beta1Context" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "list": { + "description": "Returns the list of all contexts in the specified session.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts", + "httpMethod": "GET", + "id": "dialogflow.projects.locations.agent.environments.users.sessions.contexts.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. The next_page_token value returned from a previous list request.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The session to list all contexts from. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+parent}/contexts", + "response": { + "$ref": "GoogleCloudDialogflowV2beta1ListContextsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "patch": { + "description": "Updates the specified context.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts/{contextsId}", + "httpMethod": "PATCH", + "id": "dialogflow.projects.locations.agent.environments.users.sessions.contexts.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The unique identifier of the context. Supported formats: - `projects//agent/sessions//contexts/`, - `projects//locations//agent/sessions//contexts/`, - `projects//agent/environments//users//sessions//contexts/`, - `projects//locations//agent/environments//users//sessions//contexts/`, The `Context ID` is always converted to lowercase, may only contain characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. The following context names are reserved for internal use by Dialogflow. You should not use these contexts or create contexts with these names: * `__system_counters__` * `*_id_dialog_context` * `*_dialog_params_size`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/contexts/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. The mask to control which fields get updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2beta1/{+name}", + "request": { + "$ref": "GoogleCloudDialogflowV2beta1Context" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2beta1Context" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + } + } + }, + "entityTypes": { + "methods": { + "create": { + "description": "Creates a session entity type. If the specified session entity type already exists, overrides the session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/entityTypes", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The session to create a session entity type for. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+parent}/entityTypes", + "request": { + "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "delete": { + "description": "Deletes the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/entityTypes/{entityTypesId}", + "httpMethod": "DELETE", + "id": "dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the entity type to delete. Supported formats: - `projects//agent/sessions//entityTypes/` - `projects//locations//agent/sessions//entityTypes/` - `projects//agent/environments//users//sessions//entityTypes/` - `projects//locations//agent/environments/ /users//sessions//entityTypes/` If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/entityTypes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "get": { + "description": "Retrieves the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/entityTypes/{entityTypesId}", + "httpMethod": "GET", + "id": "dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the session entity type. Supported formats: - `projects//agent/sessions//entityTypes/` - `projects//locations//agent/sessions//entityTypes/` - `projects//agent/environments//users//sessions//entityTypes/` - `projects//locations//agent/environments/ /users//sessions//entityTypes/` If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/entityTypes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+name}", + "response": { + "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "list": { + "description": "Returns the list of all session entity types in the specified session. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/entityTypes", + "httpMethod": "GET", + "id": "dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. The next_page_token value returned from a previous list request.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The session to list all session entity types from. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+parent}/entityTypes", + "response": { + "$ref": "GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "patch": { + "description": "Updates the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/entityTypes/{entityTypesId}", + "httpMethod": "PATCH", + "id": "dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The unique identifier of this session entity type. Supported formats: - `projects//agent/sessions//entityTypes/` - `projects//locations//agent/sessions//entityTypes/` - `projects//agent/environments//users//sessions//entityTypes/` - `projects//locations//agent/environments/ /users//sessions//entityTypes/` If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. `` must be the display name of an existing entity type in the same agent that will be overridden or supplemented.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/entityTypes/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. The mask to control which fields get updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2beta1/{+name}", + "request": { + "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + } + } + } + } + } + } + } + } + }, + "intents": { + "methods": { + "batchDelete": { + "description": "Deletes intents in the specified agent. Operation ", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/intents:batchDelete", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.agent.intents.batchDelete", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The name of the agent to delete all entities types for. Supported formats: - `projects//agent` - `projects//locations//agent`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+parent}/intents:batchDelete", + "request": { + "$ref": "GoogleCloudDialogflowV2beta1BatchDeleteIntentsRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "batchUpdate": { + "description": "Updates/Creates multiple intents in the specified agent. Operation ", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/intents:batchUpdate", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.agent.intents.batchUpdate", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The name of the agent to update or create intents in. Supported formats: - `projects//agent` - `projects//locations//agent`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+parent}/intents:batchUpdate", + "request": { + "$ref": "GoogleCloudDialogflowV2beta1BatchUpdateIntentsRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "create": { + "description": "Creates an intent in the specified agent.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/intents", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.agent.intents.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "intentView": { + "description": "Optional. The resource view to apply to the returned intent.", + "enum": [ + "INTENT_VIEW_UNSPECIFIED", + "INTENT_VIEW_FULL" + ], + "enumDescriptions": [ + "Training phrases field is not populated in the response.", + "All fields are populated." + ], + "location": "query", + "type": "string" + }, + "languageCode": { + "description": "Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The agent to create a intent for. Supported formats: - `projects//agent` - `projects//locations//agent`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+parent}/intents", + "request": { + "$ref": "GoogleCloudDialogflowV2beta1Intent" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2beta1Intent" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "delete": { + "description": "Deletes the specified intent and its direct or indirect followup intents.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/intents/{intentsId}", + "httpMethod": "DELETE", + "id": "dialogflow.projects.locations.agent.intents.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the intent to delete. If this intent has direct or indirect followup intents, we also delete them. Supported formats: - `projects//agent/intents/` - `projects//locations//agent/intents/`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/intents/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "get": { + "description": "Retrieves the specified intent.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/intents/{intentsId}", + "httpMethod": "GET", + "id": "dialogflow.projects.locations.agent.intents.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "intentView": { + "description": "Optional. The resource view to apply to the returned intent.", + "enum": [ + "INTENT_VIEW_UNSPECIFIED", + "INTENT_VIEW_FULL" + ], + "enumDescriptions": [ + "Training phrases field is not populated in the response.", + "All fields are populated." + ], + "location": "query", + "type": "string" + }, + "languageCode": { + "description": "Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).", + "location": "query", + "type": "string" + }, + "name": { + "description": "Required. The name of the intent. Supported formats: - `projects//agent/intents/` - `projects//locations//agent/intents/`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/intents/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+name}", + "response": { + "$ref": "GoogleCloudDialogflowV2beta1Intent" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "list": { + "description": "Returns the list of all intents in the specified agent.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/intents", + "httpMethod": "GET", + "id": "dialogflow.projects.locations.agent.intents.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "intentView": { + "description": "Optional. The resource view to apply to the returned intent.", + "enum": [ + "INTENT_VIEW_UNSPECIFIED", + "INTENT_VIEW_FULL" + ], + "enumDescriptions": [ + "Training phrases field is not populated in the response.", + "All fields are populated." + ], + "location": "query", + "type": "string" + }, + "languageCode": { + "description": "Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. The next_page_token value returned from a previous list request.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The agent to list all intents from. Format: `projects//agent`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+parent}/intents", + "response": { + "$ref": "GoogleCloudDialogflowV2beta1ListIntentsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "patch": { + "description": "Updates the specified intent.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/intents/{intentsId}", + "httpMethod": "PATCH", + "id": "dialogflow.projects.locations.agent.intents.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "intentView": { + "description": "Optional. The resource view to apply to the returned intent.", + "enum": [ + "INTENT_VIEW_UNSPECIFIED", + "INTENT_VIEW_FULL" + ], + "enumDescriptions": [ + "Training phrases field is not populated in the response.", + "All fields are populated." + ], + "location": "query", + "type": "string" + }, + "languageCode": { + "description": "Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).", + "location": "query", + "type": "string" + }, + "name": { + "description": "Optional. The unique identifier of this intent. Required for Intents.UpdateIntent and Intents.BatchUpdateIntents methods. Supported formats: - `projects//agent/intents/` - `projects//locations//agent/intents/`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/intents/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. The mask to control which fields get updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2beta1/{+name}", + "request": { + "$ref": "GoogleCloudDialogflowV2beta1Intent" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2beta1Intent" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + } + } + }, + "sessions": { + "methods": { + "deleteContexts": { + "description": "Deletes all active contexts in the specified session.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/contexts", + "httpMethod": "DELETE", + "id": "dialogflow.projects.locations.agent.sessions.deleteContexts", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The name of the session to delete all contexts from. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+parent}/contexts", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "detectIntent": { + "description": "Processes a natural language query and returns structured, actionable data as a result. This method is not idempotent, because it may cause contexts and session entity types to be updated, which in turn might affect results of future queries. Note: Always use agent versions for production traffic. See [Versions and environments](https://cloud.google.com/dialogflow/es/docs/agents-versions).", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}:detectIntent", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.agent.sessions.detectIntent", + "parameterOrder": [ + "session" + ], + "parameters": { + "session": { + "description": "Required. The name of the session this query is sent to. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment (`Environment ID` might be referred to as environment name at some places). If `User ID` is not specified, we are using \"-\". It's up to the API caller to choose an appropriate `Session ID` and `User Id`. They can be a random number or some type of user and session identifiers (preferably hashed). The length of the `Session ID` and `User ID` must not exceed 36 characters. For more information, see the [API interactions guide](https://cloud.google.com/dialogflow/docs/api-overview). Note: Always use agent versions for production traffic. See [Versions and environments](https://cloud.google.com/dialogflow/es/docs/agents-versions).", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+session}:detectIntent", + "request": { + "$ref": "GoogleCloudDialogflowV2beta1DetectIntentRequest" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2beta1DetectIntentResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + } + }, + "resources": { + "contexts": { + "methods": { + "create": { + "description": "Creates a context. If the specified context already exists, overrides the context.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/contexts", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.agent.sessions.contexts.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The session to create a context for. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+parent}/contexts", + "request": { + "$ref": "GoogleCloudDialogflowV2beta1Context" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2beta1Context" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "delete": { + "description": "Deletes the specified context.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/contexts/{contextsId}", + "httpMethod": "DELETE", + "id": "dialogflow.projects.locations.agent.sessions.contexts.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the context to delete. Supported formats: - `projects//agent/sessions//contexts/`, - `projects//locations//agent/sessions//contexts/`, - `projects//agent/environments//users//sessions//contexts/`, - `projects//locations//agent/environments//users//sessions//contexts/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+/contexts/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "get": { + "description": "Retrieves the specified context.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/contexts/{contextsId}", + "httpMethod": "GET", + "id": "dialogflow.projects.locations.agent.sessions.contexts.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the context. Supported formats: - `projects//agent/sessions//contexts/`, - `projects//locations//agent/sessions//contexts/`, - `projects//agent/environments//users//sessions//contexts/`, - `projects//locations//agent/environments//users//sessions//contexts/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+/contexts/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+name}", + "response": { + "$ref": "GoogleCloudDialogflowV2beta1Context" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "list": { + "description": "Returns the list of all contexts in the specified session.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/contexts", + "httpMethod": "GET", + "id": "dialogflow.projects.locations.agent.sessions.contexts.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. The next_page_token value returned from a previous list request.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The session to list all contexts from. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+$", + "required": true, + "type": "string" } }, - "resources": { - "contexts": { - "methods": { - "create": { - "description": "Creates a context. If the specified context already exists, overrides the context.", - "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts", - "httpMethod": "POST", - "id": "dialogflow.projects.locations.agent.environments.users.sessions.contexts.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. The session to create a context for. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2beta1/{+parent}/contexts", - "request": { - "$ref": "GoogleCloudDialogflowV2beta1Context" - }, - "response": { - "$ref": "GoogleCloudDialogflowV2beta1Context" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/dialogflow" - ] - }, - "delete": { - "description": "Deletes the specified context.", - "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts/{contextsId}", - "httpMethod": "DELETE", - "id": "dialogflow.projects.locations.agent.environments.users.sessions.contexts.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the context to delete. Supported formats: - `projects//agent/sessions//contexts/`, - `projects//locations//agent/sessions//contexts/`, - `projects//agent/environments//users//sessions//contexts/`, - `projects//locations//agent/environments//users//sessions//contexts/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/contexts/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2beta1/{+name}", - "response": { - "$ref": "GoogleProtobufEmpty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/dialogflow" - ] - }, - "get": { - "description": "Retrieves the specified context.", - "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts/{contextsId}", - "httpMethod": "GET", - "id": "dialogflow.projects.locations.agent.environments.users.sessions.contexts.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the context. Supported formats: - `projects//agent/sessions//contexts/`, - `projects//locations//agent/sessions//contexts/`, - `projects//agent/environments//users//sessions//contexts/`, - `projects//locations//agent/environments//users//sessions//contexts/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/contexts/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2beta1/{+name}", - "response": { - "$ref": "GoogleCloudDialogflowV2beta1Context" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/dialogflow" - ] - }, - "list": { - "description": "Returns the list of all contexts in the specified session.", - "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts", - "httpMethod": "GET", - "id": "dialogflow.projects.locations.agent.environments.users.sessions.contexts.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "pageSize": { - "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "Optional. The next_page_token value returned from a previous list request.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The session to list all contexts from. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2beta1/{+parent}/contexts", - "response": { - "$ref": "GoogleCloudDialogflowV2beta1ListContextsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/dialogflow" - ] - }, - "patch": { - "description": "Updates the specified context.", - "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/contexts/{contextsId}", - "httpMethod": "PATCH", - "id": "dialogflow.projects.locations.agent.environments.users.sessions.contexts.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The unique identifier of the context. Supported formats: - `projects//agent/sessions//contexts/`, - `projects//locations//agent/sessions//contexts/`, - `projects//agent/environments//users//sessions//contexts/`, - `projects//locations//agent/environments//users//sessions//contexts/`, The `Context ID` is always converted to lowercase, may only contain characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. The following context names are reserved for internal use by Dialogflow. You should not use these contexts or create contexts with these names: * `__system_counters__` * `*_id_dialog_context` * `*_dialog_params_size`", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/contexts/[^/]+$", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Optional. The mask to control which fields get updated.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "v2beta1/{+name}", - "request": { - "$ref": "GoogleCloudDialogflowV2beta1Context" - }, - "response": { - "$ref": "GoogleCloudDialogflowV2beta1Context" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/dialogflow" - ] - } - } + "path": "v2beta1/{+parent}/contexts", + "response": { + "$ref": "GoogleCloudDialogflowV2beta1ListContextsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "patch": { + "description": "Updates the specified context.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/contexts/{contextsId}", + "httpMethod": "PATCH", + "id": "dialogflow.projects.locations.agent.sessions.contexts.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The unique identifier of the context. Supported formats: - `projects//agent/sessions//contexts/`, - `projects//locations//agent/sessions//contexts/`, - `projects//agent/environments//users//sessions//contexts/`, - `projects//locations//agent/environments//users//sessions//contexts/`, The `Context ID` is always converted to lowercase, may only contain characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. The following context names are reserved for internal use by Dialogflow. You should not use these contexts or create contexts with these names: * `__system_counters__` * `*_id_dialog_context` * `*_dialog_params_size`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+/contexts/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. The mask to control which fields get updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2beta1/{+name}", + "request": { + "$ref": "GoogleCloudDialogflowV2beta1Context" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2beta1Context" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + } + } + }, + "entityTypes": { + "methods": { + "create": { + "description": "Creates a session entity type. If the specified session entity type already exists, overrides the session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/entityTypes", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.agent.sessions.entityTypes.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The session to create a session entity type for. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+parent}/entityTypes", + "request": { + "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "delete": { + "description": "Deletes the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/entityTypes/{entityTypesId}", + "httpMethod": "DELETE", + "id": "dialogflow.projects.locations.agent.sessions.entityTypes.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the entity type to delete. Supported formats: - `projects//agent/sessions//entityTypes/` - `projects//locations//agent/sessions//entityTypes/` - `projects//agent/environments//users//sessions//entityTypes/` - `projects//locations//agent/environments/ /users//sessions//entityTypes/` If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+/entityTypes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "get": { + "description": "Retrieves the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/entityTypes/{entityTypesId}", + "httpMethod": "GET", + "id": "dialogflow.projects.locations.agent.sessions.entityTypes.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the session entity type. Supported formats: - `projects//agent/sessions//entityTypes/` - `projects//locations//agent/sessions//entityTypes/` - `projects//agent/environments//users//sessions//entityTypes/` - `projects//locations//agent/environments/ /users//sessions//entityTypes/` If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+/entityTypes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+name}", + "response": { + "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "list": { + "description": "Returns the list of all session entity types in the specified session. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/entityTypes", + "httpMethod": "GET", + "id": "dialogflow.projects.locations.agent.sessions.entityTypes.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.", + "format": "int32", + "location": "query", + "type": "integer" }, - "entityTypes": { - "methods": { - "create": { - "description": "Creates a session entity type. If the specified session entity type already exists, overrides the session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.", - "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/entityTypes", - "httpMethod": "POST", - "id": "dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. The session to create a session entity type for. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2beta1/{+parent}/entityTypes", - "request": { - "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType" - }, - "response": { - "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/dialogflow" - ] - }, - "delete": { - "description": "Deletes the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.", - "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/entityTypes/{entityTypesId}", - "httpMethod": "DELETE", - "id": "dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the entity type to delete. Supported formats: - `projects//agent/sessions//entityTypes/` - `projects//locations//agent/sessions//entityTypes/` - `projects//agent/environments//users//sessions//entityTypes/` - `projects//locations//agent/environments/ /users//sessions//entityTypes/` If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/entityTypes/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2beta1/{+name}", - "response": { - "$ref": "GoogleProtobufEmpty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/dialogflow" - ] - }, - "get": { - "description": "Retrieves the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.", - "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/entityTypes/{entityTypesId}", - "httpMethod": "GET", - "id": "dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the session entity type. Supported formats: - `projects//agent/sessions//entityTypes/` - `projects//locations//agent/sessions//entityTypes/` - `projects//agent/environments//users//sessions//entityTypes/` - `projects//locations//agent/environments/ /users//sessions//entityTypes/` If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/entityTypes/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2beta1/{+name}", - "response": { - "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/dialogflow" - ] - }, - "list": { - "description": "Returns the list of all session entity types in the specified session. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.", - "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/entityTypes", - "httpMethod": "GET", - "id": "dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "pageSize": { - "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "Optional. The next_page_token value returned from a previous list request.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The session to list all session entity types from. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2beta1/{+parent}/entityTypes", - "response": { - "$ref": "GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/dialogflow" - ] - }, - "patch": { - "description": "Updates the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.", - "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/environments/{environmentsId}/users/{usersId}/sessions/{sessionsId}/entityTypes/{entityTypesId}", - "httpMethod": "PATCH", - "id": "dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The unique identifier of this session entity type. Supported formats: - `projects//agent/sessions//entityTypes/` - `projects//locations//agent/sessions//entityTypes/` - `projects//agent/environments//users//sessions//entityTypes/` - `projects//locations//agent/environments/ /users//sessions//entityTypes/` If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. `` must be the display name of an existing entity type in the same agent that will be overridden or supplemented.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/agent/environments/[^/]+/users/[^/]+/sessions/[^/]+/entityTypes/[^/]+$", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Optional. The mask to control which fields get updated.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "v2beta1/{+name}", - "request": { - "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType" - }, - "response": { - "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/dialogflow" - ] - } - } + "pageToken": { + "description": "Optional. The next_page_token value returned from a previous list request.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The session to list all session entity types from. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+parent}/entityTypes", + "response": { + "$ref": "GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "patch": { + "description": "Updates the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/entityTypes/{entityTypesId}", + "httpMethod": "PATCH", + "id": "dialogflow.projects.locations.agent.sessions.entityTypes.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The unique identifier of this session entity type. Supported formats: - `projects//agent/sessions//entityTypes/` - `projects//locations//agent/sessions//entityTypes/` - `projects//agent/environments//users//sessions//entityTypes/` - `projects//locations//agent/environments/ /users//sessions//entityTypes/` If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. `` must be the display name of an existing entity type in the same agent that will be overridden or supplemented.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+/entityTypes/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. The mask to control which fields get updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" } - } + }, + "path": "v2beta1/{+name}", + "request": { + "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] } } } - } + } + } + } + }, + "answerRecords": { + "methods": { + "get": { + "description": "Deprecated. Retrieves a specific answer record.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/answerRecords/{answerRecordsId}", + "httpMethod": "GET", + "id": "dialogflow.projects.locations.answerRecords.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the answer record to retrieve. Format: `projects//locations//answerRecords/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/answerRecords/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+name}", + "response": { + "$ref": "GoogleCloudDialogflowV2beta1AnswerRecord" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "list": { + "description": "Returns the list of all answer records in the specified project in reverse chronological order.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/answerRecords", + "httpMethod": "GET", + "id": "dialogflow.projects.locations.answerRecords.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. The maximum number of records to return in a single page. The server may return fewer records than this. If unspecified, we use 10. The maximum is 100.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. The ListAnswerRecordsResponse.next_page_token value returned from a previous list request used to continue listing on the next page.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The project to list all answer records for in reverse chronological order. Format: `projects//locations/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+parent}/answerRecords", + "response": { + "$ref": "GoogleCloudDialogflowV2beta1ListAnswerRecordsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "patch": { + "description": "Updates the specified answer record.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/answerRecords/{answerRecordsId}", + "httpMethod": "PATCH", + "id": "dialogflow.projects.locations.answerRecords.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The unique identifier of this answer record. Required for AnswerRecords.UpdateAnswerRecord method. Format: `projects//locations//answerRecords/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/answerRecords/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. The mask to control which fields get updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2beta1/{+name}", + "request": { + "$ref": "GoogleCloudDialogflowV2beta1AnswerRecord" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2beta1AnswerRecord" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + } + } + }, + "conversationProfiles": { + "methods": { + "create": { + "description": "Creates a conversation profile in the specified project. ConversationProfile.CreateTime and ConversationProfile.UpdateTime aren't populated in the response. You can retrieve them via GetConversationProfile API.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/conversationProfiles", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.conversationProfiles.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The project to create a conversation profile for. Format: `projects//locations/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+parent}/conversationProfiles", + "request": { + "$ref": "GoogleCloudDialogflowV2beta1ConversationProfile" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2beta1ConversationProfile" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "delete": { + "description": "Deletes the specified conversation profile.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/conversationProfiles/{conversationProfilesId}", + "httpMethod": "DELETE", + "id": "dialogflow.projects.locations.conversationProfiles.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the conversation profile to delete. Format: `projects//locations//conversationProfiles/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/conversationProfiles/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "get": { + "description": "Retrieves the specified conversation profile.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/conversationProfiles/{conversationProfilesId}", + "httpMethod": "GET", + "id": "dialogflow.projects.locations.conversationProfiles.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the conversation profile. Format: `projects//locations//conversationProfiles/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/conversationProfiles/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+name}", + "response": { + "$ref": "GoogleCloudDialogflowV2beta1ConversationProfile" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "list": { + "description": "Returns the list of all conversation profiles in the specified project.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/conversationProfiles", + "httpMethod": "GET", + "id": "dialogflow.projects.locations.conversationProfiles.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "The maximum number of items to return in a single page. By default 100 and at most 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The next_page_token value returned from a previous list request.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The project to list all conversation profiles from. Format: `projects//locations/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+parent}/conversationProfiles", + "response": { + "$ref": "GoogleCloudDialogflowV2beta1ListConversationProfilesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "patch": { + "description": "Updates the specified conversation profile. ConversationProfile.CreateTime and ConversationProfile.UpdateTime aren't populated in the response. You can retrieve them via GetConversationProfile API.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/conversationProfiles/{conversationProfilesId}", + "httpMethod": "PATCH", + "id": "dialogflow.projects.locations.conversationProfiles.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The unique identifier of this conversation profile. Format: `projects//locations//conversationProfiles/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/conversationProfiles/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. The mask to control which fields to update.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2beta1/{+name}", + "request": { + "$ref": "GoogleCloudDialogflowV2beta1ConversationProfile" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2beta1ConversationProfile" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + } + } + }, + "conversations": { + "methods": { + "complete": { + "description": "Completes the specified conversation. Finished conversations are purged from the database after 30 days.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/conversations/{conversationsId}:complete", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.conversations.complete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Resource identifier of the conversation to close. Format: `projects//locations//conversations/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/conversations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+name}:complete", + "request": { + "$ref": "GoogleCloudDialogflowV2beta1CompleteConversationRequest" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2beta1Conversation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "create": { + "description": "Creates a new conversation. Conversations are auto-completed after 24 hours. Conversation Lifecycle: There are two stages during a conversation: Automated Agent Stage and Assist Stage. For Automated Agent Stage, there will be a dialogflow agent responding to user queries. For Assist Stage, there's no dialogflow agent responding to user queries. But we will provide suggestions which are generated from conversation. If Conversation.conversation_profile is configured for a dialogflow agent, conversation will start from `Automated Agent Stage`, otherwise, it will start from `Assist Stage`. And during `Automated Agent Stage`, once an Intent with Intent.live_agent_handoff is triggered, conversation will transfer to Assist Stage.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/conversations", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.conversations.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "conversationId": { + "description": "Optional. Identifier of the conversation. Generally it's auto generated by Google. Only set it if you cannot wait for the response to return a auto-generated one to you. The conversation ID must be compliant with the regression fomula \"a-zA-Z*\" with the characters length in range of [3,64]. If the field is provided, the caller is resposible for 1. the uniqueness of the ID, otherwise the request will be rejected. 2. the consistency for whether to use custom ID or not under a project to better ensure uniqueness.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Resource identifier of the project creating the conversation. Format: `projects//locations/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+parent}/conversations", + "request": { + "$ref": "GoogleCloudDialogflowV2beta1Conversation" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2beta1Conversation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] }, - "intents": { - "methods": { - "batchDelete": { - "description": "Deletes intents in the specified agent. Operation ", - "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/intents:batchDelete", - "httpMethod": "POST", - "id": "dialogflow.projects.locations.agent.intents.batchDelete", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. The name of the agent to delete all entities types for. Supported formats: - `projects//agent` - `projects//locations//agent`", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/agent$", - "required": true, - "type": "string" - } - }, - "path": "v2beta1/{+parent}/intents:batchDelete", - "request": { - "$ref": "GoogleCloudDialogflowV2beta1BatchDeleteIntentsRequest" - }, - "response": { - "$ref": "GoogleLongrunningOperation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/dialogflow" - ] + "get": { + "description": "Retrieves the specific conversation.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/conversations/{conversationsId}", + "httpMethod": "GET", + "id": "dialogflow.projects.locations.conversations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the conversation. Format: `projects//locations//conversations/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/conversations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+name}", + "response": { + "$ref": "GoogleCloudDialogflowV2beta1Conversation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, + "list": { + "description": "Returns the list of all conversations in the specified project.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/conversations", + "httpMethod": "GET", + "id": "dialogflow.projects.locations.conversations.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters conversations listed in the response. In general, the expression must specify the field name, a comparison operator, and the value to use for filtering: - The value must be a string, a number, or a boolean. - The comparison operator must be either `=`,`!=`, `>`, or `<`. - To filter on multiple expressions, separate the expressions with `AND` or `OR` (omitting both implies `AND`). - For clarity, expressions can be enclosed in parentheses. Only `lifecycle_state` can be filtered on in this way. For example, the following expression only returns `COMPLETED` conversations: `lifecycle_state = \"COMPLETED\"` For more information about filtering, see [API Filtering](https://aip.dev/160).", + "location": "query", + "type": "string" }, - "batchUpdate": { - "description": "Updates/Creates multiple intents in the specified agent. Operation ", - "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/intents:batchUpdate", - "httpMethod": "POST", - "id": "dialogflow.projects.locations.agent.intents.batchUpdate", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. The name of the agent to update or create intents in. Supported formats: - `projects//agent` - `projects//locations//agent`", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/agent$", - "required": true, - "type": "string" - } - }, - "path": "v2beta1/{+parent}/intents:batchUpdate", - "request": { - "$ref": "GoogleCloudDialogflowV2beta1BatchUpdateIntentsRequest" - }, - "response": { - "$ref": "GoogleLongrunningOperation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/dialogflow" - ] + "pageSize": { + "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.", + "format": "int32", + "location": "query", + "type": "integer" }, - "create": { - "description": "Creates an intent in the specified agent.", - "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/intents", + "pageToken": { + "description": "Optional. The next_page_token value returned from a previous list request.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The project from which to list all conversation. Format: `projects//locations/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+parent}/conversations", + "response": { + "$ref": "GoogleCloudDialogflowV2beta1ListConversationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + } + }, + "resources": { + "messages": { + "methods": { + "batchCreate": { + "description": "Batch ingests messages to conversation. Customers can use this RPC to ingest historical messages to conversation.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/conversations/{conversationsId}/messages:batchCreate", "httpMethod": "POST", - "id": "dialogflow.projects.locations.agent.intents.create", + "id": "dialogflow.projects.locations.conversations.messages.batchCreate", "parameterOrder": [ "parent" ], "parameters": { - "intentView": { - "description": "Optional. The resource view to apply to the returned intent.", - "enum": [ - "INTENT_VIEW_UNSPECIFIED", - "INTENT_VIEW_FULL" - ], - "enumDescriptions": [ - "Training phrases field is not populated in the response.", - "All fields are populated." - ], - "location": "query", - "type": "string" - }, - "languageCode": { - "description": "Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).", - "location": "query", - "type": "string" - }, "parent": { - "description": "Required. The agent to create a intent for. Supported formats: - `projects//agent` - `projects//locations//agent`", + "description": "Required. Resource identifier of the conversation to create message. Format: `projects//locations//conversations/`.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/agent$", + "pattern": "^projects/[^/]+/locations/[^/]+/conversations/[^/]+$", "required": true, "type": "string" } }, - "path": "v2beta1/{+parent}/intents", + "path": "v2beta1/{+parent}/messages:batchCreate", "request": { - "$ref": "GoogleCloudDialogflowV2beta1Intent" - }, - "response": { - "$ref": "GoogleCloudDialogflowV2beta1Intent" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/dialogflow" - ] - }, - "delete": { - "description": "Deletes the specified intent and its direct or indirect followup intents.", - "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/intents/{intentsId}", - "httpMethod": "DELETE", - "id": "dialogflow.projects.locations.agent.intents.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the intent to delete. If this intent has direct or indirect followup intents, we also delete them. Supported formats: - `projects//agent/intents/` - `projects//locations//agent/intents/`", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/agent/intents/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2beta1/{+name}", - "response": { - "$ref": "GoogleProtobufEmpty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/dialogflow" - ] - }, - "get": { - "description": "Retrieves the specified intent.", - "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/intents/{intentsId}", - "httpMethod": "GET", - "id": "dialogflow.projects.locations.agent.intents.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "intentView": { - "description": "Optional. The resource view to apply to the returned intent.", - "enum": [ - "INTENT_VIEW_UNSPECIFIED", - "INTENT_VIEW_FULL" - ], - "enumDescriptions": [ - "Training phrases field is not populated in the response.", - "All fields are populated." - ], - "location": "query", - "type": "string" - }, - "languageCode": { - "description": "Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).", - "location": "query", - "type": "string" - }, - "name": { - "description": "Required. The name of the intent. Supported formats: - `projects//agent/intents/` - `projects//locations//agent/intents/`", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/agent/intents/[^/]+$", - "required": true, - "type": "string" - } + "$ref": "GoogleCloudDialogflowV2beta1BatchCreateMessagesRequest" }, - "path": "v2beta1/{+name}", "response": { - "$ref": "GoogleCloudDialogflowV2beta1Intent" + "$ref": "GoogleCloudDialogflowV2beta1BatchCreateMessagesResponse" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", @@ -3919,29 +5655,16 @@ ] }, "list": { - "description": "Returns the list of all intents in the specified agent.", - "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/intents", + "description": "Lists messages that belong to a given conversation. `messages` are ordered by `create_time` in descending order. To fetch updates without duplication, send request with filter `create_time_epoch_microseconds > [first item's create_time of previous request]` and empty page_token.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/conversations/{conversationsId}/messages", "httpMethod": "GET", - "id": "dialogflow.projects.locations.agent.intents.list", + "id": "dialogflow.projects.locations.conversations.messages.list", "parameterOrder": [ - "parent" - ], - "parameters": { - "intentView": { - "description": "Optional. The resource view to apply to the returned intent.", - "enum": [ - "INTENT_VIEW_UNSPECIFIED", - "INTENT_VIEW_FULL" - ], - "enumDescriptions": [ - "Training phrases field is not populated in the response.", - "All fields are populated." - ], - "location": "query", - "type": "string" - }, - "languageCode": { - "description": "Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).", + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Filter on message fields. Currently predicates on `create_time` and `create_time_epoch_microseconds` are supported. `create_time` only support milliseconds accuracy. E.g., `create_time_epoch_microseconds > 1551790877964485` or `create_time > 2017-01-15T01:30:15.01Z`. For more information about filtering, see [API Filtering](https://aip.dev/160).", "location": "query", "type": "string" }, @@ -3957,442 +5680,267 @@ "type": "string" }, "parent": { - "description": "Required. The agent to list all intents from. Format: `projects//agent`.", + "description": "Required. The name of the conversation to list messages for. Format: `projects//locations//conversations/`", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/agent$", + "pattern": "^projects/[^/]+/locations/[^/]+/conversations/[^/]+$", "required": true, "type": "string" } }, - "path": "v2beta1/{+parent}/intents", + "path": "v2beta1/{+parent}/messages", "response": { - "$ref": "GoogleCloudDialogflowV2beta1ListIntentsResponse" + "$ref": "GoogleCloudDialogflowV2beta1ListMessagesResponse" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/dialogflow" ] - }, - "patch": { - "description": "Updates the specified intent.", - "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/intents/{intentsId}", - "httpMethod": "PATCH", - "id": "dialogflow.projects.locations.agent.intents.patch", + } + } + }, + "participants": { + "methods": { + "analyzeContent": { + "description": "Adds a text (chat, for example), or audio (phone recording, for example) message from a participant into the conversation. Note: Always use agent versions for production traffic sent to virtual agents. See [Versions and environments](https://cloud.google.com/dialogflow/es/docs/agents-versions).", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/conversations/{conversationsId}/participants/{participantsId}:analyzeContent", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.conversations.participants.analyzeContent", "parameterOrder": [ - "name" + "participant" ], "parameters": { - "intentView": { - "description": "Optional. The resource view to apply to the returned intent.", - "enum": [ - "INTENT_VIEW_UNSPECIFIED", - "INTENT_VIEW_FULL" - ], - "enumDescriptions": [ - "Training phrases field is not populated in the response.", - "All fields are populated." - ], - "location": "query", - "type": "string" - }, - "languageCode": { - "description": "Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).", - "location": "query", - "type": "string" - }, - "name": { - "description": "Optional. The unique identifier of this intent. Required for Intents.UpdateIntent and Intents.BatchUpdateIntents methods. Supported formats: - `projects//agent/intents/` - `projects//locations//agent/intents/`", + "participant": { + "description": "Required. The name of the participant this text comes from. Format: `projects//locations//conversations//participants/`.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/agent/intents/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/conversations/[^/]+/participants/[^/]+$", "required": true, "type": "string" - }, - "updateMask": { - "description": "Optional. The mask to control which fields get updated.", - "format": "google-fieldmask", - "location": "query", - "type": "string" } }, - "path": "v2beta1/{+name}", + "path": "v2beta1/{+participant}:analyzeContent", "request": { - "$ref": "GoogleCloudDialogflowV2beta1Intent" + "$ref": "GoogleCloudDialogflowV2beta1AnalyzeContentRequest" }, "response": { - "$ref": "GoogleCloudDialogflowV2beta1Intent" + "$ref": "GoogleCloudDialogflowV2beta1AnalyzeContentResponse" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/dialogflow" ] - } - } - }, - "sessions": { - "methods": { - "deleteContexts": { - "description": "Deletes all active contexts in the specified session.", - "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/contexts", - "httpMethod": "DELETE", - "id": "dialogflow.projects.locations.agent.sessions.deleteContexts", + }, + "create": { + "description": "Creates a new participant in a conversation.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/conversations/{conversationsId}/participants", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.conversations.participants.create", "parameterOrder": [ "parent" ], "parameters": { "parent": { - "description": "Required. The name of the session to delete all contexts from. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", + "description": "Required. Resource identifier of the conversation adding the participant. Format: `projects//locations//conversations/`.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/conversations/[^/]+$", "required": true, "type": "string" } }, - "path": "v2beta1/{+parent}/contexts", + "path": "v2beta1/{+parent}/participants", + "request": { + "$ref": "GoogleCloudDialogflowV2beta1Participant" + }, "response": { - "$ref": "GoogleProtobufEmpty" + "$ref": "GoogleCloudDialogflowV2beta1Participant" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/dialogflow" ] }, - "detectIntent": { - "description": "Processes a natural language query and returns structured, actionable data as a result. This method is not idempotent, because it may cause contexts and session entity types to be updated, which in turn might affect results of future queries. Note: Always use agent versions for production traffic. See [Versions and environments](https://cloud.google.com/dialogflow/es/docs/agents-versions).", - "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}:detectIntent", - "httpMethod": "POST", - "id": "dialogflow.projects.locations.agent.sessions.detectIntent", + "get": { + "description": "Retrieves a conversation participant.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/conversations/{conversationsId}/participants/{participantsId}", + "httpMethod": "GET", + "id": "dialogflow.projects.locations.conversations.participants.get", "parameterOrder": [ - "session" + "name" ], "parameters": { - "session": { - "description": "Required. The name of the session this query is sent to. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment (`Environment ID` might be referred to as environment name at some places). If `User ID` is not specified, we are using \"-\". It's up to the API caller to choose an appropriate `Session ID` and `User Id`. They can be a random number or some type of user and session identifiers (preferably hashed). The length of the `Session ID` and `User ID` must not exceed 36 characters. For more information, see the [API interactions guide](https://cloud.google.com/dialogflow/docs/api-overview). Note: Always use agent versions for production traffic. See [Versions and environments](https://cloud.google.com/dialogflow/es/docs/agents-versions).", + "name": { + "description": "Required. The name of the participant. Format: `projects//locations//conversations//participants/`.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/conversations/[^/]+/participants/[^/]+$", "required": true, "type": "string" } }, - "path": "v2beta1/{+session}:detectIntent", - "request": { - "$ref": "GoogleCloudDialogflowV2beta1DetectIntentRequest" - }, + "path": "v2beta1/{+name}", "response": { - "$ref": "GoogleCloudDialogflowV2beta1DetectIntentResponse" + "$ref": "GoogleCloudDialogflowV2beta1Participant" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/dialogflow" ] - } - }, - "resources": { - "contexts": { - "methods": { - "create": { - "description": "Creates a context. If the specified context already exists, overrides the context.", - "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/contexts", - "httpMethod": "POST", - "id": "dialogflow.projects.locations.agent.sessions.contexts.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. The session to create a context for. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2beta1/{+parent}/contexts", - "request": { - "$ref": "GoogleCloudDialogflowV2beta1Context" - }, - "response": { - "$ref": "GoogleCloudDialogflowV2beta1Context" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/dialogflow" - ] - }, - "delete": { - "description": "Deletes the specified context.", - "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/contexts/{contextsId}", - "httpMethod": "DELETE", - "id": "dialogflow.projects.locations.agent.sessions.contexts.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the context to delete. Supported formats: - `projects//agent/sessions//contexts/`, - `projects//locations//agent/sessions//contexts/`, - `projects//agent/environments//users//sessions//contexts/`, - `projects//locations//agent/environments//users//sessions//contexts/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+/contexts/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2beta1/{+name}", - "response": { - "$ref": "GoogleProtobufEmpty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/dialogflow" - ] - }, - "get": { - "description": "Retrieves the specified context.", - "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/contexts/{contextsId}", - "httpMethod": "GET", - "id": "dialogflow.projects.locations.agent.sessions.contexts.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the context. Supported formats: - `projects//agent/sessions//contexts/`, - `projects//locations//agent/sessions//contexts/`, - `projects//agent/environments//users//sessions//contexts/`, - `projects//locations//agent/environments//users//sessions//contexts/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+/contexts/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2beta1/{+name}", - "response": { - "$ref": "GoogleCloudDialogflowV2beta1Context" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/dialogflow" - ] - }, - "list": { - "description": "Returns the list of all contexts in the specified session.", - "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/contexts", - "httpMethod": "GET", - "id": "dialogflow.projects.locations.agent.sessions.contexts.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "pageSize": { - "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "Optional. The next_page_token value returned from a previous list request.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The session to list all contexts from. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2beta1/{+parent}/contexts", - "response": { - "$ref": "GoogleCloudDialogflowV2beta1ListContextsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/dialogflow" - ] + }, + "list": { + "description": "Returns the list of all participants in the specified conversation.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/conversations/{conversationsId}/participants", + "httpMethod": "GET", + "id": "dialogflow.projects.locations.conversations.participants.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.", + "format": "int32", + "location": "query", + "type": "integer" }, - "patch": { - "description": "Updates the specified context.", - "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/contexts/{contextsId}", - "httpMethod": "PATCH", - "id": "dialogflow.projects.locations.agent.sessions.contexts.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The unique identifier of the context. Supported formats: - `projects//agent/sessions//contexts/`, - `projects//locations//agent/sessions//contexts/`, - `projects//agent/environments//users//sessions//contexts/`, - `projects//locations//agent/environments//users//sessions//contexts/`, The `Context ID` is always converted to lowercase, may only contain characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. The following context names are reserved for internal use by Dialogflow. You should not use these contexts or create contexts with these names: * `__system_counters__` * `*_id_dialog_context` * `*_dialog_params_size`", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+/contexts/[^/]+$", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Optional. The mask to control which fields get updated.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "v2beta1/{+name}", - "request": { - "$ref": "GoogleCloudDialogflowV2beta1Context" - }, - "response": { - "$ref": "GoogleCloudDialogflowV2beta1Context" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/dialogflow" - ] + "pageToken": { + "description": "Optional. The next_page_token value returned from a previous list request.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The conversation to list all participants from. Format: `projects//locations//conversations/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/conversations/[^/]+$", + "required": true, + "type": "string" } - } + }, + "path": "v2beta1/{+parent}/participants", + "response": { + "$ref": "GoogleCloudDialogflowV2beta1ListParticipantsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] }, - "entityTypes": { + "patch": { + "description": "Updates the specified participant.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/conversations/{conversationsId}/participants/{participantsId}", + "httpMethod": "PATCH", + "id": "dialogflow.projects.locations.conversations.participants.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Optional. The unique identifier of this participant. Format: `projects//locations//conversations//participants/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/conversations/[^/]+/participants/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. The mask to specify which fields to update.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2beta1/{+name}", + "request": { + "$ref": "GoogleCloudDialogflowV2beta1Participant" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2beta1Participant" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + } + }, + "resources": { + "suggestions": { "methods": { - "create": { - "description": "Creates a session entity type. If the specified session entity type already exists, overrides the session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.", - "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/entityTypes", + "suggestArticles": { + "description": "Gets suggested articles for a participant based on specific historical messages. Note that ListSuggestions will only list the auto-generated suggestions, while CompileSuggestion will try to compile suggestion based on the provided conversation context in the real time.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/conversations/{conversationsId}/participants/{participantsId}/suggestions:suggestArticles", "httpMethod": "POST", - "id": "dialogflow.projects.locations.agent.sessions.entityTypes.create", + "id": "dialogflow.projects.locations.conversations.participants.suggestions.suggestArticles", "parameterOrder": [ "parent" ], "parameters": { "parent": { - "description": "Required. The session to create a session entity type for. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", + "description": "Required. The name of the participant to fetch suggestion for. Format: `projects//locations//conversations//participants/`.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/conversations/[^/]+/participants/[^/]+$", "required": true, "type": "string" } }, - "path": "v2beta1/{+parent}/entityTypes", + "path": "v2beta1/{+parent}/suggestions:suggestArticles", "request": { - "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType" + "$ref": "GoogleCloudDialogflowV2beta1SuggestArticlesRequest" }, "response": { - "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType" + "$ref": "GoogleCloudDialogflowV2beta1SuggestArticlesResponse" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/dialogflow" ] }, - "delete": { - "description": "Deletes the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.", - "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/entityTypes/{entityTypesId}", - "httpMethod": "DELETE", - "id": "dialogflow.projects.locations.agent.sessions.entityTypes.delete", + "suggestFaqAnswers": { + "description": "Gets suggested faq answers for a participant based on specific historical messages.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/conversations/{conversationsId}/participants/{participantsId}/suggestions:suggestFaqAnswers", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.conversations.participants.suggestions.suggestFaqAnswers", "parameterOrder": [ - "name" + "parent" ], "parameters": { - "name": { - "description": "Required. The name of the entity type to delete. Supported formats: - `projects//agent/sessions//entityTypes/` - `projects//locations//agent/sessions//entityTypes/` - `projects//agent/environments//users//sessions//entityTypes/` - `projects//locations//agent/environments/ /users//sessions//entityTypes/` If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", + "parent": { + "description": "Required. The name of the participant to fetch suggestion for. Format: `projects//locations//conversations//participants/`.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+/entityTypes/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/conversations/[^/]+/participants/[^/]+$", "required": true, "type": "string" } }, - "path": "v2beta1/{+name}", - "response": { - "$ref": "GoogleProtobufEmpty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/dialogflow" - ] - }, - "get": { - "description": "Retrieves the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.", - "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/entityTypes/{entityTypesId}", - "httpMethod": "GET", - "id": "dialogflow.projects.locations.agent.sessions.entityTypes.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the session entity type. Supported formats: - `projects//agent/sessions//entityTypes/` - `projects//locations//agent/sessions//entityTypes/` - `projects//agent/environments//users//sessions//entityTypes/` - `projects//locations//agent/environments/ /users//sessions//entityTypes/` If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+/entityTypes/[^/]+$", - "required": true, - "type": "string" - } + "path": "v2beta1/{+parent}/suggestions:suggestFaqAnswers", + "request": { + "$ref": "GoogleCloudDialogflowV2beta1SuggestFaqAnswersRequest" }, - "path": "v2beta1/{+name}", "response": { - "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType" + "$ref": "GoogleCloudDialogflowV2beta1SuggestFaqAnswersResponse" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/dialogflow" ] }, - "list": { - "description": "Returns the list of all session entity types in the specified session. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.", - "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/entityTypes", - "httpMethod": "GET", - "id": "dialogflow.projects.locations.agent.sessions.entityTypes.list", + "suggestSmartReplies": { + "description": "Gets smart replies for a participant based on specific historical messages.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/conversations/{conversationsId}/participants/{participantsId}/suggestions:suggestSmartReplies", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.conversations.participants.suggestions.suggestSmartReplies", "parameterOrder": [ "parent" ], "parameters": { - "pageSize": { - "description": "Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "Optional. The next_page_token value returned from a previous list request.", - "location": "query", - "type": "string" - }, "parent": { - "description": "Required. The session to list all session entity types from. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2beta1/{+parent}/entityTypes", - "response": { - "$ref": "GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/dialogflow" - ] - }, - "patch": { - "description": "Updates the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration.", - "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/agent/sessions/{sessionsId}/entityTypes/{entityTypesId}", - "httpMethod": "PATCH", - "id": "dialogflow.projects.locations.agent.sessions.entityTypes.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The unique identifier of this session entity type. Supported formats: - `projects//agent/sessions//entityTypes/` - `projects//locations//agent/sessions//entityTypes/` - `projects//agent/environments//users//sessions//entityTypes/` - `projects//locations//agent/environments/ /users//sessions//entityTypes/` If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. `` must be the display name of an existing entity type in the same agent that will be overridden or supplemented.", + "description": "Required. The name of the participant to fetch suggestion for. Format: `projects//locations//conversations//participants/`.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/agent/sessions/[^/]+/entityTypes/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/conversations/[^/]+/participants/[^/]+$", "required": true, "type": "string" - }, - "updateMask": { - "description": "Optional. The mask to control which fields get updated.", - "format": "google-fieldmask", - "location": "query", - "type": "string" } }, - "path": "v2beta1/{+name}", + "path": "v2beta1/{+parent}/suggestions:suggestSmartReplies", "request": { - "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType" + "$ref": "GoogleCloudDialogflowV2beta1SuggestSmartRepliesRequest" }, "response": { - "$ref": "GoogleCloudDialogflowV2beta1SessionEntityType" + "$ref": "GoogleCloudDialogflowV2beta1SuggestSmartRepliesResponse" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", @@ -4660,6 +6208,35 @@ "https://www.googleapis.com/auth/dialogflow" ] }, + "import": { + "description": "Create documents by importing data from external sources.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/knowledgeBases/{knowledgeBasesId}/documents:import", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.knowledgeBases.documents.import", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The knowledge base to import documents into. Format: `projects//locations//knowledgeBases/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/knowledgeBases/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+parent}/documents:import", + "request": { + "$ref": "GoogleCloudDialogflowV2beta1ImportDocumentsRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, "list": { "description": "Returns the list of all documents of the knowledge base. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`.", "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/knowledgeBases/{knowledgeBasesId}/documents", @@ -4971,7 +6548,7 @@ } } }, - "revision": "20210227", + "revision": "20210320", "rootUrl": "https://dialogflow.googleapis.com/", "schemas": { "GoogleCloudDialogflowCxV3AudioInput": { @@ -6250,7 +7827,7 @@ "type": "object" }, "GoogleCloudDialogflowCxV3WebhookRequest": { - "description": "The request message for a webhook call.", + "description": "The request message for a webhook call. The request is sent as a JSON object and the field names will be presented in camel cases.", "id": "GoogleCloudDialogflowCxV3WebhookRequest", "properties": { "detectIntentResponseId": { @@ -7704,7 +9281,7 @@ "type": "object" }, "GoogleCloudDialogflowCxV3beta1WebhookRequest": { - "description": "The request message for a webhook call.", + "description": "The request message for a webhook call. The request is sent as a JSON object and the field names will be presented in camel cases.", "id": "GoogleCloudDialogflowCxV3beta1WebhookRequest", "properties": { "detectIntentResponseId": { @@ -7901,6 +9478,44 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2ArticleAnswer": { + "description": "Represents article answer.", + "id": "GoogleCloudDialogflowV2ArticleAnswer", + "properties": { + "answerRecord": { + "description": "The name of answer record, in the format of \"projects//locations//answerRecords/\"", + "type": "string" + }, + "confidence": { + "description": "Article match confidence. The system's confidence score that this article is a good match for this conversation, as a value from 0.0 (completely uncertain) to 1.0 (completely certain).", + "format": "float", + "type": "number" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "A map that contains metadata about the answer and the document from which it originates.", + "type": "object" + }, + "snippets": { + "description": "Article snippets.", + "items": { + "type": "string" + }, + "type": "array" + }, + "title": { + "description": "The article title.", + "type": "string" + }, + "uri": { + "description": "The article URI.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2BatchUpdateEntityTypesResponse": { "description": "The response message for EntityTypes.BatchUpdateEntityTypes.", "id": "GoogleCloudDialogflowV2BatchUpdateEntityTypesResponse", @@ -8103,6 +9718,63 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2FaqAnswer": { + "description": "Represents answer from \"frequently asked questions\".", + "id": "GoogleCloudDialogflowV2FaqAnswer", + "properties": { + "answer": { + "description": "The piece of text from the `source` knowledge base document.", + "type": "string" + }, + "answerRecord": { + "description": "The name of answer record, in the format of \"projects//locations//answerRecords/\"", + "type": "string" + }, + "confidence": { + "description": "The system's confidence score that this Knowledge answer is a good match for this conversational query, range from 0.0 (completely uncertain) to 1.0 (completely certain).", + "format": "float", + "type": "number" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "A map that contains metadata about the answer and the document from which it originates.", + "type": "object" + }, + "question": { + "description": "The corresponding FAQ question.", + "type": "string" + }, + "source": { + "description": "Indicates which Knowledge Document this answer was extracted from. Format: `projects//locations//agent/knowledgeBases//documents/`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2HumanAgentAssistantEvent": { + "description": "Represents a notification sent to Cloud Pub/Sub subscribers for human agent assistant events in a specific conversation.", + "id": "GoogleCloudDialogflowV2HumanAgentAssistantEvent", + "properties": { + "conversation": { + "description": "The conversation this notification refers to. Format: `projects//conversations/`.", + "type": "string" + }, + "participant": { + "description": "The participant that the suggestion is compiled for. Format: `projects//conversations//participants/`. It will not be set in legacy workflow.", + "type": "string" + }, + "suggestionResults": { + "description": "The suggestion results payload that this notification refers to.", + "items": { + "$ref": "GoogleCloudDialogflowV2SuggestionResult" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2Intent": { "description": "An intent categorizes an end-user's intention for one conversation turn. For each agent, you define many intents, where your combined intents can handle a complete conversation. When an end-user writes or says something, referred to as an end-user expression or end-user input, Dialogflow matches the end-user input to the best intent in your agent. Matching an intent is also known as intent classification. For more information, see the [intent guide](https://cloud.google.com/dialogflow/docs/intents-overview).", "id": "GoogleCloudDialogflowV2Intent", @@ -8146,6 +9818,10 @@ "description": "Required. The name of this intent.", "type": "string" }, + "endInteraction": { + "description": "Optional. Indicates that this intent ends an interaction. Some integrations (e.g., Actions on Google or Dialogflow phone gateway) use this information to close interaction with an end user. Default is false.", + "type": "boolean" + }, "events": { "description": "Optional. The collection of event names that trigger the intent. If the collection of input contexts is not empty, all of the contexts must be present in the active user session for an event to trigger this intent. Event names are limited to 150 characters.", "items": { @@ -8171,6 +9847,10 @@ "description": "Optional. Indicates whether this is a fallback intent.", "type": "boolean" }, + "liveAgentHandoff": { + "description": "Optional. Indicates that a live agent should be brought in to handle the interaction with the user. In most cases, when you set this flag to true, you would also want to set end_interaction to true as well. Default is false.", + "type": "boolean" + }, "messages": { "description": "Optional. The collection of rich messages corresponding to the `Response` field in the Dialogflow console.", "items": { @@ -8995,10 +10675,34 @@ "text": { "description": "Required. The text for this part.", "type": "string" - }, - "userDefined": { - "description": "Optional. Indicates whether the text was manually annotated. This field is set to true when the Dialogflow Console is used to manually annotate the part. When creating an annotated part with the API, you must set this to true.", - "type": "boolean" + }, + "userDefined": { + "description": "Optional. Indicates whether the text was manually annotated. This field is set to true when the Dialogflow Console is used to manually annotate the part. When creating an annotated part with the API, you must set this to true.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2KnowledgeOperationMetadata": { + "description": "Metadata in google::longrunning::Operation for Knowledge operations.", + "id": "GoogleCloudDialogflowV2KnowledgeOperationMetadata", + "properties": { + "state": { + "description": "Output only. The current state of this operation.", + "enum": [ + "STATE_UNSPECIFIED", + "PENDING", + "RUNNING", + "DONE" + ], + "enumDescriptions": [ + "State unspecified.", + "The operation has been created.", + "The operation is currently running.", + "The operation is done, either cancelled or completed." + ], + "readOnly": true, + "type": "string" } }, "type": "object" @@ -9243,6 +10947,71 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2SuggestArticlesResponse": { + "description": "The response message for Participants.SuggestArticles.", + "id": "GoogleCloudDialogflowV2SuggestArticlesResponse", + "properties": { + "articleAnswers": { + "description": "Articles ordered by score in descending order.", + "items": { + "$ref": "GoogleCloudDialogflowV2ArticleAnswer" + }, + "type": "array" + }, + "contextSize": { + "description": "Number of messages prior to and including latest_message to compile the suggestion. It may be smaller than the SuggestArticlesRequest.context_size field in the request if there aren't that many messages in the conversation.", + "format": "int32", + "type": "integer" + }, + "latestMessage": { + "description": "The name of the latest conversation message used to compile suggestion for. Format: `projects//locations//conversations//messages/`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2SuggestFaqAnswersResponse": { + "description": "The request message for Participants.SuggestFaqAnswers.", + "id": "GoogleCloudDialogflowV2SuggestFaqAnswersResponse", + "properties": { + "contextSize": { + "description": "Number of messages prior to and including latest_message to compile the suggestion. It may be smaller than the SuggestFaqAnswersRequest.context_size field in the request if there aren't that many messages in the conversation.", + "format": "int32", + "type": "integer" + }, + "faqAnswers": { + "description": "Answers extracted from FAQ documents.", + "items": { + "$ref": "GoogleCloudDialogflowV2FaqAnswer" + }, + "type": "array" + }, + "latestMessage": { + "description": "The name of the latest conversation message used to compile suggestion for. Format: `projects//locations//conversations//messages/`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2SuggestionResult": { + "description": "One response of different type of suggestion response which is used in the response of Participants.AnalyzeContent and Participants.AnalyzeContent, as well as HumanAgentAssistantEvent.", + "id": "GoogleCloudDialogflowV2SuggestionResult", + "properties": { + "error": { + "$ref": "GoogleRpcStatus", + "description": "Error status if the request failed." + }, + "suggestArticlesResponse": { + "$ref": "GoogleCloudDialogflowV2SuggestArticlesResponse", + "description": "SuggestArticlesResponse if request is for ARTICLE_SUGGESTION." + }, + "suggestFaqAnswersResponse": { + "$ref": "GoogleCloudDialogflowV2SuggestFaqAnswersResponse", + "description": "SuggestFaqAnswersResponse if request is for FAQ_ANSWER." + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2WebhookRequest": { "description": "The request message for a webhook call.", "id": "GoogleCloudDialogflowV2WebhookRequest", @@ -9338,71 +11107,396 @@ "description": "Optional. The URI of the agent's avatar. Avatars are used throughout the Dialogflow console and in the self-hosted [Web Demo](https://cloud.google.com/dialogflow/docs/integrations/web-demo) integration.", "type": "string" }, - "classificationThreshold": { - "description": "Optional. To filter out false positive results and still get variety in matched natural language inputs for your agent, you can tune the machine learning classification threshold. If the returned score value is less than the threshold value, then a fallback intent will be triggered or, if there are no fallback intents defined, no intent will be triggered. The score values range from 0.0 (completely uncertain) to 1.0 (completely certain). If set to 0.0, the default of 0.3 is used.", - "format": "float", - "type": "number" + "classificationThreshold": { + "description": "Optional. To filter out false positive results and still get variety in matched natural language inputs for your agent, you can tune the machine learning classification threshold. If the returned score value is less than the threshold value, then a fallback intent will be triggered or, if there are no fallback intents defined, no intent will be triggered. The score values range from 0.0 (completely uncertain) to 1.0 (completely certain). If set to 0.0, the default of 0.3 is used.", + "format": "float", + "type": "number" + }, + "defaultLanguageCode": { + "description": "Required. The default language of the agent as a language tag. See [Language Support](https://cloud.google.com/dialogflow/docs/reference/language) for a list of the currently supported language codes. This field cannot be set by the `Update` method.", + "type": "string" + }, + "description": { + "description": "Optional. The description of this agent. The maximum length is 500 characters. If exceeded, the request is rejected.", + "type": "string" + }, + "displayName": { + "description": "Required. The name of this agent.", + "type": "string" + }, + "enableLogging": { + "description": "Optional. Determines whether this agent should log conversation queries.", + "type": "boolean" + }, + "matchMode": { + "description": "Optional. Determines how intents are detected from user queries.", + "enum": [ + "MATCH_MODE_UNSPECIFIED", + "MATCH_MODE_HYBRID", + "MATCH_MODE_ML_ONLY" + ], + "enumDescriptions": [ + "Not specified.", + "Best for agents with a small number of examples in intents and/or wide use of templates syntax and composite entities.", + "Can be used for agents with a large number of examples in intents, especially the ones using @sys.any or very large custom entities." + ], + "type": "string" + }, + "parent": { + "description": "Required. The project of this agent. Format: `projects/` or `projects//locations/`", + "type": "string" + }, + "supportedLanguageCodes": { + "description": "Optional. The list of all languages supported by this agent (except for the `default_language_code`).", + "items": { + "type": "string" + }, + "type": "array" + }, + "tier": { + "description": "Optional. The agent tier. If not specified, TIER_STANDARD is assumed.", + "enum": [ + "TIER_UNSPECIFIED", + "TIER_STANDARD", + "TIER_ENTERPRISE", + "TIER_ENTERPRISE_PLUS" + ], + "enumDescriptions": [ + "Not specified. This value should never be used.", + "Standard tier.", + "Enterprise tier (Essentials).", + "Enterprise tier (Plus)." + ], + "type": "string" + }, + "timeZone": { + "description": "Required. The time zone of this agent from the [time zone database](https://www.iana.org/time-zones), e.g., America/New_York, Europe/Paris.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1AgentAssistantFeedback": { + "description": "Detail feedback of Agent Assistant result.", + "id": "GoogleCloudDialogflowV2beta1AgentAssistantFeedback", + "properties": { + "answerRelevance": { + "description": "Optional. Whether or not the suggested answer is relevant. For example: * Query: \"Can I change my mailing address?\" * Suggested document says: \"Items must be returned/exchanged within 60 days of the purchase date.\" * answer_relevance: AnswerRelevance.IRRELEVANT", + "enum": [ + "ANSWER_RELEVANCE_UNSPECIFIED", + "IRRELEVANT", + "RELEVANT" + ], + "enumDescriptions": [ + "Answer relevance unspecified.", + "Answer is irrelevant to query.", + "Answer is relevant to query." + ], + "type": "string" + }, + "documentCorrectness": { + "description": "Optional. Whether or not the information in the document is correct. For example: * Query: \"Can I return the package in 2 days once received?\" * Suggested document says: \"Items must be returned/exchanged within 60 days of the purchase date.\" * Ground truth: \"No return or exchange is allowed.\" * [document_correctness]: INCORRECT", + "enum": [ + "DOCUMENT_CORRECTNESS_UNSPECIFIED", + "INCORRECT", + "CORRECT" + ], + "enumDescriptions": [ + "Document correctness unspecified.", + "Information in document is incorrect.", + "Information in document is correct." + ], + "type": "string" + }, + "documentEfficiency": { + "description": "Optional. Whether or not the suggested document is efficient. For example, if the document is poorly written, hard to understand, hard to use or too long to find useful information, document_efficiency is DocumentEfficiency.INEFFICIENT.", + "enum": [ + "DOCUMENT_EFFICIENCY_UNSPECIFIED", + "INEFFICIENT", + "EFFICIENT" + ], + "enumDescriptions": [ + "Document efficiency unspecified.", + "Document is inefficient.", + "Document is efficient." + ], + "type": "string" + }, + "summarizationFeedback": { + "$ref": "GoogleCloudDialogflowV2beta1AgentAssistantFeedbackSummarizationFeedback", + "description": "Feedback for conversation summarization." + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1AgentAssistantFeedbackSummarizationFeedback": { + "description": "Feedback for conversation summarization.", + "id": "GoogleCloudDialogflowV2beta1AgentAssistantFeedbackSummarizationFeedback", + "properties": { + "startTimestamp": { + "description": "Timestamp when composing of the summary starts.", + "format": "google-datetime", + "type": "string" + }, + "submitTimestamp": { + "description": "Timestamp when the summary was submitted.", + "format": "google-datetime", + "type": "string" + }, + "summaryText": { + "description": "Text of actual submitted summary.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1AgentAssistantRecord": { + "description": "Represents a record of a human agent assistant answer.", + "id": "GoogleCloudDialogflowV2beta1AgentAssistantRecord", + "properties": { + "articleSuggestionAnswer": { + "$ref": "GoogleCloudDialogflowV2beta1ArticleAnswer", + "description": "Output only. The article suggestion answer.", + "readOnly": true + }, + "faqAnswer": { + "$ref": "GoogleCloudDialogflowV2beta1FaqAnswer", + "description": "Output only. The FAQ answer.", + "readOnly": true + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1AnalyzeContentRequest": { + "description": "The request message for Participants.AnalyzeContent.", + "id": "GoogleCloudDialogflowV2beta1AnalyzeContentRequest", + "properties": { + "eventInput": { + "$ref": "GoogleCloudDialogflowV2beta1EventInput", + "description": "An input event to send to Dialogflow." + }, + "messageSendTime": { + "description": "Optional. The send time of the message from end user or human agent's perspective. It is used for identifying the same message under one participant. Given two messages under the same participant: - If send time are different regardless of whether the content of the messages are exactly the same, the conversation will regard them as two distinct messages sent by the participant. - If send time is the same regardless of whether the content of the messages are exactly the same, the conversation will regard them as same message, and ignore the message received later. If the value is not provided, a new request will always be regarded as a new message without any de-duplication.", + "format": "google-datetime", + "type": "string" + }, + "queryParams": { + "$ref": "GoogleCloudDialogflowV2beta1QueryParameters", + "description": "Parameters for a Dialogflow virtual-agent query." + }, + "replyAudioConfig": { + "$ref": "GoogleCloudDialogflowV2beta1OutputAudioConfig", + "description": "Speech synthesis configuration. The speech synthesis settings for a virtual agent that may be configured for the associated conversation profile are not used when calling AnalyzeContent. If this configuration is not supplied, speech synthesis is disabled." + }, + "requestId": { + "description": "A unique identifier for this request. Restricted to 36 ASCII characters. A random UUID is recommended. This request is only idempotent if a `request_id` is provided.", + "type": "string" + }, + "textInput": { + "$ref": "GoogleCloudDialogflowV2beta1TextInput", + "description": "The natural language text to be processed." + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1AnalyzeContentResponse": { + "description": "The response message for Participants.AnalyzeContent.", + "id": "GoogleCloudDialogflowV2beta1AnalyzeContentResponse", + "properties": { + "automatedAgentReply": { + "$ref": "GoogleCloudDialogflowV2beta1AutomatedAgentReply", + "description": "Optional. Only set if a Dialogflow automated agent has responded. Note that: AutomatedAgentReply.detect_intent_response.output_audio and AutomatedAgentReply.detect_intent_response.output_audio_config are always empty, use reply_audio instead." + }, + "dtmfParameters": { + "$ref": "GoogleCloudDialogflowV2beta1DtmfParameters", + "description": "Indicates the parameters of DTMF." + }, + "endUserSuggestionResults": { + "description": "The suggestions for end user. The order is the same as HumanAgentAssistantConfig.SuggestionConfig.feature_configs of HumanAgentAssistantConfig.end_user_suggestion_config.", + "items": { + "$ref": "GoogleCloudDialogflowV2beta1SuggestionResult" + }, + "type": "array" + }, + "humanAgentSuggestionResults": { + "description": "The suggestions for most recent human agent. The order is the same as HumanAgentAssistantConfig.SuggestionConfig.feature_configs of HumanAgentAssistantConfig.human_agent_suggestion_config.", + "items": { + "$ref": "GoogleCloudDialogflowV2beta1SuggestionResult" + }, + "type": "array" + }, + "message": { + "$ref": "GoogleCloudDialogflowV2beta1Message", + "description": "Output only. Message analyzed by CCAI." + }, + "replyAudio": { + "$ref": "GoogleCloudDialogflowV2beta1OutputAudio", + "description": "Optional. The audio data bytes encoded as specified in the request. This field is set if: - `reply_audio_config` was specified in the request, or - The automated agent responded with audio to play to the user. In such case, `reply_audio.config` contains settings used to synthesize the speech. In some scenarios, multiple output audio fields may be present in the response structure. In these cases, only the top-most-level audio output has content." + }, + "replyText": { + "description": "Output only. The output text content. This field is set if the automated agent responded with text to show to the user.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1AnnotatedMessagePart": { + "description": "Represents a part of a message possibly annotated with an entity. The part can be an entity or purely a part of the message between two entities or message start/end.", + "id": "GoogleCloudDialogflowV2beta1AnnotatedMessagePart", + "properties": { + "entityType": { + "description": "Optional. The [Dialogflow system entity type](https://cloud.google.com/dialogflow/docs/reference/system-entities) of this message part. If this is empty, Dialogflow could not annotate the phrase part with a system entity.", + "type": "string" + }, + "formattedValue": { + "description": "Optional. The [Dialogflow system entity formatted value ](https://cloud.google.com/dialogflow/docs/reference/system-entities) of this message part. For example for a system entity of type `@sys.unit-currency`, this may contain: { \"amount\": 5, \"currency\": \"USD\" } ", + "type": "any" + }, + "text": { + "description": "Required. A part of a message possibly annotated with an entity.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1AnswerFeedback": { + "description": "Represents feedback the customer has about the quality & correctness of a certain answer in a conversation.", + "id": "GoogleCloudDialogflowV2beta1AnswerFeedback", + "properties": { + "agentAssistantDetailFeedback": { + "$ref": "GoogleCloudDialogflowV2beta1AgentAssistantFeedback", + "description": "Optional. Detail feedback of agent assistant suggestions." + }, + "clickTime": { + "description": "Time when the answer/item was clicked.", + "format": "google-datetime", + "type": "string" + }, + "clicked": { + "description": "Indicates whether the answer/item was clicked by the human agent or not. Default to false.", + "type": "boolean" + }, + "correctnessLevel": { + "description": "The correctness level of the specific answer.", + "enum": [ + "CORRECTNESS_LEVEL_UNSPECIFIED", + "NOT_CORRECT", + "PARTIALLY_CORRECT", + "FULLY_CORRECT" + ], + "enumDescriptions": [ + "Correctness level unspecified.", + "Answer is totally wrong.", + "Answer is partially correct.", + "Answer is fully correct." + ], + "type": "string" + }, + "displayTime": { + "description": "Time when the answer/item was displayed.", + "format": "google-datetime", + "type": "string" + }, + "displayed": { + "description": "Indicates whether the answer/item was displayed to the human agent in the agent desktop UI. Default to false.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1AnswerRecord": { + "description": "Answer records are records to manage answer history and feedbacks for Dialogflow. Currently, answer record includes: - human agent assistant article suggestion - human agent assistant faq article It doesn't include: - `DetectIntent` intent matching - `DetectIntent` knowledge Answer records are not related to the conversation history in the Dialogflow Console. A Record is generated even when the end-user disables conversation history in the console. Records are created when there's a human agent assistant suggestion generated. A typical workflow for customers provide feedback to an answer is: 1. For human agent assistant, customers get suggestion via ListSuggestions API. Together with the answers, AnswerRecord.name are returned to the customers. 2. The customer uses the AnswerRecord.name to call the UpdateAnswerRecord method to send feedback about a specific answer that they believe is wrong.", + "id": "GoogleCloudDialogflowV2beta1AnswerRecord", + "properties": { + "agentAssistantRecord": { + "$ref": "GoogleCloudDialogflowV2beta1AgentAssistantRecord", + "description": "Output only. The record for human agent assistant." + }, + "answerFeedback": { + "$ref": "GoogleCloudDialogflowV2beta1AnswerFeedback", + "description": "Optional. The AnswerFeedback for this record. You can set this with AnswerRecords.UpdateAnswerRecord in order to give us feedback about this answer." + }, + "name": { + "description": "The unique identifier of this answer record. Required for AnswerRecords.UpdateAnswerRecord method. Format: `projects//locations//answerRecords/`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1ArticleAnswer": { + "description": "Represents article answer.", + "id": "GoogleCloudDialogflowV2beta1ArticleAnswer", + "properties": { + "answerRecord": { + "description": "The name of answer record, in the format of \"projects//locations//answerRecords/\"", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "A map that contains metadata about the answer and the document from which it originates.", + "type": "object" + }, + "snippets": { + "description": "Output only. Article snippets.", + "items": { + "type": "string" + }, + "type": "array" }, - "defaultLanguageCode": { - "description": "Required. The default language of the agent as a language tag. See [Language Support](https://cloud.google.com/dialogflow/docs/reference/language) for a list of the currently supported language codes. This field cannot be set by the `Update` method.", + "title": { + "description": "The article title.", "type": "string" }, - "description": { - "description": "Optional. The description of this agent. The maximum length is 500 characters. If exceeded, the request is rejected.", + "uri": { + "description": "The article URI.", "type": "string" - }, - "displayName": { - "description": "Required. The name of this agent.", + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1AutomatedAgentConfig": { + "description": "Defines the Automated Agent to connect to a conversation.", + "id": "GoogleCloudDialogflowV2beta1AutomatedAgentConfig", + "properties": { + "agent": { + "description": "Required. ID of the Dialogflow agent environment to use. This project needs to either be the same project as the conversation or you need to grant `service-@gcp-sa-dialogflow.iam.gserviceaccount.com` the `Dialogflow API Service Agent` role in this project. - For ES agents, use format: `projects//locations//agent/environments/`. If environment is not specified, the default `draft` environment is used. Refer to [DetectIntentRequest](/dialogflow/docs/reference/rpc/google.cloud.dialogflow.v2beta1#google.cloud.dialogflow.v2beta1.DetectIntentRequest) for more details. - For CX agents, use format `projects//locations//agents//environments/`. If environment is not specified, the default `draft` environment is used.", "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1AutomatedAgentReply": { + "description": "Represents a response from an automated agent.", + "id": "GoogleCloudDialogflowV2beta1AutomatedAgentReply", + "properties": { + "cxSessionParameters": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "The collection of current Dialogflow CX agent session parameters at the time of this response.", + "type": "object" }, - "enableLogging": { - "description": "Optional. Determines whether this agent should log conversation queries.", - "type": "boolean" + "detectIntentResponse": { + "$ref": "GoogleCloudDialogflowV2beta1DetectIntentResponse", + "description": "Response of the Dialogflow Sessions.DetectIntent call." }, - "matchMode": { - "description": "Optional. Determines how intents are detected from user queries.", - "enum": [ - "MATCH_MODE_UNSPECIFIED", - "MATCH_MODE_HYBRID", - "MATCH_MODE_ML_ONLY" - ], - "enumDescriptions": [ - "Not specified.", - "Best for agents with a small number of examples in intents and/or wide use of templates syntax and composite entities.", - "Can be used for agents with a large number of examples in intents, especially the ones using @sys.any or very large custom entities." - ], + "event": { + "description": "Event name if an event is triggered for the query.", "type": "string" }, - "parent": { - "description": "Required. The project of this agent. Format: `projects/` or `projects//locations/`", + "intent": { + "description": "Name of the intent if an intent is matched for the query. For a V2 query, the value format is `projects//locations/ /agent/intents/`. For a V3 query, the value format is `projects//locations/ /agents//intents/`.", "type": "string" }, - "supportedLanguageCodes": { - "description": "Optional. The list of all languages supported by this agent (except for the `default_language_code`).", + "responseMessages": { + "description": "Response messages from the automated agent.", "items": { - "type": "string" + "$ref": "GoogleCloudDialogflowV2beta1ResponseMessage" }, "type": "array" - }, - "tier": { - "description": "Optional. The agent tier. If not specified, TIER_STANDARD is assumed.", - "enum": [ - "TIER_UNSPECIFIED", - "TIER_STANDARD", - "TIER_ENTERPRISE", - "TIER_ENTERPRISE_PLUS" - ], - "enumDescriptions": [ - "Not specified. This value should never be used.", - "Standard tier.", - "Enterprise tier (Essentials).", - "Enterprise tier (Plus)." - ], - "type": "string" - }, - "timeZone": { - "description": "Required. The time zone of this agent from the [time zone database](https://www.iana.org/time-zones), e.g., America/New_York, Europe/Paris.", - "type": "string" } }, "type": "object" @@ -9425,6 +11519,34 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2beta1BatchCreateMessagesRequest": { + "description": "The request message for Conversations.BatchCreateMessagesRequest.", + "id": "GoogleCloudDialogflowV2beta1BatchCreateMessagesRequest", + "properties": { + "requests": { + "description": "Required. A maximum of 1000 Messages can be created in a batch. CreateMessageRequest.message.send_time is required. All created messages will have identical Message.create_time.", + "items": { + "$ref": "GoogleCloudDialogflowV2beta1CreateMessageRequest" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1BatchCreateMessagesResponse": { + "description": "The request message for Conversations.BatchCreateMessagesResponse.", + "id": "GoogleCloudDialogflowV2beta1BatchCreateMessagesResponse", + "properties": { + "messages": { + "description": "Messages created.", + "items": { + "$ref": "GoogleCloudDialogflowV2beta1Message" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2beta1BatchDeleteEntitiesRequest": { "description": "The request message for EntityTypes.BatchDeleteEntities.", "id": "GoogleCloudDialogflowV2beta1BatchDeleteEntitiesRequest", @@ -9556,52 +11678,275 @@ ], "type": "string" }, - "languageCode": { - "description": "Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).", - "type": "string" + "languageCode": { + "description": "Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).", + "type": "string" + }, + "updateMask": { + "description": "Optional. The mask to control which fields get updated.", + "format": "google-fieldmask", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse": { + "description": "The response message for Intents.BatchUpdateIntents.", + "id": "GoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse", + "properties": { + "intents": { + "description": "The collection of updated or created intents.", + "items": { + "$ref": "GoogleCloudDialogflowV2beta1Intent" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1CompileSuggestionRequest": { + "description": "The request message for Participants.CompileSuggestion.", + "id": "GoogleCloudDialogflowV2beta1CompileSuggestionRequest", + "properties": { + "contextSize": { + "description": "Optional. Max number of messages prior to and including [latest_message] to use as context when compiling the suggestion. If zero or less than zero, 20 is used.", + "format": "int32", + "type": "integer" + }, + "latestMessage": { + "description": "Optional. The name of the latest conversation message to compile suggestion for. If empty, it will be the latest message of the conversation. Format: `projects//locations//conversations//messages/`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1CompileSuggestionResponse": { + "description": "The response message for Participants.CompileSuggestion.", + "id": "GoogleCloudDialogflowV2beta1CompileSuggestionResponse", + "properties": { + "contextSize": { + "description": "Number of messages prior to and including latest_message to compile the suggestion. It may be smaller than the CompileSuggestionRequest.context_size field in the request if there aren't that many messages in the conversation.", + "format": "int32", + "type": "integer" + }, + "latestMessage": { + "description": "The name of the latest conversation message used to compile suggestion for. Format: `projects//locations//conversations//messages/`.", + "type": "string" + }, + "suggestion": { + "$ref": "GoogleCloudDialogflowV2beta1Suggestion", + "description": "The compiled suggestion." + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1CompleteConversationRequest": { + "description": "The request message for Conversations.CompleteConversation.", + "id": "GoogleCloudDialogflowV2beta1CompleteConversationRequest", + "properties": {}, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1Context": { + "description": "Dialogflow contexts are similar to natural language context. If a person says to you \"they are orange\", you need context in order to understand what \"they\" is referring to. Similarly, for Dialogflow to handle an end-user expression like that, it needs to be provided with context in order to correctly match an intent. Using contexts, you can control the flow of a conversation. You can configure contexts for an intent by setting input and output contexts, which are identified by string names. When an intent is matched, any configured output contexts for that intent become active. While any contexts are active, Dialogflow is more likely to match intents that are configured with input contexts that correspond to the currently active contexts. For more information about context, see the [Contexts guide](https://cloud.google.com/dialogflow/docs/contexts-overview).", + "id": "GoogleCloudDialogflowV2beta1Context", + "properties": { + "lifespanCount": { + "description": "Optional. The number of conversational query requests after which the context expires. The default is `0`. If set to `0`, the context expires immediately. Contexts expire automatically after 20 minutes if there are no matching queries.", + "format": "int32", + "type": "integer" + }, + "name": { + "description": "Required. The unique identifier of the context. Supported formats: - `projects//agent/sessions//contexts/`, - `projects//locations//agent/sessions//contexts/`, - `projects//agent/environments//users//sessions//contexts/`, - `projects//locations//agent/environments//users//sessions//contexts/`, The `Context ID` is always converted to lowercase, may only contain characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. The following context names are reserved for internal use by Dialogflow. You should not use these contexts or create contexts with these names: * `__system_counters__` * `*_id_dialog_context` * `*_dialog_params_size`", + "type": "string" + }, + "parameters": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Optional. The collection of parameters associated with this context. Depending on your protocol or client library language, this is a map, associative array, symbol table, dictionary, or JSON object composed of a collection of (MapKey, MapValue) pairs: - MapKey type: string - MapKey value: parameter name - MapValue type: - If parameter's entity type is a composite entity: map - Else: depending on parameter value type, could be one of string, number, boolean, null, list or map - MapValue value: - If parameter's entity type is a composite entity: map from composite entity property names to property values - Else: parameter value", + "type": "object" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1Conversation": { + "description": "Represents a conversation. A conversation is an interaction between an agent, including live agents and Dialogflow agents, and a support customer. Conversations can include phone calls and text-based chat sessions.", + "id": "GoogleCloudDialogflowV2beta1Conversation", + "properties": { + "conversationProfile": { + "description": "Required. The Conversation Profile to be used to configure this Conversation. This field cannot be updated. Format: `projects//locations//conversationProfiles/`.", + "type": "string" + }, + "conversationStage": { + "description": "The stage of a conversation. It indicates whether the virtual agent or a human agent is handling the conversation. If the conversation is created with the conversation profile that has Dialogflow config set, defaults to ConversationStage.VIRTUAL_AGENT_STAGE; Otherwise, defaults to ConversationStage.HUMAN_ASSIST_STAGE. If the conversation is created with the conversation profile that has Dialogflow config set but explicitly sets conversation_stage to ConversationStage.HUMAN_ASSIST_STAGE, it skips ConversationStage.VIRTUAL_AGENT_STAGE stage and directly goes to ConversationStage.HUMAN_ASSIST_STAGE.", + "enum": [ + "CONVERSATION_STAGE_UNSPECIFIED", + "VIRTUAL_AGENT_STAGE", + "HUMAN_ASSIST_STAGE" + ], + "enumDescriptions": [ + "Unknown. Should never be used after a conversation is successfully created.", + "The conversation should return virtual agent responses into the conversation.", + "The conversation should not provide responses, just listen and provide suggestions." + ], + "type": "string" + }, + "endTime": { + "description": "Output only. The time the conversation was finished.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "lifecycleState": { + "description": "Output only. The current state of the Conversation.", + "enum": [ + "LIFECYCLE_STATE_UNSPECIFIED", + "IN_PROGRESS", + "COMPLETED" + ], + "enumDescriptions": [ + "Unknown.", + "Conversation is currently open for media analysis.", + "Conversation has been completed." + ], + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Output only. The unique identifier of this conversation. Format: `projects//locations//conversations/`.", + "readOnly": true, + "type": "string" + }, + "phoneNumber": { + "$ref": "GoogleCloudDialogflowV2beta1ConversationPhoneNumber", + "description": "Output only. Required if the conversation is to be connected over telephony.", + "readOnly": true + }, + "startTime": { + "description": "Output only. The time the conversation was started.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1ConversationEvent": { + "description": "Represents a notification sent to Pub/Sub subscribers for conversation lifecycle events.", + "id": "GoogleCloudDialogflowV2beta1ConversationEvent", + "properties": { + "conversation": { + "description": "Required. The unique identifier of the conversation this notification refers to. Format: `projects//conversations/`.", + "type": "string" + }, + "errorStatus": { + "$ref": "GoogleRpcStatus", + "description": "Optional. More detailed information about an error. Only set for type UNRECOVERABLE_ERROR_IN_PHONE_CALL." + }, + "newMessagePayload": { + "$ref": "GoogleCloudDialogflowV2beta1Message", + "description": "Payload of NEW_MESSAGE event." + }, + "type": { + "description": "Required. The type of the event that this notification refers to.", + "enum": [ + "TYPE_UNSPECIFIED", + "CONVERSATION_STARTED", + "CONVERSATION_FINISHED", + "NEW_MESSAGE", + "UNRECOVERABLE_ERROR" + ], + "enumDescriptions": [ + "Type not set.", + "A new conversation has been opened. This is fired when a telephone call is answered, or a conversation is created via the API.", + "An existing conversation has closed. This is fired when a telephone call is terminated, or a conversation is closed via the API.", + "An existing conversation has received a new message, either from API or telephony. It is configured in ConversationProfile.new_message_event_notification_config", + "Unrecoverable error during a telephone call. In general non-recoverable errors only occur if something was misconfigured in the ConversationProfile corresponding to the call. After a non-recoverable error, Dialogflow may stop responding. We don't fire this event: * in an API call because we can directly return the error, or, * when we can recover from an error." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1ConversationPhoneNumber": { + "description": "Represents a phone number for telephony integration. It allows for connecting a particular conversation over telephony.", + "id": "GoogleCloudDialogflowV2beta1ConversationPhoneNumber", + "properties": { + "phoneNumber": { + "description": "Output only. The phone number to connect to this conversation.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1ConversationProfile": { + "description": "Defines the services to connect to incoming Dialogflow conversations.", + "id": "GoogleCloudDialogflowV2beta1ConversationProfile", + "properties": { + "automatedAgentConfig": { + "$ref": "GoogleCloudDialogflowV2beta1AutomatedAgentConfig", + "description": "Configuration for an automated agent to use with this profile." + }, + "createTime": { + "description": "Output only. Create time of the conversation profile.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "Required. Human readable name for this profile. Max length 1024 bytes.", + "type": "string" + }, + "humanAgentAssistantConfig": { + "$ref": "GoogleCloudDialogflowV2beta1HumanAgentAssistantConfig", + "description": "Configuration for agent assistance to use with this profile." + }, + "languageCode": { + "description": "Language code for the conversation profile. If not specified, the language is en-US. Language at ConversationProfile should be set for all non en-us languages.", + "type": "string" + }, + "loggingConfig": { + "$ref": "GoogleCloudDialogflowV2beta1LoggingConfig", + "description": "Configuration for logging conversation lifecycle events." + }, + "name": { + "description": "The unique identifier of this conversation profile. Format: `projects//locations//conversationProfiles/`.", + "type": "string" + }, + "newMessageEventNotificationConfig": { + "$ref": "GoogleCloudDialogflowV2beta1NotificationConfig", + "description": "Configuration for publishing new message events. Event will be sent in format of ConversationEvent" }, - "updateMask": { - "description": "Optional. The mask to control which fields get updated.", - "format": "google-fieldmask", + "notificationConfig": { + "$ref": "GoogleCloudDialogflowV2beta1NotificationConfig", + "description": "Configuration for publishing conversation lifecycle events." + }, + "sttConfig": { + "$ref": "GoogleCloudDialogflowV2beta1SpeechToTextConfig", + "description": "Settings for speech transcription." + }, + "updateTime": { + "description": "Output only. Update time of the conversation profile.", + "format": "google-datetime", + "readOnly": true, "type": "string" } }, "type": "object" }, - "GoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse": { - "description": "The response message for Intents.BatchUpdateIntents.", - "id": "GoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse", - "properties": { - "intents": { - "description": "The collection of updated or created intents.", - "items": { - "$ref": "GoogleCloudDialogflowV2beta1Intent" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDialogflowV2beta1Context": { - "description": "Dialogflow contexts are similar to natural language context. If a person says to you \"they are orange\", you need context in order to understand what \"they\" is referring to. Similarly, for Dialogflow to handle an end-user expression like that, it needs to be provided with context in order to correctly match an intent. Using contexts, you can control the flow of a conversation. You can configure contexts for an intent by setting input and output contexts, which are identified by string names. When an intent is matched, any configured output contexts for that intent become active. While any contexts are active, Dialogflow is more likely to match intents that are configured with input contexts that correspond to the currently active contexts. For more information about context, see the [Contexts guide](https://cloud.google.com/dialogflow/docs/contexts-overview).", - "id": "GoogleCloudDialogflowV2beta1Context", + "GoogleCloudDialogflowV2beta1CreateMessageRequest": { + "description": "The request message to create one Message. Currently it is only used in BatchCreateMessagesRequest.", + "id": "GoogleCloudDialogflowV2beta1CreateMessageRequest", "properties": { - "lifespanCount": { - "description": "Optional. The number of conversational query requests after which the context expires. The default is `0`. If set to `0`, the context expires immediately. Contexts expire automatically after 20 minutes if there are no matching queries.", - "format": "int32", - "type": "integer" + "message": { + "$ref": "GoogleCloudDialogflowV2beta1Message", + "description": "Required. The message to create. Message.participant is required." }, - "name": { - "description": "Required. The unique identifier of the context. Supported formats: - `projects//agent/sessions//contexts/`, - `projects//locations//agent/sessions//contexts/`, - `projects//agent/environments//users//sessions//contexts/`, - `projects//locations//agent/environments//users//sessions//contexts/`, The `Context ID` is always converted to lowercase, may only contain characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. The following context names are reserved for internal use by Dialogflow. You should not use these contexts or create contexts with these names: * `__system_counters__` * `*_id_dialog_context` * `*_dialog_params_size`", + "parent": { + "description": "Required. Resource identifier of the conversation to create message. Format: `projects//locations//conversations/`.", "type": "string" - }, - "parameters": { - "additionalProperties": { - "description": "Properties of the object.", - "type": "any" - }, - "description": "Optional. The collection of parameters associated with this context. Depending on your protocol or client library language, this is a map, associative array, symbol table, dictionary, or JSON object composed of a collection of (MapKey, MapValue) pairs: - MapKey type: string - MapKey value: parameter name - MapValue type: - If parameter's entity type is a composite entity: map - Else: depending on parameter value type, could be one of string, number, boolean, null, list or map - MapValue value: - If parameter's entity type is a composite entity: map from composite entity property names to property values - Else: parameter value", - "type": "object" } }, "type": "object" @@ -9696,12 +12041,16 @@ "enum": [ "KNOWLEDGE_TYPE_UNSPECIFIED", "FAQ", - "EXTRACTIVE_QA" + "EXTRACTIVE_QA", + "ARTICLE_SUGGESTION", + "SMART_REPLY" ], "enumDescriptions": [ "The type is unspecified or arbitrary.", "The document content contains question and answer pairs as either HTML or CSV. Typical FAQ HTML formats are parsed accurately, but unusual formats may fail to be parsed. CSV must have questions in the first column and answers in the second, with no header. Because of this explicit format, they are always parsed accurately.", - "Documents for which unstructured text is extracted and used for question answering." + "Documents for which unstructured text is extracted and used for question answering.", + "The entire document content as a whole can be used for query results. Only for Contact Center Solutions on Dialogflow.", + "The legacy enum for agent-facing smart reply feature." ], "type": "string" }, @@ -9712,6 +12061,13 @@ "description": "Output only. The time and status of the latest reload. This reload may have been triggered automatically or manually and may not have succeeded.", "readOnly": true }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Metadata for the document. The metadata supports arbitrary key-value pairs. Suggested use cases include storing a document's title, an external URL distinct from the document's content_uri, etc. The max size of a `key` or a `value` of the metadata is 1024 bytes.", + "type": "object" + }, "mimeType": { "description": "Required. The MIME type of this document.", "type": "string" @@ -9744,6 +12100,17 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2beta1DtmfParameters": { + "description": "The message in the response that indicates the parameters of DTMF.", + "id": "GoogleCloudDialogflowV2beta1DtmfParameters", + "properties": { + "acceptsDtmfInput": { + "description": "Indicates whether DTMF input can be handled in the next request.", + "type": "boolean" + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2beta1EntityType": { "description": "Each intent parameter has a type, called the entity type, which dictates exactly how data from an end-user expression is extracted. Dialogflow provides predefined system entities that can match many common types of data. For example, there are system entities for matching dates, times, colors, email addresses, and so on. You can also create your own custom entities for matching custom data. For example, you could define a vegetable entity that can match the types of vegetables available for purchase with a grocery store agent. For more information, see the [Entity guide](https://cloud.google.com/dialogflow/docs/entities-overview).", "id": "GoogleCloudDialogflowV2beta1EntityType", @@ -9923,12 +12290,47 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2beta1FaqAnswer": { + "description": "Represents answer from \"frequently asked questions\".", + "id": "GoogleCloudDialogflowV2beta1FaqAnswer", + "properties": { + "answer": { + "description": "The piece of text from the `source` knowledge base document.", + "type": "string" + }, + "answerRecord": { + "description": "The name of answer record, in the format of \"projects//locations//answerRecords/\"", + "type": "string" + }, + "confidence": { + "description": "The system's confidence score that this Knowledge answer is a good match for this conversational query, range from 0.0 (completely uncertain) to 1.0 (completely certain).", + "format": "float", + "type": "number" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "A map that contains metadata about the answer and the document from which it originates.", + "type": "object" + }, + "question": { + "description": "The corresponding FAQ question.", + "type": "string" + }, + "source": { + "description": "Indicates which Knowledge Document this answer was extracted from. Format: `projects//locations//agent/knowledgeBases//documents/`.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2beta1Fulfillment": { "description": "By default, your agent responds to a matched intent with a static response. As an alternative, you can provide a more dynamic response by using fulfillment. When you enable fulfillment for an intent, Dialogflow responds to that intent by calling a service that you define. For example, if an end-user wants to schedule a haircut on Friday, your service can check your database and respond to the end-user with availability information for Friday. For more information, see the [fulfillment guide](https://cloud.google.com/dialogflow/docs/fulfillment-overview).", "id": "GoogleCloudDialogflowV2beta1Fulfillment", "properties": { "displayName": { - "description": "The human-readable name of the fulfillment, unique within the agent.", + "description": "The human-readable name of the fulfillment, unique within the agent. This field is not used for Fulfillment in an Environment.", "type": "string" }, "enabled": { @@ -9947,7 +12349,7 @@ "description": "Configuration for a generic web service." }, "name": { - "description": "Required. The unique identifier of the fulfillment. Supported formats: - `projects//agent/fulfillment` - `projects//locations//agent/fulfillment`", + "description": "Required. The unique identifier of the fulfillment. Supported formats: - `projects//agent/fulfillment` - `projects//locations//agent/fulfillment` This field is not used for Fulfillment in an Environment.", "type": "string" } }, @@ -9972,59 +12374,359 @@ }, "type": "object" }, - "GoogleCloudDialogflowV2beta1FulfillmentGenericWebService": { - "description": "Represents configuration for a generic web service. Dialogflow supports two mechanisms for authentications: - Basic authentication with username and password. - Authentication with additional authentication headers. More information could be found at: https://cloud.google.com/dialogflow/docs/fulfillment-configure.", - "id": "GoogleCloudDialogflowV2beta1FulfillmentGenericWebService", + "GoogleCloudDialogflowV2beta1FulfillmentGenericWebService": { + "description": "Represents configuration for a generic web service. Dialogflow supports two mechanisms for authentications: - Basic authentication with username and password. - Authentication with additional authentication headers. More information could be found at: https://cloud.google.com/dialogflow/docs/fulfillment-configure.", + "id": "GoogleCloudDialogflowV2beta1FulfillmentGenericWebService", + "properties": { + "isCloudFunction": { + "description": "Indicates if generic web service is created through Cloud Functions integration. Defaults to false.", + "type": "boolean" + }, + "password": { + "description": "The password for HTTP Basic authentication.", + "type": "string" + }, + "requestHeaders": { + "additionalProperties": { + "type": "string" + }, + "description": "The HTTP request headers to send together with fulfillment requests.", + "type": "object" + }, + "uri": { + "description": "Required. The fulfillment URI for receiving POST requests. It must use https protocol.", + "type": "string" + }, + "username": { + "description": "The user name for HTTP Basic authentication.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1GcsSource": { + "description": "Google Cloud Storage location for single input.", + "id": "GoogleCloudDialogflowV2beta1GcsSource", + "properties": { + "uri": { + "description": "Required. The Google Cloud Storage URIs for the inputs. A URI is of the form: gs://bucket/object-prefix-or-name Whether a prefix or name is used depends on the use case.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1GcsSources": { + "description": "Google Cloud Storage locations for the inputs.", + "id": "GoogleCloudDialogflowV2beta1GcsSources", + "properties": { + "uris": { + "description": "Required. Google Cloud Storage URIs for the inputs. A URI is of the form: gs://bucket/object-prefix-or-name Whether a prefix or name is used depends on the use case.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1HumanAgentAssistantConfig": { + "description": "Defines the Human Agent Assistant to connect to a conversation.", + "id": "GoogleCloudDialogflowV2beta1HumanAgentAssistantConfig", + "properties": { + "humanAgentSuggestionConfig": { + "$ref": "GoogleCloudDialogflowV2beta1HumanAgentAssistantConfigSuggestionConfig", + "description": "Configuration for agent assistance of human agent participant." + }, + "messageAnalysisConfig": { + "$ref": "GoogleCloudDialogflowV2beta1HumanAgentAssistantConfigMessageAnalysisConfig", + "description": "Configuration for message analysis." + }, + "notificationConfig": { + "$ref": "GoogleCloudDialogflowV2beta1NotificationConfig", + "description": "Pub/Sub topic on which to publish new agent assistant events." + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1HumanAgentAssistantConfigConversationModelConfig": { + "description": "Custom conversation models used in agent assist feature. Supported feature: ARTICLE_SUGGESTION, SMART_COMPOSE, SMART_REPLY.", + "id": "GoogleCloudDialogflowV2beta1HumanAgentAssistantConfigConversationModelConfig", + "properties": { + "model": { + "description": "Required. Conversation model resource name. Format: `projects//conversationModels/`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1HumanAgentAssistantConfigMessageAnalysisConfig": { + "description": "Configuration for analyses to run on each conversation message.", + "id": "GoogleCloudDialogflowV2beta1HumanAgentAssistantConfigMessageAnalysisConfig", + "properties": { + "enableSentimentAnalysis": { + "description": "Enable sentiment analysis in conversation messages on [agent assist stage](https://cloud.google.com/dialogflow/priv/docs/contact-center/basics#stages). If unspecified, defaults to false. Sentiment analysis inspects user input and identifies the prevailing subjective opinion, especially to determine a user's attitude as positive, negative, or neutral: https://cloud.google.com/natural-language/docs/basics#sentiment_analysis For Participants.StreamingAnalyzeContent method, result will be in StreamingAnalyzeContentResponse.message.SentimentAnalysisResult. For Participants.AnalyzeContent method, result will be in AnalyzeContentResponse.message.SentimentAnalysisResult For Conversations.ListMessages method, result will be in ListMessagesResponse.messages.SentimentAnalysisResult If Pub/Sub notification is configured, result will be in ConversationEvent.new_message_payload.SentimentAnalysisResult.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1HumanAgentAssistantConfigSuggestionConfig": { + "description": "Detail human agent assistant config.", + "id": "GoogleCloudDialogflowV2beta1HumanAgentAssistantConfigSuggestionConfig", + "properties": { + "featureConfigs": { + "description": "Configuration of different suggestion features. One feature can have only one config.", + "items": { + "$ref": "GoogleCloudDialogflowV2beta1HumanAgentAssistantConfigSuggestionFeatureConfig" + }, + "type": "array" + }, + "groupSuggestionResponses": { + "description": "If `group_suggestion_responses` is false, and there are multiple `feature_configs` in `event based suggestion` or StreamingAnalyzeContent, we will try to deliver suggestions to customers as soon as we get new suggestion. Different type of suggestions based on the same context will be in separate Pub/Sub event or `StreamingAnalyzeContentResponse`. If `group_suggestion_responses` set to true. All the suggestions to the same participant based on the same context will be grouped into a single Pub/Sub event or StreamingAnalyzeContentResponse.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1HumanAgentAssistantConfigSuggestionFeatureConfig": { + "description": "Config for suggestion features.", + "id": "GoogleCloudDialogflowV2beta1HumanAgentAssistantConfigSuggestionFeatureConfig", + "properties": { + "conversationModelConfig": { + "$ref": "GoogleCloudDialogflowV2beta1HumanAgentAssistantConfigConversationModelConfig", + "description": "Configs of custom conversation model." + }, + "enableEventBasedSuggestion": { + "description": "Automatically iterates all participants and tries to compile suggestions. Supported features: ARTICLE_SUGGESTION, FAQ, DIALOGFLOW_ASSIST.", + "type": "boolean" + }, + "queryConfig": { + "$ref": "GoogleCloudDialogflowV2beta1HumanAgentAssistantConfigSuggestionQueryConfig", + "description": "Configs of query." + }, + "suggestionFeature": { + "$ref": "GoogleCloudDialogflowV2beta1SuggestionFeature", + "description": "The suggestion feature." + }, + "suggestionTriggerSettings": { + "$ref": "GoogleCloudDialogflowV2beta1HumanAgentAssistantConfigSuggestionTriggerSettings", + "description": "Settings of suggestion trigger. Currently, only ARTICLE_SUGGESTION, FAQ, and DIALOGFLOW_ASSIST will use this field." + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1HumanAgentAssistantConfigSuggestionQueryConfig": { + "description": "Config for suggestion query.", + "id": "GoogleCloudDialogflowV2beta1HumanAgentAssistantConfigSuggestionQueryConfig", + "properties": { + "confidenceThreshold": { + "description": "Confidence threshold of query result. Agent Assist gives each suggestion a score in the range [0.0, 1.0], based on the relevance between the suggestion and the current conversation context. A score of 0.0 has no relevance, while a score of 1.0 has high relevance. Only suggestions with a score greater than or equal to the value of this field are included in the results. For a baseline model (the default), the recommended value is in the range [0.05, 0.1]. For a custom model, there is no recommended value. Tune this value by starting from a very low value and slowly increasing until you have desired results. If this field is not set, it is default to 0.0, which means that all suggestions are returned. Supported features: ARTICLE_SUGGESTION, FAQ, SMART_REPLY, SMART_COMPOSE.", + "format": "float", + "type": "number" + }, + "contextFilterSettings": { + "$ref": "GoogleCloudDialogflowV2beta1HumanAgentAssistantConfigSuggestionQueryConfigContextFilterSettings", + "description": "Determines how recent conversation context is filtered when generating suggestions. If unspecified, no messages will be dropped." + }, + "dialogflowQuerySource": { + "$ref": "GoogleCloudDialogflowV2beta1HumanAgentAssistantConfigSuggestionQueryConfigDialogflowQuerySource", + "description": "Query from Dialogflow agent. It is used by DIALOGFLOW_ASSIST." + }, + "documentQuerySource": { + "$ref": "GoogleCloudDialogflowV2beta1HumanAgentAssistantConfigSuggestionQueryConfigDocumentQuerySource", + "description": "Query from knowledge base document. It is used by: SMART_REPLY, SMART_COMPOSE." + }, + "knowledgeBaseQuerySource": { + "$ref": "GoogleCloudDialogflowV2beta1HumanAgentAssistantConfigSuggestionQueryConfigKnowledgeBaseQuerySource", + "description": "Query from knowledgebase. It is used by: ARTICLE_SUGGESTION, FAQ." + }, + "maxResults": { + "description": "Maximum number of results to return. Currently, if unset, defaults to 10. And the max number is 20.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1HumanAgentAssistantConfigSuggestionQueryConfigContextFilterSettings": { + "description": "Settings that determine how to filter recent conversation context when generating suggestions.", + "id": "GoogleCloudDialogflowV2beta1HumanAgentAssistantConfigSuggestionQueryConfigContextFilterSettings", + "properties": { + "dropHandoffMessages": { + "description": "If set to true, the last message from virtual agent (hand off message) and the message before it (trigger message of hand off) are dropped.", + "type": "boolean" + }, + "dropIvrMessages": { + "description": "If set to true, all messages from ivr stage are dropped.", + "type": "boolean" + }, + "dropVirtualAgentMessages": { + "description": "If set to true, all messages from virtual agent are dropped.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1HumanAgentAssistantConfigSuggestionQueryConfigDialogflowQuerySource": { + "description": "Dialogflow source setting. Supported feature: DIALOGFLOW_ASSIST.", + "id": "GoogleCloudDialogflowV2beta1HumanAgentAssistantConfigSuggestionQueryConfigDialogflowQuerySource", + "properties": { + "agent": { + "description": "Required. The name of a dialogflow virtual agent used for end user side intent detection and suggestion. Format: `projects//locations//agent`. When multiple agents are allowed in the same Dialogflow project.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1HumanAgentAssistantConfigSuggestionQueryConfigDocumentQuerySource": { + "description": "Document source settings. Supported features: SMART_REPLY, SMART_COMPOSE.", + "id": "GoogleCloudDialogflowV2beta1HumanAgentAssistantConfigSuggestionQueryConfigDocumentQuerySource", + "properties": { + "documents": { + "description": "Required. Knowledge documents to query from. Format: `projects//locations//knowledgeBases//documents/`. Currently, only one document is supported.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1HumanAgentAssistantConfigSuggestionQueryConfigKnowledgeBaseQuerySource": { + "description": "Knowledge base source settings. Supported features: ARTICLE_SUGGESTION, FAQ.", + "id": "GoogleCloudDialogflowV2beta1HumanAgentAssistantConfigSuggestionQueryConfigKnowledgeBaseQuerySource", + "properties": { + "knowledgeBases": { + "description": "Required. Knowledge bases to query. Format: `projects//locations//knowledgeBases/`. Currently, only one knowledge base is supported.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1HumanAgentAssistantConfigSuggestionTriggerSettings": { + "description": "Settings of suggestion trigger.", + "id": "GoogleCloudDialogflowV2beta1HumanAgentAssistantConfigSuggestionTriggerSettings", + "properties": { + "noSmallTalk": { + "description": "Do not trigger if last utterance is small talk.", + "type": "boolean" + }, + "onlyEndUser": { + "description": "Only trigger suggestion if participant role of last utterance is END_USER.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1HumanAgentAssistantEvent": { + "description": "Output only. Represents a notification sent to Pub/Sub subscribers for agent assistant events in a specific conversation.", + "id": "GoogleCloudDialogflowV2beta1HumanAgentAssistantEvent", + "properties": { + "conversation": { + "description": "The conversation this notification refers to. Format: `projects//conversations/`.", + "type": "string" + }, + "participant": { + "description": "The participant that the suggestion is compiled for. And This field is used to call Participants.ListSuggestions API. Format: `projects//conversations//participants/`. It will not be set in legacy workflow. HumanAgentAssistantConfig.name for more information.", + "type": "string" + }, + "suggestionResults": { + "description": "The suggestion results payload that this notification refers to. It will only be set when HumanAgentAssistantConfig.SuggestionConfig.group_suggestion_responses sets to true.", + "items": { + "$ref": "GoogleCloudDialogflowV2beta1SuggestionResult" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1ImportAgentRequest": { + "description": "The request message for Agents.ImportAgent.", + "id": "GoogleCloudDialogflowV2beta1ImportAgentRequest", + "properties": { + "agentContent": { + "description": "Zip compressed raw byte content for agent.", + "format": "byte", + "type": "string" + }, + "agentUri": { + "description": "The URI to a Google Cloud Storage file containing the agent to import. Note: The URI must start with \"gs://\".", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1ImportDocumentTemplate": { + "description": "The template used for importing documents.", + "id": "GoogleCloudDialogflowV2beta1ImportDocumentTemplate", "properties": { - "isCloudFunction": { - "description": "Indicates if generic web service is created through Cloud Functions integration. Defaults to false.", - "type": "boolean" - }, - "password": { - "description": "The password for HTTP Basic authentication.", - "type": "string" + "knowledgeTypes": { + "description": "Required. The knowledge type of document content.", + "items": { + "enum": [ + "KNOWLEDGE_TYPE_UNSPECIFIED", + "FAQ", + "EXTRACTIVE_QA", + "ARTICLE_SUGGESTION", + "SMART_REPLY" + ], + "enumDescriptions": [ + "The type is unspecified or arbitrary.", + "The document content contains question and answer pairs as either HTML or CSV. Typical FAQ HTML formats are parsed accurately, but unusual formats may fail to be parsed. CSV must have questions in the first column and answers in the second, with no header. Because of this explicit format, they are always parsed accurately.", + "Documents for which unstructured text is extracted and used for question answering.", + "The entire document content as a whole can be used for query results. Only for Contact Center Solutions on Dialogflow.", + "The legacy enum for agent-facing smart reply feature." + ], + "type": "string" + }, + "type": "array" }, - "requestHeaders": { + "metadata": { "additionalProperties": { "type": "string" }, - "description": "The HTTP request headers to send together with fulfillment requests.", + "description": "Metadata for the document. The metadata supports arbitrary key-value pairs. Suggested use cases include storing a document's title, an external URL distinct from the document's content_uri, etc. The max size of a `key` or a `value` of the metadata is 1024 bytes.", "type": "object" }, - "uri": { - "description": "Required. The fulfillment URI for receiving POST requests. It must use https protocol.", - "type": "string" - }, - "username": { - "description": "The user name for HTTP Basic authentication.", + "mimeType": { + "description": "Required. The MIME type of the document.", "type": "string" } }, "type": "object" }, - "GoogleCloudDialogflowV2beta1GcsSource": { - "description": "Google Cloud Storage location for single input.", - "id": "GoogleCloudDialogflowV2beta1GcsSource", + "GoogleCloudDialogflowV2beta1ImportDocumentsRequest": { + "description": "Request message for Documents.ImportDocuments.", + "id": "GoogleCloudDialogflowV2beta1ImportDocumentsRequest", "properties": { - "uri": { - "description": "Required. The Google Cloud Storage URIs for the inputs. A URI is of the form: gs://bucket/object-prefix-or-name Whether a prefix or name is used depends on the use case.", - "type": "string" + "documentTemplate": { + "$ref": "GoogleCloudDialogflowV2beta1ImportDocumentTemplate", + "description": "Required. Document template used for importing all the documents." + }, + "gcsSource": { + "$ref": "GoogleCloudDialogflowV2beta1GcsSources", + "description": "The Google Cloud Storage location for the documents. The path can include a wildcard. These URIs may have the forms `gs:///`. `gs:////*.`." + }, + "importGcsCustomMetadata": { + "description": "Whether to import custom metadata from Google Cloud Storage. Only valid when the document source is Google Cloud Storage URI.", + "type": "boolean" } }, "type": "object" }, - "GoogleCloudDialogflowV2beta1ImportAgentRequest": { - "description": "The request message for Agents.ImportAgent.", - "id": "GoogleCloudDialogflowV2beta1ImportAgentRequest", + "GoogleCloudDialogflowV2beta1ImportDocumentsResponse": { + "description": "Response message for Documents.ImportDocuments.", + "id": "GoogleCloudDialogflowV2beta1ImportDocumentsResponse", "properties": { - "agentContent": { - "description": "Zip compressed raw byte content for agent.", - "format": "byte", - "type": "string" - }, - "agentUri": { - "description": "The URI to a Google Cloud Storage file containing the agent to import. Note: The URI must start with \"gs://\".", - "type": "string" + "warnings": { + "description": "Includes details about skipped documents or any other warnings.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" } }, "type": "object" @@ -10057,6 +12759,10 @@ ], "type": "string" }, + "disableNoSpeechRecognizedEvent": { + "description": "Only used in Participants.AnalyzeContent and Participants.StreamingAnalyzeContent. If `false` and recognition doesn't return any result, trigger `NO_SPEECH_RECOGNIZED` event to Dialogflow agent.", + "type": "boolean" + }, "enableWordInfo": { "description": "If `true`, Dialogflow returns SpeechWordInfo in StreamingRecognitionResult with information about the recognized speech words, e.g. start and end time offsets. If false or unspecified, Speech doesn't return any word-level information.", "type": "boolean" @@ -10186,6 +12892,10 @@ "description": "Optional. Indicates whether this is a fallback intent.", "type": "boolean" }, + "liveAgentHandoff": { + "description": "Optional. Indicates that a live agent should be brought in to handle the interaction with the user. In most cases, when you set this flag to true, you would also want to set end_interaction to true as well. Default is false.", + "type": "boolean" + }, "messages": { "description": "Optional. The collection of rich messages corresponding to the `Response` field in the Dialogflow console.", "items": { @@ -11424,6 +14134,24 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2beta1ListAnswerRecordsResponse": { + "description": "Response message for AnswerRecords.ListAnswerRecords.", + "id": "GoogleCloudDialogflowV2beta1ListAnswerRecordsResponse", + "properties": { + "answerRecords": { + "description": "The list of answer records.", + "items": { + "$ref": "GoogleCloudDialogflowV2beta1AnswerRecord" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token to retrieve next page of results. Or empty if there are no more results. Pass this value in the ListAnswerRecordsRequest.page_token field in the subsequent call to `ListAnswerRecords` method to retrieve the next page of results.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2beta1ListContextsResponse": { "description": "The response message for Contexts.ListContexts.", "id": "GoogleCloudDialogflowV2beta1ListContextsResponse", @@ -11442,6 +14170,42 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2beta1ListConversationProfilesResponse": { + "description": "The response message for ConversationProfiles.ListConversationProfiles.", + "id": "GoogleCloudDialogflowV2beta1ListConversationProfilesResponse", + "properties": { + "conversationProfiles": { + "description": "The list of project conversation profiles. There is a maximum number of items returned based on the page_size field in the request.", + "items": { + "$ref": "GoogleCloudDialogflowV2beta1ConversationProfile" + }, + "type": "array" + }, + "nextPageToken": { + "description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1ListConversationsResponse": { + "description": "The response message for Conversations.ListConversations.", + "id": "GoogleCloudDialogflowV2beta1ListConversationsResponse", + "properties": { + "conversations": { + "description": "The list of conversations. There will be a maximum number of items returned based on the page_size field in the request.", + "items": { + "$ref": "GoogleCloudDialogflowV2beta1Conversation" + }, + "type": "array" + }, + "nextPageToken": { + "description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2beta1ListDocumentsResponse": { "description": "Response message for Documents.ListDocuments.", "id": "GoogleCloudDialogflowV2beta1ListDocumentsResponse", @@ -11532,6 +14296,42 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2beta1ListMessagesResponse": { + "description": "The response message for Conversations.ListMessages.", + "id": "GoogleCloudDialogflowV2beta1ListMessagesResponse", + "properties": { + "messages": { + "description": "Required. The list of messages. There will be a maximum number of items returned based on the page_size field in the request. `messages` is sorted by `create_time` in descending order.", + "items": { + "$ref": "GoogleCloudDialogflowV2beta1Message" + }, + "type": "array" + }, + "nextPageToken": { + "description": "Optional. Token to retrieve the next page of results, or empty if there are no more results in the list.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1ListParticipantsResponse": { + "description": "The response message for Participants.ListParticipants.", + "id": "GoogleCloudDialogflowV2beta1ListParticipantsResponse", + "properties": { + "nextPageToken": { + "description": "Token to retrieve the next page of results or empty if there are no more results in the list.", + "type": "string" + }, + "participants": { + "description": "The list of participants. There is a maximum number of items returned based on the page_size field in the request.", + "items": { + "$ref": "GoogleCloudDialogflowV2beta1Participant" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse": { "description": "The response message for SessionEntityTypes.ListSessionEntityTypes.", "id": "GoogleCloudDialogflowV2beta1ListSessionEntityTypesResponse", @@ -11550,6 +14350,140 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2beta1ListSuggestionsResponse": { + "description": "The response message for Participants.ListSuggestions.", + "id": "GoogleCloudDialogflowV2beta1ListSuggestionsResponse", + "properties": { + "nextPageToken": { + "description": "Optional. Token to retrieve the next page of results or empty if there are no more results in the list.", + "type": "string" + }, + "suggestions": { + "description": "Required. The list of suggestions. There will be a maximum number of items returned based on the page_size field in the request. `suggestions` is sorted by `create_time` in descending order.", + "items": { + "$ref": "GoogleCloudDialogflowV2beta1Suggestion" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1LoggingConfig": { + "description": "Defines logging behavior for conversation lifecycle events.", + "id": "GoogleCloudDialogflowV2beta1LoggingConfig", + "properties": { + "enableStackdriverLogging": { + "description": "Whether to log conversation events like CONVERSATION_STARTED to Stackdriver in the conversation project as JSON format ConversationEvent protos.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1Message": { + "description": "Represents a message posted into a conversation.", + "id": "GoogleCloudDialogflowV2beta1Message", + "properties": { + "content": { + "description": "Required. The message content.", + "type": "string" + }, + "createTime": { + "description": "Output only. The time when the message was created in Contact Center AI.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "languageCode": { + "description": "Optional. The message language. This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. Example: \"en-US\".", + "type": "string" + }, + "messageAnnotation": { + "$ref": "GoogleCloudDialogflowV2beta1MessageAnnotation", + "description": "Output only. The annotation for the message.", + "readOnly": true + }, + "name": { + "description": "Optional. The unique identifier of the message. Format: `projects//locations//conversations//messages/`.", + "type": "string" + }, + "participant": { + "description": "Output only. The participant that sends this message.", + "readOnly": true, + "type": "string" + }, + "participantRole": { + "description": "Output only. The role of the participant.", + "enum": [ + "ROLE_UNSPECIFIED", + "HUMAN_AGENT", + "AUTOMATED_AGENT", + "END_USER" + ], + "enumDescriptions": [ + "Participant role not set.", + "Participant is a human agent.", + "Participant is an automated agent, such as a Dialogflow agent.", + "Participant is an end user that has called or chatted with Dialogflow services." + ], + "readOnly": true, + "type": "string" + }, + "sendTime": { + "description": "Optional. The time when the message was sent.", + "format": "google-datetime", + "type": "string" + }, + "sentimentAnalysis": { + "$ref": "GoogleCloudDialogflowV2beta1SentimentAnalysisResult", + "description": "Output only. The sentiment analysis result for the message.", + "readOnly": true + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1MessageAnnotation": { + "description": "Represents the result of annotation for the message.", + "id": "GoogleCloudDialogflowV2beta1MessageAnnotation", + "properties": { + "containEntities": { + "description": "Required. Indicates whether the text message contains entities.", + "type": "boolean" + }, + "parts": { + "description": "Optional. The collection of annotated message parts ordered by their position in the message. You can recover the annotated message by concatenating [AnnotatedMessagePart.text].", + "items": { + "$ref": "GoogleCloudDialogflowV2beta1AnnotatedMessagePart" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1NotificationConfig": { + "description": "Defines notification behavior.", + "id": "GoogleCloudDialogflowV2beta1NotificationConfig", + "properties": { + "messageFormat": { + "description": "Format of message.", + "enum": [ + "MESSAGE_FORMAT_UNSPECIFIED", + "PROTO", + "JSON" + ], + "enumDescriptions": [ + "If it is unspecified, PROTO will be used.", + "Pubsub message will be serialized proto.", + "Pubsub message will be json." + ], + "type": "string" + }, + "topic": { + "description": "Name of the Pub/Sub topic to publish conversation events like CONVERSATION_STARTED as serialized ConversationEvent protos. Notification works for phone calls, if this topic either is in the same project as the conversation or you grant `service-@gcp-sa-dialogflow.iam.gserviceaccount.com` the `Dialogflow Service Agent` role in the topic project. Format: `projects//locations//topics/`.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest": { "description": "Represents the contents of the original request that was passed to the `[Streaming]DetectIntent` call.", "id": "GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest", @@ -11573,6 +14507,22 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2beta1OutputAudio": { + "description": "Represents the natural language speech audio to be played to the end user.", + "id": "GoogleCloudDialogflowV2beta1OutputAudio", + "properties": { + "audio": { + "description": "Required. The natural language speech audio.", + "format": "byte", + "type": "string" + }, + "config": { + "$ref": "GoogleCloudDialogflowV2beta1OutputAudioConfig", + "description": "Required. Instructs the speech synthesizer how to generate the speech audio." + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2beta1OutputAudioConfig": { "description": "Instructs the speech synthesizer how to generate the output audio content. If this audio config is supplied in a request, it overrides all existing text-to-speech settings applied to the agent.", "id": "GoogleCloudDialogflowV2beta1OutputAudioConfig", @@ -11583,13 +14533,17 @@ "OUTPUT_AUDIO_ENCODING_UNSPECIFIED", "OUTPUT_AUDIO_ENCODING_LINEAR_16", "OUTPUT_AUDIO_ENCODING_MP3", - "OUTPUT_AUDIO_ENCODING_OGG_OPUS" + "OUTPUT_AUDIO_ENCODING_MP3_64_KBPS", + "OUTPUT_AUDIO_ENCODING_OGG_OPUS", + "OUTPUT_AUDIO_ENCODING_MULAW" ], "enumDescriptions": [ "Not specified.", "Uncompressed 16-bit signed little-endian samples (Linear PCM). Audio content returned as LINEAR16 also contains a WAV header.", "MP3 audio at 32kbps.", - "Opus encoded audio wrapped in an ogg container. The result will be a file which can be played natively on Android, and in browsers (at least Chrome and Firefox). The quality of the encoding is considerably higher than MP3 while using approximately the same bitrate." + "MP3 audio at 64kbps.", + "Opus encoded audio wrapped in an ogg container. The result will be a file which can be played natively on Android, and in browsers (at least Chrome and Firefox). The quality of the encoding is considerably higher than MP3 while using approximately the same bitrate.", + "8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law." ], "type": "string" }, @@ -11605,6 +14559,37 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2beta1Participant": { + "description": "Represents a conversation participant (human agent, virtual agent, end-user).", + "id": "GoogleCloudDialogflowV2beta1Participant", + "properties": { + "name": { + "description": "Optional. The unique identifier of this participant. Format: `projects//locations//conversations//participants/`.", + "type": "string" + }, + "obfuscatedExternalUserId": { + "description": "Optional. Obfuscated user id that should be associated with the created participant. You can specify a user id as follows: 1. If you set this field in CreateParticipantRequest or UpdateParticipantRequest, Dialogflow adds the obfuscated user id with the participant. 2. If you set this field in AnalyzeContent or StreamingAnalyzeContent, Dialogflow will update Participant.obfuscated_external_user_id. Dialogflow uses this user id for following purposes: 1) Billing and measurement. If user with the same obfuscated_external_user_id is created in a later conversation, dialogflow will know it's the same user. 2) Agent assist suggestion personalization. For example, Dialogflow can use it to provide personalized smart reply suggestions for this user. Note: * Please never pass raw user ids to Dialogflow. Always obfuscate your user id first. * Dialogflow only accepts a UTF-8 encoded string, e.g., a hex digest of a hash function like SHA-512. * The length of the user id must be <= 256 characters.", + "type": "string" + }, + "role": { + "description": "Immutable. The role this participant plays in the conversation. This field must be set during participant creation and is then immutable.", + "enum": [ + "ROLE_UNSPECIFIED", + "HUMAN_AGENT", + "AUTOMATED_AGENT", + "END_USER" + ], + "enumDescriptions": [ + "Participant role not set.", + "Participant is a human agent.", + "Participant is an automated agent, such as a Dialogflow agent.", + "Participant is an end user that has called or chatted with Dialogflow services." + ], + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2beta1QueryInput": { "description": "Represents the query input. It can contain either: 1. An audio config which instructs the speech recognizer how to process the speech audio. 2. A conversational query in the form of text. 3. An event that specifies which intent to trigger.", "id": "GoogleCloudDialogflowV2beta1QueryInput", @@ -11613,6 +14598,10 @@ "$ref": "GoogleCloudDialogflowV2beta1InputAudioConfig", "description": "Instructs the speech recognizer how to process the speech audio." }, + "dtmf": { + "$ref": "GoogleCloudDialogflowV2beta1TelephonyDtmfEvents", + "description": "The DTMF digits used to invoke intent and fill in parameter value." + }, "event": { "$ref": "GoogleCloudDialogflowV2beta1EventInput", "description": "The event to be processed." @@ -11796,6 +14785,68 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2beta1ResponseMessage": { + "description": "Response messages from an automated agent.", + "id": "GoogleCloudDialogflowV2beta1ResponseMessage", + "properties": { + "endInteraction": { + "$ref": "GoogleCloudDialogflowV2beta1ResponseMessageEndInteraction", + "description": "A signal that indicates the interaction with the Dialogflow agent has ended." + }, + "liveAgentHandoff": { + "$ref": "GoogleCloudDialogflowV2beta1ResponseMessageLiveAgentHandoff", + "description": "Hands off conversation to a live agent." + }, + "payload": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Returns a response containing a custom, platform-specific payload.", + "type": "object" + }, + "text": { + "$ref": "GoogleCloudDialogflowV2beta1ResponseMessageText", + "description": "Returns a text response." + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1ResponseMessageEndInteraction": { + "description": "Indicates that interaction with the Dialogflow agent has ended.", + "id": "GoogleCloudDialogflowV2beta1ResponseMessageEndInteraction", + "properties": {}, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1ResponseMessageLiveAgentHandoff": { + "description": "Indicates that the conversation should be handed off to a human agent. Dialogflow only uses this to determine which conversations were handed off to a human agent for measurement purposes. What else to do with this signal is up to you and your handoff procedures. You may set this, for example: * In the entry fulfillment of a CX Page if entering the page indicates something went extremely wrong in the conversation. * In a webhook response when you determine that the customer issue can only be handled by a human.", + "id": "GoogleCloudDialogflowV2beta1ResponseMessageLiveAgentHandoff", + "properties": { + "metadata": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Custom metadata for your handoff procedure. Dialogflow doesn't impose any structure on this.", + "type": "object" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1ResponseMessageText": { + "description": "The text response message.", + "id": "GoogleCloudDialogflowV2beta1ResponseMessageText", + "properties": { + "text": { + "description": "A collection of text responses.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2beta1RestoreAgentRequest": { "description": "The request message for Agents.RestoreAgent.", "id": "GoogleCloudDialogflowV2beta1RestoreAgentRequest", @@ -11901,6 +14952,26 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2beta1SmartReplyAnswer": { + "description": "Represents a smart reply answer.", + "id": "GoogleCloudDialogflowV2beta1SmartReplyAnswer", + "properties": { + "answerRecord": { + "description": "The name of answer record, in the format of \"projects//locations//answerRecords/\"", + "type": "string" + }, + "confidence": { + "description": "Smart reply confidence. The system's confidence score that this reply is a good match for this conversation, as a value from 0.0 (completely uncertain) to 1.0 (completely certain).", + "format": "float", + "type": "number" + }, + "reply": { + "description": "The content of the reply.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2beta1SpeechContext": { "description": "Hints for the speech recognizer to help with recognition in a specific conversation state.", "id": "GoogleCloudDialogflowV2beta1SpeechContext", @@ -11920,6 +14991,29 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2beta1SpeechToTextConfig": { + "description": "Configures speech transcription for ConversationProfile.", + "id": "GoogleCloudDialogflowV2beta1SpeechToTextConfig", + "properties": { + "speechModelVariant": { + "description": "Optional. The speech model used in speech to text. `SPEECH_MODEL_VARIANT_UNSPECIFIED`, `USE_BEST_AVAILABLE` will be treated as `USE_ENHANCED`. It can be overridden in AnalyzeContentRequest and StreamingAnalyzeContentRequest request.", + "enum": [ + "SPEECH_MODEL_VARIANT_UNSPECIFIED", + "USE_BEST_AVAILABLE", + "USE_STANDARD", + "USE_ENHANCED" + ], + "enumDescriptions": [ + "No model variant specified. In this case Dialogflow defaults to USE_BEST_AVAILABLE.", + "Use the best available variant of the Speech model that the caller is eligible for. Please see the [Dialogflow docs](https://cloud.google.com/dialogflow/docs/data-logging) for how to make your project eligible for enhanced models.", + "Use standard model variant even if an enhanced model is available. See the [Cloud Speech documentation](https://cloud.google.com/speech-to-text/docs/enhanced-models) for details about enhanced models.", + "Use an enhanced model variant: * If an enhanced variant does not exist for the given model and request language, Dialogflow falls back to the standard variant. The [Cloud Speech documentation](https://cloud.google.com/speech-to-text/docs/enhanced-models) describes which models have enhanced variants. * If the API caller isn't eligible for enhanced models, Dialogflow returns an error. Please see the [Dialogflow docs](https://cloud.google.com/dialogflow/docs/data-logging) for how to make your project eligible." + ], + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2beta1SubAgent": { "description": "Contains basic configuration for a sub-agent.", "id": "GoogleCloudDialogflowV2beta1SubAgent", @@ -11935,6 +15029,275 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2beta1SuggestArticlesRequest": { + "description": "The request message for Participants.SuggestArticles.", + "id": "GoogleCloudDialogflowV2beta1SuggestArticlesRequest", + "properties": { + "contextSize": { + "description": "Optional. Max number of messages prior to and including latest_message to use as context when compiling the suggestion. By default 20 and at most 50.", + "format": "int32", + "type": "integer" + }, + "latestMessage": { + "description": "Optional. The name of the latest conversation message to compile suggestion for. If empty, it will be the latest message of the conversation. Format: `projects//locations//conversations//messages/`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1SuggestArticlesResponse": { + "description": "The response message for Participants.SuggestArticles.", + "id": "GoogleCloudDialogflowV2beta1SuggestArticlesResponse", + "properties": { + "articleAnswers": { + "description": "Output only. Articles ordered by score in descending order.", + "items": { + "$ref": "GoogleCloudDialogflowV2beta1ArticleAnswer" + }, + "type": "array" + }, + "contextSize": { + "description": "Number of messages prior to and including latest_message to compile the suggestion. It may be smaller than the SuggestArticlesResponse.context_size field in the request if there aren't that many messages in the conversation.", + "format": "int32", + "type": "integer" + }, + "latestMessage": { + "description": "The name of the latest conversation message used to compile suggestion for. Format: `projects//locations//conversations//messages/`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1SuggestFaqAnswersRequest": { + "description": "The request message for Participants.SuggestFaqAnswers.", + "id": "GoogleCloudDialogflowV2beta1SuggestFaqAnswersRequest", + "properties": { + "contextSize": { + "description": "Optional. Max number of messages prior to and including [latest_message] to use as context when compiling the suggestion. By default 20 and at most 50.", + "format": "int32", + "type": "integer" + }, + "latestMessage": { + "description": "Optional. The name of the latest conversation message to compile suggestion for. If empty, it will be the latest message of the conversation. Format: `projects//locations//conversations//messages/`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1SuggestFaqAnswersResponse": { + "description": "The request message for Participants.SuggestFaqAnswers.", + "id": "GoogleCloudDialogflowV2beta1SuggestFaqAnswersResponse", + "properties": { + "contextSize": { + "description": "Number of messages prior to and including latest_message to compile the suggestion. It may be smaller than the SuggestFaqAnswersRequest.context_size field in the request if there aren't that many messages in the conversation.", + "format": "int32", + "type": "integer" + }, + "faqAnswers": { + "description": "Output only. Answers extracted from FAQ documents.", + "items": { + "$ref": "GoogleCloudDialogflowV2beta1FaqAnswer" + }, + "type": "array" + }, + "latestMessage": { + "description": "The name of the latest conversation message used to compile suggestion for. Format: `projects//locations//conversations//messages/`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1SuggestSmartRepliesRequest": { + "description": "The request message for Participants.SuggestSmartReplies.", + "id": "GoogleCloudDialogflowV2beta1SuggestSmartRepliesRequest", + "properties": { + "contextSize": { + "description": "Optional. Max number of messages prior to and including [latest_message] to use as context when compiling the suggestion. By default 20 and at most 50.", + "format": "int32", + "type": "integer" + }, + "currentTextInput": { + "$ref": "GoogleCloudDialogflowV2beta1TextInput", + "description": "The current natural language text segment to compile suggestion for. This provides a way for user to get follow up smart reply suggestion after a smart reply selection, without sending a text message." + }, + "latestMessage": { + "description": "The name of the latest conversation message to compile suggestion for. If empty, it will be the latest message of the conversation. Format: `projects//locations//conversations//messages/`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1SuggestSmartRepliesResponse": { + "description": "The response message for Participants.SuggestSmartReplies.", + "id": "GoogleCloudDialogflowV2beta1SuggestSmartRepliesResponse", + "properties": { + "contextSize": { + "description": "Number of messages prior to and including latest_message to compile the suggestion. It may be smaller than the SuggestSmartRepliesRequest.context_size field in the request if there aren't that many messages in the conversation.", + "format": "int32", + "type": "integer" + }, + "latestMessage": { + "description": "The name of the latest conversation message used to compile suggestion for. Format: `projects//locations//conversations//messages/`.", + "type": "string" + }, + "smartReplyAnswers": { + "description": "Output only. Multiple reply options provided by smart reply service. The order is based on the rank of the model prediction. The maximum number of the returned replies is set in SmartReplyConfig.", + "items": { + "$ref": "GoogleCloudDialogflowV2beta1SmartReplyAnswer" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1Suggestion": { + "description": "Represents a suggestion for a human agent.", + "id": "GoogleCloudDialogflowV2beta1Suggestion", + "properties": { + "articles": { + "description": "Output only. Articles ordered by score in descending order.", + "items": { + "$ref": "GoogleCloudDialogflowV2beta1SuggestionArticle" + }, + "type": "array" + }, + "createTime": { + "description": "Output only. The time the suggestion was created.", + "format": "google-datetime", + "type": "string" + }, + "faqAnswers": { + "description": "Output only. Answers extracted from FAQ documents.", + "items": { + "$ref": "GoogleCloudDialogflowV2beta1SuggestionFaqAnswer" + }, + "type": "array" + }, + "latestMessage": { + "description": "Output only. Latest message used as context to compile this suggestion. Format: `projects//locations//conversations//messages/`.", + "type": "string" + }, + "name": { + "description": "Output only. The name of this suggestion. Format: `projects//locations//conversations//participants/*/suggestions/`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1SuggestionArticle": { + "description": "Represents suggested article.", + "id": "GoogleCloudDialogflowV2beta1SuggestionArticle", + "properties": { + "answerRecord": { + "description": "Output only. The name of answer record, in the format of \"projects//locations//answerRecords/\"", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Output only. A map that contains metadata about the answer and the document from which it originates.", + "type": "object" + }, + "snippets": { + "description": "Output only. Article snippets.", + "items": { + "type": "string" + }, + "type": "array" + }, + "title": { + "description": "Output only. The article title.", + "type": "string" + }, + "uri": { + "description": "Output only. The article URI.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1SuggestionFaqAnswer": { + "description": "Represents suggested answer from \"frequently asked questions\".", + "id": "GoogleCloudDialogflowV2beta1SuggestionFaqAnswer", + "properties": { + "answer": { + "description": "Output only. The piece of text from the `source` knowledge base document.", + "type": "string" + }, + "answerRecord": { + "description": "Output only. The name of answer record, in the format of \"projects//locations//answerRecords/\"", + "type": "string" + }, + "confidence": { + "description": "The system's confidence score that this Knowledge answer is a good match for this conversational query, range from 0.0 (completely uncertain) to 1.0 (completely certain).", + "format": "float", + "type": "number" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Output only. A map that contains metadata about the answer and the document from which it originates.", + "type": "object" + }, + "question": { + "description": "Output only. The corresponding FAQ question.", + "type": "string" + }, + "source": { + "description": "Output only. Indicates which Knowledge Document this answer was extracted from. Format: `projects//locations//agent/knowledgeBases//documents/`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1SuggestionFeature": { + "description": "The type of Human Agent Assistant API suggestion to perform, and the maximum number of results to return for that type. Multiple `Feature` objects can be specified in the `features` list.", + "id": "GoogleCloudDialogflowV2beta1SuggestionFeature", + "properties": { + "type": { + "description": "Type of Human Agent Assistant API feature to request.", + "enum": [ + "TYPE_UNSPECIFIED", + "ARTICLE_SUGGESTION", + "FAQ", + "SMART_REPLY" + ], + "enumDescriptions": [ + "Unspecified feature type.", + "Run article suggestion model.", + "Run FAQ model.", + "Run smart reply model." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1SuggestionResult": { + "description": "One response of different type of suggestion response which is used in the response of Participants.AnalyzeContent and Participants.AnalyzeContent, as well as HumanAgentAssistantEvent.", + "id": "GoogleCloudDialogflowV2beta1SuggestionResult", + "properties": { + "error": { + "$ref": "GoogleRpcStatus", + "description": "Error status if the request failed." + }, + "suggestArticlesResponse": { + "$ref": "GoogleCloudDialogflowV2beta1SuggestArticlesResponse", + "description": "SuggestArticlesResponse if request is for ARTICLE_SUGGESTION." + }, + "suggestFaqAnswersResponse": { + "$ref": "GoogleCloudDialogflowV2beta1SuggestFaqAnswersResponse", + "description": "SuggestFaqAnswersResponse if request is for FAQ_ANSWER." + }, + "suggestSmartRepliesResponse": { + "$ref": "GoogleCloudDialogflowV2beta1SuggestSmartRepliesResponse", + "description": "SuggestSmartRepliesResponse if request is for SMART_REPLY." + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2beta1SynthesizeSpeechConfig": { "description": "Configuration of how speech should be synthesized.", "id": "GoogleCloudDialogflowV2beta1SynthesizeSpeechConfig", @@ -11968,6 +15331,58 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2beta1TelephonyDtmfEvents": { + "description": "A wrapper of repeated TelephonyDtmf digits.", + "id": "GoogleCloudDialogflowV2beta1TelephonyDtmfEvents", + "properties": { + "dtmfEvents": { + "description": "A sequence of TelephonyDtmf digits.", + "items": { + "enum": [ + "TELEPHONY_DTMF_UNSPECIFIED", + "DTMF_ONE", + "DTMF_TWO", + "DTMF_THREE", + "DTMF_FOUR", + "DTMF_FIVE", + "DTMF_SIX", + "DTMF_SEVEN", + "DTMF_EIGHT", + "DTMF_NINE", + "DTMF_ZERO", + "DTMF_A", + "DTMF_B", + "DTMF_C", + "DTMF_D", + "DTMF_STAR", + "DTMF_POUND" + ], + "enumDescriptions": [ + "Not specified. This value may be used to indicate an absent digit.", + "Number: '1'.", + "Number: '2'.", + "Number: '3'.", + "Number: '4'.", + "Number: '5'.", + "Number: '6'.", + "Number: '7'.", + "Number: '8'.", + "Number: '9'.", + "Number: '0'.", + "Letter: 'A'.", + "Letter: 'B'.", + "Letter: 'C'.", + "Letter: 'D'.", + "Asterisk/star: '*'.", + "Pound/diamond/hash/square/gate/octothorpe: '#'." + ], + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2beta1TextInput": { "description": "Represents the natural language text to be processed.", "id": "GoogleCloudDialogflowV2beta1TextInput", @@ -12119,6 +15534,10 @@ "description": "Optional. The text response message intended for the end-user. It is recommended to use `fulfillment_messages.text.text[0]` instead. When provided, Dialogflow uses this field to populate QueryResult.fulfillment_text sent to the integration or API caller.", "type": "string" }, + "liveAgentHandoff": { + "description": "Indicates that a live agent should be brought in to handle the interaction with the user. In most cases, when you set this flag to true, you would also want to set end_interaction to true as well. Default is false.", + "type": "boolean" + }, "outputContexts": { "description": "Optional. The collection of output contexts that will overwrite currently active contexts for the session and reset their lifespans. When provided, Dialogflow uses this field to populate QueryResult.output_contexts sent to the integration or API caller.", "items": { diff --git a/discovery/dialogflow-v3.json b/discovery/dialogflow-v3.json index 6aa7f0ba20d..56fe1bf7907 100644 --- a/discovery/dialogflow-v3.json +++ b/discovery/dialogflow-v3.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" }, "https://www.googleapis.com/auth/dialogflow": { "description": "View, manage and query your Dialogflow agents" @@ -1072,7 +1072,7 @@ "entityTypes": { "methods": { "create": { - "description": "Creates a session entity type. If the specified session entity type already exists, overrides the session entity type.", + "description": "Creates a session entity type.", "flatPath": "v3/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/environments/{environmentsId}/sessions/{sessionsId}/entityTypes", "httpMethod": "POST", "id": "dialogflow.projects.locations.agents.environments.sessions.entityTypes.create", @@ -2339,7 +2339,7 @@ "entityTypes": { "methods": { "create": { - "description": "Creates a session entity type. If the specified session entity type already exists, overrides the session entity type.", + "description": "Creates a session entity type.", "flatPath": "v3/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/sessions/{sessionsId}/entityTypes", "httpMethod": "POST", "id": "dialogflow.projects.locations.agents.sessions.entityTypes.create", @@ -2831,6 +2831,32 @@ "resources": { "results": { "methods": { + "get": { + "description": "Gets a test case result.", + "flatPath": "v3/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/testCases/{testCasesId}/results/{resultsId}", + "httpMethod": "GET", + "id": "dialogflow.projects.locations.agents.testCases.results.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the testcase. Format: `projects//locations//agents//testCases//results/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/testCases/[^/]+/results/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v3/{+name}", + "response": { + "$ref": "GoogleCloudDialogflowCxV3TestCaseResult" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, "list": { "description": "Fetches a list of results for a given test case.", "flatPath": "v3/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/testCases/{testCasesId}/results", @@ -3399,7 +3425,7 @@ } } }, - "revision": "20210227", + "revision": "20210320", "rootUrl": "https://dialogflow.googleapis.com/", "schemas": { "GoogleCloudDialogflowCxV3Agent": { @@ -3952,7 +3978,7 @@ "type": "string" }, "experimentLength": { - "description": "Maximum number of days to run the experiment.", + "description": "Maximum number of days to run the experiment/rollout. If auto-rollout is not enabled, default value and maximum will be 30 days. If auto-rollout is enabled, default value and maximum will be 6 days.", "format": "google-duration", "type": "string" }, @@ -5176,7 +5202,7 @@ "type": "string" }, "transcript": { - "description": "If natural language speech audio was provided as input, this field will contain the trascript for the audio.", + "description": "If natural language speech audio was provided as input, this field will contain the transcript for the audio.", "type": "string" }, "triggerEvent": { @@ -5184,7 +5210,7 @@ "type": "string" }, "triggerIntent": { - "description": "If an intent was provided as input, this field will contain a copy of the intent identifier.", + "description": "If an intent was provided as input, this field will contain a copy of the intent identifier. Format: `projects//locations//agents//intents/`.", "type": "string" } }, @@ -5519,7 +5545,7 @@ "type": "string" }, "transcript": { - "description": "If natural language speech audio was provided as input, this field will contain the trascript for the audio.", + "description": "If natural language speech audio was provided as input, this field will contain the transcript for the audio.", "type": "string" }, "triggerEvent": { @@ -5527,7 +5553,7 @@ "type": "string" }, "triggerIntent": { - "description": "If an intent was provided as input, this field will contain a copy of the intent identifier.", + "description": "If an intent was provided as input, this field will contain a copy of the intent identifier. Format: `projects//locations//agents//intents/`.", "type": "string" }, "webhookPayloads": { @@ -5760,6 +5786,20 @@ "agentUri": { "description": "The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI to restore agent from. The format of this URI must be `gs:///`.", "type": "string" + }, + "restoreOption": { + "description": "Agent restore mode. If not specified, `KEEP` is assumed.", + "enum": [ + "RESTORE_OPTION_UNSPECIFIED", + "KEEP", + "FALLBACK" + ], + "enumDescriptions": [ + "Unspecified. Treated as KEEP.", + "Always respect the settings from the exported agent file. It may cause a restoration failure if some settings (e.g. model type) are not supported in the target agent.", + "Fallback to default settings if some settings are not supported in the target agent." + ], + "type": "string" } }, "type": "object" @@ -6631,7 +6671,7 @@ "type": "object" }, "GoogleCloudDialogflowCxV3WebhookRequest": { - "description": "The request message for a webhook call.", + "description": "The request message for a webhook call. The request is sent as a JSON object and the field names will be presented in camel cases.", "id": "GoogleCloudDialogflowCxV3WebhookRequest", "properties": { "detectIntentResponseId": { @@ -8085,7 +8125,7 @@ "type": "object" }, "GoogleCloudDialogflowCxV3beta1WebhookRequest": { - "description": "The request message for a webhook call.", + "description": "The request message for a webhook call. The request is sent as a JSON object and the field names will be presented in camel cases.", "id": "GoogleCloudDialogflowCxV3beta1WebhookRequest", "properties": { "detectIntentResponseId": { @@ -8282,6 +8322,44 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2ArticleAnswer": { + "description": "Represents article answer.", + "id": "GoogleCloudDialogflowV2ArticleAnswer", + "properties": { + "answerRecord": { + "description": "The name of answer record, in the format of \"projects//locations//answerRecords/\"", + "type": "string" + }, + "confidence": { + "description": "Article match confidence. The system's confidence score that this article is a good match for this conversation, as a value from 0.0 (completely uncertain) to 1.0 (completely certain).", + "format": "float", + "type": "number" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "A map that contains metadata about the answer and the document from which it originates.", + "type": "object" + }, + "snippets": { + "description": "Article snippets.", + "items": { + "type": "string" + }, + "type": "array" + }, + "title": { + "description": "The article title.", + "type": "string" + }, + "uri": { + "description": "The article URI.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2BatchUpdateEntityTypesResponse": { "description": "The response message for EntityTypes.BatchUpdateEntityTypes.", "id": "GoogleCloudDialogflowV2BatchUpdateEntityTypesResponse", @@ -8484,6 +8562,63 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2FaqAnswer": { + "description": "Represents answer from \"frequently asked questions\".", + "id": "GoogleCloudDialogflowV2FaqAnswer", + "properties": { + "answer": { + "description": "The piece of text from the `source` knowledge base document.", + "type": "string" + }, + "answerRecord": { + "description": "The name of answer record, in the format of \"projects//locations//answerRecords/\"", + "type": "string" + }, + "confidence": { + "description": "The system's confidence score that this Knowledge answer is a good match for this conversational query, range from 0.0 (completely uncertain) to 1.0 (completely certain).", + "format": "float", + "type": "number" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "A map that contains metadata about the answer and the document from which it originates.", + "type": "object" + }, + "question": { + "description": "The corresponding FAQ question.", + "type": "string" + }, + "source": { + "description": "Indicates which Knowledge Document this answer was extracted from. Format: `projects//locations//agent/knowledgeBases//documents/`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2HumanAgentAssistantEvent": { + "description": "Represents a notification sent to Cloud Pub/Sub subscribers for human agent assistant events in a specific conversation.", + "id": "GoogleCloudDialogflowV2HumanAgentAssistantEvent", + "properties": { + "conversation": { + "description": "The conversation this notification refers to. Format: `projects//conversations/`.", + "type": "string" + }, + "participant": { + "description": "The participant that the suggestion is compiled for. Format: `projects//conversations//participants/`. It will not be set in legacy workflow.", + "type": "string" + }, + "suggestionResults": { + "description": "The suggestion results payload that this notification refers to.", + "items": { + "$ref": "GoogleCloudDialogflowV2SuggestionResult" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2Intent": { "description": "An intent categorizes an end-user's intention for one conversation turn. For each agent, you define many intents, where your combined intents can handle a complete conversation. When an end-user writes or says something, referred to as an end-user expression or end-user input, Dialogflow matches the end-user input to the best intent in your agent. Matching an intent is also known as intent classification. For more information, see the [intent guide](https://cloud.google.com/dialogflow/docs/intents-overview).", "id": "GoogleCloudDialogflowV2Intent", @@ -8527,6 +8662,10 @@ "description": "Required. The name of this intent.", "type": "string" }, + "endInteraction": { + "description": "Optional. Indicates that this intent ends an interaction. Some integrations (e.g., Actions on Google or Dialogflow phone gateway) use this information to close interaction with an end user. Default is false.", + "type": "boolean" + }, "events": { "description": "Optional. The collection of event names that trigger the intent. If the collection of input contexts is not empty, all of the contexts must be present in the active user session for an event to trigger this intent. Event names are limited to 150 characters.", "items": { @@ -8552,6 +8691,10 @@ "description": "Optional. Indicates whether this is a fallback intent.", "type": "boolean" }, + "liveAgentHandoff": { + "description": "Optional. Indicates that a live agent should be brought in to handle the interaction with the user. In most cases, when you set this flag to true, you would also want to set end_interaction to true as well. Default is false.", + "type": "boolean" + }, "messages": { "description": "Optional. The collection of rich messages corresponding to the `Response` field in the Dialogflow console.", "items": { @@ -9384,6 +9527,30 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2KnowledgeOperationMetadata": { + "description": "Metadata in google::longrunning::Operation for Knowledge operations.", + "id": "GoogleCloudDialogflowV2KnowledgeOperationMetadata", + "properties": { + "state": { + "description": "Output only. The current state of this operation.", + "enum": [ + "STATE_UNSPECIFIED", + "PENDING", + "RUNNING", + "DONE" + ], + "enumDescriptions": [ + "State unspecified.", + "The operation has been created.", + "The operation is currently running.", + "The operation is done, either cancelled or completed." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2Message": { "description": "Represents a message posted into a conversation.", "id": "GoogleCloudDialogflowV2Message", @@ -9624,6 +9791,71 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2SuggestArticlesResponse": { + "description": "The response message for Participants.SuggestArticles.", + "id": "GoogleCloudDialogflowV2SuggestArticlesResponse", + "properties": { + "articleAnswers": { + "description": "Articles ordered by score in descending order.", + "items": { + "$ref": "GoogleCloudDialogflowV2ArticleAnswer" + }, + "type": "array" + }, + "contextSize": { + "description": "Number of messages prior to and including latest_message to compile the suggestion. It may be smaller than the SuggestArticlesRequest.context_size field in the request if there aren't that many messages in the conversation.", + "format": "int32", + "type": "integer" + }, + "latestMessage": { + "description": "The name of the latest conversation message used to compile suggestion for. Format: `projects//locations//conversations//messages/`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2SuggestFaqAnswersResponse": { + "description": "The request message for Participants.SuggestFaqAnswers.", + "id": "GoogleCloudDialogflowV2SuggestFaqAnswersResponse", + "properties": { + "contextSize": { + "description": "Number of messages prior to and including latest_message to compile the suggestion. It may be smaller than the SuggestFaqAnswersRequest.context_size field in the request if there aren't that many messages in the conversation.", + "format": "int32", + "type": "integer" + }, + "faqAnswers": { + "description": "Answers extracted from FAQ documents.", + "items": { + "$ref": "GoogleCloudDialogflowV2FaqAnswer" + }, + "type": "array" + }, + "latestMessage": { + "description": "The name of the latest conversation message used to compile suggestion for. Format: `projects//locations//conversations//messages/`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2SuggestionResult": { + "description": "One response of different type of suggestion response which is used in the response of Participants.AnalyzeContent and Participants.AnalyzeContent, as well as HumanAgentAssistantEvent.", + "id": "GoogleCloudDialogflowV2SuggestionResult", + "properties": { + "error": { + "$ref": "GoogleRpcStatus", + "description": "Error status if the request failed." + }, + "suggestArticlesResponse": { + "$ref": "GoogleCloudDialogflowV2SuggestArticlesResponse", + "description": "SuggestArticlesResponse if request is for ARTICLE_SUGGESTION." + }, + "suggestFaqAnswersResponse": { + "$ref": "GoogleCloudDialogflowV2SuggestFaqAnswersResponse", + "description": "SuggestFaqAnswersResponse if request is for FAQ_ANSWER." + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2WebhookRequest": { "description": "The request message for a webhook call.", "id": "GoogleCloudDialogflowV2WebhookRequest", @@ -9695,6 +9927,58 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2beta1AnnotatedMessagePart": { + "description": "Represents a part of a message possibly annotated with an entity. The part can be an entity or purely a part of the message between two entities or message start/end.", + "id": "GoogleCloudDialogflowV2beta1AnnotatedMessagePart", + "properties": { + "entityType": { + "description": "Optional. The [Dialogflow system entity type](https://cloud.google.com/dialogflow/docs/reference/system-entities) of this message part. If this is empty, Dialogflow could not annotate the phrase part with a system entity.", + "type": "string" + }, + "formattedValue": { + "description": "Optional. The [Dialogflow system entity formatted value ](https://cloud.google.com/dialogflow/docs/reference/system-entities) of this message part. For example for a system entity of type `@sys.unit-currency`, this may contain: { \"amount\": 5, \"currency\": \"USD\" } ", + "type": "any" + }, + "text": { + "description": "Required. A part of a message possibly annotated with an entity.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1ArticleAnswer": { + "description": "Represents article answer.", + "id": "GoogleCloudDialogflowV2beta1ArticleAnswer", + "properties": { + "answerRecord": { + "description": "The name of answer record, in the format of \"projects//locations//answerRecords/\"", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "A map that contains metadata about the answer and the document from which it originates.", + "type": "object" + }, + "snippets": { + "description": "Output only. Article snippets.", + "items": { + "type": "string" + }, + "type": "array" + }, + "title": { + "description": "The article title.", + "type": "string" + }, + "uri": { + "description": "The article URI.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse": { "description": "The response message for EntityTypes.BatchUpdateEntityTypes.", "id": "GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse", @@ -9747,6 +10031,43 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2beta1ConversationEvent": { + "description": "Represents a notification sent to Pub/Sub subscribers for conversation lifecycle events.", + "id": "GoogleCloudDialogflowV2beta1ConversationEvent", + "properties": { + "conversation": { + "description": "Required. The unique identifier of the conversation this notification refers to. Format: `projects//conversations/`.", + "type": "string" + }, + "errorStatus": { + "$ref": "GoogleRpcStatus", + "description": "Optional. More detailed information about an error. Only set for type UNRECOVERABLE_ERROR_IN_PHONE_CALL." + }, + "newMessagePayload": { + "$ref": "GoogleCloudDialogflowV2beta1Message", + "description": "Payload of NEW_MESSAGE event." + }, + "type": { + "description": "Required. The type of the event that this notification refers to.", + "enum": [ + "TYPE_UNSPECIFIED", + "CONVERSATION_STARTED", + "CONVERSATION_FINISHED", + "NEW_MESSAGE", + "UNRECOVERABLE_ERROR" + ], + "enumDescriptions": [ + "Type not set.", + "A new conversation has been opened. This is fired when a telephone call is answered, or a conversation is created via the API.", + "An existing conversation has closed. This is fired when a telephone call is terminated, or a conversation is closed via the API.", + "An existing conversation has received a new message, either from API or telephony. It is configured in ConversationProfile.new_message_event_notification_config", + "Unrecoverable error during a telephone call. In general non-recoverable errors only occur if something was misconfigured in the ConversationProfile corresponding to the call. After a non-recoverable error, Dialogflow may stop responding. We don't fire this event: * in an API call because we can directly return the error, or, * when we can recover from an error." + ], + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2beta1EntityType": { "description": "Each intent parameter has a type, called the entity type, which dictates exactly how data from an end-user expression is extracted. Dialogflow provides predefined system entities that can match many common types of data. For example, there are system entities for matching dates, times, colors, email addresses, and so on. You can also create your own custom entities for matching custom data. For example, you could define a vegetable entity that can match the types of vegetables available for purchase with a grocery store agent. For more information, see the [Entity guide](https://cloud.google.com/dialogflow/docs/entities-overview).", "id": "GoogleCloudDialogflowV2beta1EntityType", @@ -9858,6 +10179,77 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2beta1FaqAnswer": { + "description": "Represents answer from \"frequently asked questions\".", + "id": "GoogleCloudDialogflowV2beta1FaqAnswer", + "properties": { + "answer": { + "description": "The piece of text from the `source` knowledge base document.", + "type": "string" + }, + "answerRecord": { + "description": "The name of answer record, in the format of \"projects//locations//answerRecords/\"", + "type": "string" + }, + "confidence": { + "description": "The system's confidence score that this Knowledge answer is a good match for this conversational query, range from 0.0 (completely uncertain) to 1.0 (completely certain).", + "format": "float", + "type": "number" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "A map that contains metadata about the answer and the document from which it originates.", + "type": "object" + }, + "question": { + "description": "The corresponding FAQ question.", + "type": "string" + }, + "source": { + "description": "Indicates which Knowledge Document this answer was extracted from. Format: `projects//locations//agent/knowledgeBases//documents/`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1HumanAgentAssistantEvent": { + "description": "Output only. Represents a notification sent to Pub/Sub subscribers for agent assistant events in a specific conversation.", + "id": "GoogleCloudDialogflowV2beta1HumanAgentAssistantEvent", + "properties": { + "conversation": { + "description": "The conversation this notification refers to. Format: `projects//conversations/`.", + "type": "string" + }, + "participant": { + "description": "The participant that the suggestion is compiled for. And This field is used to call Participants.ListSuggestions API. Format: `projects//conversations//participants/`. It will not be set in legacy workflow. HumanAgentAssistantConfig.name for more information.", + "type": "string" + }, + "suggestionResults": { + "description": "The suggestion results payload that this notification refers to. It will only be set when HumanAgentAssistantConfig.SuggestionConfig.group_suggestion_responses sets to true.", + "items": { + "$ref": "GoogleCloudDialogflowV2beta1SuggestionResult" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1ImportDocumentsResponse": { + "description": "Response message for Documents.ImportDocuments.", + "id": "GoogleCloudDialogflowV2beta1ImportDocumentsResponse", + "properties": { + "warnings": { + "description": "Includes details about skipped documents or any other warnings.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2beta1Intent": { "description": "An intent categorizes an end-user's intention for one conversation turn. For each agent, you define many intents, where your combined intents can handle a complete conversation. When an end-user writes or says something, referred to as an end-user expression or end-user input, Dialogflow matches the end-user input to the best intent in your agent. Matching an intent is also known as intent classification. For more information, see the [intent guide](https://cloud.google.com/dialogflow/docs/intents-overview).", "id": "GoogleCloudDialogflowV2beta1Intent", @@ -9933,6 +10325,10 @@ "description": "Optional. Indicates whether this is a fallback intent.", "type": "boolean" }, + "liveAgentHandoff": { + "description": "Optional. Indicates that a live agent should be brought in to handle the interaction with the user. In most cases, when you set this flag to true, you would also want to set end_interaction to true as well. Default is false.", + "type": "boolean" + }, "messages": { "description": "Optional. The collection of rich messages corresponding to the `Response` field in the Dialogflow console.", "items": { @@ -11138,6 +11534,86 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2beta1Message": { + "description": "Represents a message posted into a conversation.", + "id": "GoogleCloudDialogflowV2beta1Message", + "properties": { + "content": { + "description": "Required. The message content.", + "type": "string" + }, + "createTime": { + "description": "Output only. The time when the message was created in Contact Center AI.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "languageCode": { + "description": "Optional. The message language. This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. Example: \"en-US\".", + "type": "string" + }, + "messageAnnotation": { + "$ref": "GoogleCloudDialogflowV2beta1MessageAnnotation", + "description": "Output only. The annotation for the message.", + "readOnly": true + }, + "name": { + "description": "Optional. The unique identifier of the message. Format: `projects//locations//conversations//messages/`.", + "type": "string" + }, + "participant": { + "description": "Output only. The participant that sends this message.", + "readOnly": true, + "type": "string" + }, + "participantRole": { + "description": "Output only. The role of the participant.", + "enum": [ + "ROLE_UNSPECIFIED", + "HUMAN_AGENT", + "AUTOMATED_AGENT", + "END_USER" + ], + "enumDescriptions": [ + "Participant role not set.", + "Participant is a human agent.", + "Participant is an automated agent, such as a Dialogflow agent.", + "Participant is an end user that has called or chatted with Dialogflow services." + ], + "readOnly": true, + "type": "string" + }, + "sendTime": { + "description": "Optional. The time when the message was sent.", + "format": "google-datetime", + "type": "string" + }, + "sentimentAnalysis": { + "$ref": "GoogleCloudDialogflowV2beta1SentimentAnalysisResult", + "description": "Output only. The sentiment analysis result for the message.", + "readOnly": true + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1MessageAnnotation": { + "description": "Represents the result of annotation for the message.", + "id": "GoogleCloudDialogflowV2beta1MessageAnnotation", + "properties": { + "containEntities": { + "description": "Required. Indicates whether the text message contains entities.", + "type": "boolean" + }, + "parts": { + "description": "Optional. The collection of annotated message parts ordered by their position in the message. You can recover the annotated message by concatenating [AnnotatedMessagePart.text].", + "items": { + "$ref": "GoogleCloudDialogflowV2beta1AnnotatedMessagePart" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest": { "description": "Represents the contents of the original request that was passed to the `[Streaming]DetectIntent` call.", "id": "GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest", @@ -11312,6 +11788,118 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2beta1SmartReplyAnswer": { + "description": "Represents a smart reply answer.", + "id": "GoogleCloudDialogflowV2beta1SmartReplyAnswer", + "properties": { + "answerRecord": { + "description": "The name of answer record, in the format of \"projects//locations//answerRecords/\"", + "type": "string" + }, + "confidence": { + "description": "Smart reply confidence. The system's confidence score that this reply is a good match for this conversation, as a value from 0.0 (completely uncertain) to 1.0 (completely certain).", + "format": "float", + "type": "number" + }, + "reply": { + "description": "The content of the reply.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1SuggestArticlesResponse": { + "description": "The response message for Participants.SuggestArticles.", + "id": "GoogleCloudDialogflowV2beta1SuggestArticlesResponse", + "properties": { + "articleAnswers": { + "description": "Output only. Articles ordered by score in descending order.", + "items": { + "$ref": "GoogleCloudDialogflowV2beta1ArticleAnswer" + }, + "type": "array" + }, + "contextSize": { + "description": "Number of messages prior to and including latest_message to compile the suggestion. It may be smaller than the SuggestArticlesResponse.context_size field in the request if there aren't that many messages in the conversation.", + "format": "int32", + "type": "integer" + }, + "latestMessage": { + "description": "The name of the latest conversation message used to compile suggestion for. Format: `projects//locations//conversations//messages/`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1SuggestFaqAnswersResponse": { + "description": "The request message for Participants.SuggestFaqAnswers.", + "id": "GoogleCloudDialogflowV2beta1SuggestFaqAnswersResponse", + "properties": { + "contextSize": { + "description": "Number of messages prior to and including latest_message to compile the suggestion. It may be smaller than the SuggestFaqAnswersRequest.context_size field in the request if there aren't that many messages in the conversation.", + "format": "int32", + "type": "integer" + }, + "faqAnswers": { + "description": "Output only. Answers extracted from FAQ documents.", + "items": { + "$ref": "GoogleCloudDialogflowV2beta1FaqAnswer" + }, + "type": "array" + }, + "latestMessage": { + "description": "The name of the latest conversation message used to compile suggestion for. Format: `projects//locations//conversations//messages/`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1SuggestSmartRepliesResponse": { + "description": "The response message for Participants.SuggestSmartReplies.", + "id": "GoogleCloudDialogflowV2beta1SuggestSmartRepliesResponse", + "properties": { + "contextSize": { + "description": "Number of messages prior to and including latest_message to compile the suggestion. It may be smaller than the SuggestSmartRepliesRequest.context_size field in the request if there aren't that many messages in the conversation.", + "format": "int32", + "type": "integer" + }, + "latestMessage": { + "description": "The name of the latest conversation message used to compile suggestion for. Format: `projects//locations//conversations//messages/`.", + "type": "string" + }, + "smartReplyAnswers": { + "description": "Output only. Multiple reply options provided by smart reply service. The order is based on the rank of the model prediction. The maximum number of the returned replies is set in SmartReplyConfig.", + "items": { + "$ref": "GoogleCloudDialogflowV2beta1SmartReplyAnswer" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1SuggestionResult": { + "description": "One response of different type of suggestion response which is used in the response of Participants.AnalyzeContent and Participants.AnalyzeContent, as well as HumanAgentAssistantEvent.", + "id": "GoogleCloudDialogflowV2beta1SuggestionResult", + "properties": { + "error": { + "$ref": "GoogleRpcStatus", + "description": "Error status if the request failed." + }, + "suggestArticlesResponse": { + "$ref": "GoogleCloudDialogflowV2beta1SuggestArticlesResponse", + "description": "SuggestArticlesResponse if request is for ARTICLE_SUGGESTION." + }, + "suggestFaqAnswersResponse": { + "$ref": "GoogleCloudDialogflowV2beta1SuggestFaqAnswersResponse", + "description": "SuggestFaqAnswersResponse if request is for FAQ_ANSWER." + }, + "suggestSmartRepliesResponse": { + "$ref": "GoogleCloudDialogflowV2beta1SuggestSmartRepliesResponse", + "description": "SuggestSmartRepliesResponse if request is for SMART_REPLY." + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2beta1WebhookRequest": { "description": "The request message for a webhook call.", "id": "GoogleCloudDialogflowV2beta1WebhookRequest", @@ -11365,6 +11953,10 @@ "description": "Optional. The text response message intended for the end-user. It is recommended to use `fulfillment_messages.text.text[0]` instead. When provided, Dialogflow uses this field to populate QueryResult.fulfillment_text sent to the integration or API caller.", "type": "string" }, + "liveAgentHandoff": { + "description": "Indicates that a live agent should be brought in to handle the interaction with the user. In most cases, when you set this flag to true, you would also want to set end_interaction to true as well. Default is false.", + "type": "boolean" + }, "outputContexts": { "description": "Optional. The collection of output contexts that will overwrite currently active contexts for the session and reset their lifespans. When provided, Dialogflow uses this field to populate QueryResult.output_contexts sent to the integration or API caller.", "items": { diff --git a/discovery/dialogflow-v3beta1.json b/discovery/dialogflow-v3beta1.json index bc0616cf78b..4fe942c1659 100644 --- a/discovery/dialogflow-v3beta1.json +++ b/discovery/dialogflow-v3beta1.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" }, "https://www.googleapis.com/auth/dialogflow": { "description": "View, manage and query your Dialogflow agents" @@ -1072,7 +1072,7 @@ "entityTypes": { "methods": { "create": { - "description": "Creates a session entity type. If the specified session entity type already exists, overrides the session entity type.", + "description": "Creates a session entity type.", "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/environments/{environmentsId}/sessions/{sessionsId}/entityTypes", "httpMethod": "POST", "id": "dialogflow.projects.locations.agents.environments.sessions.entityTypes.create", @@ -2339,7 +2339,7 @@ "entityTypes": { "methods": { "create": { - "description": "Creates a session entity type. If the specified session entity type already exists, overrides the session entity type.", + "description": "Creates a session entity type.", "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/sessions/{sessionsId}/entityTypes", "httpMethod": "POST", "id": "dialogflow.projects.locations.agents.sessions.entityTypes.create", @@ -2831,6 +2831,32 @@ "resources": { "results": { "methods": { + "get": { + "description": "Gets a test case result.", + "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/testCases/{testCasesId}/results/{resultsId}", + "httpMethod": "GET", + "id": "dialogflow.projects.locations.agents.testCases.results.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the testcase. Format: `projects//locations//agents//testCases//results/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/testCases/[^/]+/results/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v3beta1/{+name}", + "response": { + "$ref": "GoogleCloudDialogflowCxV3beta1TestCaseResult" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, "list": { "description": "Fetches a list of results for a given test case.", "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/testCases/{testCasesId}/results", @@ -3399,7 +3425,7 @@ } } }, - "revision": "20210227", + "revision": "20210320", "rootUrl": "https://dialogflow.googleapis.com/", "schemas": { "GoogleCloudDialogflowCxV3AudioInput": { @@ -4678,7 +4704,7 @@ "type": "object" }, "GoogleCloudDialogflowCxV3WebhookRequest": { - "description": "The request message for a webhook call.", + "description": "The request message for a webhook call. The request is sent as a JSON object and the field names will be presented in camel cases.", "id": "GoogleCloudDialogflowCxV3WebhookRequest", "properties": { "detectIntentResponseId": { @@ -5406,7 +5432,7 @@ "type": "string" }, "experimentLength": { - "description": "Maximum number of days to run the experiment.", + "description": "Maximum number of days to run the experiment. If auto-rollout is not enabled, default value and maximum will be 30 days. If auto-rollout is enabled, default value and maximum will be 6 days.", "format": "google-duration", "type": "string" }, @@ -6630,7 +6656,7 @@ "type": "string" }, "transcript": { - "description": "If natural language speech audio was provided as input, this field will contain the trascript for the audio.", + "description": "If natural language speech audio was provided as input, this field will contain the transcript for the audio.", "type": "string" }, "triggerEvent": { @@ -6638,7 +6664,7 @@ "type": "string" }, "triggerIntent": { - "description": "If an intent was provided as input, this field will contain a copy of the intent identifier.", + "description": "If an intent was provided as input, this field will contain a copy of the intent identifier. Format: `projects//locations//agents//intents/`.", "type": "string" } }, @@ -6973,7 +6999,7 @@ "type": "string" }, "transcript": { - "description": "If natural language speech audio was provided as input, this field will contain the trascript for the audio.", + "description": "If natural language speech audio was provided as input, this field will contain the transcript for the audio.", "type": "string" }, "triggerEvent": { @@ -6981,7 +7007,7 @@ "type": "string" }, "triggerIntent": { - "description": "If an intent was provided as input, this field will contain a copy of the intent identifier.", + "description": "If an intent was provided as input, this field will contain a copy of the intent identifier. Format: `projects//locations//agents//intents/`.", "type": "string" }, "webhookPayloads": { @@ -7214,6 +7240,20 @@ "agentUri": { "description": "The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI to restore agent from. The format of this URI must be `gs:///`.", "type": "string" + }, + "restoreOption": { + "description": "Agent restore mode. If not specified, `KEEP` is assumed.", + "enum": [ + "RESTORE_OPTION_UNSPECIFIED", + "KEEP", + "FALLBACK" + ], + "enumDescriptions": [ + "Unspecified. Treated as KEEP.", + "Always respect the settings from the exported agent file. It may cause a restoration failure if some settings (e.g. model type) are not supported in the target agent.", + "Fallback to default settings if some settings are not supported in the target agent." + ], + "type": "string" } }, "type": "object" @@ -8085,7 +8125,7 @@ "type": "object" }, "GoogleCloudDialogflowCxV3beta1WebhookRequest": { - "description": "The request message for a webhook call.", + "description": "The request message for a webhook call. The request is sent as a JSON object and the field names will be presented in camel cases.", "id": "GoogleCloudDialogflowCxV3beta1WebhookRequest", "properties": { "detectIntentResponseId": { @@ -8282,6 +8322,44 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2ArticleAnswer": { + "description": "Represents article answer.", + "id": "GoogleCloudDialogflowV2ArticleAnswer", + "properties": { + "answerRecord": { + "description": "The name of answer record, in the format of \"projects//locations//answerRecords/\"", + "type": "string" + }, + "confidence": { + "description": "Article match confidence. The system's confidence score that this article is a good match for this conversation, as a value from 0.0 (completely uncertain) to 1.0 (completely certain).", + "format": "float", + "type": "number" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "A map that contains metadata about the answer and the document from which it originates.", + "type": "object" + }, + "snippets": { + "description": "Article snippets.", + "items": { + "type": "string" + }, + "type": "array" + }, + "title": { + "description": "The article title.", + "type": "string" + }, + "uri": { + "description": "The article URI.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2BatchUpdateEntityTypesResponse": { "description": "The response message for EntityTypes.BatchUpdateEntityTypes.", "id": "GoogleCloudDialogflowV2BatchUpdateEntityTypesResponse", @@ -8484,6 +8562,63 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2FaqAnswer": { + "description": "Represents answer from \"frequently asked questions\".", + "id": "GoogleCloudDialogflowV2FaqAnswer", + "properties": { + "answer": { + "description": "The piece of text from the `source` knowledge base document.", + "type": "string" + }, + "answerRecord": { + "description": "The name of answer record, in the format of \"projects//locations//answerRecords/\"", + "type": "string" + }, + "confidence": { + "description": "The system's confidence score that this Knowledge answer is a good match for this conversational query, range from 0.0 (completely uncertain) to 1.0 (completely certain).", + "format": "float", + "type": "number" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "A map that contains metadata about the answer and the document from which it originates.", + "type": "object" + }, + "question": { + "description": "The corresponding FAQ question.", + "type": "string" + }, + "source": { + "description": "Indicates which Knowledge Document this answer was extracted from. Format: `projects//locations//agent/knowledgeBases//documents/`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2HumanAgentAssistantEvent": { + "description": "Represents a notification sent to Cloud Pub/Sub subscribers for human agent assistant events in a specific conversation.", + "id": "GoogleCloudDialogflowV2HumanAgentAssistantEvent", + "properties": { + "conversation": { + "description": "The conversation this notification refers to. Format: `projects//conversations/`.", + "type": "string" + }, + "participant": { + "description": "The participant that the suggestion is compiled for. Format: `projects//conversations//participants/`. It will not be set in legacy workflow.", + "type": "string" + }, + "suggestionResults": { + "description": "The suggestion results payload that this notification refers to.", + "items": { + "$ref": "GoogleCloudDialogflowV2SuggestionResult" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2Intent": { "description": "An intent categorizes an end-user's intention for one conversation turn. For each agent, you define many intents, where your combined intents can handle a complete conversation. When an end-user writes or says something, referred to as an end-user expression or end-user input, Dialogflow matches the end-user input to the best intent in your agent. Matching an intent is also known as intent classification. For more information, see the [intent guide](https://cloud.google.com/dialogflow/docs/intents-overview).", "id": "GoogleCloudDialogflowV2Intent", @@ -8527,6 +8662,10 @@ "description": "Required. The name of this intent.", "type": "string" }, + "endInteraction": { + "description": "Optional. Indicates that this intent ends an interaction. Some integrations (e.g., Actions on Google or Dialogflow phone gateway) use this information to close interaction with an end user. Default is false.", + "type": "boolean" + }, "events": { "description": "Optional. The collection of event names that trigger the intent. If the collection of input contexts is not empty, all of the contexts must be present in the active user session for an event to trigger this intent. Event names are limited to 150 characters.", "items": { @@ -8552,6 +8691,10 @@ "description": "Optional. Indicates whether this is a fallback intent.", "type": "boolean" }, + "liveAgentHandoff": { + "description": "Optional. Indicates that a live agent should be brought in to handle the interaction with the user. In most cases, when you set this flag to true, you would also want to set end_interaction to true as well. Default is false.", + "type": "boolean" + }, "messages": { "description": "Optional. The collection of rich messages corresponding to the `Response` field in the Dialogflow console.", "items": { @@ -9384,6 +9527,30 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2KnowledgeOperationMetadata": { + "description": "Metadata in google::longrunning::Operation for Knowledge operations.", + "id": "GoogleCloudDialogflowV2KnowledgeOperationMetadata", + "properties": { + "state": { + "description": "Output only. The current state of this operation.", + "enum": [ + "STATE_UNSPECIFIED", + "PENDING", + "RUNNING", + "DONE" + ], + "enumDescriptions": [ + "State unspecified.", + "The operation has been created.", + "The operation is currently running.", + "The operation is done, either cancelled or completed." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2Message": { "description": "Represents a message posted into a conversation.", "id": "GoogleCloudDialogflowV2Message", @@ -9624,6 +9791,71 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2SuggestArticlesResponse": { + "description": "The response message for Participants.SuggestArticles.", + "id": "GoogleCloudDialogflowV2SuggestArticlesResponse", + "properties": { + "articleAnswers": { + "description": "Articles ordered by score in descending order.", + "items": { + "$ref": "GoogleCloudDialogflowV2ArticleAnswer" + }, + "type": "array" + }, + "contextSize": { + "description": "Number of messages prior to and including latest_message to compile the suggestion. It may be smaller than the SuggestArticlesRequest.context_size field in the request if there aren't that many messages in the conversation.", + "format": "int32", + "type": "integer" + }, + "latestMessage": { + "description": "The name of the latest conversation message used to compile suggestion for. Format: `projects//locations//conversations//messages/`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2SuggestFaqAnswersResponse": { + "description": "The request message for Participants.SuggestFaqAnswers.", + "id": "GoogleCloudDialogflowV2SuggestFaqAnswersResponse", + "properties": { + "contextSize": { + "description": "Number of messages prior to and including latest_message to compile the suggestion. It may be smaller than the SuggestFaqAnswersRequest.context_size field in the request if there aren't that many messages in the conversation.", + "format": "int32", + "type": "integer" + }, + "faqAnswers": { + "description": "Answers extracted from FAQ documents.", + "items": { + "$ref": "GoogleCloudDialogflowV2FaqAnswer" + }, + "type": "array" + }, + "latestMessage": { + "description": "The name of the latest conversation message used to compile suggestion for. Format: `projects//locations//conversations//messages/`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2SuggestionResult": { + "description": "One response of different type of suggestion response which is used in the response of Participants.AnalyzeContent and Participants.AnalyzeContent, as well as HumanAgentAssistantEvent.", + "id": "GoogleCloudDialogflowV2SuggestionResult", + "properties": { + "error": { + "$ref": "GoogleRpcStatus", + "description": "Error status if the request failed." + }, + "suggestArticlesResponse": { + "$ref": "GoogleCloudDialogflowV2SuggestArticlesResponse", + "description": "SuggestArticlesResponse if request is for ARTICLE_SUGGESTION." + }, + "suggestFaqAnswersResponse": { + "$ref": "GoogleCloudDialogflowV2SuggestFaqAnswersResponse", + "description": "SuggestFaqAnswersResponse if request is for FAQ_ANSWER." + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2WebhookRequest": { "description": "The request message for a webhook call.", "id": "GoogleCloudDialogflowV2WebhookRequest", @@ -9695,6 +9927,58 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2beta1AnnotatedMessagePart": { + "description": "Represents a part of a message possibly annotated with an entity. The part can be an entity or purely a part of the message between two entities or message start/end.", + "id": "GoogleCloudDialogflowV2beta1AnnotatedMessagePart", + "properties": { + "entityType": { + "description": "Optional. The [Dialogflow system entity type](https://cloud.google.com/dialogflow/docs/reference/system-entities) of this message part. If this is empty, Dialogflow could not annotate the phrase part with a system entity.", + "type": "string" + }, + "formattedValue": { + "description": "Optional. The [Dialogflow system entity formatted value ](https://cloud.google.com/dialogflow/docs/reference/system-entities) of this message part. For example for a system entity of type `@sys.unit-currency`, this may contain: { \"amount\": 5, \"currency\": \"USD\" } ", + "type": "any" + }, + "text": { + "description": "Required. A part of a message possibly annotated with an entity.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1ArticleAnswer": { + "description": "Represents article answer.", + "id": "GoogleCloudDialogflowV2beta1ArticleAnswer", + "properties": { + "answerRecord": { + "description": "The name of answer record, in the format of \"projects//locations//answerRecords/\"", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "A map that contains metadata about the answer and the document from which it originates.", + "type": "object" + }, + "snippets": { + "description": "Output only. Article snippets.", + "items": { + "type": "string" + }, + "type": "array" + }, + "title": { + "description": "The article title.", + "type": "string" + }, + "uri": { + "description": "The article URI.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse": { "description": "The response message for EntityTypes.BatchUpdateEntityTypes.", "id": "GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse", @@ -9747,6 +10031,43 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2beta1ConversationEvent": { + "description": "Represents a notification sent to Pub/Sub subscribers for conversation lifecycle events.", + "id": "GoogleCloudDialogflowV2beta1ConversationEvent", + "properties": { + "conversation": { + "description": "Required. The unique identifier of the conversation this notification refers to. Format: `projects//conversations/`.", + "type": "string" + }, + "errorStatus": { + "$ref": "GoogleRpcStatus", + "description": "Optional. More detailed information about an error. Only set for type UNRECOVERABLE_ERROR_IN_PHONE_CALL." + }, + "newMessagePayload": { + "$ref": "GoogleCloudDialogflowV2beta1Message", + "description": "Payload of NEW_MESSAGE event." + }, + "type": { + "description": "Required. The type of the event that this notification refers to.", + "enum": [ + "TYPE_UNSPECIFIED", + "CONVERSATION_STARTED", + "CONVERSATION_FINISHED", + "NEW_MESSAGE", + "UNRECOVERABLE_ERROR" + ], + "enumDescriptions": [ + "Type not set.", + "A new conversation has been opened. This is fired when a telephone call is answered, or a conversation is created via the API.", + "An existing conversation has closed. This is fired when a telephone call is terminated, or a conversation is closed via the API.", + "An existing conversation has received a new message, either from API or telephony. It is configured in ConversationProfile.new_message_event_notification_config", + "Unrecoverable error during a telephone call. In general non-recoverable errors only occur if something was misconfigured in the ConversationProfile corresponding to the call. After a non-recoverable error, Dialogflow may stop responding. We don't fire this event: * in an API call because we can directly return the error, or, * when we can recover from an error." + ], + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2beta1EntityType": { "description": "Each intent parameter has a type, called the entity type, which dictates exactly how data from an end-user expression is extracted. Dialogflow provides predefined system entities that can match many common types of data. For example, there are system entities for matching dates, times, colors, email addresses, and so on. You can also create your own custom entities for matching custom data. For example, you could define a vegetable entity that can match the types of vegetables available for purchase with a grocery store agent. For more information, see the [Entity guide](https://cloud.google.com/dialogflow/docs/entities-overview).", "id": "GoogleCloudDialogflowV2beta1EntityType", @@ -9858,6 +10179,77 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2beta1FaqAnswer": { + "description": "Represents answer from \"frequently asked questions\".", + "id": "GoogleCloudDialogflowV2beta1FaqAnswer", + "properties": { + "answer": { + "description": "The piece of text from the `source` knowledge base document.", + "type": "string" + }, + "answerRecord": { + "description": "The name of answer record, in the format of \"projects//locations//answerRecords/\"", + "type": "string" + }, + "confidence": { + "description": "The system's confidence score that this Knowledge answer is a good match for this conversational query, range from 0.0 (completely uncertain) to 1.0 (completely certain).", + "format": "float", + "type": "number" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "A map that contains metadata about the answer and the document from which it originates.", + "type": "object" + }, + "question": { + "description": "The corresponding FAQ question.", + "type": "string" + }, + "source": { + "description": "Indicates which Knowledge Document this answer was extracted from. Format: `projects//locations//agent/knowledgeBases//documents/`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1HumanAgentAssistantEvent": { + "description": "Output only. Represents a notification sent to Pub/Sub subscribers for agent assistant events in a specific conversation.", + "id": "GoogleCloudDialogflowV2beta1HumanAgentAssistantEvent", + "properties": { + "conversation": { + "description": "The conversation this notification refers to. Format: `projects//conversations/`.", + "type": "string" + }, + "participant": { + "description": "The participant that the suggestion is compiled for. And This field is used to call Participants.ListSuggestions API. Format: `projects//conversations//participants/`. It will not be set in legacy workflow. HumanAgentAssistantConfig.name for more information.", + "type": "string" + }, + "suggestionResults": { + "description": "The suggestion results payload that this notification refers to. It will only be set when HumanAgentAssistantConfig.SuggestionConfig.group_suggestion_responses sets to true.", + "items": { + "$ref": "GoogleCloudDialogflowV2beta1SuggestionResult" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1ImportDocumentsResponse": { + "description": "Response message for Documents.ImportDocuments.", + "id": "GoogleCloudDialogflowV2beta1ImportDocumentsResponse", + "properties": { + "warnings": { + "description": "Includes details about skipped documents or any other warnings.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2beta1Intent": { "description": "An intent categorizes an end-user's intention for one conversation turn. For each agent, you define many intents, where your combined intents can handle a complete conversation. When an end-user writes or says something, referred to as an end-user expression or end-user input, Dialogflow matches the end-user input to the best intent in your agent. Matching an intent is also known as intent classification. For more information, see the [intent guide](https://cloud.google.com/dialogflow/docs/intents-overview).", "id": "GoogleCloudDialogflowV2beta1Intent", @@ -9933,6 +10325,10 @@ "description": "Optional. Indicates whether this is a fallback intent.", "type": "boolean" }, + "liveAgentHandoff": { + "description": "Optional. Indicates that a live agent should be brought in to handle the interaction with the user. In most cases, when you set this flag to true, you would also want to set end_interaction to true as well. Default is false.", + "type": "boolean" + }, "messages": { "description": "Optional. The collection of rich messages corresponding to the `Response` field in the Dialogflow console.", "items": { @@ -11138,6 +11534,86 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2beta1Message": { + "description": "Represents a message posted into a conversation.", + "id": "GoogleCloudDialogflowV2beta1Message", + "properties": { + "content": { + "description": "Required. The message content.", + "type": "string" + }, + "createTime": { + "description": "Output only. The time when the message was created in Contact Center AI.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "languageCode": { + "description": "Optional. The message language. This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. Example: \"en-US\".", + "type": "string" + }, + "messageAnnotation": { + "$ref": "GoogleCloudDialogflowV2beta1MessageAnnotation", + "description": "Output only. The annotation for the message.", + "readOnly": true + }, + "name": { + "description": "Optional. The unique identifier of the message. Format: `projects//locations//conversations//messages/`.", + "type": "string" + }, + "participant": { + "description": "Output only. The participant that sends this message.", + "readOnly": true, + "type": "string" + }, + "participantRole": { + "description": "Output only. The role of the participant.", + "enum": [ + "ROLE_UNSPECIFIED", + "HUMAN_AGENT", + "AUTOMATED_AGENT", + "END_USER" + ], + "enumDescriptions": [ + "Participant role not set.", + "Participant is a human agent.", + "Participant is an automated agent, such as a Dialogflow agent.", + "Participant is an end user that has called or chatted with Dialogflow services." + ], + "readOnly": true, + "type": "string" + }, + "sendTime": { + "description": "Optional. The time when the message was sent.", + "format": "google-datetime", + "type": "string" + }, + "sentimentAnalysis": { + "$ref": "GoogleCloudDialogflowV2beta1SentimentAnalysisResult", + "description": "Output only. The sentiment analysis result for the message.", + "readOnly": true + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1MessageAnnotation": { + "description": "Represents the result of annotation for the message.", + "id": "GoogleCloudDialogflowV2beta1MessageAnnotation", + "properties": { + "containEntities": { + "description": "Required. Indicates whether the text message contains entities.", + "type": "boolean" + }, + "parts": { + "description": "Optional. The collection of annotated message parts ordered by their position in the message. You can recover the annotated message by concatenating [AnnotatedMessagePart.text].", + "items": { + "$ref": "GoogleCloudDialogflowV2beta1AnnotatedMessagePart" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest": { "description": "Represents the contents of the original request that was passed to the `[Streaming]DetectIntent` call.", "id": "GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest", @@ -11312,6 +11788,118 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2beta1SmartReplyAnswer": { + "description": "Represents a smart reply answer.", + "id": "GoogleCloudDialogflowV2beta1SmartReplyAnswer", + "properties": { + "answerRecord": { + "description": "The name of answer record, in the format of \"projects//locations//answerRecords/\"", + "type": "string" + }, + "confidence": { + "description": "Smart reply confidence. The system's confidence score that this reply is a good match for this conversation, as a value from 0.0 (completely uncertain) to 1.0 (completely certain).", + "format": "float", + "type": "number" + }, + "reply": { + "description": "The content of the reply.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1SuggestArticlesResponse": { + "description": "The response message for Participants.SuggestArticles.", + "id": "GoogleCloudDialogflowV2beta1SuggestArticlesResponse", + "properties": { + "articleAnswers": { + "description": "Output only. Articles ordered by score in descending order.", + "items": { + "$ref": "GoogleCloudDialogflowV2beta1ArticleAnswer" + }, + "type": "array" + }, + "contextSize": { + "description": "Number of messages prior to and including latest_message to compile the suggestion. It may be smaller than the SuggestArticlesResponse.context_size field in the request if there aren't that many messages in the conversation.", + "format": "int32", + "type": "integer" + }, + "latestMessage": { + "description": "The name of the latest conversation message used to compile suggestion for. Format: `projects//locations//conversations//messages/`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1SuggestFaqAnswersResponse": { + "description": "The request message for Participants.SuggestFaqAnswers.", + "id": "GoogleCloudDialogflowV2beta1SuggestFaqAnswersResponse", + "properties": { + "contextSize": { + "description": "Number of messages prior to and including latest_message to compile the suggestion. It may be smaller than the SuggestFaqAnswersRequest.context_size field in the request if there aren't that many messages in the conversation.", + "format": "int32", + "type": "integer" + }, + "faqAnswers": { + "description": "Output only. Answers extracted from FAQ documents.", + "items": { + "$ref": "GoogleCloudDialogflowV2beta1FaqAnswer" + }, + "type": "array" + }, + "latestMessage": { + "description": "The name of the latest conversation message used to compile suggestion for. Format: `projects//locations//conversations//messages/`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1SuggestSmartRepliesResponse": { + "description": "The response message for Participants.SuggestSmartReplies.", + "id": "GoogleCloudDialogflowV2beta1SuggestSmartRepliesResponse", + "properties": { + "contextSize": { + "description": "Number of messages prior to and including latest_message to compile the suggestion. It may be smaller than the SuggestSmartRepliesRequest.context_size field in the request if there aren't that many messages in the conversation.", + "format": "int32", + "type": "integer" + }, + "latestMessage": { + "description": "The name of the latest conversation message used to compile suggestion for. Format: `projects//locations//conversations//messages/`.", + "type": "string" + }, + "smartReplyAnswers": { + "description": "Output only. Multiple reply options provided by smart reply service. The order is based on the rank of the model prediction. The maximum number of the returned replies is set in SmartReplyConfig.", + "items": { + "$ref": "GoogleCloudDialogflowV2beta1SmartReplyAnswer" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1SuggestionResult": { + "description": "One response of different type of suggestion response which is used in the response of Participants.AnalyzeContent and Participants.AnalyzeContent, as well as HumanAgentAssistantEvent.", + "id": "GoogleCloudDialogflowV2beta1SuggestionResult", + "properties": { + "error": { + "$ref": "GoogleRpcStatus", + "description": "Error status if the request failed." + }, + "suggestArticlesResponse": { + "$ref": "GoogleCloudDialogflowV2beta1SuggestArticlesResponse", + "description": "SuggestArticlesResponse if request is for ARTICLE_SUGGESTION." + }, + "suggestFaqAnswersResponse": { + "$ref": "GoogleCloudDialogflowV2beta1SuggestFaqAnswersResponse", + "description": "SuggestFaqAnswersResponse if request is for FAQ_ANSWER." + }, + "suggestSmartRepliesResponse": { + "$ref": "GoogleCloudDialogflowV2beta1SuggestSmartRepliesResponse", + "description": "SuggestSmartRepliesResponse if request is for SMART_REPLY." + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2beta1WebhookRequest": { "description": "The request message for a webhook call.", "id": "GoogleCloudDialogflowV2beta1WebhookRequest", @@ -11365,6 +11953,10 @@ "description": "Optional. The text response message intended for the end-user. It is recommended to use `fulfillment_messages.text.text[0]` instead. When provided, Dialogflow uses this field to populate QueryResult.fulfillment_text sent to the integration or API caller.", "type": "string" }, + "liveAgentHandoff": { + "description": "Indicates that a live agent should be brought in to handle the interaction with the user. In most cases, when you set this flag to true, you would also want to set end_interaction to true as well. Default is false.", + "type": "boolean" + }, "outputContexts": { "description": "Optional. The collection of output contexts that will overwrite currently active contexts for the session and reset their lifespans. When provided, Dialogflow uses this field to populate QueryResult.output_contexts sent to the integration or API caller.", "items": { diff --git a/discovery/displayvideo-v1.json b/discovery/displayvideo-v1.json index f7a4a9d584b..7b16bae35f5 100644 --- a/discovery/displayvideo-v1.json +++ b/discovery/displayvideo-v1.json @@ -421,6 +421,62 @@ }, "campaigns": { "methods": { + "bulkListCampaignAssignedTargetingOptions": { + "description": "Lists assigned targeting options of a campaign across targeting types.", + "flatPath": "v1/advertisers/{advertisersId}/campaigns/{campaignsId}:bulkListCampaignAssignedTargetingOptions", + "httpMethod": "GET", + "id": "displayvideo.advertisers.campaigns.bulkListCampaignAssignedTargetingOptions", + "parameterOrder": [ + "advertiserId", + "campaignId" + ], + "parameters": { + "advertiserId": { + "description": "Required. The ID of the advertiser the campaign belongs to.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "campaignId": { + "description": "Required. The ID of the campaign to list assigned targeting options for.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "filter": { + "description": "Allows filtering by assigned targeting option properties. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by the logical operator `OR` on the same field. * A restriction has the form of `{field} {operator} {value}`. * The operator must be `EQUALS (=)`. * Supported fields: - `targetingType` - `inheritance` Examples: * AssignedTargetingOptions of targeting type TARGETING_TYPE_LANGUAGE or TARGETING_TYPE_GENDER `targetingType=\"TARGETING_TYPE_LANGUAGE\" OR targetingType=\"TARGETING_TYPE_GENDER\"` * AssignedTargetingOptions with inheritance status of NOT_INHERITED or INHERITED_FROM_PARTNER `inheritance=\"NOT_INHERITED\" OR inheritance=\"INHERITED_FROM_PARTNER\"` The length of this field should be no more than 500 characters.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Field by which to sort the list. Acceptable values are: * `targetingType` (default) The default sorting order is ascending. To specify descending order for a field, a suffix \"desc\" should be added to the field name. Example: `targetingType desc`.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Requested page size. The size must be an integer between `1` and `5000`. If unspecified, the default is `5000`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A token that lets the client fetch the next page of results. Typically, this is the value of next_page_token returned from the previous call to `BulkListCampaignAssignedTargetingOptions` method. If not specified, the first page of results will be returned.", + "location": "query", + "type": "string" + } + }, + "path": "v1/advertisers/{+advertiserId}/campaigns/{+campaignId}:bulkListCampaignAssignedTargetingOptions", + "response": { + "$ref": "BulkListCampaignAssignedTargetingOptionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/display-video" + ] + }, "create": { "description": "Creates a new campaign. Returns the newly created campaign if successful.", "flatPath": "v1/advertisers/{advertisersId}/campaigns", @@ -603,18 +659,303 @@ "location": "query", "type": "string" } - }, - "path": "v1/advertisers/{+advertiserId}/campaigns/{+campaignId}", - "request": { - "$ref": "Campaign" - }, - "response": { - "$ref": "Campaign" - }, - "scopes": [ - "https://www.googleapis.com/auth/display-video", - "https://www.googleapis.com/auth/display-video-mediaplanning" - ] + }, + "path": "v1/advertisers/{+advertiserId}/campaigns/{+campaignId}", + "request": { + "$ref": "Campaign" + }, + "response": { + "$ref": "Campaign" + }, + "scopes": [ + "https://www.googleapis.com/auth/display-video", + "https://www.googleapis.com/auth/display-video-mediaplanning" + ] + } + }, + "resources": { + "targetingTypes": { + "resources": { + "assignedTargetingOptions": { + "methods": { + "get": { + "description": "Gets a single targeting option assigned to a campaign.", + "flatPath": "v1/advertisers/{advertisersId}/campaigns/{campaignsId}/targetingTypes/{targetingTypesId}/assignedTargetingOptions/{assignedTargetingOptionsId}", + "httpMethod": "GET", + "id": "displayvideo.advertisers.campaigns.targetingTypes.assignedTargetingOptions.get", + "parameterOrder": [ + "advertiserId", + "campaignId", + "targetingType", + "assignedTargetingOptionId" + ], + "parameters": { + "advertiserId": { + "description": "Required. The ID of the advertiser the campaign belongs to.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "assignedTargetingOptionId": { + "description": "Required. An identifier unique to the targeting type in this campaign that identifies the assigned targeting option being requested.", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "campaignId": { + "description": "Required. The ID of the campaign the assigned targeting option belongs to.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "targetingType": { + "description": "Required. Identifies the type of this assigned targeting option. Supported targeting types: * `TARGETING_TYPE_AGE_RANGE` * `TARGETING_TYPE_AUTHORIZED_SELLER_STATUS` * `TARGETING_TYPE_CONTENT_INSTREAM_POSITION` * `TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION` * `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_EXCHANGE` * `TARGETING_TYPE_GENDER` * `TARGETING_TYPE_GEO_REGION` * `TARGETING_TYPE_HOUSEHOLD_INCOME` * `TARGETING_TYPE_INVENTORY_SOURCE` * `TARGETING_TYPE_INVENTORY_SOURCE_GROUP` * `TARGETING_TYPE_LANGUAGE` * `TARGETING_TYPE_ON_SCREEN_POSITION` * `TARGETING_TYPE_PARENTAL_STATUS` * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * `TARGETING_TYPE_SUB_EXCHANGE` * `TARGETING_TYPE_THIRD_PARTY_VERIFIER` * `TARGETING_TYPE_VIEWABILITY`", + "enum": [ + "TARGETING_TYPE_UNSPECIFIED", + "TARGETING_TYPE_CHANNEL", + "TARGETING_TYPE_APP_CATEGORY", + "TARGETING_TYPE_APP", + "TARGETING_TYPE_URL", + "TARGETING_TYPE_DAY_AND_TIME", + "TARGETING_TYPE_AGE_RANGE", + "TARGETING_TYPE_REGIONAL_LOCATION_LIST", + "TARGETING_TYPE_PROXIMITY_LOCATION_LIST", + "TARGETING_TYPE_GENDER", + "TARGETING_TYPE_VIDEO_PLAYER_SIZE", + "TARGETING_TYPE_USER_REWARDED_CONTENT", + "TARGETING_TYPE_PARENTAL_STATUS", + "TARGETING_TYPE_CONTENT_INSTREAM_POSITION", + "TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION", + "TARGETING_TYPE_DEVICE_TYPE", + "TARGETING_TYPE_AUDIENCE_GROUP", + "TARGETING_TYPE_BROWSER", + "TARGETING_TYPE_HOUSEHOLD_INCOME", + "TARGETING_TYPE_ON_SCREEN_POSITION", + "TARGETING_TYPE_THIRD_PARTY_VERIFIER", + "TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION", + "TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION", + "TARGETING_TYPE_ENVIRONMENT", + "TARGETING_TYPE_CARRIER_AND_ISP", + "TARGETING_TYPE_OPERATING_SYSTEM", + "TARGETING_TYPE_DEVICE_MAKE_MODEL", + "TARGETING_TYPE_KEYWORD", + "TARGETING_TYPE_NEGATIVE_KEYWORD_LIST", + "TARGETING_TYPE_VIEWABILITY", + "TARGETING_TYPE_CATEGORY", + "TARGETING_TYPE_INVENTORY_SOURCE", + "TARGETING_TYPE_LANGUAGE", + "TARGETING_TYPE_AUTHORIZED_SELLER_STATUS", + "TARGETING_TYPE_GEO_REGION", + "TARGETING_TYPE_INVENTORY_SOURCE_GROUP", + "TARGETING_TYPE_EXCHANGE", + "TARGETING_TYPE_SUB_EXCHANGE" + ], + "enumDescriptions": [ + "Default value when type is not specified or is unknown in this version.", + "Target a channel (a custom group of related websites or apps).", + "Target an app category (for example, education or puzzle games).", + "Target a specific app (for example, Angry Birds).", + "Target a specific url (for example, quora.com).", + "Target ads during a chosen time period on a specific day.", + "Target ads to a specific age range (for example, 18-24).", + "Target ads to the specified regions on a regional location list.", + "Target ads to the specified points of interest on a proximity location list.", + "Target ads to a specific gender (for example, female or male).", + "Target a specific video player size for video ads.", + "Target user rewarded content for video ads.", + "Target ads to a specific parental status (for example, parent or not a parent).", + "Target video or audio ads in a specific content instream position (for example, pre-roll, mid-roll, or post-roll).", + "Target ads in a specific content outstream position.", + "Target ads to a specific device type (for example, tablet or connected TV).", + "Target ads to an audience or groups of audiences. Singleton field, at most one can exist on a single Lineitem at a time.", + "Target ads to specific web browsers (for example, Chrome).", + "Target ads to a specific household income range (for example, top 10%).", + "Target ads in a specific on screen position.", + "Filter web sites through third party verification (for example, IAS or DoubleVerify).", + "Filter web sites by specific digital content label ratings (for example, DL-MA: suitable only for mature audiences).", + "Filter website content by sensitive categories (for example, adult).", + "Target ads to a specific environment (for example, web or app).", + "Target ads to a specific network carrier or internet service provider (ISP) (for example, Comcast or Orange).", + "Target ads to a specific operating system (for example, macOS).", + "Target ads to a specific device make or model (for example, Roku or Samsung).", + "Target ads to a specific keyword (for example, dog or retriever).", + "Target ads to a specific negative keyword list.", + "Target ads to a specific viewability (for example, 80% viewable).", + "Target ads to a specific content category (for example, arts & entertainment).", + "Purchase impressions from specific deals and auction packages.", + "Target ads to a specific language (for example, English or Japanese).", + "Target ads to ads.txt authorized sellers.", + "Target ads to a specific regional location (for example, a city or state).", + "Purchase impressions from a group of deals and auction packages.", + "Purchase impressions from specific exchanges.", + "Purchase impressions from specific sub-exchanges." + ], + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/advertisers/{+advertiserId}/campaigns/{+campaignId}/targetingTypes/{+targetingType}/assignedTargetingOptions/{+assignedTargetingOptionId}", + "response": { + "$ref": "AssignedTargetingOption" + }, + "scopes": [ + "https://www.googleapis.com/auth/display-video" + ] + }, + "list": { + "description": "Lists the targeting options assigned to a campaign for a specified targeting type.", + "flatPath": "v1/advertisers/{advertisersId}/campaigns/{campaignsId}/targetingTypes/{targetingTypesId}/assignedTargetingOptions", + "httpMethod": "GET", + "id": "displayvideo.advertisers.campaigns.targetingTypes.assignedTargetingOptions.list", + "parameterOrder": [ + "advertiserId", + "campaignId", + "targetingType" + ], + "parameters": { + "advertiserId": { + "description": "Required. The ID of the advertiser the campaign belongs to.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "campaignId": { + "description": "Required. The ID of the campaign to list assigned targeting options for.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "filter": { + "description": "Allows filtering by assigned targeting option properties. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by the logical operator `OR`. * A restriction has the form of `{field} {operator} {value}`. * The operator must be `EQUALS (=)`. * Supported fields: - `assignedTargetingOptionId` - `inheritance` Examples: * AssignedTargetingOptions with ID 1 or 2 `assignedTargetingOptionId=\"1\" OR assignedTargetingOptionId=\"2\"` * AssignedTargetingOptions with inheritance status of NOT_INHERITED or INHERITED_FROM_PARTNER `inheritance=\"NOT_INHERITED\" OR inheritance=\"INHERITED_FROM_PARTNER\"` The length of this field should be no more than 500 characters.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Field by which to sort the list. Acceptable values are: * `assignedTargetingOptionId` (default) The default sorting order is ascending. To specify descending order for a field, a suffix \"desc\" should be added to the field name. Example: `assignedTargetingOptionId desc`.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A token identifying a page of results the server should return. Typically, this is the value of next_page_token returned from the previous call to `ListCampaignAssignedTargetingOptions` method. If not specified, the first page of results will be returned.", + "location": "query", + "type": "string" + }, + "targetingType": { + "description": "Required. Identifies the type of assigned targeting options to list. Supported targeting types: * `TARGETING_TYPE_AGE_RANGE` * `TARGETING_TYPE_AUTHORIZED_SELLER_STATUS` * `TARGETING_TYPE_CONTENT_INSTREAM_POSITION` * `TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION` * `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_EXCHANGE` * `TARGETING_TYPE_GENDER` * `TARGETING_TYPE_GEO_REGION` * `TARGETING_TYPE_HOUSEHOLD_INCOME` * `TARGETING_TYPE_INVENTORY_SOURCE` * `TARGETING_TYPE_INVENTORY_SOURCE_GROUP` * `TARGETING_TYPE_LANGUAGE` * `TARGETING_TYPE_ON_SCREEN_POSITION` * `TARGETING_TYPE_PARENTAL_STATUS` * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * `TARGETING_TYPE_SUB_EXCHANGE` * `TARGETING_TYPE_THIRD_PARTY_VERIFIER` * `TARGETING_TYPE_VIEWABILITY`", + "enum": [ + "TARGETING_TYPE_UNSPECIFIED", + "TARGETING_TYPE_CHANNEL", + "TARGETING_TYPE_APP_CATEGORY", + "TARGETING_TYPE_APP", + "TARGETING_TYPE_URL", + "TARGETING_TYPE_DAY_AND_TIME", + "TARGETING_TYPE_AGE_RANGE", + "TARGETING_TYPE_REGIONAL_LOCATION_LIST", + "TARGETING_TYPE_PROXIMITY_LOCATION_LIST", + "TARGETING_TYPE_GENDER", + "TARGETING_TYPE_VIDEO_PLAYER_SIZE", + "TARGETING_TYPE_USER_REWARDED_CONTENT", + "TARGETING_TYPE_PARENTAL_STATUS", + "TARGETING_TYPE_CONTENT_INSTREAM_POSITION", + "TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION", + "TARGETING_TYPE_DEVICE_TYPE", + "TARGETING_TYPE_AUDIENCE_GROUP", + "TARGETING_TYPE_BROWSER", + "TARGETING_TYPE_HOUSEHOLD_INCOME", + "TARGETING_TYPE_ON_SCREEN_POSITION", + "TARGETING_TYPE_THIRD_PARTY_VERIFIER", + "TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION", + "TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION", + "TARGETING_TYPE_ENVIRONMENT", + "TARGETING_TYPE_CARRIER_AND_ISP", + "TARGETING_TYPE_OPERATING_SYSTEM", + "TARGETING_TYPE_DEVICE_MAKE_MODEL", + "TARGETING_TYPE_KEYWORD", + "TARGETING_TYPE_NEGATIVE_KEYWORD_LIST", + "TARGETING_TYPE_VIEWABILITY", + "TARGETING_TYPE_CATEGORY", + "TARGETING_TYPE_INVENTORY_SOURCE", + "TARGETING_TYPE_LANGUAGE", + "TARGETING_TYPE_AUTHORIZED_SELLER_STATUS", + "TARGETING_TYPE_GEO_REGION", + "TARGETING_TYPE_INVENTORY_SOURCE_GROUP", + "TARGETING_TYPE_EXCHANGE", + "TARGETING_TYPE_SUB_EXCHANGE" + ], + "enumDescriptions": [ + "Default value when type is not specified or is unknown in this version.", + "Target a channel (a custom group of related websites or apps).", + "Target an app category (for example, education or puzzle games).", + "Target a specific app (for example, Angry Birds).", + "Target a specific url (for example, quora.com).", + "Target ads during a chosen time period on a specific day.", + "Target ads to a specific age range (for example, 18-24).", + "Target ads to the specified regions on a regional location list.", + "Target ads to the specified points of interest on a proximity location list.", + "Target ads to a specific gender (for example, female or male).", + "Target a specific video player size for video ads.", + "Target user rewarded content for video ads.", + "Target ads to a specific parental status (for example, parent or not a parent).", + "Target video or audio ads in a specific content instream position (for example, pre-roll, mid-roll, or post-roll).", + "Target ads in a specific content outstream position.", + "Target ads to a specific device type (for example, tablet or connected TV).", + "Target ads to an audience or groups of audiences. Singleton field, at most one can exist on a single Lineitem at a time.", + "Target ads to specific web browsers (for example, Chrome).", + "Target ads to a specific household income range (for example, top 10%).", + "Target ads in a specific on screen position.", + "Filter web sites through third party verification (for example, IAS or DoubleVerify).", + "Filter web sites by specific digital content label ratings (for example, DL-MA: suitable only for mature audiences).", + "Filter website content by sensitive categories (for example, adult).", + "Target ads to a specific environment (for example, web or app).", + "Target ads to a specific network carrier or internet service provider (ISP) (for example, Comcast or Orange).", + "Target ads to a specific operating system (for example, macOS).", + "Target ads to a specific device make or model (for example, Roku or Samsung).", + "Target ads to a specific keyword (for example, dog or retriever).", + "Target ads to a specific negative keyword list.", + "Target ads to a specific viewability (for example, 80% viewable).", + "Target ads to a specific content category (for example, arts & entertainment).", + "Purchase impressions from specific deals and auction packages.", + "Target ads to a specific language (for example, English or Japanese).", + "Target ads to ads.txt authorized sellers.", + "Target ads to a specific regional location (for example, a city or state).", + "Purchase impressions from a group of deals and auction packages.", + "Purchase impressions from specific exchanges.", + "Purchase impressions from specific sub-exchanges." + ], + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/advertisers/{+advertiserId}/campaigns/{+campaignId}/targetingTypes/{+targetingType}/assignedTargetingOptions", + "response": { + "$ref": "ListCampaignAssignedTargetingOptionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/display-video" + ] + } + } + } + } } } }, @@ -967,7 +1308,7 @@ "type": "string" }, "pageSize": { - "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + "description": "Requested page size. Must be between `1` and `10000`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", "format": "int32", "location": "query", "type": "integer" @@ -991,6 +1332,43 @@ "scopes": [ "https://www.googleapis.com/auth/display-video" ] + }, + "replace": { + "description": "Replaces all of the sites under a single channel. The operation will replace the sites under a channel with the sites provided in ReplaceSitesRequest.new_sites.", + "flatPath": "v1/advertisers/{advertiserId}/channels/{channelsId}/sites:replace", + "httpMethod": "POST", + "id": "displayvideo.advertisers.channels.sites.replace", + "parameterOrder": [ + "advertiserId", + "channelId" + ], + "parameters": { + "advertiserId": { + "description": "The ID of the advertiser that owns the parent channel.", + "format": "int64", + "location": "path", + "required": true, + "type": "string" + }, + "channelId": { + "description": "Required. The ID of the parent channel whose sites will be replaced.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/advertisers/{advertiserId}/channels/{+channelId}/sites:replace", + "request": { + "$ref": "ReplaceSitesRequest" + }, + "response": { + "$ref": "ReplaceSitesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/display-video" + ] } } } @@ -1885,6 +2263,35 @@ "https://www.googleapis.com/auth/display-video" ] }, + "generateDefault": { + "description": "Creates a new line item with settings (including targeting) inherited from the insertion order. Returns the newly created line item if successful. There are default values based on the three fields: * The insertion order's InsertionOrderType * The insertion order's InsertionOrderAutomationType * The given line_item_type", + "flatPath": "v1/advertisers/{advertisersId}/lineItems:generateDefault", + "httpMethod": "POST", + "id": "displayvideo.advertisers.lineItems.generateDefault", + "parameterOrder": [ + "advertiserId" + ], + "parameters": { + "advertiserId": { + "description": "Required. The ID of the advertiser this line item belongs to.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/advertisers/{+advertiserId}/lineItems:generateDefault", + "request": { + "$ref": "GenerateDefaultLineItemRequest" + }, + "response": { + "$ref": "LineItem" + }, + "scopes": [ + "https://www.googleapis.com/auth/display-video" + ] + }, "get": { "description": "Gets a line item.", "flatPath": "v1/advertisers/{advertisersId}/lineItems/{lineItemsId}", @@ -3461,7 +3868,7 @@ "type": "string" }, "pageSize": { - "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + "description": "Requested page size. Must be between `1` and `1000`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", "format": "int32", "location": "query", "type": "integer" @@ -3479,6 +3886,43 @@ "scopes": [ "https://www.googleapis.com/auth/display-video" ] + }, + "replace": { + "description": "Replaces all negative keywords in a single negative keyword list. The operation will replace the keywords in a negative keywords with keywords provided in ReplaceNegativeKeywordsRequest.new_negative_keywords.", + "flatPath": "v1/advertisers/{advertiserId}/negativeKeywordLists/{negativeKeywordListsId}/negativeKeywords:replace", + "httpMethod": "POST", + "id": "displayvideo.advertisers.negativeKeywordLists.negativeKeywords.replace", + "parameterOrder": [ + "advertiserId", + "negativeKeywordListId" + ], + "parameters": { + "advertiserId": { + "description": "Required. The ID of the DV360 advertiser to which the parent negative keyword list belongs.", + "format": "int64", + "location": "path", + "required": true, + "type": "string" + }, + "negativeKeywordListId": { + "description": "Required. The ID of the parent negative keyword list to which the negative keywords belong.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/advertisers/{advertiserId}/negativeKeywordLists/{+negativeKeywordListId}/negativeKeywords:replace", + "request": { + "$ref": "ReplaceNegativeKeywordsRequest" + }, + "response": { + "$ref": "ReplaceNegativeKeywordsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/display-video" + ] } } } @@ -5456,7 +5900,7 @@ "type": "string" }, "pageSize": { - "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + "description": "Requested page size. Must be between `1` and `10000`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", "format": "int32", "location": "query", "type": "integer" @@ -5482,6 +5926,43 @@ "scopes": [ "https://www.googleapis.com/auth/display-video" ] + }, + "replace": { + "description": "Replaces all of the sites under a single channel. The operation will replace the sites under a channel with the sites provided in ReplaceSitesRequest.new_sites.", + "flatPath": "v1/partners/{partnerId}/channels/{channelsId}/sites:replace", + "httpMethod": "POST", + "id": "displayvideo.partners.channels.sites.replace", + "parameterOrder": [ + "partnerId", + "channelId" + ], + "parameters": { + "channelId": { + "description": "Required. The ID of the parent channel whose sites will be replaced.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + }, + "partnerId": { + "description": "The ID of the partner that owns the parent channel.", + "format": "int64", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v1/partners/{partnerId}/channels/{+channelId}/sites:replace", + "request": { + "$ref": "ReplaceSitesRequest" + }, + "response": { + "$ref": "ReplaceSitesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/display-video" + ] } } } @@ -6590,7 +7071,7 @@ } } }, - "revision": "20210304", + "revision": "20210323", "rootUrl": "https://displayvideo.googleapis.com/", "schemas": { "ActivateManualTriggerRequest": { @@ -6999,6 +7480,36 @@ "description": "Required. The ID of the app. Android's Play store app uses bundle ID, for example `com.google.android.gm`. Apple's App store app ID uses 9 digit string, for example `422689480`.", "type": "string" }, + "appPlatform": { + "description": "Indicates the platform of the targeted app. If this field is not specified, the app platform will be assumed to be mobile (i.e., Android or iOS), and we will derive the appropriate mobile platform from the app ID.", + "enum": [ + "APP_PLATFORM_UNSPECIFIED", + "APP_PLATFORM_IOS", + "APP_PLATFORM_ANDROID", + "APP_PLATFORM_ROKU", + "APP_PLATFORM_AMAZON_FIRETV", + "APP_PLATFORM_PLAYSTATION", + "APP_PLATFORM_APPLE_TV", + "APP_PLATFORM_XBOX", + "APP_PLATFORM_SAMSUNG_TV", + "APP_PLATFORM_ANDROID_TV", + "APP_PLATFORM_GENERIC_CTV" + ], + "enumDescriptions": [ + "Default value when app platform is not specified in this version. This enum is a placeholder for default value and does not represent a real platform option.", + "The app platform is iOS.", + "The app platform is Android.", + "The app platform is Roku.", + "The app platform is Amazon FireTV.", + "The app platform is Playstation.", + "The app platform is Apple TV.", + "The app platform is Xbox.", + "The app platform is Samsung TV.", + "The app platform is Android TV.", + "The app platform is a CTV platform that is not explicitly listed elsewhere." + ], + "type": "string" + }, "displayName": { "description": "Output only. The display name of the app.", "readOnly": true, @@ -7989,6 +8500,24 @@ }, "type": "object" }, + "BulkListCampaignAssignedTargetingOptionsResponse": { + "description": "Response message for BulkListCampaignAssignedTargetingOptions.", + "id": "BulkListCampaignAssignedTargetingOptionsResponse", + "properties": { + "assignedTargetingOptions": { + "description": "The list of assigned targeting options. This list will be absent if empty.", + "items": { + "$ref": "AssignedTargetingOption" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token identifying the next page of results. This value should be specified as the pageToken in a subsequent BulkListCampaignAssignedTargetingOptionsRequest to fetch the next page of results. This token will be absent if there are no more assigned_targeting_options to return.", + "type": "string" + } + }, + "type": "object" + }, "BulkListInsertionOrderAssignedTargetingOptionsResponse": { "description": "Response message for BulkListInsertionOrderAssignedTargetingOptions.", "id": "BulkListInsertionOrderAssignedTargetingOptionsResponse", @@ -10924,6 +11453,52 @@ }, "type": "object" }, + "GenerateDefaultLineItemRequest": { + "description": "Request message for LineItemService.GenerateDefaultLineItem.", + "id": "GenerateDefaultLineItemRequest", + "properties": { + "displayName": { + "description": "Required. The display name of the line item. Must be UTF-8 encoded with a maximum size of 240 bytes.", + "type": "string" + }, + "insertionOrderId": { + "description": "Required. The unique ID of the insertion order that the line item belongs to.", + "format": "int64", + "type": "string" + }, + "lineItemType": { + "description": "Required. The type of the line item.", + "enum": [ + "LINE_ITEM_TYPE_UNSPECIFIED", + "LINE_ITEM_TYPE_DISPLAY_DEFAULT", + "LINE_ITEM_TYPE_DISPLAY_MOBILE_APP_INSTALL", + "LINE_ITEM_TYPE_VIDEO_DEFAULT", + "LINE_ITEM_TYPE_VIDEO_MOBILE_APP_INSTALL", + "LINE_ITEM_TYPE_DISPLAY_MOBILE_APP_INVENTORY", + "LINE_ITEM_TYPE_VIDEO_MOBILE_APP_INVENTORY", + "LINE_ITEM_TYPE_AUDIO_DEFAULT", + "LINE_ITEM_TYPE_VIDEO_OVER_THE_TOP" + ], + "enumDescriptions": [ + "Type value is not specified or is unknown in this version.", + "Image, HTML5, native, or rich media ads.", + "Display ads that drive installs of an app.", + "Video ads sold on a CPM basis for a variety of environments.", + "Video ads that drive installs of an app.", + "Display ads served on mobile app inventory.", + "Video ads served on mobile app inventory.", + "RTB Audio ads sold for a variety of environments.", + "Over-the-top ads present in OTT insertion orders. This type is only applicable to line items with an insertion order of insertion_order_type `OVER_THE_TOP`." + ], + "type": "string" + }, + "mobileApp": { + "$ref": "MobileApp", + "description": "The mobile app promoted by the line item. This is applicable only when line_item_type is either `LINE_ITEM_TYPE_DISPLAY_MOBILE_APP_INSTALL` or `LINE_ITEM_TYPE_VIDEO_MOBILE_APP_INSTALL`." + } + }, + "type": "object" + }, "GeoRegionAssignedTargetingOptionDetails": { "description": "Details for assigned geographic region targeting option. This will be populated in the details field of an AssignedTargetingOption when targeting_type is `TARGETING_TYPE_GEO_REGION`.", "id": "GeoRegionAssignedTargetingOptionDetails", @@ -12482,6 +13057,24 @@ }, "type": "object" }, + "ListCampaignAssignedTargetingOptionsResponse": { + "description": "Response message for ListCampaignAssignedTargetingOptions.", + "id": "ListCampaignAssignedTargetingOptionsResponse", + "properties": { + "assignedTargetingOptions": { + "description": "The list of assigned targeting options. This list will be absent if empty.", + "items": { + "$ref": "AssignedTargetingOption" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token identifying the next page of results. This value should be specified as the pageToken in a subsequent ListCampaignAssignedTargetingOptionsRequest to fetch the next page of results. This token will be absent if there are no more assigned_targeting_options to return.", + "type": "string" + } + }, + "type": "object" + }, "ListCampaignsResponse": { "id": "ListCampaignsResponse", "properties": { @@ -13968,6 +14561,72 @@ }, "type": "object" }, + "ReplaceNegativeKeywordsRequest": { + "description": "Request message for NegativeKeywordService.ReplaceNegativeKeywords.", + "id": "ReplaceNegativeKeywordsRequest", + "properties": { + "newNegativeKeywords": { + "description": "The negative keywords that will replace the existing keywords in the negative keyword list, specified as a list of NegativeKeywords.", + "items": { + "$ref": "NegativeKeyword" + }, + "type": "array" + } + }, + "type": "object" + }, + "ReplaceNegativeKeywordsResponse": { + "description": "Response message for NegativeKeywordService.ReplaceNegativeKeywords.", + "id": "ReplaceNegativeKeywordsResponse", + "properties": { + "negativeKeywords": { + "description": "The full list of negative keywords now present in the negative keyword list.", + "items": { + "$ref": "NegativeKeyword" + }, + "type": "array" + } + }, + "type": "object" + }, + "ReplaceSitesRequest": { + "description": "Request message for SiteService.ReplaceSites.", + "id": "ReplaceSitesRequest", + "properties": { + "advertiserId": { + "description": "The ID of the advertiser that owns the parent channel.", + "format": "int64", + "type": "string" + }, + "newSites": { + "description": "The sites that will replace the existing sites assigned to the channel, specified as a list of Sites.", + "items": { + "$ref": "Site" + }, + "type": "array" + }, + "partnerId": { + "description": "The ID of the partner that owns the parent channel.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "ReplaceSitesResponse": { + "description": "Response message for SiteService.ReplaceSites.", + "id": "ReplaceSitesResponse", + "properties": { + "sites": { + "description": "The list of sites in the channel after replacing.", + "items": { + "$ref": "Site" + }, + "type": "array" + } + }, + "type": "object" + }, "ReviewStatusInfo": { "description": "Review statuses for the creative.", "id": "ReviewStatusInfo", diff --git a/discovery/dns-v1.json b/discovery/dns-v1.json index 381b4f4840d..f2a9fbba07d 100644 --- a/discovery/dns-v1.json +++ b/discovery/dns-v1.json @@ -269,7 +269,7 @@ "dnsKeys": { "methods": { "get": { - "description": "Fetch the representation of an existing DnsKey.", + "description": "Fetches the representation of an existing DnsKey.", "flatPath": "dns/v1/projects/{project}/managedZones/{managedZone}/dnsKeys/{dnsKeyId}", "httpMethod": "GET", "id": "dns.dnsKeys.get", @@ -320,7 +320,7 @@ ] }, "list": { - "description": "Enumerate DnsKeys to a ResourceRecordSet collection.", + "description": "Enumerates DnsKeys to a ResourceRecordSet collection.", "flatPath": "dns/v1/projects/{project}/managedZones/{managedZone}/dnsKeys", "httpMethod": "GET", "id": "dns.dnsKeys.list", @@ -483,7 +483,7 @@ "managedZones": { "methods": { "create": { - "description": "Create a new ManagedZone.", + "description": "Creates a new ManagedZone.", "flatPath": "dns/v1/projects/{project}/managedZones", "httpMethod": "POST", "id": "dns.managedZones.create", @@ -516,7 +516,7 @@ ] }, "delete": { - "description": "Delete a previously created ManagedZone.", + "description": "Deletes a previously created ManagedZone.", "flatPath": "dns/v1/projects/{project}/managedZones/{managedZone}", "httpMethod": "DELETE", "id": "dns.managedZones.delete", @@ -550,7 +550,7 @@ ] }, "get": { - "description": "Fetch the representation of an existing ManagedZone.", + "description": "Fetches the representation of an existing ManagedZone.", "flatPath": "dns/v1/projects/{project}/managedZones/{managedZone}", "httpMethod": "GET", "id": "dns.managedZones.get", @@ -589,7 +589,7 @@ ] }, "list": { - "description": "Enumerate ManagedZones that have been created but not yet deleted.", + "description": "Enumerates ManagedZones that have been created but not yet deleted.", "flatPath": "dns/v1/projects/{project}/managedZones", "httpMethod": "GET", "id": "dns.managedZones.list", @@ -632,7 +632,7 @@ ] }, "patch": { - "description": "Apply a partial update to an existing ManagedZone.", + "description": "Applies a partial update to an existing ManagedZone.", "flatPath": "dns/v1/projects/{project}/managedZones/{managedZone}", "httpMethod": "PATCH", "id": "dns.managedZones.patch", @@ -672,7 +672,7 @@ ] }, "update": { - "description": "Update an existing ManagedZone.", + "description": "Updates an existing ManagedZone.", "flatPath": "dns/v1/projects/{project}/managedZones/{managedZone}", "httpMethod": "PUT", "id": "dns.managedZones.update", @@ -860,7 +860,7 @@ ] }, "patch": { - "description": "Apply a partial update to an existing Policy.", + "description": "Applies a partial update to an existing Policy.", "flatPath": "dns/v1/projects/{project}/policies/{policy}", "httpMethod": "PATCH", "id": "dns.policies.patch", @@ -900,7 +900,7 @@ ] }, "update": { - "description": "Update an existing Policy.", + "description": "Updates an existing Policy.", "flatPath": "dns/v1/projects/{project}/policies/{policy}", "httpMethod": "PUT", "id": "dns.policies.update", @@ -944,7 +944,7 @@ "projects": { "methods": { "get": { - "description": "Fetch the representation of an existing Project.", + "description": "Fetches the representation of an existing Project.", "flatPath": "dns/v1/projects/{project}", "httpMethod": "GET", "id": "dns.projects.get", @@ -982,7 +982,7 @@ "rrsets": { "methods": { "create": { - "description": "Create a new ResourceRecordSet.", + "description": "Creates a new ResourceRecordSet.", "flatPath": "dns/v1/projects/{project}/managedZones/{managedZone}/rrsets", "httpMethod": "POST", "id": "dns.projects.managedZones.rrsets.create", @@ -1022,7 +1022,7 @@ ] }, "delete": { - "description": "Delete a previously created ResourceRecordSet.", + "description": "Deletes a previously created ResourceRecordSet.", "flatPath": "dns/v1/projects/{project}/managedZones/{managedZone}/rrsets/{name}/{type}", "httpMethod": "DELETE", "id": "dns.projects.managedZones.rrsets.delete", @@ -1073,7 +1073,7 @@ ] }, "get": { - "description": "Fetch the representation of an existing ResourceRecordSet.", + "description": "Fetches the representation of an existing ResourceRecordSet.", "flatPath": "dns/v1/projects/{project}/managedZones/{managedZone}/rrsets/{name}/{type}", "httpMethod": "GET", "id": "dns.projects.managedZones.rrsets.get", @@ -1126,7 +1126,7 @@ ] }, "patch": { - "description": "Apply a partial update to an existing ResourceRecordSet.", + "description": "Applies a partial update to an existing ResourceRecordSet.", "flatPath": "dns/v1/projects/{project}/managedZones/{managedZone}/rrsets/{name}/{type}", "httpMethod": "PATCH", "id": "dns.projects.managedZones.rrsets.patch", @@ -1245,7 +1245,7 @@ } } }, - "revision": "20210303", + "revision": "20210314", "rootUrl": "https://dns.googleapis.com/", "schemas": { "Change": { @@ -1317,7 +1317,7 @@ "type": "string" }, "nextPageToken": { - "description": "The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your pagination token. In this way you can retrieve the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. There is no way to retrieve a \"snapshot\" of collections larger than the maximum page size.", + "description": "The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your pagination token. This lets you retrieve the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. You cannot retrieve a \"snapshot\" of collections larger than the maximum page size.", "type": "string" } }, @@ -1680,7 +1680,7 @@ "type": "string" }, "nextPageToken": { - "description": "The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your page token. In this way you can retrieve the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. There is no way to retrieve a consistent snapshot of a collection larger than the maximum page size.", + "description": "The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your page token. This lets you retrieve the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. You cannot retrieve a consistent snapshot of a collection larger than the maximum page size.", "type": "string" }, "operations": { @@ -1793,7 +1793,7 @@ "type": "string" }, "namespaceUrl": { - "description": "The fully qualified URL of the namespace associated with the zone. This should be formatted like https://servicedirectory.googleapis.com/v1/projects/{project}/locations/{location}/namespaces/{namespace}", + "description": "The fully qualified URL of the namespace associated with the zone. Format must be https://servicedirectory.googleapis.com/v1/projects/{project}/locations/{location}/namespaces/{namespace}", "type": "string" } }, @@ -1818,7 +1818,7 @@ "type": "array" }, "nextPageToken": { - "description": "The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your page token. In this way you can retrieve the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. There is no way to retrieve a consistent snapshot of a collection larger than the maximum page size.", + "description": "The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your page token. This lets you the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. You cannot retrieve a consistent snapshot of a collection larger than the maximum page size.", "type": "string" } }, @@ -1911,7 +1911,7 @@ "type": "string" }, "nextPageToken": { - "description": "The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your page token. In this way you can retrieve the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. There is no way to retrieve a consistent snapshot of a collection larger than the maximum page size.", + "description": "The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your page token. This lets you the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. You cannot retrieve a consistent snapshot of a collection larger than the maximum page size.", "type": "string" }, "policies": { @@ -2049,7 +2049,7 @@ "type": "object" }, "Project": { - "description": "A project resource. The project is a top level container for resources including Cloud DNS ManagedZones. Projects can be created only in the APIs console.", + "description": "A project resource. The project is a top level container for resources including Cloud DNS ManagedZones. Projects can be created only in the APIs console. Next tag: 7.", "id": "Project", "properties": { "id": { diff --git a/discovery/dns-v1beta2.json b/discovery/dns-v1beta2.json index 9aa5431cd4c..b151baf1822 100644 --- a/discovery/dns-v1beta2.json +++ b/discovery/dns-v1beta2.json @@ -269,7 +269,7 @@ "dnsKeys": { "methods": { "get": { - "description": "Fetch the representation of an existing DnsKey.", + "description": "Fetches the representation of an existing DnsKey.", "flatPath": "dns/v1beta2/projects/{project}/managedZones/{managedZone}/dnsKeys/{dnsKeyId}", "httpMethod": "GET", "id": "dns.dnsKeys.get", @@ -320,7 +320,7 @@ ] }, "list": { - "description": "Enumerate DnsKeys to a ResourceRecordSet collection.", + "description": "Enumerates DnsKeys to a ResourceRecordSet collection.", "flatPath": "dns/v1beta2/projects/{project}/managedZones/{managedZone}/dnsKeys", "httpMethod": "GET", "id": "dns.dnsKeys.list", @@ -483,7 +483,7 @@ "managedZones": { "methods": { "create": { - "description": "Create a new ManagedZone.", + "description": "Creates a new ManagedZone.", "flatPath": "dns/v1beta2/projects/{project}/managedZones", "httpMethod": "POST", "id": "dns.managedZones.create", @@ -516,7 +516,7 @@ ] }, "delete": { - "description": "Delete a previously created ManagedZone.", + "description": "Deletes a previously created ManagedZone.", "flatPath": "dns/v1beta2/projects/{project}/managedZones/{managedZone}", "httpMethod": "DELETE", "id": "dns.managedZones.delete", @@ -550,7 +550,7 @@ ] }, "get": { - "description": "Fetch the representation of an existing ManagedZone.", + "description": "Fetches the representation of an existing ManagedZone.", "flatPath": "dns/v1beta2/projects/{project}/managedZones/{managedZone}", "httpMethod": "GET", "id": "dns.managedZones.get", @@ -589,7 +589,7 @@ ] }, "list": { - "description": "Enumerate ManagedZones that have been created but not yet deleted.", + "description": "Enumerates ManagedZones that have been created but not yet deleted.", "flatPath": "dns/v1beta2/projects/{project}/managedZones", "httpMethod": "GET", "id": "dns.managedZones.list", @@ -632,7 +632,7 @@ ] }, "patch": { - "description": "Apply a partial update to an existing ManagedZone.", + "description": "Applies a partial update to an existing ManagedZone.", "flatPath": "dns/v1beta2/projects/{project}/managedZones/{managedZone}", "httpMethod": "PATCH", "id": "dns.managedZones.patch", @@ -672,7 +672,7 @@ ] }, "update": { - "description": "Update an existing ManagedZone.", + "description": "Updates an existing ManagedZone.", "flatPath": "dns/v1beta2/projects/{project}/managedZones/{managedZone}", "httpMethod": "PUT", "id": "dns.managedZones.update", @@ -860,7 +860,7 @@ ] }, "patch": { - "description": "Apply a partial update to an existing Policy.", + "description": "Applies a partial update to an existing Policy.", "flatPath": "dns/v1beta2/projects/{project}/policies/{policy}", "httpMethod": "PATCH", "id": "dns.policies.patch", @@ -900,7 +900,7 @@ ] }, "update": { - "description": "Update an existing Policy.", + "description": "Updates an existing Policy.", "flatPath": "dns/v1beta2/projects/{project}/policies/{policy}", "httpMethod": "PUT", "id": "dns.policies.update", @@ -944,7 +944,7 @@ "projects": { "methods": { "get": { - "description": "Fetch the representation of an existing Project.", + "description": "Fetches the representation of an existing Project.", "flatPath": "dns/v1beta2/projects/{project}", "httpMethod": "GET", "id": "dns.projects.get", @@ -982,7 +982,7 @@ "rrsets": { "methods": { "create": { - "description": "Create a new ResourceRecordSet.", + "description": "Creates a new ResourceRecordSet.", "flatPath": "dns/v1beta2/projects/{project}/managedZones/{managedZone}/rrsets", "httpMethod": "POST", "id": "dns.projects.managedZones.rrsets.create", @@ -1022,7 +1022,7 @@ ] }, "delete": { - "description": "Delete a previously created ResourceRecordSet.", + "description": "Deletes a previously created ResourceRecordSet.", "flatPath": "dns/v1beta2/projects/{project}/managedZones/{managedZone}/rrsets/{name}/{type}", "httpMethod": "DELETE", "id": "dns.projects.managedZones.rrsets.delete", @@ -1070,7 +1070,7 @@ ] }, "get": { - "description": "Fetch the representation of an existing ResourceRecordSet.", + "description": "Fetches the representation of an existing ResourceRecordSet.", "flatPath": "dns/v1beta2/projects/{project}/managedZones/{managedZone}/rrsets/{name}/{type}", "httpMethod": "GET", "id": "dns.projects.managedZones.rrsets.get", @@ -1123,7 +1123,7 @@ ] }, "patch": { - "description": "Apply a partial update to an existing ResourceRecordSet.", + "description": "Applies a partial update to an existing ResourceRecordSet.", "flatPath": "dns/v1beta2/projects/{project}/managedZones/{managedZone}/rrsets/{name}/{type}", "httpMethod": "PATCH", "id": "dns.projects.managedZones.rrsets.patch", @@ -1277,7 +1277,7 @@ ] }, "delete": { - "description": "Delete a previously created Response Policy. Fails if the response policy is non-empty or still being referenced by a network.", + "description": "Deletes a previously created Response Policy. Fails if the response policy is non-empty or still being referenced by a network.", "flatPath": "dns/v1beta2/projects/{project}/responsePolicies/{responsePolicy}", "httpMethod": "DELETE", "id": "dns.responsePolicies.delete", @@ -1311,7 +1311,7 @@ ] }, "get": { - "description": "Fetch the representation of an existing Response Policy.", + "description": "Fetches the representation of an existing Response Policy.", "flatPath": "dns/v1beta2/projects/{project}/responsePolicies/{responsePolicy}", "httpMethod": "GET", "id": "dns.responsePolicies.get", @@ -1350,7 +1350,7 @@ ] }, "list": { - "description": "Enumerate all Response Policies associated with a project.", + "description": "Enumerates all Response Policies associated with a project.", "flatPath": "dns/v1beta2/projects/{project}/responsePolicies", "httpMethod": "GET", "id": "dns.responsePolicies.list", @@ -1388,7 +1388,7 @@ ] }, "patch": { - "description": "Apply a partial update to an existing Response Policy.", + "description": "Applies a partial update to an existing Response Policy.", "flatPath": "dns/v1beta2/projects/{project}/responsePolicies/{responsePolicy}", "httpMethod": "PATCH", "id": "dns.responsePolicies.patch", @@ -1428,7 +1428,7 @@ ] }, "update": { - "description": "Update an existing Response Policy.", + "description": "Updates an existing Response Policy.", "flatPath": "dns/v1beta2/projects/{project}/responsePolicies/{responsePolicy}", "httpMethod": "PUT", "id": "dns.responsePolicies.update", @@ -1512,7 +1512,7 @@ ] }, "delete": { - "description": "Delete a previously created Response Policy Rule.", + "description": "Deletes a previously created Response Policy Rule.", "flatPath": "dns/v1beta2/projects/{project}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}", "httpMethod": "DELETE", "id": "dns.responsePolicyRules.delete", @@ -1553,7 +1553,7 @@ ] }, "get": { - "description": "Fetch the representation of an existing Response Policy Rule.", + "description": "Fetches the representation of an existing Response Policy Rule.", "flatPath": "dns/v1beta2/projects/{project}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}", "httpMethod": "GET", "id": "dns.responsePolicyRules.get", @@ -1599,7 +1599,7 @@ ] }, "list": { - "description": "Enumerate all Response Policy Rules associated with a project.", + "description": "Enumerates all Response Policy Rules associated with a project.", "flatPath": "dns/v1beta2/projects/{project}/responsePolicies/{responsePolicy}/rules", "httpMethod": "GET", "id": "dns.responsePolicyRules.list", @@ -1644,7 +1644,7 @@ ] }, "patch": { - "description": "Apply a partial update to an existing Response Policy Rule.", + "description": "Applies a partial update to an existing Response Policy Rule.", "flatPath": "dns/v1beta2/projects/{project}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}", "httpMethod": "PATCH", "id": "dns.responsePolicyRules.patch", @@ -1691,7 +1691,7 @@ ] }, "update": { - "description": "Update an existing Response Policy Rule.", + "description": "Updates an existing Response Policy Rule.", "flatPath": "dns/v1beta2/projects/{project}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}", "httpMethod": "PUT", "id": "dns.responsePolicyRules.update", @@ -1740,7 +1740,7 @@ } } }, - "revision": "20210303", + "revision": "20210314", "rootUrl": "https://dns.googleapis.com/", "schemas": { "Change": { @@ -1812,7 +1812,7 @@ "type": "string" }, "nextPageToken": { - "description": "The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your pagination token. In this way you can retrieve the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. There is no way to retrieve a \"snapshot\" of collections larger than the maximum page size.", + "description": "The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your pagination token. This lets you retrieve the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. You cannot retrieve a \"snapshot\" of collections larger than the maximum page size.", "type": "string" } }, @@ -2179,7 +2179,7 @@ "type": "string" }, "nextPageToken": { - "description": "The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your page token. In this way you can retrieve the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. There is no way to retrieve a consistent snapshot of a collection larger than the maximum page size.", + "description": "The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your page token. This lets you retrieve the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. You cannot retrieve a consistent snapshot of a collection larger than the maximum page size.", "type": "string" }, "operations": { @@ -2292,7 +2292,7 @@ "type": "string" }, "namespaceUrl": { - "description": "The fully qualified URL of the namespace associated with the zone. This should be formatted like https://servicedirectory.googleapis.com/v1/projects/{project}/locations/{location}/namespaces/{namespace}", + "description": "The fully qualified URL of the namespace associated with the zone. Format must be https://servicedirectory.googleapis.com/v1/projects/{project}/locations/{location}/namespaces/{namespace}", "type": "string" } }, @@ -2317,7 +2317,7 @@ "type": "array" }, "nextPageToken": { - "description": "The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your page token. In this way you can retrieve the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. There is no way to retrieve a consistent snapshot of a collection larger than the maximum page size.", + "description": "The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your page token. This lets you the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. You cannot retrieve a consistent snapshot of a collection larger than the maximum page size.", "type": "string" } }, @@ -2410,7 +2410,7 @@ "type": "string" }, "nextPageToken": { - "description": "The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your page token. In this way you can retrieve the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. There is no way to retrieve a consistent snapshot of a collection larger than the maximum page size.", + "description": "The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your page token. This lets you the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. You cannot retrieve a consistent snapshot of a collection larger than the maximum page size.", "type": "string" }, "policies": { @@ -2552,7 +2552,7 @@ "type": "object" }, "Project": { - "description": "A project resource. The project is a top level container for resources including Cloud DNS ManagedZones. Projects can be created only in the APIs console.", + "description": "A project resource. The project is a top level container for resources including Cloud DNS ManagedZones. Projects can be created only in the APIs console. Next tag: 7.", "id": "Project", "properties": { "id": { @@ -2744,7 +2744,7 @@ "$ref": "ResponseHeader" }, "nextPageToken": { - "description": "The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your page token. In this way you can retrieve the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. There is no way to retrieve a consistent snapshot of a collection larger than the maximum page size.", + "description": "The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your page token. This lets you the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. You cannot retrieve a consistent snapshot of a collection larger than the maximum page size.", "type": "string" }, "responsePolicies": { @@ -2881,7 +2881,7 @@ "$ref": "ResponseHeader" }, "nextPageToken": { - "description": "The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your page token. In this way you can retrieve the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. There is no way to retrieve a consistent snapshot of a collection larger than the maximum page size.", + "description": "The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your page token. This lets you the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. You cannot retrieve a consistent snapshot of a collection larger than the maximum page size.", "type": "string" }, "responsePolicyRules": { diff --git a/discovery/documentai-v1beta2.json b/discovery/documentai-v1beta2.json index 79e6611a068..ccaa908aeb5 100644 --- a/discovery/documentai-v1beta2.json +++ b/discovery/documentai-v1beta2.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" } } } @@ -292,7 +292,7 @@ } } }, - "revision": "20210226", + "revision": "20210319", "rootUrl": "https://documentai.googleapis.com/", "schemas": { "GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata": { @@ -453,6 +453,17 @@ }, "type": "object" }, + "GoogleCloudDocumentaiUiv1beta3SampleDatasetMetadata": { + "description": "The long running operation metadata for SampleDataset.", + "id": "GoogleCloudDocumentaiUiv1beta3SampleDatasetMetadata", + "properties": { + "commonMetadata": { + "$ref": "GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata", + "description": "The basic metadata of the long running operation." + } + }, + "type": "object" + }, "GoogleCloudDocumentaiUiv1beta3SetDefaultProcessorVersionMetadata": { "description": "The long running operation metadata for set default processor version method.", "id": "GoogleCloudDocumentaiUiv1beta3SetDefaultProcessorVersionMetadata", @@ -775,7 +786,7 @@ "id": "GoogleCloudDocumentaiV1beta1Document", "properties": { "content": { - "description": "Inline document content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64.", + "description": "Optional. Inline document content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64.", "format": "byte", "type": "string" }, @@ -820,7 +831,7 @@ "description": "Information about the sharding if this document is sharded part of a larger document. If the document is not sharded, this message is not specified." }, "text": { - "description": "UTF-8 encoded text in reading order from the document.", + "description": "Optional. UTF-8 encoded text in reading order from the document.", "type": "string" }, "textChanges": { @@ -837,15 +848,8 @@ }, "type": "array" }, - "translations": { - "description": "A list of translations on Document.text. For document shards, translations in this list may cross shard boundaries.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentTranslation" - }, - "type": "array" - }, "uri": { - "description": "Currently supports Google Cloud Storage URI of the form `gs://bucket_name/object_name`. Object versioning is not supported. See [Google Cloud Storage Request URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.", + "description": "Optional. Currently supports Google Cloud Storage URI of the form `gs://bucket_name/object_name`. Object versioning is not supported. See [Google Cloud Storage Request URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.", "type": "string" } }, @@ -865,11 +869,11 @@ "type": "string" }, "mentionId": { - "description": "Deprecated. Use `id` field instead.", + "description": "Optional. Deprecated. Use `id` field instead.", "type": "string" }, "mentionText": { - "description": "Text value in the document e.g. `1600 Amphitheatre Pkwy`.", + "description": "Optional. Text value in the document e.g. `1600 Amphitheatre Pkwy`.", "type": "string" }, "normalizedValue": { @@ -897,7 +901,7 @@ }, "textAnchor": { "$ref": "GoogleCloudDocumentaiV1beta1DocumentTextAnchor", - "description": "Provenance of the entity. Text anchor indexing into the Document.text." + "description": "Optional. Provenance of the entity. Text anchor indexing into the Document.text." }, "type": { "description": "Entity type from a schema e.g. `Address`.", @@ -1502,7 +1506,8 @@ "REMOVE", "REPLACE", "EVAL_REQUESTED", - "EVAL_APPROVED" + "EVAL_APPROVED", + "EVAL_SKIPPED" ], "enumDescriptions": [ "Operation type unspecified.", @@ -1510,7 +1515,8 @@ "The element is removed. No `parents` should be set.", "Explicitly replaces the element(s) identified by `parents`.", "Element is requested for human review.", - "Element is review and approved at human review, confidence will be set to 1.0" + "Element is reviewed and approved at human review, confidence will be set to 1.0.", + "Element is skipped in the validation process." ], "type": "string" } @@ -1715,32 +1721,6 @@ }, "type": "object" }, - "GoogleCloudDocumentaiV1beta1DocumentTranslation": { - "description": "A translation of the text segment.", - "id": "GoogleCloudDocumentaiV1beta1DocumentTranslation", - "properties": { - "languageCode": { - "description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", - "type": "string" - }, - "provenance": { - "description": "The history of this annotation.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentProvenance" - }, - "type": "array" - }, - "textAnchor": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentTextAnchor", - "description": "Provenance of the translation. Text anchor indexing into the Document.text. There can only be a single `TextAnchor.text_segments` element. If the start and end index of the text segment are the same, the text change is inserted before that index." - }, - "translatedText": { - "description": "Text translated into the target language.", - "type": "string" - } - }, - "type": "object" - }, "GoogleCloudDocumentaiV1beta1GcsDestination": { "description": "The Google Cloud Storage location where the output file will be written to.", "id": "GoogleCloudDocumentaiV1beta1GcsDestination", @@ -1949,7 +1929,7 @@ "id": "GoogleCloudDocumentaiV1beta2Document", "properties": { "content": { - "description": "Inline document content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64.", + "description": "Optional. Inline document content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64.", "format": "byte", "type": "string" }, @@ -2001,7 +1981,7 @@ "description": "Information about the sharding if this document is sharded part of a larger document. If the document is not sharded, this message is not specified." }, "text": { - "description": "UTF-8 encoded text in reading order from the document.", + "description": "Optional. UTF-8 encoded text in reading order from the document.", "type": "string" }, "textChanges": { @@ -2018,15 +1998,8 @@ }, "type": "array" }, - "translations": { - "description": "A list of translations on Document.text. For document shards, translations in this list may cross shard boundaries.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentTranslation" - }, - "type": "array" - }, "uri": { - "description": "Currently supports Google Cloud Storage URI of the form `gs://bucket_name/object_name`. Object versioning is not supported. See [Google Cloud Storage Request URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.", + "description": "Optional. Currently supports Google Cloud Storage URI of the form `gs://bucket_name/object_name`. Object versioning is not supported. See [Google Cloud Storage Request URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.", "type": "string" } }, @@ -2046,11 +2019,11 @@ "type": "string" }, "mentionId": { - "description": "Deprecated. Use `id` field instead.", + "description": "Optional. Deprecated. Use `id` field instead.", "type": "string" }, "mentionText": { - "description": "Text value in the document e.g. `1600 Amphitheatre Pkwy`.", + "description": "Optional. Text value in the document e.g. `1600 Amphitheatre Pkwy`.", "type": "string" }, "normalizedValue": { @@ -2078,7 +2051,7 @@ }, "textAnchor": { "$ref": "GoogleCloudDocumentaiV1beta2DocumentTextAnchor", - "description": "Provenance of the entity. Text anchor indexing into the Document.text." + "description": "Optional. Provenance of the entity. Text anchor indexing into the Document.text." }, "type": { "description": "Entity type from a schema e.g. `Address`.", @@ -2703,7 +2676,8 @@ "REMOVE", "REPLACE", "EVAL_REQUESTED", - "EVAL_APPROVED" + "EVAL_APPROVED", + "EVAL_SKIPPED" ], "enumDescriptions": [ "Operation type unspecified.", @@ -2711,7 +2685,8 @@ "The element is removed. No `parents` should be set.", "Explicitly replaces the element(s) identified by `parents`.", "Element is requested for human review.", - "Element is review and approved at human review, confidence will be set to 1.0" + "Element is reviewed and approved at human review, confidence will be set to 1.0.", + "Element is skipped in the validation process." ], "type": "string" } @@ -2916,32 +2891,6 @@ }, "type": "object" }, - "GoogleCloudDocumentaiV1beta2DocumentTranslation": { - "description": "A translation of the text segment.", - "id": "GoogleCloudDocumentaiV1beta2DocumentTranslation", - "properties": { - "languageCode": { - "description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", - "type": "string" - }, - "provenance": { - "description": "The history of this annotation.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentProvenance" - }, - "type": "array" - }, - "textAnchor": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentTextAnchor", - "description": "Provenance of the translation. Text anchor indexing into the Document.text. There can only be a single `TextAnchor.text_segments` element. If the start and end index of the text segment are the same, the text change is inserted before that index." - }, - "translatedText": { - "description": "Text translated into the target language.", - "type": "string" - } - }, - "type": "object" - }, "GoogleCloudDocumentaiV1beta2EntityExtractionParams": { "description": "Parameters to control entity extraction behavior.", "id": "GoogleCloudDocumentaiV1beta2EntityExtractionParams", @@ -3529,11 +3478,11 @@ "type": "object" }, "GoogleTypeColor": { - "description": "Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to/from color representations in various languages over compactness; for example, the fields of this representation can be trivially provided to the constructor of \"java.awt.Color\" in Java; it can also be trivially provided to UIColor's \"+colorWithRed:green:blue:alpha\" method in iOS; and, with just a little work, it can be easily formatted into a CSS \"rgba()\" string in JavaScript, as well. Note: this proto does not carry information about the absolute color space that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default, applications SHOULD assume the sRGB color space. Note: when color equality needs to be decided, implementations, unless documented otherwise, will treat two colors to be equal if all their red, green, blue and alpha values each differ by at most 1e-5. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) { return rgbToCssColor_(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); }; var rgbToCssColor_ = function(red, green, blue) { var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) { resultBuilder.push('0'); } resultBuilder.push(hexString); return resultBuilder.join(''); }; // ...", + "description": "Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to/from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn't carry information about the absolute color space that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most 1e-5. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) { resultBuilder.push('0'); } resultBuilder.push(hexString); return resultBuilder.join(''); }; // ...", "id": "GoogleTypeColor", "properties": { "alpha": { - "description": "The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: pixel color = alpha * (this color) + (1.0 - alpha) * (background color) This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is to be rendered as a solid color (as if the alpha value had been explicitly given with a value of 1.0).", + "description": "The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).", "format": "float", "type": "number" }, diff --git a/discovery/documentai-v1beta3.json b/discovery/documentai-v1beta3.json index 000c2be9533..2ee95b73167 100644 --- a/discovery/documentai-v1beta3.json +++ b/discovery/documentai-v1beta3.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" } } } @@ -144,7 +144,7 @@ ], "parameters": { "filter": { - "description": "The standard list 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" }, @@ -156,13 +156,13 @@ "type": "string" }, "pageSize": { - "description": "The standard list page size.", + "description": "The maximum number of results to return. If not set, the service will select a default.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "The standard list page token.", + "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" } @@ -218,7 +218,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of Processor or ProcessorVersion. Format: projects/{project}/locations/{location}/processors/{processor}, or projects/{project}/locations/{location}/processors/{processor}/processorVerions/{processorVersion}", + "description": "Required. The resource name of Processor or ProcessorVersion. Format: projects/{project}/locations/{location}/processors/{processor}, or projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/processors/[^/]+$", "required": true, @@ -246,7 +246,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Processor or ProcessorVersion to use for processing. If a Processor is specified, the server will use its default version. Format: projects/{project}/locations/{location}/processors/{processor}, or projects/{project}/locations/{location}/processors/{processor}/processorVerions/{processorVersion}", + "description": "Required. The resource name of the Processor or ProcessorVersion to use for processing. If a Processor is specified, the server will use its default version. Format: projects/{project}/locations/{location}/processors/{processor}, or projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/processors/[^/]+$", "required": true, @@ -310,7 +310,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of Processor or ProcessorVersion. Format: projects/{project}/locations/{location}/processors/{processor}, or projects/{project}/locations/{location}/processors/{processor}/processorVerions/{processorVersion}", + "description": "Required. The resource name of Processor or ProcessorVersion. Format: projects/{project}/locations/{location}/processors/{processor}, or projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/processors/[^/]+/processorVersions/[^/]+$", "required": true, @@ -338,7 +338,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Processor or ProcessorVersion to use for processing. If a Processor is specified, the server will use its default version. Format: projects/{project}/locations/{location}/processors/{processor}, or projects/{project}/locations/{location}/processors/{processor}/processorVerions/{processorVersion}", + "description": "Required. The resource name of the Processor or ProcessorVersion to use for processing. If a Processor is specified, the server will use its default version. Format: projects/{project}/locations/{location}/processors/{processor}, or projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/processors/[^/]+/processorVersions/[^/]+$", "required": true, @@ -365,7 +365,7 @@ } } }, - "revision": "20210226", + "revision": "20210319", "rootUrl": "https://documentai.googleapis.com/", "schemas": { "GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata": { @@ -526,6 +526,17 @@ }, "type": "object" }, + "GoogleCloudDocumentaiUiv1beta3SampleDatasetMetadata": { + "description": "The long running operation metadata for SampleDataset.", + "id": "GoogleCloudDocumentaiUiv1beta3SampleDatasetMetadata", + "properties": { + "commonMetadata": { + "$ref": "GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata", + "description": "The basic metadata of the long running operation." + } + }, + "type": "object" + }, "GoogleCloudDocumentaiUiv1beta3SetDefaultProcessorVersionMetadata": { "description": "The long running operation metadata for set default processor version method.", "id": "GoogleCloudDocumentaiUiv1beta3SetDefaultProcessorVersionMetadata", @@ -848,7 +859,7 @@ "id": "GoogleCloudDocumentaiV1beta1Document", "properties": { "content": { - "description": "Inline document content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64.", + "description": "Optional. Inline document content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64.", "format": "byte", "type": "string" }, @@ -893,7 +904,7 @@ "description": "Information about the sharding if this document is sharded part of a larger document. If the document is not sharded, this message is not specified." }, "text": { - "description": "UTF-8 encoded text in reading order from the document.", + "description": "Optional. UTF-8 encoded text in reading order from the document.", "type": "string" }, "textChanges": { @@ -910,15 +921,8 @@ }, "type": "array" }, - "translations": { - "description": "A list of translations on Document.text. For document shards, translations in this list may cross shard boundaries.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentTranslation" - }, - "type": "array" - }, "uri": { - "description": "Currently supports Google Cloud Storage URI of the form `gs://bucket_name/object_name`. Object versioning is not supported. See [Google Cloud Storage Request URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.", + "description": "Optional. Currently supports Google Cloud Storage URI of the form `gs://bucket_name/object_name`. Object versioning is not supported. See [Google Cloud Storage Request URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.", "type": "string" } }, @@ -938,11 +942,11 @@ "type": "string" }, "mentionId": { - "description": "Deprecated. Use `id` field instead.", + "description": "Optional. Deprecated. Use `id` field instead.", "type": "string" }, "mentionText": { - "description": "Text value in the document e.g. `1600 Amphitheatre Pkwy`.", + "description": "Optional. Text value in the document e.g. `1600 Amphitheatre Pkwy`.", "type": "string" }, "normalizedValue": { @@ -970,7 +974,7 @@ }, "textAnchor": { "$ref": "GoogleCloudDocumentaiV1beta1DocumentTextAnchor", - "description": "Provenance of the entity. Text anchor indexing into the Document.text." + "description": "Optional. Provenance of the entity. Text anchor indexing into the Document.text." }, "type": { "description": "Entity type from a schema e.g. `Address`.", @@ -1575,7 +1579,8 @@ "REMOVE", "REPLACE", "EVAL_REQUESTED", - "EVAL_APPROVED" + "EVAL_APPROVED", + "EVAL_SKIPPED" ], "enumDescriptions": [ "Operation type unspecified.", @@ -1583,7 +1588,8 @@ "The element is removed. No `parents` should be set.", "Explicitly replaces the element(s) identified by `parents`.", "Element is requested for human review.", - "Element is review and approved at human review, confidence will be set to 1.0" + "Element is reviewed and approved at human review, confidence will be set to 1.0.", + "Element is skipped in the validation process." ], "type": "string" } @@ -1788,32 +1794,6 @@ }, "type": "object" }, - "GoogleCloudDocumentaiV1beta1DocumentTranslation": { - "description": "A translation of the text segment.", - "id": "GoogleCloudDocumentaiV1beta1DocumentTranslation", - "properties": { - "languageCode": { - "description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", - "type": "string" - }, - "provenance": { - "description": "The history of this annotation.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentProvenance" - }, - "type": "array" - }, - "textAnchor": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentTextAnchor", - "description": "Provenance of the translation. Text anchor indexing into the Document.text. There can only be a single `TextAnchor.text_segments` element. If the start and end index of the text segment are the same, the text change is inserted before that index." - }, - "translatedText": { - "description": "Text translated into the target language.", - "type": "string" - } - }, - "type": "object" - }, "GoogleCloudDocumentaiV1beta1GcsDestination": { "description": "The Google Cloud Storage location where the output file will be written to.", "id": "GoogleCloudDocumentaiV1beta1GcsDestination", @@ -1997,7 +1977,7 @@ "id": "GoogleCloudDocumentaiV1beta2Document", "properties": { "content": { - "description": "Inline document content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64.", + "description": "Optional. Inline document content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64.", "format": "byte", "type": "string" }, @@ -2049,7 +2029,7 @@ "description": "Information about the sharding if this document is sharded part of a larger document. If the document is not sharded, this message is not specified." }, "text": { - "description": "UTF-8 encoded text in reading order from the document.", + "description": "Optional. UTF-8 encoded text in reading order from the document.", "type": "string" }, "textChanges": { @@ -2066,15 +2046,8 @@ }, "type": "array" }, - "translations": { - "description": "A list of translations on Document.text. For document shards, translations in this list may cross shard boundaries.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentTranslation" - }, - "type": "array" - }, "uri": { - "description": "Currently supports Google Cloud Storage URI of the form `gs://bucket_name/object_name`. Object versioning is not supported. See [Google Cloud Storage Request URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.", + "description": "Optional. Currently supports Google Cloud Storage URI of the form `gs://bucket_name/object_name`. Object versioning is not supported. See [Google Cloud Storage Request URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.", "type": "string" } }, @@ -2094,11 +2067,11 @@ "type": "string" }, "mentionId": { - "description": "Deprecated. Use `id` field instead.", + "description": "Optional. Deprecated. Use `id` field instead.", "type": "string" }, "mentionText": { - "description": "Text value in the document e.g. `1600 Amphitheatre Pkwy`.", + "description": "Optional. Text value in the document e.g. `1600 Amphitheatre Pkwy`.", "type": "string" }, "normalizedValue": { @@ -2126,7 +2099,7 @@ }, "textAnchor": { "$ref": "GoogleCloudDocumentaiV1beta2DocumentTextAnchor", - "description": "Provenance of the entity. Text anchor indexing into the Document.text." + "description": "Optional. Provenance of the entity. Text anchor indexing into the Document.text." }, "type": { "description": "Entity type from a schema e.g. `Address`.", @@ -2751,7 +2724,8 @@ "REMOVE", "REPLACE", "EVAL_REQUESTED", - "EVAL_APPROVED" + "EVAL_APPROVED", + "EVAL_SKIPPED" ], "enumDescriptions": [ "Operation type unspecified.", @@ -2759,7 +2733,8 @@ "The element is removed. No `parents` should be set.", "Explicitly replaces the element(s) identified by `parents`.", "Element is requested for human review.", - "Element is review and approved at human review, confidence will be set to 1.0" + "Element is reviewed and approved at human review, confidence will be set to 1.0.", + "Element is skipped in the validation process." ], "type": "string" } @@ -2964,32 +2939,6 @@ }, "type": "object" }, - "GoogleCloudDocumentaiV1beta2DocumentTranslation": { - "description": "A translation of the text segment.", - "id": "GoogleCloudDocumentaiV1beta2DocumentTranslation", - "properties": { - "languageCode": { - "description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", - "type": "string" - }, - "provenance": { - "description": "The history of this annotation.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentProvenance" - }, - "type": "array" - }, - "textAnchor": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentTextAnchor", - "description": "Provenance of the translation. Text anchor indexing into the Document.text. There can only be a single `TextAnchor.text_segments` element. If the start and end index of the text segment are the same, the text change is inserted before that index." - }, - "translatedText": { - "description": "Text translated into the target language.", - "type": "string" - } - }, - "type": "object" - }, "GoogleCloudDocumentaiV1beta2GcsDestination": { "description": "The Google Cloud Storage location where the output file will be written to.", "id": "GoogleCloudDocumentaiV1beta2GcsDestination", @@ -3359,7 +3308,7 @@ "id": "GoogleCloudDocumentaiV1beta3Document", "properties": { "content": { - "description": "Inline document content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64.", + "description": "Optional. Inline document content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64.", "format": "byte", "type": "string" }, @@ -3404,7 +3353,7 @@ "description": "Information about the sharding if this document is sharded part of a larger document. If the document is not sharded, this message is not specified." }, "text": { - "description": "UTF-8 encoded text in reading order from the document.", + "description": "Optional. UTF-8 encoded text in reading order from the document.", "type": "string" }, "textChanges": { @@ -3421,15 +3370,8 @@ }, "type": "array" }, - "translations": { - "description": "A list of translations on Document.text. For document shards, translations in this list may cross shard boundaries.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta3DocumentTranslation" - }, - "type": "array" - }, "uri": { - "description": "Currently supports Google Cloud Storage URI of the form `gs://bucket_name/object_name`. Object versioning is not supported. See [Google Cloud Storage Request URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.", + "description": "Optional. Currently supports Google Cloud Storage URI of the form `gs://bucket_name/object_name`. Object versioning is not supported. See [Google Cloud Storage Request URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.", "type": "string" } }, @@ -3449,11 +3391,11 @@ "type": "string" }, "mentionId": { - "description": "Deprecated. Use `id` field instead.", + "description": "Optional. Deprecated. Use `id` field instead.", "type": "string" }, "mentionText": { - "description": "Text value in the document e.g. `1600 Amphitheatre Pkwy`.", + "description": "Optional. Text value in the document e.g. `1600 Amphitheatre Pkwy`.", "type": "string" }, "normalizedValue": { @@ -3481,7 +3423,7 @@ }, "textAnchor": { "$ref": "GoogleCloudDocumentaiV1beta3DocumentTextAnchor", - "description": "Provenance of the entity. Text anchor indexing into the Document.text." + "description": "Optional. Provenance of the entity. Text anchor indexing into the Document.text." }, "type": { "description": "Entity type from a schema e.g. `Address`.", @@ -4108,7 +4050,8 @@ "REMOVE", "REPLACE", "EVAL_REQUESTED", - "EVAL_APPROVED" + "EVAL_APPROVED", + "EVAL_SKIPPED" ], "enumDescriptions": [ "Operation type unspecified.", @@ -4116,7 +4059,8 @@ "The element is removed. No `parents` should be set.", "Explicitly replaces the element(s) identified by `parents`.", "Element is requested for human review.", - "Element is review and approved at human review, confidence will be set to 1.0" + "Element is reviewed and approved at human review, confidence will be set to 1.0.", + "Element is skipped in the validation process." ], "type": "string" } @@ -4321,32 +4265,6 @@ }, "type": "object" }, - "GoogleCloudDocumentaiV1beta3DocumentTranslation": { - "description": "A translation of the text segment.", - "id": "GoogleCloudDocumentaiV1beta3DocumentTranslation", - "properties": { - "languageCode": { - "description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", - "type": "string" - }, - "provenance": { - "description": "The history of this annotation.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta3DocumentProvenance" - }, - "type": "array" - }, - "textAnchor": { - "$ref": "GoogleCloudDocumentaiV1beta3DocumentTextAnchor", - "description": "Provenance of the translation. Text anchor indexing into the Document.text. There can only be a single `TextAnchor.text_segments` element. If the start and end index of the text segment are the same, the text change is inserted before that index." - }, - "translatedText": { - "description": "Text translated into the target language.", - "type": "string" - } - }, - "type": "object" - }, "GoogleCloudDocumentaiV1beta3GcsDocument": { "description": "Specifies a document stored on Cloud Storage.", "id": "GoogleCloudDocumentaiV1beta3GcsDocument", @@ -4704,11 +4622,11 @@ "type": "object" }, "GoogleTypeColor": { - "description": "Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to/from color representations in various languages over compactness; for example, the fields of this representation can be trivially provided to the constructor of \"java.awt.Color\" in Java; it can also be trivially provided to UIColor's \"+colorWithRed:green:blue:alpha\" method in iOS; and, with just a little work, it can be easily formatted into a CSS \"rgba()\" string in JavaScript, as well. Note: this proto does not carry information about the absolute color space that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default, applications SHOULD assume the sRGB color space. Note: when color equality needs to be decided, implementations, unless documented otherwise, will treat two colors to be equal if all their red, green, blue and alpha values each differ by at most 1e-5. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) { return rgbToCssColor_(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); }; var rgbToCssColor_ = function(red, green, blue) { var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) { resultBuilder.push('0'); } resultBuilder.push(hexString); return resultBuilder.join(''); }; // ...", + "description": "Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to/from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn't carry information about the absolute color space that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most 1e-5. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) { resultBuilder.push('0'); } resultBuilder.push(hexString); return resultBuilder.join(''); }; // ...", "id": "GoogleTypeColor", "properties": { "alpha": { - "description": "The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: pixel color = alpha * (this color) + (1.0 - alpha) * (background color) This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is to be rendered as a solid color (as if the alpha value had been explicitly given with a value of 1.0).", + "description": "The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).", "format": "float", "type": "number" }, diff --git a/discovery/doubleclickbidmanager-v1.1.json b/discovery/doubleclickbidmanager-v1.1.json index 388e50db1d8..b3fca331403 100644 --- a/discovery/doubleclickbidmanager-v1.1.json +++ b/discovery/doubleclickbidmanager-v1.1.json @@ -342,7 +342,7 @@ } } }, - "revision": "20210225", + "revision": "20210315", "rootUrl": "https://doubleclickbidmanager.googleapis.com/", "schemas": { "ChannelGrouping": { @@ -812,7 +812,8 @@ "FILTER_EVENT_TYPE", "FILTER_CHANNEL_GROUPING", "FILTER_OM_SDK_AVAILABLE", - "FILTER_DATA_SOURCE" + "FILTER_DATA_SOURCE", + "FILTER_CM360_PLACEMENT_ID" ], "enumDescriptions": [ "", @@ -1076,6 +1077,7 @@ "", "", "", + "", "" ], "type": "string" @@ -1422,7 +1424,8 @@ "FILTER_EVENT_TYPE", "FILTER_CHANNEL_GROUPING", "FILTER_OM_SDK_AVAILABLE", - "FILTER_DATA_SOURCE" + "FILTER_DATA_SOURCE", + "FILTER_CM360_PLACEMENT_ID" ], "enumDescriptions": [ "", @@ -1686,6 +1689,7 @@ "", "", "", + "", "" ], "type": "string" @@ -2149,7 +2153,12 @@ "METRIC_VIRTUAL_PEOPLE_AVERAGE_VIEWABLE_IMPRESSION_FREQUENCY_BY_DEMO", "METRIC_VIRTUAL_PEOPLE_VIEWABLE_IMPRESSION_REACH_BY_DEMO", "METRIC_VIRTUAL_PEOPLE_VIEWABLE_IMPRESSION_REACH_PERCENT", - "METRIC_VIRTUAL_PEOPLE_VIEWABLE_IMPRESSION_REACH_SHARE_PERCENT" + "METRIC_VIRTUAL_PEOPLE_VIEWABLE_IMPRESSION_REACH_SHARE_PERCENT", + "METRIC_ENGAGEMENT_RATE", + "METRIC_CM360_POST_VIEW_REVENUE", + "METRIC_CM360_POST_CLICK_REVENUE", + "METRIC_CM360_POST_CLICK_REVENUE_CROSS_ENVIRONMENT", + "METRIC_CM360_POST_VIEW_REVENUE_CROSS_ENVIRONMENT" ], "enumDescriptions": [ "", @@ -2601,6 +2610,11 @@ "", "", "", + "", + "", + "", + "", + "", "" ], "type": "string" @@ -3004,7 +3018,8 @@ "FILTER_EVENT_TYPE", "FILTER_CHANNEL_GROUPING", "FILTER_OM_SDK_AVAILABLE", - "FILTER_DATA_SOURCE" + "FILTER_DATA_SOURCE", + "FILTER_CM360_PLACEMENT_ID" ], "enumDescriptions": [ "", @@ -3268,6 +3283,7 @@ "", "", "", + "", "" ], "type": "string" diff --git a/discovery/drive-v2.json b/discovery/drive-v2.json index a6695c5036b..619fec42fb1 100644 --- a/discovery/drive-v2.json +++ b/discovery/drive-v2.json @@ -12,7 +12,7 @@ "description": "View your Google Drive apps" }, "https://www.googleapis.com/auth/drive.file": { - "description": "View and manage Google Drive files and folders that you have opened or created with this app" + "description": "See, edit, create, and delete only the specific Google Drive files you use with this app" }, "https://www.googleapis.com/auth/drive.metadata": { "description": "View and manage metadata of files in your Google Drive" @@ -38,7 +38,7 @@ "description": "Manages files in Drive including uploading, downloading, searching, detecting changes, and updating sharing permissions.", "discoveryVersion": "v1", "documentationLink": "https://developers.google.com/drive/", - "etag": "\"uWj2hSb4GVjzdDlAnRd2gbM1ZQ8/Rjaxlc2y0RE6nuthF2RV3qUKAvg\"", + "etag": "\"uWj2hSb4GVjzdDlAnRd2gbM1ZQ8/WyBZdYbE0D4DynBiI0u-hsaxEpU\"", "icons": { "x16": "https://ssl.gstatic.com/docs/doclist/images/drive_icon_16.png", "x32": "https://ssl.gstatic.com/docs/doclist/images/drive_icon_32.png" @@ -3521,7 +3521,7 @@ } } }, - "revision": "20210228", + "revision": "20210315", "rootUrl": "https://www.googleapis.com/", "schemas": { "About": { diff --git a/discovery/drive-v3.json b/discovery/drive-v3.json index 1303ce489dc..ca4df5f333a 100644 --- a/discovery/drive-v3.json +++ b/discovery/drive-v3.json @@ -9,7 +9,7 @@ "description": "See, create, and delete its own configuration data in your Google Drive" }, "https://www.googleapis.com/auth/drive.file": { - "description": "View and manage Google Drive files and folders that you have opened or created with this app" + "description": "See, edit, create, and delete only the specific Google Drive files you use with this app" }, "https://www.googleapis.com/auth/drive.metadata": { "description": "View and manage metadata of files in your Google Drive" @@ -35,7 +35,7 @@ "description": "Manages files in Drive including uploading, downloading, searching, detecting changes, and updating sharing permissions.", "discoveryVersion": "v1", "documentationLink": "https://developers.google.com/drive/", - "etag": "\"uWj2hSb4GVjzdDlAnRd2gbM1ZQ8/_w67gF5xPKfOw4DCYqfd5GwBcCo\"", + "etag": "\"uWj2hSb4GVjzdDlAnRd2gbM1ZQ8/OJJW7Iw8BEx9p12r7dD_2mNZIX0\"", "icons": { "x16": "https://ssl.gstatic.com/docs/doclist/images/drive_icon_16.png", "x32": "https://ssl.gstatic.com/docs/doclist/images/drive_icon_32.png" @@ -2185,7 +2185,7 @@ } } }, - "revision": "20210228", + "revision": "20210315", "rootUrl": "https://www.googleapis.com/", "schemas": { "About": { diff --git a/discovery/driveactivity-v2.json b/discovery/driveactivity-v2.json index d5b1da021f0..fb3ce4ca902 100644 --- a/discovery/driveactivity-v2.json +++ b/discovery/driveactivity-v2.json @@ -132,7 +132,7 @@ } } }, - "revision": "20200801", + "revision": "20210319", "rootUrl": "https://driveactivity.googleapis.com/", "schemas": { "Action": { @@ -362,7 +362,7 @@ "properties": { "originalObject": { "$ref": "TargetReference", - "description": "The the original object." + "description": "The original object." } }, "type": "object" @@ -443,7 +443,7 @@ "type": "string" }, "name": { - "description": "The name of the domain, e.g. \"google.com\".", + "description": "The name of the domain, e.g. `google.com`.", "type": "string" } }, @@ -454,7 +454,7 @@ "id": "Drive", "properties": { "name": { - "description": "The resource name of the shared drive. The format is \"COLLECTION_ID/DRIVE_ID\". Clients should not assume a specific collection ID for this resource name.", + "description": "The resource name of the shared drive. The format is `COLLECTION_ID/DRIVE_ID`. Clients should not assume a specific collection ID for this resource name.", "type": "string" }, "root": { @@ -563,7 +563,7 @@ "type": "string" }, "name": { - "description": "The target Drive item. The format is \"items/ITEM_ID\".", + "description": "The target Drive item. The format is `items/ITEM_ID`.", "type": "string" }, "owner": { @@ -598,7 +598,7 @@ "description": "This field is deprecated; please use the `driveFolder` field instead." }, "name": { - "description": "The target Drive item. The format is \"items/ITEM_ID\".", + "description": "The target Drive item. The format is `items/ITEM_ID`.", "type": "string" }, "title": { @@ -613,7 +613,7 @@ "id": "DriveReference", "properties": { "name": { - "description": "The resource name of the shared drive. The format is \"COLLECTION_ID/DRIVE_ID\". Clients should not assume a specific collection ID for this resource name.", + "description": "The resource name of the shared drive. The format is `COLLECTION_ID/DRIVE_ID`. Clients should not assume a specific collection ID for this resource name.", "type": "string" }, "title": { @@ -648,7 +648,7 @@ "type": "string" }, "linkToDiscussion": { - "description": "The link to the discussion thread containing this comment, for example, \"https://docs.google.com/DOCUMENT_ID/edit?disco=THREAD_ID\".", + "description": "The link to the discussion thread containing this comment, for example, `https://docs.google.com/DOCUMENT_ID/edit?disco=THREAD_ID`.", "type": "string" }, "parent": { @@ -716,7 +716,7 @@ "type": "boolean" }, "personName": { - "description": "The identifier for this user that can be used with the People API to get more information. The format is \"people/ACCOUNT_ID\". See https://developers.google.com/people/.", + "description": "The identifier for this user that can be used with the People API to get more information. The format is `people/ACCOUNT_ID`. See https://developers.google.com/people/.", "type": "string" } }, @@ -805,7 +805,7 @@ "description": "The group to whom this permission applies." }, "role": { - "description": "Indicates the Google Drive permissions role. The role determines a user's ability to read, write, and comment on items.", + "description": "Indicates the [Google Drive permissions role](https://developers.google.com/drive/web/manage-sharing#roles). The role determines a user's ability to read, write, and comment on items.", "enum": [ "ROLE_UNSPECIFIED", "OWNER", @@ -890,7 +890,7 @@ "id": "QueryDriveActivityRequest", "properties": { "ancestorName": { - "description": "Return activities for this Drive folder and all children and descendants. The format is \"items/ITEM_ID\".", + "description": "Return activities for this Drive folder and all children and descendants. The format is `items/ITEM_ID`.", "type": "string" }, "consolidationStrategy": { @@ -898,11 +898,11 @@ "description": "Details on how to consolidate related actions that make up the activity. If not set, then related actions are not consolidated." }, "filter": { - "description": "The filtering for items returned from this query request. The format of the filter string is a sequence of expressions, joined by an optional \"AND\", where each expression is of the form \"field operator value\". Supported fields: - time: Uses numerical operators on date values either in terms of milliseconds since Jan 1, 1970 or in RFC 3339 format. Examples: - time > 1452409200000 AND time <= 1492812924310 - time >= \"2016-01-10T01:02:03-05:00\" - detail.action_detail_case: Uses the \"has\" operator (:) and either a singular value or a list of allowed action types enclosed in parentheses. Examples: - detail.action_detail_case: RENAME - detail.action_detail_case:(CREATE EDIT) - -detail.action_detail_case:MOVE", + "description": "The filtering for items returned from this query request. The format of the filter string is a sequence of expressions, joined by an optional \"AND\", where each expression is of the form \"field operator value\". Supported fields: - `time`: Uses numerical operators on date values either in terms of milliseconds since Jan 1, 1970 or in RFC 3339 format. Examples: - `time > 1452409200000 AND time <= 1492812924310` - `time >= \"2016-01-10T01:02:03-05:00\"` - `detail.action_detail_case`: Uses the \"has\" operator (:) and either a singular value or a list of allowed action types enclosed in parentheses. Examples: - `detail.action_detail_case: RENAME` - `detail.action_detail_case:(CREATE EDIT)` - `-detail.action_detail_case:MOVE` ", "type": "string" }, "itemName": { - "description": "Return activities for this Drive item. The format is \"items/ITEM_ID\".", + "description": "Return activities for this Drive item. The format is `items/ITEM_ID`.", "type": "string" }, "pageSize": { diff --git a/discovery/eventarc-v1.json b/discovery/eventarc-v1.json index 7a0f1e5930c..d00a6fdf567 100644 --- a/discovery/eventarc-v1.json +++ b/discovery/eventarc-v1.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" } } } @@ -144,7 +144,7 @@ ], "parameters": { "filter": { - "description": "The standard list 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" }, @@ -156,13 +156,13 @@ "type": "string" }, "pageSize": { - "description": "The standard list page size.", + "description": "The maximum number of results to return. If not set, the service will select a default.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "The standard list page token.", + "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" } @@ -584,7 +584,7 @@ } } }, - "revision": "20210226", + "revision": "20210312", "rootUrl": "https://eventarc.googleapis.com/", "schemas": { "AuditConfig": { diff --git a/discovery/eventarc-v1beta1.json b/discovery/eventarc-v1beta1.json index f7b5143dede..d9015a92de0 100644 --- a/discovery/eventarc-v1beta1.json +++ b/discovery/eventarc-v1beta1.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" } } } @@ -144,7 +144,7 @@ ], "parameters": { "filter": { - "description": "The standard list 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" }, @@ -156,13 +156,13 @@ "type": "string" }, "pageSize": { - "description": "The standard list page size.", + "description": "The maximum number of results to return. If not set, the service will select a default.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "The standard list page token.", + "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" } @@ -584,7 +584,7 @@ } } }, - "revision": "20210226", + "revision": "20210312", "rootUrl": "https://eventarc.googleapis.com/", "schemas": { "AuditConfig": { diff --git a/discovery/fcm-v1.json b/discovery/fcm-v1.json index 4e3186ebf3d..78966c2c894 100644 --- a/discovery/fcm-v1.json +++ b/discovery/fcm-v1.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" } } } @@ -142,7 +142,7 @@ } } }, - "revision": "20200720", + "revision": "20210317", "rootUrl": "https://fcm.googleapis.com/", "schemas": { "AndroidConfig": { @@ -396,11 +396,11 @@ "type": "object" }, "Color": { - "description": "Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to/from color representations in various languages over compactness; for example, the fields of this representation can be trivially provided to the constructor of \"java.awt.Color\" in Java; it can also be trivially provided to UIColor's \"+colorWithRed:green:blue:alpha\" method in iOS; and, with just a little work, it can be easily formatted into a CSS \"rgba()\" string in JavaScript, as well. Note: this proto does not carry information about the absolute color space that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default, applications SHOULD assume the sRGB color space. Note: when color equality needs to be decided, implementations, unless documented otherwise, will treat two colors to be equal if all their red, green, blue and alpha values each differ by at most 1e-5. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) { return rgbToCssColor_(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); }; var rgbToCssColor_ = function(red, green, blue) { var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) { resultBuilder.push('0'); } resultBuilder.push(hexString); return resultBuilder.join(''); }; // ...", + "description": "Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to/from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn't carry information about the absolute color space that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most 1e-5. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) { resultBuilder.push('0'); } resultBuilder.push(hexString); return resultBuilder.join(''); }; // ...", "id": "Color", "properties": { "alpha": { - "description": "The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: pixel color = alpha * (this color) + (1.0 - alpha) * (background color) This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is to be rendered as a solid color (as if the alpha value had been explicitly given with a value of 1.0).", + "description": "The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).", "format": "float", "type": "number" }, diff --git a/discovery/firebasehosting-v1.json b/discovery/firebasehosting-v1.json index 4bb3685b4a3..af35a0cd504 100644 --- a/discovery/firebasehosting-v1.json +++ b/discovery/firebasehosting-v1.json @@ -3,7 +3,7 @@ "baseUrl": "https://firebasehosting.googleapis.com/", "batchPath": "batch", "canonicalName": "Firebase Hosting", - "description": "The Firebase Hosting REST API enables programmatic and customizable deployments to your Firebase-hosted sites. Use this REST API to deploy new or updated hosting configurations and content files.", + "description": "The Firebase Hosting REST API enables programmatic and customizable management and deployments to your Firebase-hosted sites. Use this REST API to create and manage channels and sites as well as to deploy new or updated hosting configurations and content files.", "discoveryVersion": "v1", "documentationLink": "https://firebase.google.com/docs/hosting/", "fullyEncodeReservedExpansion": true, @@ -186,7 +186,7 @@ } } }, - "revision": "20200731", + "revision": "20210315", "rootUrl": "https://firebasehosting.googleapis.com/", "schemas": { "CancelOperationRequest": { diff --git a/discovery/firebasehosting-v1beta1.json b/discovery/firebasehosting-v1beta1.json index d9828063a33..b172d52a619 100644 --- a/discovery/firebasehosting-v1beta1.json +++ b/discovery/firebasehosting-v1beta1.json @@ -21,7 +21,7 @@ "baseUrl": "https://firebasehosting.googleapis.com/", "batchPath": "batch", "canonicalName": "Firebase Hosting", - "description": "The Firebase Hosting REST API enables programmatic and customizable deployments to your Firebase-hosted sites. Use this REST API to deploy new or updated hosting configurations and content files.", + "description": "The Firebase Hosting REST API enables programmatic and customizable management and deployments to your Firebase-hosted sites. Use this REST API to create and manage channels and sites as well as to deploy new or updated hosting configurations and content files.", "discoveryVersion": "v1", "documentationLink": "https://firebase.google.com/docs/hosting/", "fullyEncodeReservedExpansion": true, @@ -150,6 +150,94 @@ }, "sites": { "methods": { + "create": { + "description": "Creates a new Hosting Site in the specified parent Firebase project. Note that Hosting sites can take several minutes to propagate through Firebase systems.", + "flatPath": "v1beta1/projects/{projectsId}/sites", + "httpMethod": "POST", + "id": "firebasehosting.projects.sites.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The Firebase project in which to create a Hosting site, in the format: projects/PROJECT_IDENTIFIER Refer to the `Site` [`name`](../projects#Site.FIELDS.name) field for details about PROJECT_IDENTIFIER values.", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + }, + "siteId": { + "description": "Required. Immutable. A globally unique identifier for the Hosting site. This identifier is used to construct the Firebase-provisioned subdomains for the site, so it must also be a valid domain name label.", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+parent}/sites", + "request": { + "$ref": "Site" + }, + "response": { + "$ref": "Site" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/firebase" + ] + }, + "delete": { + "description": "Deletes the specified Hosting Site from the specified parent Firebase project.", + "flatPath": "v1beta1/projects/{projectsId}/sites/{sitesId}", + "httpMethod": "DELETE", + "id": "firebasehosting.projects.sites.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The fully-qualified resource name for the Hosting site, in the format: projects/PROJECT_IDENTIFIER/sites/SITE_ID Refer to the `Site` [`name`](../projects#Site.FIELDS.name) field for details about PROJECT_IDENTIFIER values.", + "location": "path", + "pattern": "^projects/[^/]+/sites/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/firebase" + ] + }, + "get": { + "description": "Gets the specified Hosting Site.", + "flatPath": "v1beta1/projects/{projectsId}/sites/{sitesId}", + "httpMethod": "GET", + "id": "firebasehosting.projects.sites.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The fully-qualified resource name for the Hosting site, in the format: projects/PROJECT_IDENTIFIER/sites/SITE_ID Refer to the `Site` [`name`](../projects#Site.FIELDS.name) field for details about PROJECT_IDENTIFIER values. Since a SITE_ID is a globally unique identifier, you can also use the unique sub-collection resource access pattern, in the format: projects/-/sites/SITE_ID", + "location": "path", + "pattern": "^projects/[^/]+/sites/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "Site" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/firebase", + "https://www.googleapis.com/auth/firebase.readonly" + ] + }, "getConfig": { "description": "Gets the Hosting metadata for a specific site.", "flatPath": "v1beta1/projects/{projectsId}/sites/{sitesId}/config", @@ -178,6 +266,80 @@ "https://www.googleapis.com/auth/firebase.readonly" ] }, + "list": { + "description": "Lists each Hosting Site associated with the specified parent Firebase project.", + "flatPath": "v1beta1/projects/{projectsId}/sites", + "httpMethod": "GET", + "id": "firebasehosting.projects.sites.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. The maximum number of sites to return. The service may return a lower number if fewer sites exist than this maximum number. If unspecified, defaults to 40.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A token from a previous call to `ListSites` that tells the server where to resume listing.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The Firebase project for which to list sites, in the format: projects/PROJECT_IDENTIFIER Refer to the `Site` [`name`](../projects#Site.FIELDS.name) field for details about PROJECT_IDENTIFIER values.", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/sites", + "response": { + "$ref": "ListSitesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/firebase", + "https://www.googleapis.com/auth/firebase.readonly" + ] + }, + "patch": { + "description": "Updates attributes of the specified Hosting Site.", + "flatPath": "v1beta1/projects/{projectsId}/sites/{sitesId}", + "httpMethod": "PATCH", + "id": "firebasehosting.projects.sites.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. The fully-qualified resource name of the Hosting site, in the format: projects/PROJECT_IDENTIFIER/sites/SITE_ID PROJECT_IDENTIFIER: the Firebase project's [`ProjectNumber`](https://firebase.google.com/docs/projects/api/reference/rest/v1beta1/projects#FirebaseProject.FIELDS.project_number) ***(recommended)*** or its [`ProjectId`](https://firebase.google.com/docs/projects/api/reference/rest/v1beta1/projects#FirebaseProject.FIELDS.project_id). Learn more about using project identifiers in Google's [AIP 2510 standard](https://google.aip.dev/cloud/2510).", + "location": "path", + "pattern": "^projects/[^/]+/sites/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "A set of field names from your Site that you want to update.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "request": { + "$ref": "Site" + }, + "response": { + "$ref": "Site" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/firebase" + ] + }, "updateConfig": { "description": "Sets the Hosting metadata for a specific site.", "flatPath": "v1beta1/projects/{projectsId}/sites/{sitesId}/config", @@ -232,7 +394,7 @@ "type": "string" }, "parent": { - "description": "Required. The site in which to create this channel, in the format: sites/ SITE_NAME", + "description": "Required. The site in which to create this channel, in the format: sites/ SITE_ID", "location": "path", "pattern": "^projects/[^/]+/sites/[^/]+$", "required": true, @@ -261,7 +423,7 @@ ], "parameters": { "name": { - "description": "Required. The fully-qualified identifier for the channel, in the format: sites/SITE_NAME/channels/CHANNEL_ID", + "description": "Required. The fully-qualified resource name for the channel, in the format: sites/SITE_ID/channels/CHANNEL_ID", "location": "path", "pattern": "^projects/[^/]+/sites/[^/]+/channels/[^/]+$", "required": true, @@ -287,7 +449,7 @@ ], "parameters": { "name": { - "description": "Required. The fully-qualified identifier for the channel, in the format: sites/SITE_NAME/channels/CHANNEL_ID", + "description": "Required. The fully-qualified resource name for the channel, in the format: sites/SITE_ID/channels/CHANNEL_ID", "location": "path", "pattern": "^projects/[^/]+/sites/[^/]+/channels/[^/]+$", "required": true, @@ -326,7 +488,7 @@ "type": "string" }, "parent": { - "description": "Required. The site for which to list channels, in the format: sites/ SITE_NAME", + "description": "Required. The site for which to list channels, in the format: sites/SITE_ID", "location": "path", "pattern": "^projects/[^/]+/sites/[^/]+$", "required": true, @@ -354,7 +516,7 @@ ], "parameters": { "name": { - "description": "The fully-qualified identifier for the channel, in the format: sites/ SITE_NAME/channels/CHANNEL_ID", + "description": "The fully-qualified resource name for the channel, in the format: sites/ SITE_ID/channels/CHANNEL_ID", "location": "path", "pattern": "^projects/[^/]+/sites/[^/]+/channels/[^/]+$", "required": true, @@ -393,14 +555,14 @@ ], "parameters": { "parent": { - "description": "Required. The site or channel to which the release belongs, in either of the following formats: - sites/SITE_NAME - sites/SITE_NAME/channels/CHANNEL_ID", + "description": "Required. The site or channel to which the release belongs, in either of the following formats: - sites/SITE_ID - sites/SITE_ID/channels/CHANNEL_ID", "location": "path", "pattern": "^projects/[^/]+/sites/[^/]+/channels/[^/]+$", "required": true, "type": "string" }, "versionName": { - "description": " The unique identifier for a version, in the format: sites/SITE_NAME /versions/VERSION_ID The SITE_NAME in this version identifier must match the SITE_NAME in the `parent` parameter. This query parameter must be empty if the `type` field in the request body is `SITE_DISABLE`.", + "description": " The unique identifier for a version, in the format: sites/SITE_ID/versions/ VERSION_ID The SITE_ID in this version identifier must match the SITE_ID in the `parent` parameter. This query parameter must be empty if the `type` field in the request body is `SITE_DISABLE`.", "location": "query", "type": "string" } @@ -438,7 +600,7 @@ "type": "string" }, "parent": { - "description": "Required. The site or channel for which to list releases, in either of the following formats: - sites/SITE_NAME - sites/SITE_NAME/channels/CHANNEL_ID ", + "description": "Required. The site or channel for which to list releases, in either of the following formats: - sites/SITE_ID - sites/SITE_ID/channels/CHANNEL_ID ", "location": "path", "pattern": "^projects/[^/]+/sites/[^/]+/channels/[^/]+$", "required": true, @@ -627,14 +789,14 @@ ], "parameters": { "parent": { - "description": "Required. The site or channel to which the release belongs, in either of the following formats: - sites/SITE_NAME - sites/SITE_NAME/channels/CHANNEL_ID", + "description": "Required. The site or channel to which the release belongs, in either of the following formats: - sites/SITE_ID - sites/SITE_ID/channels/CHANNEL_ID", "location": "path", "pattern": "^projects/[^/]+/sites/[^/]+$", "required": true, "type": "string" }, "versionName": { - "description": " The unique identifier for a version, in the format: sites/SITE_NAME /versions/VERSION_ID The SITE_NAME in this version identifier must match the SITE_NAME in the `parent` parameter. This query parameter must be empty if the `type` field in the request body is `SITE_DISABLE`.", + "description": " The unique identifier for a version, in the format: sites/SITE_ID/versions/ VERSION_ID The SITE_ID in this version identifier must match the SITE_ID in the `parent` parameter. This query parameter must be empty if the `type` field in the request body is `SITE_DISABLE`.", "location": "query", "type": "string" } @@ -672,7 +834,7 @@ "type": "string" }, "parent": { - "description": "Required. The site or channel for which to list releases, in either of the following formats: - sites/SITE_NAME - sites/SITE_NAME/channels/CHANNEL_ID ", + "description": "Required. The site or channel for which to list releases, in either of the following formats: - sites/SITE_ID - sites/SITE_ID/channels/CHANNEL_ID ", "location": "path", "pattern": "^projects/[^/]+/sites/[^/]+$", "required": true, @@ -704,7 +866,7 @@ ], "parameters": { "parent": { - "description": "Required. The target site for the cloned version, in the format: sites/ SITE_NAME", + "description": "Required. The target site for the cloned version, in the format: sites/ SITE_ID", "location": "path", "pattern": "^projects/[^/]+/sites/[^/]+$", "required": true, @@ -733,7 +895,7 @@ ], "parameters": { "parent": { - "description": "Required. The site in which to create the version, in the format: sites/ SITE_NAME", + "description": "Required. The site in which to create the version, in the format: sites/ SITE_ID", "location": "path", "pattern": "^projects/[^/]+/sites/[^/]+$", "required": true, @@ -773,7 +935,7 @@ ], "parameters": { "name": { - "description": "Required. The fully-qualified identifier for the version, in the format: sites/SITE_NAME/versions/VERSION_ID", + "description": "Required. The fully-qualified resource name for the version, in the format: sites/SITE_ID/versions/VERSION_ID", "location": "path", "pattern": "^projects/[^/]+/sites/[^/]+/versions/[^/]+$", "required": true, @@ -815,7 +977,7 @@ "type": "string" }, "parent": { - "description": "Required. The site or channel for which to list versions, in either of the following formats: - sites/SITE_NAME - sites/SITE_NAME/channels/CHANNEL_ID ", + "description": "Required. The site or channel for which to list versions, in either of the following formats: - sites/SITE_ID - sites/SITE_ID/channels/CHANNEL_ID ", "location": "path", "pattern": "^projects/[^/]+/sites/[^/]+$", "required": true, @@ -843,7 +1005,7 @@ ], "parameters": { "name": { - "description": "The fully-qualified identifier for the version, in the format: sites/ SITE_NAME/versions/VERSION_ID This name is provided in the response body when you call [`CreateVersion`](sites.versions/create).", + "description": "The fully-qualified resource name for the version, in the format: sites/ SITE_ID/versions/VERSION_ID This name is provided in the response body when you call [`CreateVersion`](sites.versions/create).", "location": "path", "pattern": "^projects/[^/]+/sites/[^/]+/versions/[^/]+$", "required": true, @@ -878,7 +1040,7 @@ ], "parameters": { "parent": { - "description": "Required. The version to which to add files, in the format: sites/SITE_NAME /versions/VERSION_ID", + "description": "Required. The version to which to add files, in the format: sites/SITE_ID /versions/VERSION_ID", "location": "path", "pattern": "^projects/[^/]+/sites/[^/]+/versions/[^/]+$", "required": true, @@ -922,7 +1084,7 @@ "type": "string" }, "parent": { - "description": "Required. The version for which to list files, in the format: sites/ SITE_NAME/versions/VERSION_ID", + "description": "Required. The version for which to list files, in the format: sites/SITE_ID /versions/VERSION_ID", "location": "path", "pattern": "^projects/[^/]+/sites/[^/]+/versions/[^/]+$", "required": true, @@ -1047,7 +1209,7 @@ "type": "string" }, "parent": { - "description": "Required. The site in which to create this channel, in the format: sites/ SITE_NAME", + "description": "Required. The site in which to create this channel, in the format: sites/ SITE_ID", "location": "path", "pattern": "^sites/[^/]+$", "required": true, @@ -1076,7 +1238,7 @@ ], "parameters": { "name": { - "description": "Required. The fully-qualified identifier for the channel, in the format: sites/SITE_NAME/channels/CHANNEL_ID", + "description": "Required. The fully-qualified resource name for the channel, in the format: sites/SITE_ID/channels/CHANNEL_ID", "location": "path", "pattern": "^sites/[^/]+/channels/[^/]+$", "required": true, @@ -1102,7 +1264,7 @@ ], "parameters": { "name": { - "description": "Required. The fully-qualified identifier for the channel, in the format: sites/SITE_NAME/channels/CHANNEL_ID", + "description": "Required. The fully-qualified resource name for the channel, in the format: sites/SITE_ID/channels/CHANNEL_ID", "location": "path", "pattern": "^sites/[^/]+/channels/[^/]+$", "required": true, @@ -1141,7 +1303,7 @@ "type": "string" }, "parent": { - "description": "Required. The site for which to list channels, in the format: sites/ SITE_NAME", + "description": "Required. The site for which to list channels, in the format: sites/SITE_ID", "location": "path", "pattern": "^sites/[^/]+$", "required": true, @@ -1169,7 +1331,7 @@ ], "parameters": { "name": { - "description": "The fully-qualified identifier for the channel, in the format: sites/ SITE_NAME/channels/CHANNEL_ID", + "description": "The fully-qualified resource name for the channel, in the format: sites/ SITE_ID/channels/CHANNEL_ID", "location": "path", "pattern": "^sites/[^/]+/channels/[^/]+$", "required": true, @@ -1208,14 +1370,14 @@ ], "parameters": { "parent": { - "description": "Required. The site or channel to which the release belongs, in either of the following formats: - sites/SITE_NAME - sites/SITE_NAME/channels/CHANNEL_ID", + "description": "Required. The site or channel to which the release belongs, in either of the following formats: - sites/SITE_ID - sites/SITE_ID/channels/CHANNEL_ID", "location": "path", "pattern": "^sites/[^/]+/channels/[^/]+$", "required": true, "type": "string" }, "versionName": { - "description": " The unique identifier for a version, in the format: sites/SITE_NAME /versions/VERSION_ID The SITE_NAME in this version identifier must match the SITE_NAME in the `parent` parameter. This query parameter must be empty if the `type` field in the request body is `SITE_DISABLE`.", + "description": " The unique identifier for a version, in the format: sites/SITE_ID/versions/ VERSION_ID The SITE_ID in this version identifier must match the SITE_ID in the `parent` parameter. This query parameter must be empty if the `type` field in the request body is `SITE_DISABLE`.", "location": "query", "type": "string" } @@ -1253,7 +1415,7 @@ "type": "string" }, "parent": { - "description": "Required. The site or channel for which to list releases, in either of the following formats: - sites/SITE_NAME - sites/SITE_NAME/channels/CHANNEL_ID ", + "description": "Required. The site or channel for which to list releases, in either of the following formats: - sites/SITE_ID - sites/SITE_ID/channels/CHANNEL_ID ", "location": "path", "pattern": "^sites/[^/]+/channels/[^/]+$", "required": true, @@ -1442,14 +1604,14 @@ ], "parameters": { "parent": { - "description": "Required. The site or channel to which the release belongs, in either of the following formats: - sites/SITE_NAME - sites/SITE_NAME/channels/CHANNEL_ID", + "description": "Required. The site or channel to which the release belongs, in either of the following formats: - sites/SITE_ID - sites/SITE_ID/channels/CHANNEL_ID", "location": "path", "pattern": "^sites/[^/]+$", "required": true, "type": "string" }, "versionName": { - "description": " The unique identifier for a version, in the format: sites/SITE_NAME /versions/VERSION_ID The SITE_NAME in this version identifier must match the SITE_NAME in the `parent` parameter. This query parameter must be empty if the `type` field in the request body is `SITE_DISABLE`.", + "description": " The unique identifier for a version, in the format: sites/SITE_ID/versions/ VERSION_ID The SITE_ID in this version identifier must match the SITE_ID in the `parent` parameter. This query parameter must be empty if the `type` field in the request body is `SITE_DISABLE`.", "location": "query", "type": "string" } @@ -1487,7 +1649,7 @@ "type": "string" }, "parent": { - "description": "Required. The site or channel for which to list releases, in either of the following formats: - sites/SITE_NAME - sites/SITE_NAME/channels/CHANNEL_ID ", + "description": "Required. The site or channel for which to list releases, in either of the following formats: - sites/SITE_ID - sites/SITE_ID/channels/CHANNEL_ID ", "location": "path", "pattern": "^sites/[^/]+$", "required": true, @@ -1519,7 +1681,7 @@ ], "parameters": { "parent": { - "description": "Required. The target site for the cloned version, in the format: sites/ SITE_NAME", + "description": "Required. The target site for the cloned version, in the format: sites/ SITE_ID", "location": "path", "pattern": "^sites/[^/]+$", "required": true, @@ -1548,7 +1710,7 @@ ], "parameters": { "parent": { - "description": "Required. The site in which to create the version, in the format: sites/ SITE_NAME", + "description": "Required. The site in which to create the version, in the format: sites/ SITE_ID", "location": "path", "pattern": "^sites/[^/]+$", "required": true, @@ -1588,7 +1750,7 @@ ], "parameters": { "name": { - "description": "Required. The fully-qualified identifier for the version, in the format: sites/SITE_NAME/versions/VERSION_ID", + "description": "Required. The fully-qualified resource name for the version, in the format: sites/SITE_ID/versions/VERSION_ID", "location": "path", "pattern": "^sites/[^/]+/versions/[^/]+$", "required": true, @@ -1630,7 +1792,7 @@ "type": "string" }, "parent": { - "description": "Required. The site or channel for which to list versions, in either of the following formats: - sites/SITE_NAME - sites/SITE_NAME/channels/CHANNEL_ID ", + "description": "Required. The site or channel for which to list versions, in either of the following formats: - sites/SITE_ID - sites/SITE_ID/channels/CHANNEL_ID ", "location": "path", "pattern": "^sites/[^/]+$", "required": true, @@ -1658,7 +1820,7 @@ ], "parameters": { "name": { - "description": "The fully-qualified identifier for the version, in the format: sites/ SITE_NAME/versions/VERSION_ID This name is provided in the response body when you call [`CreateVersion`](sites.versions/create).", + "description": "The fully-qualified resource name for the version, in the format: sites/ SITE_ID/versions/VERSION_ID This name is provided in the response body when you call [`CreateVersion`](sites.versions/create).", "location": "path", "pattern": "^sites/[^/]+/versions/[^/]+$", "required": true, @@ -1693,7 +1855,7 @@ ], "parameters": { "parent": { - "description": "Required. The version to which to add files, in the format: sites/SITE_NAME /versions/VERSION_ID", + "description": "Required. The version to which to add files, in the format: sites/SITE_ID /versions/VERSION_ID", "location": "path", "pattern": "^sites/[^/]+/versions/[^/]+$", "required": true, @@ -1737,7 +1899,7 @@ "type": "string" }, "parent": { - "description": "Required. The version for which to list files, in the format: sites/ SITE_NAME/versions/VERSION_ID", + "description": "Required. The version for which to list files, in the format: sites/SITE_ID /versions/VERSION_ID", "location": "path", "pattern": "^sites/[^/]+/versions/[^/]+$", "required": true, @@ -1777,7 +1939,7 @@ } } }, - "revision": "20210305", + "revision": "20210315", "rootUrl": "https://firebasehosting.googleapis.com/", "schemas": { "ActingUser": { @@ -1848,7 +2010,7 @@ "type": "object" }, "name": { - "description": "The fully-qualified identifier for the channel, in the format: sites/ SITE_NAME/channels/CHANNEL_ID", + "description": "The fully-qualified resource name for the channel, in the format: sites/ SITE_ID/channels/CHANNEL_ID", "type": "string" }, "release": { @@ -1896,7 +2058,7 @@ "description": "If provided, only paths that match one or more RegEx values in this list will be included in the new version." }, "sourceVersion": { - "description": "Required. The unique identifier for the version to be cloned, in the format: sites/SITE_NAME/versions/VERSION_ID", + "description": "Required. The unique identifier for the version to be cloned, in the format: sites/SITE_ID/versions/VERSION_ID", "type": "string" } }, @@ -2160,6 +2322,23 @@ }, "type": "object" }, + "ListSitesResponse": { + "id": "ListSitesResponse", + "properties": { + "nextPageToken": { + "description": "The pagination token, if more results exist beyond the ones in this response. Include this token in your next call to `ListSites`. Page tokens are short-lived and should not be stored.", + "type": "string" + }, + "sites": { + "description": "A list of Site objects associated with the specified Firebase project.", + "items": { + "$ref": "Site" + }, + "type": "array" + } + }, + "type": "object" + }, "ListVersionFilesResponse": { "id": "ListVersionFilesResponse", "properties": { @@ -2267,7 +2446,7 @@ "type": "array" }, "uploadUrl": { - "description": "The URL to which the files should be uploaded, in the format: \"https://upload-firebasehosting.googleapis.com/upload/sites/SITE_NAME /versions/VERSION_ID/files\" Perform a multipart `POST` of the Gzipped file contents to the URL using a forward slash and the hash of the file appended to the end.", + "description": "The URL to which the files should be uploaded, in the format: \"https://upload-firebasehosting.googleapis.com/upload/sites/SITE_ID /versions/VERSION_ID/files\" Perform a multipart `POST` of the Gzipped file contents to the URL using a forward slash and the hash of the file appended to the end.", "type": "string" } }, @@ -2322,7 +2501,7 @@ "type": "string" }, "name": { - "description": "Output only. The unique identifier for the release, in either of the following formats: - sites/SITE_NAME/releases/RELEASE_ID - sites/SITE_NAME/channels/CHANNEL_ID/releases/RELEASE_ID This name is provided in the response body when you call [`releases.create`](sites.releases/create) or [`channels.releases.create`](sites.channels.releases/create).", + "description": "Output only. The unique identifier for the release, in either of the following formats: - sites/SITE_ID/releases/RELEASE_ID - sites/SITE_ID/channels/CHANNEL_ID/releases/RELEASE_ID This name is provided in the response body when you call [`releases.create`](sites.releases/create) or [`channels.releases.create`](sites.channels.releases/create).", "type": "string" }, "releaseTime": { @@ -2450,6 +2629,49 @@ }, "type": "object" }, + "Site": { + "description": "A `Site` represents a Firebase Hosting site.", + "id": "Site", + "properties": { + "appId": { + "description": "Optional. The [ID of a Web App](https://firebase.google.com/docs/projects/api/reference/rest/v1beta1/projects.webApps#WebApp.FIELDS.app_id) associated with the Hosting site.", + "type": "string" + }, + "defaultUrl": { + "description": "Output only. The default URL for the Hosting site.", + "readOnly": true, + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. User-specified labels for the Hosting site.", + "type": "object" + }, + "name": { + "description": "Output only. The fully-qualified resource name of the Hosting site, in the format: projects/PROJECT_IDENTIFIER/sites/SITE_ID PROJECT_IDENTIFIER: the Firebase project's [`ProjectNumber`](https://firebase.google.com/docs/projects/api/reference/rest/v1beta1/projects#FirebaseProject.FIELDS.project_number) ***(recommended)*** or its [`ProjectId`](https://firebase.google.com/docs/projects/api/reference/rest/v1beta1/projects#FirebaseProject.FIELDS.project_id). Learn more about using project identifiers in Google's [AIP 2510 standard](https://google.aip.dev/cloud/2510).", + "readOnly": true, + "type": "string" + }, + "type": { + "description": "Output only. The type of Hosting site. Every Firebase project has a `DEFAULT_SITE`, which is created when Hosting is provisioned for the project. All additional sites are `USER_SITE`.", + "enum": [ + "TYPE_UNSPECIFIED", + "DEFAULT_SITE", + "USER_SITE" + ], + "enumDescriptions": [ + "Unknown state, likely the result of an error on the backend.", + "The default Hosting site that is provisioned when a Firebase project is created.", + "A Hosting site that the user created." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "SiteConfig": { "description": "A `SiteConfig` contains metadata associated with a specific site that controls Firebase Hosting serving behavior", "id": "SiteConfig", @@ -2541,7 +2763,7 @@ "type": "object" }, "name": { - "description": "The fully-qualified identifier for the version, in the format: sites/ SITE_NAME/versions/VERSION_ID This name is provided in the response body when you call [`CreateVersion`](sites.versions/create).", + "description": "The fully-qualified resource name for the version, in the format: sites/ SITE_ID/versions/VERSION_ID This name is provided in the response body when you call [`CreateVersion`](sites.versions/create).", "type": "string" }, "preview": { diff --git a/discovery/firebaseml-v1.json b/discovery/firebaseml-v1.json index 6922fa5a967..cc2257289ae 100644 --- a/discovery/firebaseml-v1.json +++ b/discovery/firebaseml-v1.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" } } } @@ -204,7 +204,7 @@ } } }, - "revision": "20200803", + "revision": "20210322", "rootUrl": "https://firebaseml.googleapis.com/", "schemas": { "CancelOperationRequest": { diff --git a/discovery/firebaseml-v1beta2.json b/discovery/firebaseml-v1beta2.json index 343dbee9d41..b81d68e8b26 100644 --- a/discovery/firebaseml-v1beta2.json +++ b/discovery/firebaseml-v1beta2.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" } } } @@ -318,7 +318,7 @@ } } }, - "revision": "20210305", + "revision": "20210322", "rootUrl": "https://firebaseml.googleapis.com/", "schemas": { "DownloadModelResponse": { diff --git a/discovery/firebasestorage-v1beta.json b/discovery/firebasestorage-v1beta.json new file mode 100644 index 00000000000..78776b69be3 --- /dev/null +++ b/discovery/firebasestorage-v1beta.json @@ -0,0 +1,296 @@ +{ + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + }, + "https://www.googleapis.com/auth/firebase": { + "description": "View and administer all your Firebase data and settings" + } + } + } + }, + "basePath": "", + "baseUrl": "https://firebasestorage.googleapis.com/", + "batchPath": "batch", + "canonicalName": "Firebasestorage", + "description": "The Cloud Storage for Firebase API enables programmatic management of Cloud Storage buckets for use in Firebase projects", + "discoveryVersion": "v1", + "documentationLink": "https://firebase.google.com/docs/storage", + "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": "firebasestorage:v1beta", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://firebasestorage.mtls.googleapis.com/", + "name": "firebasestorage", + "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": { + "buckets": { + "methods": { + "addFirebase": { + "description": "Links a Google Cloud Storage bucket to a Firebase project.", + "flatPath": "v1beta/projects/{projectsId}/buckets/{bucketsId}:addFirebase", + "httpMethod": "POST", + "id": "firebasestorage.projects.buckets.addFirebase", + "parameterOrder": [ + "bucket" + ], + "parameters": { + "bucket": { + "description": "Required. Resource name of the bucket, mirrors the ID of the underlying Google Cloud Storage bucket. Because bucket resource names are unique across projects, you may omit the project number, `projects/-/buckets/{bucket_id}`.", + "location": "path", + "pattern": "^projects/[^/]+/buckets/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+bucket}:addFirebase", + "request": { + "$ref": "AddFirebaseRequest" + }, + "response": { + "$ref": "Bucket" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/firebase" + ] + }, + "get": { + "description": "Gets a single linked storage bucket.", + "flatPath": "v1beta/projects/{projectsId}/buckets/{bucketsId}", + "httpMethod": "GET", + "id": "firebasestorage.projects.buckets.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Resource name of the bucket, mirrors the ID of the underlying Google Cloud Storage bucket. Because bucket resource names are unique across projects, you may omit the project number, `projects/-/buckets/{bucket_id}`.", + "location": "path", + "pattern": "^projects/[^/]+/buckets/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "Bucket" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/firebase" + ] + }, + "list": { + "description": "Lists the linked storage buckets for a project.", + "flatPath": "v1beta/projects/{projectsId}/buckets", + "httpMethod": "GET", + "id": "firebasestorage.projects.buckets.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "The maximum number of buckets to return. If not set, the server will use a reasonable default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous `ListBuckets` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListBuckets` must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Resource name of the parent Firebase project, `projects/{project_number}`.", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/buckets", + "response": { + "$ref": "ListBucketsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/firebase" + ] + }, + "removeFirebase": { + "description": "Unlinks a linked Google Cloud Storage bucket from a Firebase project.", + "flatPath": "v1beta/projects/{projectsId}/buckets/{bucketsId}:removeFirebase", + "httpMethod": "POST", + "id": "firebasestorage.projects.buckets.removeFirebase", + "parameterOrder": [ + "bucket" + ], + "parameters": { + "bucket": { + "description": "Required. Resource name of the bucket, mirrors the ID of the underlying Google Cloud Storage bucket. Because bucket resource names are unique across projects, you may omit the project number, `projects/-/buckets/{bucket_id}`.", + "location": "path", + "pattern": "^projects/[^/]+/buckets/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+bucket}:removeFirebase", + "request": { + "$ref": "RemoveFirebaseRequest" + }, + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/firebase" + ] + } + } + } + } + } + }, + "revision": "20210309", + "rootUrl": "https://firebasestorage.googleapis.com/", + "schemas": { + "AddFirebaseRequest": { + "description": "The request used to link a Google Cloud Storage bucket to a Firebase project.", + "id": "AddFirebaseRequest", + "properties": {}, + "type": "object" + }, + "Bucket": { + "description": "A storage bucket and its relation to a parent Firebase project.", + "id": "Bucket", + "properties": { + "name": { + "description": "Resource name of the bucket.", + "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "id": "Empty", + "properties": {}, + "type": "object" + }, + "ListBucketsResponse": { + "description": "The response returned by `ListBuckets`.", + "id": "ListBucketsResponse", + "properties": { + "buckets": { + "description": "The list of linked buckets.", + "items": { + "$ref": "Bucket" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token that can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + } + }, + "type": "object" + }, + "RemoveFirebaseRequest": { + "description": "The request used to unlink a Google Cloud Storage bucket from a Firebase project.", + "id": "RemoveFirebaseRequest", + "properties": {}, + "type": "object" + } + }, + "servicePath": "", + "title": "Cloud Storage for Firebase API", + "version": "v1beta", + "version_module": true +} \ No newline at end of file diff --git a/discovery/firestore-v1.json b/discovery/firestore-v1.json index 1e8a22d5d90..bc59587dbe8 100644 --- a/discovery/firestore-v1.json +++ b/discovery/firestore-v1.json @@ -254,7 +254,7 @@ ], "parameters": { "name": { - "description": "A field name of the form `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` A field path may be a simple field name, e.g. `address` or a path to fields within map_value , e.g. `address.city`, or a special field path. The only valid special field is `*`, which represents any field. Field paths may be quoted using ` (backtick). The only character that needs to be escaped within a quoted field path is the backtick character itself, escaped using a backslash. Special characters in field paths that must be quoted include: `*`, `.`, ``` (backtick), `[`, `]`, as well as any ascii symbolic characters. Examples: (Note: Comments here are written in markdown syntax, so there is an additional layer of backticks to represent a code block) `\\`address.city\\`` represents a field named `address.city`, not the map key `city` in the field `address`. `\\`*\\`` represents a field named `*`, not any field. A special `Field` contains the default indexing settings for all fields. This field's resource name is: `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*` Indexes defined on this `Field` will be applied to all fields which do not have their own `Field` index configuration.", + "description": "Required. A field name of the form `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` A field path may be a simple field name, e.g. `address` or a path to fields within map_value , e.g. `address.city`, or a special field path. The only valid special field is `*`, which represents any field. Field paths may be quoted using ` (backtick). The only character that needs to be escaped within a quoted field path is the backtick character itself, escaped using a backslash. Special characters in field paths that must be quoted include: `*`, `.`, ``` (backtick), `[`, `]`, as well as any ascii symbolic characters. Examples: (Note: Comments here are written in markdown syntax, so there is an additional layer of backticks to represent a code block) `\\`address.city\\`` represents a field named `address.city`, not the map key `city` in the field `address`. `\\`*\\`` represents a field named `*`, not any field. A special `Field` contains the default indexing settings for all fields. This field's resource name is: `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*` Indexes defined on this `Field` will be applied to all fields which do not have their own `Field` index configuration.", "location": "path", "pattern": "^projects/[^/]+/databases/[^/]+/collectionGroups/[^/]+/fields/[^/]+$", "required": true, @@ -1160,7 +1160,7 @@ } } }, - "revision": "20201003", + "revision": "20210220", "rootUrl": "https://firestore.googleapis.com/", "schemas": { "ArrayValue": { @@ -1783,7 +1783,7 @@ "description": "The index configuration for this field. If unset, field indexing will revert to the configuration defined by the `ancestor_field`. To explicitly remove all indexes for this field, specify an index config with an empty list of indexes." }, "name": { - "description": "A field name of the form `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` A field path may be a simple field name, e.g. `address` or a path to fields within map_value , e.g. `address.city`, or a special field path. The only valid special field is `*`, which represents any field. Field paths may be quoted using ` (backtick). The only character that needs to be escaped within a quoted field path is the backtick character itself, escaped using a backslash. Special characters in field paths that must be quoted include: `*`, `.`, ``` (backtick), `[`, `]`, as well as any ascii symbolic characters. Examples: (Note: Comments here are written in markdown syntax, so there is an additional layer of backticks to represent a code block) `\\`address.city\\`` represents a field named `address.city`, not the map key `city` in the field `address`. `\\`*\\`` represents a field named `*`, not any field. A special `Field` contains the default indexing settings for all fields. This field's resource name is: `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*` Indexes defined on this `Field` will be applied to all fields which do not have their own `Field` index configuration.", + "description": "Required. A field name of the form `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` A field path may be a simple field name, e.g. `address` or a path to fields within map_value , e.g. `address.city`, or a special field path. The only valid special field is `*`, which represents any field. Field paths may be quoted using ` (backtick). The only character that needs to be escaped within a quoted field path is the backtick character itself, escaped using a backslash. Special characters in field paths that must be quoted include: `*`, `.`, ``` (backtick), `[`, `]`, as well as any ascii symbolic characters. Examples: (Note: Comments here are written in markdown syntax, so there is an additional layer of backticks to represent a code block) `\\`address.city\\`` represents a field named `address.city`, not the map key `city` in the field `address`. `\\`*\\`` represents a field named `*`, not any field. A special `Field` contains the default indexing settings for all fields. This field's resource name is: `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*` Indexes defined on this `Field` will be applied to all fields which do not have their own `Field` index configuration.", "type": "string" } }, @@ -2047,7 +2047,7 @@ "type": "string" }, "order": { - "description": "Indicates that this field supports ordering by the specified order or comparing using =, <, <=, >, >=.", + "description": "Indicates that this field supports ordering by the specified order or comparing using =, !=, <, <=, >, >=.", "enum": [ "ORDER_UNSPECIFIED", "ASCENDING", @@ -2235,7 +2235,7 @@ "type": "object" }, "LatLng": { - "description": "An object representing a latitude/longitude pair. This is expressed as a pair of doubles representing degrees latitude and degrees longitude. Unless specified otherwise, this must conform to the WGS84 standard. Values must be within normalized ranges.", + "description": "An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this must conform to the WGS84 standard. Values must be within normalized ranges.", "id": "LatLng", "properties": { "latitude": { diff --git a/discovery/firestore-v1beta1.json b/discovery/firestore-v1beta1.json index 7cf7f1bfd6d..bd9ffc04d7c 100644 --- a/discovery/firestore-v1beta1.json +++ b/discovery/firestore-v1beta1.json @@ -849,7 +849,7 @@ } } }, - "revision": "20201003", + "revision": "20210220", "rootUrl": "https://firestore.googleapis.com/", "schemas": { "ArrayValue": { @@ -1724,7 +1724,7 @@ "type": "object" }, "LatLng": { - "description": "An object representing a latitude/longitude pair. This is expressed as a pair of doubles representing degrees latitude and degrees longitude. Unless specified otherwise, this must conform to the WGS84 standard. Values must be within normalized ranges.", + "description": "An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this must conform to the WGS84 standard. Values must be within normalized ranges.", "id": "LatLng", "properties": { "latitude": { diff --git a/discovery/fitness-v1.json b/discovery/fitness-v1.json index a1171ef2cf4..295e96ab08e 100644 --- a/discovery/fitness-v1.json +++ b/discovery/fitness-v1.json @@ -477,12 +477,6 @@ "datasetId" ], "parameters": { - "currentTimeMillis": { - "description": "The client's current time in milliseconds since epoch.", - "format": "int64", - "location": "query", - "type": "string" - }, "dataSourceId": { "description": "The data stream ID of the data source that created the dataset.", "location": "path", @@ -495,12 +489,6 @@ "required": true, "type": "string" }, - "modifiedTimeMillis": { - "description": "When the operation was performed on the client.", - "format": "int64", - "location": "query", - "type": "string" - }, "userId": { "description": "Delete a dataset for the person identified. Use me to indicate the authenticated user. Only me is supported at this time.", "location": "path", @@ -604,12 +592,6 @@ "datasetId" ], "parameters": { - "currentTimeMillis": { - "description": "The client's current time in milliseconds since epoch. Note that the minStartTimeNs and maxEndTimeNs properties in the request body are in nanoseconds instead of milliseconds.", - "format": "int64", - "location": "query", - "type": "string" - }, "dataSourceId": { "description": "The data stream ID of the data source that created the dataset.", "location": "path", @@ -718,12 +700,6 @@ "sessionId" ], "parameters": { - "currentTimeMillis": { - "description": "The client's current time in milliseconds since epoch.", - "format": "int64", - "location": "query", - "type": "string" - }, "sessionId": { "description": "The ID of the session to be deleted.", "location": "path", @@ -825,12 +801,6 @@ "sessionId" ], "parameters": { - "currentTimeMillis": { - "description": "The client's current time in milliseconds since epoch.", - "format": "int64", - "location": "query", - "type": "string" - }, "sessionId": { "description": "The ID of the session to be created.", "location": "path", @@ -861,7 +831,7 @@ } } }, - "revision": "20210305", + "revision": "20210318", "rootUrl": "https://fitness.googleapis.com/", "schemas": { "AggregateBucket": { diff --git a/discovery/gameservices-v1.json b/discovery/gameservices-v1.json index d809342b4aa..d2a101a856f 100644 --- a/discovery/gameservices-v1.json +++ b/discovery/gameservices-v1.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" } } } @@ -144,7 +144,7 @@ ], "parameters": { "filter": { - "description": "The standard list 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" }, @@ -161,13 +161,13 @@ "type": "string" }, "pageSize": { - "description": "The standard list page size.", + "description": "The maximum number of results to return. If not set, the service will select a default.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "The standard list page token.", + "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" } @@ -1312,7 +1312,7 @@ } } }, - "revision": "20210225", + "revision": "20210311", "rootUrl": "https://gameservices.googleapis.com/", "schemas": { "AuditConfig": { diff --git a/discovery/gameservices-v1beta.json b/discovery/gameservices-v1beta.json index 0e9c951e273..a8b52899c85 100644 --- a/discovery/gameservices-v1beta.json +++ b/discovery/gameservices-v1beta.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" } } } @@ -144,7 +144,7 @@ ], "parameters": { "filter": { - "description": "The standard list 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" }, @@ -161,13 +161,13 @@ "type": "string" }, "pageSize": { - "description": "The standard list page size.", + "description": "The maximum number of results to return. If not set, the service will select a default.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "The standard list page token.", + "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" } @@ -1312,7 +1312,7 @@ } } }, - "revision": "20210225", + "revision": "20210311", "rootUrl": "https://gameservices.googleapis.com/", "schemas": { "AuditConfig": { diff --git a/discovery/genomics-v1.json b/discovery/genomics-v1.json index 4812f6fb936..9393d34c540 100644 --- a/discovery/genomics-v1.json +++ b/discovery/genomics-v1.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" }, "https://www.googleapis.com/auth/genomics": { "description": "View and manage Genomics data" @@ -209,7 +209,7 @@ } } }, - "revision": "20200804", + "revision": "20210322", "rootUrl": "https://genomics.googleapis.com/", "schemas": { "CancelOperationRequest": { diff --git a/discovery/genomics-v1alpha2.json b/discovery/genomics-v1alpha2.json index 6d0e42103ec..4864275d814 100644 --- a/discovery/genomics-v1alpha2.json +++ b/discovery/genomics-v1alpha2.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" }, "https://www.googleapis.com/auth/compute": { "description": "View and manage your Google Compute Engine resources" @@ -389,7 +389,7 @@ } } }, - "revision": "20200804", + "revision": "20210322", "rootUrl": "https://genomics.googleapis.com/", "schemas": { "CancelOperationRequest": { diff --git a/discovery/genomics-v2alpha1.json b/discovery/genomics-v2alpha1.json index e0a68d6a628..e8e029bf231 100644 --- a/discovery/genomics-v2alpha1.json +++ b/discovery/genomics-v2alpha1.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" }, "https://www.googleapis.com/auth/genomics": { "description": "View and manage Genomics data" @@ -301,7 +301,7 @@ } } }, - "revision": "20210220", + "revision": "20210322", "rootUrl": "https://genomics.googleapis.com/", "schemas": { "Accelerator": { diff --git a/discovery/gkehub-v1.json b/discovery/gkehub-v1.json new file mode 100644 index 00000000000..e0da72b62f9 --- /dev/null +++ b/discovery/gkehub-v1.json @@ -0,0 +1,1254 @@ +{ + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "See, edit, configure, and delete your Google Cloud Platform data" + } + } + } + }, + "basePath": "", + "baseUrl": "https://gkehub.googleapis.com/", + "batchPath": "batch", + "canonicalName": "GKE Hub", + "description": "", + "discoveryVersion": "v1", + "documentationLink": "https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster", + "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": "gkehub:v1", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://gkehub.mtls.googleapis.com/", + "name": "gkehub", + "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": "gkehub.projects.locations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Resource name for the location.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Location" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists information about the supported locations for this service.", + "flatPath": "v1/projects/{projectsId}/locations", + "httpMethod": "GET", + "id": "gkehub.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 will select a default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}/locations", + "response": { + "$ref": "ListLocationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "memberships": { + "methods": { + "create": { + "description": "Adds a new Membership.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/memberships", + "httpMethod": "POST", + "id": "gkehub.projects.locations.memberships.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "membershipId": { + "description": "Required. Client chosen ID for the membership. `membership_id` must be a valid RFC 1123 compliant DNS label: 1. At most 63 characters in length 2. It must consist of lower case alphanumeric characters or `-` 3. It must start and end with an alphanumeric character Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent (project and location) where the Memberships will be created. Specified in the format `projects/*/locations/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A 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": "v1/{+parent}/memberships", + "request": { + "$ref": "Membership" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Removes a Membership.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/memberships/{membershipsId}", + "httpMethod": "DELETE", + "id": "gkehub.projects.locations.memberships.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The Membership resource name in the format `projects/*/locations/*/memberships/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/memberships/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A 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": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "generateConnectManifest": { + "description": "Generates the manifest for deployment of the GKE connect agent.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/memberships/{membershipsId}:generateConnectManifest", + "httpMethod": "GET", + "id": "gkehub.projects.locations.memberships.generateConnectManifest", + "parameterOrder": [ + "name" + ], + "parameters": { + "imagePullSecretContent": { + "description": "Optional. The image pull secret content for the registry, if not public.", + "format": "byte", + "location": "query", + "type": "string" + }, + "isUpgrade": { + "description": "Optional. If true, generate the resources for upgrade only. Some resources generated only for installation (e.g. secrets) will be excluded.", + "location": "query", + "type": "boolean" + }, + "name": { + "description": "Required. The Membership resource name the Agent will associate with, in the format `projects/*/locations/*/memberships/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/memberships/[^/]+$", + "required": true, + "type": "string" + }, + "namespace": { + "description": "Optional. Namespace for GKE Connect agent resources. Defaults to `gke-connect`. The Connect Agent is authorized automatically when run in the default namespace. Otherwise, explicit authorization must be granted with an additional IAM binding.", + "location": "query", + "type": "string" + }, + "proxy": { + "description": "Optional. URI of a proxy if connectivity from the agent to gkeconnect.googleapis.com requires the use of a proxy. Format must be in the form `http(s)://{proxy_address}`, depending on the HTTP/HTTPS protocol supported by the proxy. This will direct the connect agent's outbound traffic through a HTTP(S) proxy.", + "format": "byte", + "location": "query", + "type": "string" + }, + "registry": { + "description": "Optional. The registry to fetch the connect agent image from. Defaults to gcr.io/gkeconnect.", + "location": "query", + "type": "string" + }, + "version": { + "description": "Optional. The Connect agent version to use. Defaults to the most current version.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}:generateConnectManifest", + "response": { + "$ref": "GenerateConnectManifestResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the details of a Membership.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/memberships/{membershipsId}", + "httpMethod": "GET", + "id": "gkehub.projects.locations.memberships.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The Membership resource name in the format `projects/*/locations/*/memberships/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/memberships/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Membership" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/memberships/{membershipsId}:getIamPolicy", + "httpMethod": "GET", + "id": "gkehub.projects.locations.memberships.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "options.requestedPolicyVersion": { + "description": "Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "location": "query", + "type": "integer" + }, + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/memberships/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists Memberships in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/memberships", + "httpMethod": "GET", + "id": "gkehub.projects.locations.memberships.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Lists Memberships that match the filter expression, following the syntax outlined in https://google.aip.dev/160. Examples: - Name is `bar` in project `foo-proj` and location `global`: name = \"projects/foo-proj/locations/global/membership/bar\" - Memberships that have a label called `foo`: labels.foo:* - Memberships that have a label called `foo` whose value is `bar`: labels.foo = bar - Memberships in the CREATING state: state = CREATING", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. One or more fields to compare and use to sort the output. See https://google.aip.dev/132#ordering.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. When requesting a 'page' of resources, `page_size` specifies number of resources to return. If unspecified or set to 0, all resources will be returned.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. Token returned by previous call to `ListMemberships` which specifies the position in the list from where to continue listing the resources.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent (project and location) where the Memberships will be listed. Specified in the format `projects/*/locations/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/memberships", + "response": { + "$ref": "ListMembershipsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates an existing Membership.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/memberships/{membershipsId}", + "httpMethod": "PATCH", + "id": "gkehub.projects.locations.memberships.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The Membership resource name in the format `projects/*/locations/*/memberships/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/memberships/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A 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" + }, + "updateMask": { + "description": "Required. Mask of fields to update.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "Membership" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/memberships/{membershipsId}:setIamPolicy", + "httpMethod": "POST", + "id": "gkehub.projects.locations.memberships.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/memberships/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/memberships/{membershipsId}:testIamPermissions", + "httpMethod": "POST", + "id": "gkehub.projects.locations.memberships.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/memberships/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "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": "gkehub.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": "gkehub.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": "gkehub.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`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations", + "httpMethod": "GET", + "id": "gkehub.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" + ] + } + } + } + } + } + } + } + }, + "revision": "20210322", + "rootUrl": "https://gkehub.googleapis.com/", + "schemas": { + "AuditConfig": { + "description": "Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { \"audit_configs\": [ { \"service\": \"allServices\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\" }, { \"log_type\": \"ADMIN_READ\" } ] }, { \"service\": \"sampleservice.googleapis.com\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\" }, { \"log_type\": \"DATA_WRITE\", \"exempted_members\": [ \"user:aliya@example.com\" ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging.", + "id": "AuditConfig", + "properties": { + "auditLogConfigs": { + "description": "The configuration for logging of each type of permission.", + "items": { + "$ref": "AuditLogConfig" + }, + "type": "array" + }, + "service": { + "description": "Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.", + "type": "string" + } + }, + "type": "object" + }, + "AuditLogConfig": { + "description": "Provides the configuration for logging a type of permissions. Example: { \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging.", + "id": "AuditLogConfig", + "properties": { + "exemptedMembers": { + "description": "Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.", + "items": { + "type": "string" + }, + "type": "array" + }, + "logType": { + "description": "The log type that this config enables.", + "enum": [ + "LOG_TYPE_UNSPECIFIED", + "ADMIN_READ", + "DATA_WRITE", + "DATA_READ" + ], + "enumDescriptions": [ + "Default case. Should never be this.", + "Admin reads. Example: CloudIAM getIamPolicy", + "Data writes. Example: CloudSQL Users create", + "Data reads. Example: CloudSQL Users list" + ], + "type": "string" + } + }, + "type": "object" + }, + "Authority": { + "description": "Authority encodes how Google will recognize identities from this Membership. See the workload identity documentation for more details: https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity", + "id": "Authority", + "properties": { + "identityProvider": { + "description": "Output only. An identity provider that reflects the `issuer` in the workload identity pool.", + "readOnly": true, + "type": "string" + }, + "issuer": { + "description": "Optional. A JSON Web Token (JWT) issuer URI. `issuer` must start with `https://` and be a valid URL with length <2000 characters. If set, then Google will allow valid OIDC tokens from this issuer to authenticate within the workload_identity_pool. OIDC discovery will be performed on this URI to validate tokens from the issuer. Clearing `issuer` disables Workload Identity. `issuer` cannot be directly modified; it must be cleared (and Workload Identity disabled) before using a new issuer (and re-enabling Workload Identity).", + "type": "string" + }, + "workloadIdentityPool": { + "description": "Output only. The name of the workload identity pool in which `issuer` will be recognized. There is a single Workload Identity Pool per Hub that is shared between all Memberships that belong to that Hub. For a Hub hosted in {PROJECT_ID}, the workload pool format is `{PROJECT_ID}.hub.id.goog`, although this is subject to change in newer versions of this API.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "Binding": { + "description": "Associates `members` with a `role`.", + "id": "Binding", + "properties": { + "condition": { + "$ref": "Expr", + "description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." + }, + "members": { + "description": "Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. ", + "items": { + "type": "string" + }, + "type": "array" + }, + "role": { + "description": "Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.", + "type": "string" + } + }, + "type": "object" + }, + "CancelOperationRequest": { + "description": "The request message for Operations.CancelOperation.", + "id": "CancelOperationRequest", + "properties": {}, + "type": "object" + }, + "ConnectAgentResource": { + "description": "ConnectAgentResource represents a Kubernetes resource manifest for Connect Agent deployment.", + "id": "ConnectAgentResource", + "properties": { + "manifest": { + "description": "YAML manifest of the resource.", + "type": "string" + }, + "type": { + "$ref": "TypeMeta", + "description": "Kubernetes type of the resource." + } + }, + "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "id": "Empty", + "properties": {}, + "type": "object" + }, + "Expr": { + "description": "Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: \"Summary size limit\" description: \"Determines if a summary is less than 100 chars\" expression: \"document.summary.size() < 100\" Example (Equality): title: \"Requestor is owner\" description: \"Determines if requestor is the document owner\" expression: \"document.owner == request.auth.claims.email\" Example (Logic): title: \"Public documents\" description: \"Determine whether the document should be publicly visible\" expression: \"document.type != 'private' && document.type != 'internal'\" Example (Data Manipulation): title: \"Notification string\" description: \"Create a notification string with a timestamp.\" expression: \"'New message received at ' + string(document.create_time)\" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.", + "id": "Expr", + "properties": { + "description": { + "description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", + "type": "string" + }, + "expression": { + "description": "Textual representation of an expression in Common Expression Language syntax.", + "type": "string" + }, + "location": { + "description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", + "type": "string" + }, + "title": { + "description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", + "type": "string" + } + }, + "type": "object" + }, + "GenerateConnectManifestResponse": { + "description": "GenerateConnectManifestResponse contains manifest information for installing/upgrading a Connect agent.", + "id": "GenerateConnectManifestResponse", + "properties": { + "manifest": { + "description": "The ordered list of Kubernetes resources that need to be applied to the cluster for GKE Connect agent installation/upgrade.", + "items": { + "$ref": "ConnectAgentResource" + }, + "type": "array" + } + }, + "type": "object" + }, + "GkeCluster": { + "description": "GkeCluster contains information specific to GKE clusters.", + "id": "GkeCluster", + "properties": { + "resourceLink": { + "description": "Immutable. Self-link of the GCP resource for the GKE cluster. For example: //container.googleapis.com/projects/my-project/locations/us-west1-a/clusters/my-cluster Zonal clusters are also supported.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleRpcStatus": { + "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": "GoogleRpcStatus", + "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" + }, + "KubernetesMetadata": { + "description": "KubernetesMetadata provides informational metadata for Memberships representing Kubernetes clusters.", + "id": "KubernetesMetadata", + "properties": { + "kubernetesApiServerVersion": { + "description": "Output only. Kubernetes API server version string as reported by `/version`.", + "readOnly": true, + "type": "string" + }, + "memoryMb": { + "description": "Output only. The total memory capacity as reported by the sum of all Kubernetes nodes resources, defined in MB.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "nodeCount": { + "description": "Output only. Node count as reported by Kubernetes nodes resources.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "nodeProviderId": { + "description": "Output only. Node providerID as reported by the first node in the list of nodes on the Kubernetes endpoint. On Kubernetes platforms that support zero-node clusters (like GKE-on-GCP), the node_count will be zero and the node_provider_id will be empty.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. The time at which these details were last updated. This update_time is different from the Membership-level update_time since EndpointDetails are updated internally for API consumers.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "vcpuCount": { + "description": "Output only. vCPU count as reported by Kubernetes nodes resources.", + "format": "int32", + "readOnly": true, + "type": "integer" + } + }, + "type": "object" + }, + "ListLocationsResponse": { + "description": "The response message for Locations.ListLocations.", + "id": "ListLocationsResponse", + "properties": { + "locations": { + "description": "A list of locations that matches the specified filter in the request.", + "items": { + "$ref": "Location" + }, + "type": "array" + }, + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + } + }, + "type": "object" + }, + "ListMembershipsResponse": { + "description": "Response message for the `GkeHub.ListMemberships` method.", + "id": "ListMembershipsResponse", + "properties": { + "nextPageToken": { + "description": "A token to request the next page of resources from the `ListMemberships` method. The value of an empty string means that there are no more resources to return.", + "type": "string" + }, + "resources": { + "description": "The list of matching Memberships.", + "items": { + "$ref": "Membership" + }, + "type": "array" + }, + "unreachable": { + "description": "List of locations that could not be reached while fetching this list.", + "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" + }, + "Location": { + "description": "A resource that represents Google Cloud Platform location.", + "id": "Location", + "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" + }, + "Membership": { + "description": "Membership contains information about a member cluster.", + "id": "Membership", + "properties": { + "authority": { + "$ref": "Authority", + "description": "Optional. How to identify workloads from this Membership. See the documentation on Workload Identity for more details: https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity" + }, + "createTime": { + "description": "Output only. When the Membership was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "deleteTime": { + "description": "Output only. When the Membership was deleted.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Output only. Description of this membership, limited to 63 characters. Must match the regex: `a-zA-Z0-9*` This field is present for legacy purposes.", + "readOnly": true, + "type": "string" + }, + "endpoint": { + "$ref": "MembershipEndpoint", + "description": "Optional. Endpoint information to reach this member." + }, + "externalId": { + "description": "Optional. An externally-generated and managed ID for this Membership. This ID may be modified after creation, but this is not recommended. The ID must match the regex: `a-zA-Z0-9*` If this Membership represents a Kubernetes cluster, this value should be set to the UID of the `kube-system` namespace object.", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. GCP labels for this membership.", + "type": "object" + }, + "lastConnectionTime": { + "description": "Output only. For clusters using Connect, the timestamp of the most recent connection established with Google Cloud. This time is updated every several minutes, not continuously. For clusters that do not use GKE Connect, or that have never connected successfully, this field will be unset.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Output only. The full, unique name of this Membership resource in the format `projects/*/locations/*/memberships/{membership_id}`, set during creation. `membership_id` must be a valid RFC 1123 compliant DNS label: 1. At most 63 characters in length 2. It must consist of lower case alphanumeric characters or `-` 3. It must start and end with an alphanumeric character Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters.", + "readOnly": true, + "type": "string" + }, + "state": { + "$ref": "MembershipState", + "description": "Output only. State of the Membership resource.", + "readOnly": true + }, + "uniqueId": { + "description": "Output only. Google-generated UUID for this resource. This is unique across all Membership resources. If a Membership resource is deleted and another resource with the same name is created, it gets a different unique_id.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. When the Membership was last updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "MembershipEndpoint": { + "description": "MembershipEndpoint contains information needed to contact a Kubernetes API, endpoint and any additional Kubernetes metadata.", + "id": "MembershipEndpoint", + "properties": { + "gkeCluster": { + "$ref": "GkeCluster", + "description": "Optional. GKE-specific information. Only present if this Membership is a GKE cluster." + }, + "kubernetesMetadata": { + "$ref": "KubernetesMetadata", + "description": "Output only. Useful Kubernetes-specific metadata.", + "readOnly": true + } + }, + "type": "object" + }, + "MembershipState": { + "description": "MembershipState describes the state of a Membership resource.", + "id": "MembershipState", + "properties": { + "code": { + "description": "Output only. The current state of the Membership resource.", + "enum": [ + "CODE_UNSPECIFIED", + "CREATING", + "READY", + "DELETING", + "UPDATING", + "SERVICE_UPDATING" + ], + "enumDescriptions": [ + "The code is not set.", + "The cluster is being registered.", + "The cluster is registered.", + "The cluster is being unregistered.", + "The Membership is being updated.", + "The Membership is being updated by the Hub Service." + ], + "readOnly": true, + "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": "GoogleRpcStatus", + "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 response of the operation in case of success. 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" + }, + "cancelRequested": { + "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" + }, + "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" + }, + "statusDetail": { + "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" + }, + "Policy": { + "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time < timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", + "id": "Policy", + "properties": { + "auditConfigs": { + "description": "Specifies cloud audit logging configuration for this policy.", + "items": { + "$ref": "AuditConfig" + }, + "type": "array" + }, + "bindings": { + "description": "Associates a list of `members` to a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one member.", + "items": { + "$ref": "Binding" + }, + "type": "array" + }, + "etag": { + "description": "`etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.", + "format": "byte", + "type": "string" + }, + "version": { + "description": "Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "SetIamPolicyRequest": { + "description": "Request message for `SetIamPolicy` method.", + "id": "SetIamPolicyRequest", + "properties": { + "policy": { + "$ref": "Policy", + "description": "REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them." + }, + "updateMask": { + "description": "OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used: `paths: \"bindings, etag\"`", + "format": "google-fieldmask", + "type": "string" + } + }, + "type": "object" + }, + "TestIamPermissionsRequest": { + "description": "Request message for `TestIamPermissions` method.", + "id": "TestIamPermissionsRequest", + "properties": { + "permissions": { + "description": "The set of permissions to check for the `resource`. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "TestIamPermissionsResponse": { + "description": "Response message for `TestIamPermissions` method.", + "id": "TestIamPermissionsResponse", + "properties": { + "permissions": { + "description": "A subset of `TestPermissionsRequest.permissions` that the caller is allowed.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "TypeMeta": { + "description": "TypeMeta is the type information needed for content unmarshalling of Kubernetes resources in the manifest.", + "id": "TypeMeta", + "properties": { + "apiVersion": { + "description": "APIVersion of the resource (e.g. v1).", + "type": "string" + }, + "kind": { + "description": "Kind of the resource (e.g. Deployment).", + "type": "string" + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "GKE Hub", + "version": "v1", + "version_module": true +} \ No newline at end of file diff --git a/discovery/gkehub-v1alpha.json b/discovery/gkehub-v1alpha.json new file mode 100644 index 00000000000..42814ec9615 --- /dev/null +++ b/discovery/gkehub-v1alpha.json @@ -0,0 +1,2057 @@ +{ + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "See, edit, configure, and delete your Google Cloud Platform data" + } + } + } + }, + "basePath": "", + "baseUrl": "https://gkehub.googleapis.com/", + "batchPath": "batch", + "canonicalName": "GKE Hub", + "description": "", + "discoveryVersion": "v1", + "documentationLink": "https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster", + "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": "gkehub:v1alpha", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://gkehub.mtls.googleapis.com/", + "name": "gkehub", + "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": "gkehub.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": "Location" + }, + "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": "gkehub.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 will select 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": "ListLocationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "features": { + "methods": { + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/features/{featuresId}:getIamPolicy", + "httpMethod": "GET", + "id": "gkehub.projects.locations.features.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "options.requestedPolicyVersion": { + "description": "Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "location": "query", + "type": "integer" + }, + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/features/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+resource}:getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/features/{featuresId}:setIamPolicy", + "httpMethod": "POST", + "id": "gkehub.projects.locations.features.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/features/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/features/{featuresId}:testIamPermissions", + "httpMethod": "POST", + "id": "gkehub.projects.locations.features.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/features/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "global": { + "resources": { + "features": { + "methods": { + "create": { + "description": "Adds a new Feature.", + "flatPath": "v1alpha/projects/{projectsId}/locations/global/features", + "httpMethod": "POST", + "id": "gkehub.projects.locations.global.features.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "featureId": { + "description": "The ID of the feature to create.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "The parent (project and location) where the Feature will be created. Specified in the format `projects/*/locations/global`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/global$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/features", + "request": { + "$ref": "Feature" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Removes a Feature.", + "flatPath": "v1alpha/projects/{projectsId}/locations/global/features/{featuresId}", + "httpMethod": "DELETE", + "id": "gkehub.projects.locations.global.features.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "force": { + "description": "If set to true, the delete will ignore any outstanding resources for this Feature (that is, `FeatureState.has_resources` is set to true). These resources will NOT be cleaned up or modified in any way.", + "location": "query", + "type": "boolean" + }, + "name": { + "description": "The Feature resource name in the format `projects/*/locations/global/features/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/global/features/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single Feature.", + "flatPath": "v1alpha/projects/{projectsId}/locations/global/features/{featuresId}", + "httpMethod": "GET", + "id": "gkehub.projects.locations.global.features.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The Feature resource name in the format `projects/*/locations/global/features/*`", + "location": "path", + "pattern": "^projects/[^/]+/locations/global/features/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "Feature" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists Features in a given project and location.", + "flatPath": "v1alpha/projects/{projectsId}/locations/global/features", + "httpMethod": "GET", + "id": "gkehub.projects.locations.global.features.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Lists Features that match the filter expression, following the syntax outlined in https://google.aip.dev/160. Examples: - Feature with the name \"servicemesh\" in project \"foo-proj\": name = \"projects/foo-proj/locations/global/features/servicemesh\" - Features that have a label called `foo`: labels.foo:* - Features that have a label called `foo` whose value is `bar`: labels.foo = bar", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "One or more fields to compare and use to sort the output. See https://google.aip.dev/132#ordering.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "When requesting a 'page' of resources, `page_size` specifies number of resources to return. If unspecified or set to 0, all resources will be returned.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Token returned by previous call to `ListFeatures` which specifies the position in the list from where to continue listing the resources.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "The parent (project and location) where the Features will be listed. Specified in the format `projects/*/locations/global`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/global$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/features", + "response": { + "$ref": "ListFeaturesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates an existing Feature.", + "flatPath": "v1alpha/projects/{projectsId}/locations/global/features/{featuresId}", + "httpMethod": "PATCH", + "id": "gkehub.projects.locations.global.features.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The Feature resource name in the format `projects/*/locations/global/features/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/global/features/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Mask of fields to update.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "request": { + "$ref": "Feature" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, + "memberships": { + "methods": { + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/memberships/{membershipsId}:getIamPolicy", + "httpMethod": "GET", + "id": "gkehub.projects.locations.memberships.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "options.requestedPolicyVersion": { + "description": "Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "location": "query", + "type": "integer" + }, + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/memberships/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+resource}:getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/memberships/{membershipsId}:setIamPolicy", + "httpMethod": "POST", + "id": "gkehub.projects.locations.memberships.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/memberships/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/memberships/{membershipsId}:testIamPermissions", + "httpMethod": "POST", + "id": "gkehub.projects.locations.memberships.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/memberships/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "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": "gkehub.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": "gkehub.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": "gkehub.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`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/operations", + "httpMethod": "GET", + "id": "gkehub.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" + ] + } + } + } + } + } + } + } + }, + "revision": "20210315", + "rootUrl": "https://gkehub.googleapis.com/", + "schemas": { + "AuditConfig": { + "description": "Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { \"audit_configs\": [ { \"service\": \"allServices\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\" }, { \"log_type\": \"ADMIN_READ\" } ] }, { \"service\": \"sampleservice.googleapis.com\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\" }, { \"log_type\": \"DATA_WRITE\", \"exempted_members\": [ \"user:aliya@example.com\" ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging.", + "id": "AuditConfig", + "properties": { + "auditLogConfigs": { + "description": "The configuration for logging of each type of permission.", + "items": { + "$ref": "AuditLogConfig" + }, + "type": "array" + }, + "service": { + "description": "Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.", + "type": "string" + } + }, + "type": "object" + }, + "AuditLogConfig": { + "description": "Provides the configuration for logging a type of permissions. Example: { \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging.", + "id": "AuditLogConfig", + "properties": { + "exemptedMembers": { + "description": "Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.", + "items": { + "type": "string" + }, + "type": "array" + }, + "logType": { + "description": "The log type that this config enables.", + "enum": [ + "LOG_TYPE_UNSPECIFIED", + "ADMIN_READ", + "DATA_WRITE", + "DATA_READ" + ], + "enumDescriptions": [ + "Default case. Should never be this.", + "Admin reads. Example: CloudIAM getIamPolicy", + "Data writes. Example: CloudSQL Users create", + "Data reads. Example: CloudSQL Users list" + ], + "type": "string" + } + }, + "type": "object" + }, + "Binding": { + "description": "Associates `members` with a `role`.", + "id": "Binding", + "properties": { + "condition": { + "$ref": "Expr", + "description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." + }, + "members": { + "description": "Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. ", + "items": { + "type": "string" + }, + "type": "array" + }, + "role": { + "description": "Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.", + "type": "string" + } + }, + "type": "object" + }, + "CancelOperationRequest": { + "description": "The request message for Operations.CancelOperation.", + "id": "CancelOperationRequest", + "properties": {}, + "type": "object" + }, + "CloudAuditLoggingFeatureSpec": { + "description": "Spec for Audit Logging Allowlisting.", + "id": "CloudAuditLoggingFeatureSpec", + "properties": { + "allowlistedServiceAccounts": { + "description": "Service account that should be allowlisted to send the audit logs; eg cloudauditlogging@gcp-project.iam.gserviceaccount.com. These accounts must already exist, but do not need to have any permissions granted to them. The customer's entitlements will be checked prior to allowlisting (i.e. the customer must be an Anthos customer.)", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "CommonFeatureSpec": { + "description": "CommonFeatureSpec contains Hub-wide configuration information", + "id": "CommonFeatureSpec", + "properties": { + "cloudauditlogging": { + "$ref": "CloudAuditLoggingFeatureSpec", + "description": "Cloud Audit Logging-specific spec." + }, + "multiclusteringress": { + "$ref": "MultiClusterIngressFeatureSpec", + "description": "Multicluster Ingress-specific spec." + } + }, + "type": "object" + }, + "CommonFeatureState": { + "description": "CommonFeatureState contains Hub-wide Feature status information.", + "id": "CommonFeatureState", + "properties": { + "servicemesh": { + "$ref": "ServiceMeshFeatureState", + "description": "Service Mesh-specific state." + }, + "state": { + "$ref": "FeatureState", + "description": "Output only. The \"running state\" of the Feature in this Hub.", + "readOnly": true + } + }, + "type": "object" + }, + "ConfigManagementBinauthzConfig": { + "description": "Configuration for Binauthz", + "id": "ConfigManagementBinauthzConfig", + "properties": { + "enabled": { + "description": "Whether binauthz is enabled in this cluster.", + "type": "boolean" + } + }, + "type": "object" + }, + "ConfigManagementBinauthzState": { + "description": "State for Binauthz", + "id": "ConfigManagementBinauthzState", + "properties": { + "version": { + "$ref": "ConfigManagementBinauthzVersion", + "description": "The version of binauthz that is installed." + }, + "webhook": { + "description": "The state of the binauthz webhook.", + "enum": [ + "DEPLOYMENT_STATE_UNSPECIFIED", + "NOT_INSTALLED", + "INSTALLED", + "ERROR" + ], + "enumDescriptions": [ + "Deployment's state cannot be determined", + "Deployment is not installed", + "Deployment is installed", + "Deployment was attempted to be installed, but has errors" + ], + "type": "string" + } + }, + "type": "object" + }, + "ConfigManagementBinauthzVersion": { + "description": "The version of binauthz.", + "id": "ConfigManagementBinauthzVersion", + "properties": { + "webhookVersion": { + "description": "The version of the binauthz webhook.", + "type": "string" + } + }, + "type": "object" + }, + "ConfigManagementConfigSync": { + "description": "Configuration for Config Sync", + "id": "ConfigManagementConfigSync", + "properties": { + "git": { + "$ref": "ConfigManagementGitConfig", + "description": "Git repo configuration for the cluster." + }, + "sourceFormat": { + "description": "Specifies whether the Config Sync Repo is in “hierarchical” or “unstructured” mode.", + "type": "string" + } + }, + "type": "object" + }, + "ConfigManagementConfigSyncDeploymentState": { + "description": "The state of ConfigSync's deployment on a cluster", + "id": "ConfigManagementConfigSyncDeploymentState", + "properties": { + "gitSync": { + "description": "Deployment state of the git-sync pod", + "enum": [ + "DEPLOYMENT_STATE_UNSPECIFIED", + "NOT_INSTALLED", + "INSTALLED", + "ERROR" + ], + "enumDescriptions": [ + "Deployment's state cannot be determined", + "Deployment is not installed", + "Deployment is installed", + "Deployment was attempted to be installed, but has errors" + ], + "type": "string" + }, + "importer": { + "description": "Deployment state of the importer pod", + "enum": [ + "DEPLOYMENT_STATE_UNSPECIFIED", + "NOT_INSTALLED", + "INSTALLED", + "ERROR" + ], + "enumDescriptions": [ + "Deployment's state cannot be determined", + "Deployment is not installed", + "Deployment is installed", + "Deployment was attempted to be installed, but has errors" + ], + "type": "string" + }, + "monitor": { + "description": "Deployment state of the monitor pod", + "enum": [ + "DEPLOYMENT_STATE_UNSPECIFIED", + "NOT_INSTALLED", + "INSTALLED", + "ERROR" + ], + "enumDescriptions": [ + "Deployment's state cannot be determined", + "Deployment is not installed", + "Deployment is installed", + "Deployment was attempted to be installed, but has errors" + ], + "type": "string" + }, + "reconcilerManager": { + "description": "Deployment state of reconciler-manager pod", + "enum": [ + "DEPLOYMENT_STATE_UNSPECIFIED", + "NOT_INSTALLED", + "INSTALLED", + "ERROR" + ], + "enumDescriptions": [ + "Deployment's state cannot be determined", + "Deployment is not installed", + "Deployment is installed", + "Deployment was attempted to be installed, but has errors" + ], + "type": "string" + }, + "rootReconciler": { + "description": "Deployment state of root-reconciler", + "enum": [ + "DEPLOYMENT_STATE_UNSPECIFIED", + "NOT_INSTALLED", + "INSTALLED", + "ERROR" + ], + "enumDescriptions": [ + "Deployment's state cannot be determined", + "Deployment is not installed", + "Deployment is installed", + "Deployment was attempted to be installed, but has errors" + ], + "type": "string" + }, + "syncer": { + "description": "Deployment state of the syncer pod", + "enum": [ + "DEPLOYMENT_STATE_UNSPECIFIED", + "NOT_INSTALLED", + "INSTALLED", + "ERROR" + ], + "enumDescriptions": [ + "Deployment's state cannot be determined", + "Deployment is not installed", + "Deployment is installed", + "Deployment was attempted to be installed, but has errors" + ], + "type": "string" + } + }, + "type": "object" + }, + "ConfigManagementConfigSyncState": { + "description": "State information for ConfigSync", + "id": "ConfigManagementConfigSyncState", + "properties": { + "deploymentState": { + "$ref": "ConfigManagementConfigSyncDeploymentState", + "description": "Information about the deployment of ConfigSync, including the version of the various Pods deployed" + }, + "syncState": { + "$ref": "ConfigManagementSyncState", + "description": "The state of ConfigSync's process to sync configs to a cluster" + }, + "version": { + "$ref": "ConfigManagementConfigSyncVersion", + "description": "The version of ConfigSync deployed" + } + }, + "type": "object" + }, + "ConfigManagementConfigSyncVersion": { + "description": "Specific versioning information pertaining to ConfigSync's Pods", + "id": "ConfigManagementConfigSyncVersion", + "properties": { + "gitSync": { + "description": "Version of the deployed git-sync pod", + "type": "string" + }, + "importer": { + "description": "Version of the deployed importer pod", + "type": "string" + }, + "monitor": { + "description": "Version of the deployed monitor pod", + "type": "string" + }, + "reconcilerManager": { + "description": "Version of the deployed reconciler-manager pod", + "type": "string" + }, + "rootReconciler": { + "description": "Version of the deployed reconciler container in root-reconciler pod", + "type": "string" + }, + "syncer": { + "description": "Version of the deployed syncer pod", + "type": "string" + } + }, + "type": "object" + }, + "ConfigManagementErrorResource": { + "description": "Model for a config file in the git repo with an associated Sync error", + "id": "ConfigManagementErrorResource", + "properties": { + "resourceGvk": { + "$ref": "ConfigManagementGroupVersionKind", + "description": "Group/version/kind of the resource that is causing an error" + }, + "resourceName": { + "description": "Metadata name of the resource that is causing an error", + "type": "string" + }, + "resourceNamespace": { + "description": "Namespace of the resource that is causing an error", + "type": "string" + }, + "sourcePath": { + "description": "Path in the git repo of the erroneous config", + "type": "string" + } + }, + "type": "object" + }, + "ConfigManagementGatekeeperDeploymentState": { + "description": "State of Policy Controller installation.", + "id": "ConfigManagementGatekeeperDeploymentState", + "properties": { + "gatekeeperAudit": { + "description": "Status of gatekeeper-audit deployment.", + "enum": [ + "DEPLOYMENT_STATE_UNSPECIFIED", + "NOT_INSTALLED", + "INSTALLED", + "ERROR" + ], + "enumDescriptions": [ + "Deployment's state cannot be determined", + "Deployment is not installed", + "Deployment is installed", + "Deployment was attempted to be installed, but has errors" + ], + "type": "string" + }, + "gatekeeperControllerManagerState": { + "description": "Status of gatekeeper-controller-manager pod.", + "enum": [ + "DEPLOYMENT_STATE_UNSPECIFIED", + "NOT_INSTALLED", + "INSTALLED", + "ERROR" + ], + "enumDescriptions": [ + "Deployment's state cannot be determined", + "Deployment is not installed", + "Deployment is installed", + "Deployment was attempted to be installed, but has errors" + ], + "type": "string" + } + }, + "type": "object" + }, + "ConfigManagementGitConfig": { + "description": "Git repo configuration for a single cluster.", + "id": "ConfigManagementGitConfig", + "properties": { + "httpsProxy": { + "description": "URL for the HTTPS proxy to be used when communicating with the Git repo.", + "type": "string" + }, + "policyDir": { + "description": "The path within the Git repository that represents the top level of the repo to sync. Default: the root directory of the repository.", + "type": "string" + }, + "secretType": { + "description": "Type of secret configured for access to the Git repo.", + "type": "string" + }, + "syncBranch": { + "description": "The branch of the repository to sync from. Default: master.", + "type": "string" + }, + "syncRepo": { + "description": "The URL of the Git repository to use as the source of truth.", + "type": "string" + }, + "syncRev": { + "description": "Git revision (tag or hash) to check out. Default HEAD.", + "type": "string" + }, + "syncWaitSecs": { + "description": "Period in seconds between consecutive syncs. Default: 15.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "ConfigManagementGroupVersionKind": { + "description": "A Kubernetes object's GVK", + "id": "ConfigManagementGroupVersionKind", + "properties": { + "group": { + "description": "Kubernetes Group", + "type": "string" + }, + "kind": { + "description": "Kubernetes Kind", + "type": "string" + }, + "version": { + "description": "Kubernetes Version", + "type": "string" + } + }, + "type": "object" + }, + "ConfigManagementHierarchyControllerConfig": { + "description": "Configuration for Hierarchy Controller", + "id": "ConfigManagementHierarchyControllerConfig", + "properties": { + "enableHierarchicalResourceQuota": { + "description": "Whether hierarchical resource quota is enabled in this cluster.", + "type": "boolean" + }, + "enablePodTreeLabels": { + "description": "Whether pod tree labels are enabled in this cluster.", + "type": "boolean" + }, + "enabled": { + "description": "Whether Hierarchy Controller is enabled in this cluster.", + "type": "boolean" + } + }, + "type": "object" + }, + "ConfigManagementHierarchyControllerDeploymentState": { + "description": "Deployment state for Hierarchy Controller", + "id": "ConfigManagementHierarchyControllerDeploymentState", + "properties": { + "extension": { + "description": "The deployment state for Hierarchy Controller extension (e.g. v0.7.0-hc.1)", + "enum": [ + "DEPLOYMENT_STATE_UNSPECIFIED", + "NOT_INSTALLED", + "INSTALLED", + "ERROR" + ], + "enumDescriptions": [ + "Deployment's state cannot be determined", + "Deployment is not installed", + "Deployment is installed", + "Deployment was attempted to be installed, but has errors" + ], + "type": "string" + }, + "hnc": { + "description": "The deployment state for open source HNC (e.g. v0.7.0-hc.0)", + "enum": [ + "DEPLOYMENT_STATE_UNSPECIFIED", + "NOT_INSTALLED", + "INSTALLED", + "ERROR" + ], + "enumDescriptions": [ + "Deployment's state cannot be determined", + "Deployment is not installed", + "Deployment is installed", + "Deployment was attempted to be installed, but has errors" + ], + "type": "string" + } + }, + "type": "object" + }, + "ConfigManagementHierarchyControllerState": { + "description": "State for Hierarchy Controller", + "id": "ConfigManagementHierarchyControllerState", + "properties": { + "state": { + "$ref": "ConfigManagementHierarchyControllerDeploymentState", + "description": "The deployment state for Hierarchy Controller" + }, + "version": { + "$ref": "ConfigManagementHierarchyControllerVersion", + "description": "The version for Hierarchy Controller" + } + }, + "type": "object" + }, + "ConfigManagementHierarchyControllerVersion": { + "description": "Version for Hierarchy Controller", + "id": "ConfigManagementHierarchyControllerVersion", + "properties": { + "extension": { + "description": "Version for Hierarchy Controller extension", + "type": "string" + }, + "hnc": { + "description": "Version for open source HNC", + "type": "string" + } + }, + "type": "object" + }, + "ConfigManagementInstallError": { + "description": "Errors pertaining to the installation of ACM", + "id": "ConfigManagementInstallError", + "properties": { + "errorMessage": { + "description": "A string representing the user facing error message", + "type": "string" + } + }, + "type": "object" + }, + "ConfigManagementMembershipSpec": { + "description": "Configuration for a single cluster. Intended to parallel the ConfigManagement CR.", + "id": "ConfigManagementMembershipSpec", + "properties": { + "binauthz": { + "$ref": "ConfigManagementBinauthzConfig", + "description": "Binauthz conifguration for the cluster." + }, + "configSync": { + "$ref": "ConfigManagementConfigSync", + "description": "Config Sync configuration for the cluster." + }, + "hierarchyController": { + "$ref": "ConfigManagementHierarchyControllerConfig", + "description": "Hierarchy Controller configuration for the cluster." + }, + "policyController": { + "$ref": "ConfigManagementPolicyController", + "description": "Policy Controller configuration for the cluster." + }, + "version": { + "description": "Version of ACM installed.", + "type": "string" + } + }, + "type": "object" + }, + "ConfigManagementMembershipState": { + "description": "State for Anthos Config Management", + "id": "ConfigManagementMembershipState", + "properties": { + "binauthzState": { + "$ref": "ConfigManagementBinauthzState", + "description": "Binauthz status" + }, + "clusterName": { + "description": "The user-defined name for the cluster used by ClusterSelectors to group clusters together. This should match Membership's membership_name, unless the user installed ACM on the cluster manually prior to enabling the ACM hub feature. Unique within a Anthos Config Management installation.", + "type": "string" + }, + "configSyncState": { + "$ref": "ConfigManagementConfigSyncState", + "description": "Current sync status" + }, + "hierarchyControllerState": { + "$ref": "ConfigManagementHierarchyControllerState", + "description": "Hierarchy Controller status" + }, + "membershipSpec": { + "$ref": "ConfigManagementMembershipSpec", + "description": "Membership configuration in the cluster. This represents the actual state in the cluster, while the MembershipSpec in the FeatureSpec represents the intended state" + }, + "operatorState": { + "$ref": "ConfigManagementOperatorState", + "description": "Current install status of ACM's Operator" + }, + "policyControllerState": { + "$ref": "ConfigManagementPolicyControllerState", + "description": "PolicyController status" + } + }, + "type": "object" + }, + "ConfigManagementOperatorState": { + "description": "State information for an ACM's Operator", + "id": "ConfigManagementOperatorState", + "properties": { + "deploymentState": { + "description": "The state of the Operator's deployment", + "enum": [ + "DEPLOYMENT_STATE_UNSPECIFIED", + "NOT_INSTALLED", + "INSTALLED", + "ERROR" + ], + "enumDescriptions": [ + "Deployment's state cannot be determined", + "Deployment is not installed", + "Deployment is installed", + "Deployment was attempted to be installed, but has errors" + ], + "type": "string" + }, + "errors": { + "description": "Install errors.", + "items": { + "$ref": "ConfigManagementInstallError" + }, + "type": "array" + }, + "version": { + "description": "The semenatic version number of the operator", + "type": "string" + } + }, + "type": "object" + }, + "ConfigManagementPolicyController": { + "description": "Configuration for Policy Controller", + "id": "ConfigManagementPolicyController", + "properties": { + "auditIntervalSeconds": { + "description": "Sets the interval for Policy Controller Audit Scans (in seconds). When set to 0, this disables audit functionality altogether.", + "format": "int64", + "type": "string" + }, + "enabled": { + "description": "Enables the installation of Policy Controller. If false, the rest of PolicyController fields take no effect.", + "type": "boolean" + }, + "exemptableNamespaces": { + "description": "The set of namespaces that are excluded from Policy Controller checks. Namespaces do not need to currently exist on the cluster.", + "items": { + "type": "string" + }, + "type": "array" + }, + "logDeniesEnabled": { + "description": "Logs all denies and dry run failures.", + "type": "boolean" + }, + "referentialRulesEnabled": { + "description": "Enables the ability to use Constraint Templates that reference to objects other than the object currently being evaluated.", + "type": "boolean" + }, + "templateLibraryInstalled": { + "description": "Installs the default template library along with Policy Controller.", + "type": "boolean" + } + }, + "type": "object" + }, + "ConfigManagementPolicyControllerState": { + "description": "State for PolicyControllerState.", + "id": "ConfigManagementPolicyControllerState", + "properties": { + "deploymentState": { + "$ref": "ConfigManagementGatekeeperDeploymentState", + "description": "The state about the policy controller installation." + }, + "version": { + "$ref": "ConfigManagementPolicyControllerVersion", + "description": "The version of Gatekeeper Policy Controller deployed." + } + }, + "type": "object" + }, + "ConfigManagementPolicyControllerVersion": { + "description": "The build version of Gatekeeper Policy Controller is using.", + "id": "ConfigManagementPolicyControllerVersion", + "properties": { + "version": { + "description": "The gatekeeper image tag that is composed of ACM version, git tag, build number.", + "type": "string" + } + }, + "type": "object" + }, + "ConfigManagementSyncError": { + "description": "An ACM created error representing a problem syncing configurations", + "id": "ConfigManagementSyncError", + "properties": { + "code": { + "description": "An ACM defined error code", + "type": "string" + }, + "errorMessage": { + "description": "A description of the error", + "type": "string" + }, + "errorResources": { + "description": "A list of config(s) associated with the error, if any", + "items": { + "$ref": "ConfigManagementErrorResource" + }, + "type": "array" + } + }, + "type": "object" + }, + "ConfigManagementSyncState": { + "description": "State indicating an ACM's progress syncing configurations to a cluster", + "id": "ConfigManagementSyncState", + "properties": { + "code": { + "description": "Sync status code", + "enum": [ + "SYNC_CODE_UNSPECIFIED", + "SYNCED", + "PENDING", + "ERROR", + "NOT_CONFIGURED", + "NOT_INSTALLED", + "UNAUTHORIZED", + "UNREACHABLE" + ], + "enumDescriptions": [ + "ACM cannot determine a sync code", + "ACM successfully synced the git Repo with the cluster", + "ACM is in the progress of syncing a new change", + "Indicates an error configuring ACM, and user action is required", + "ACM has been installed (operator manifest deployed), but not configured.", + "ACM has not been installed (no operator pod found)", + "Error authorizing with the cluster", + "Cluster could not be reached" + ], + "type": "string" + }, + "errors": { + "description": "A list of errors resulting from problematic configs. This list will be truncated after 100 errors, although it is unlikely for that many errors to simultaneously exist.", + "items": { + "$ref": "ConfigManagementSyncError" + }, + "type": "array" + }, + "importToken": { + "description": "Token indicating the state of the importer.", + "type": "string" + }, + "lastSync": { + "description": "Timestamp of when ACM last successfully synced the repo The time format is specified in https://golang.org/pkg/time/#Time.String This field is being deprecated. Use last_sync_time instead. (b/154053616)", + "type": "string" + }, + "lastSyncTime": { + "description": "Timestamp type of when ACM last successfully synced the repo", + "format": "google-datetime", + "type": "string" + }, + "sourceToken": { + "description": "Token indicating the state of the repo.", + "type": "string" + }, + "syncToken": { + "description": "Token indicating the state of the syncer.", + "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "id": "Empty", + "properties": {}, + "type": "object" + }, + "Expr": { + "description": "Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: \"Summary size limit\" description: \"Determines if a summary is less than 100 chars\" expression: \"document.summary.size() < 100\" Example (Equality): title: \"Requestor is owner\" description: \"Determines if requestor is the document owner\" expression: \"document.owner == request.auth.claims.email\" Example (Logic): title: \"Public documents\" description: \"Determine whether the document should be publicly visible\" expression: \"document.type != 'private' && document.type != 'internal'\" Example (Data Manipulation): title: \"Notification string\" description: \"Create a notification string with a timestamp.\" expression: \"'New message received at ' + string(document.create_time)\" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.", + "id": "Expr", + "properties": { + "description": { + "description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", + "type": "string" + }, + "expression": { + "description": "Textual representation of an expression in Common Expression Language syntax.", + "type": "string" + }, + "location": { + "description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", + "type": "string" + }, + "title": { + "description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", + "type": "string" + } + }, + "type": "object" + }, + "Feature": { + "description": "Feature represents the settings and status of any Hub Feature.", + "id": "Feature", + "properties": { + "createTime": { + "description": "Output only. When the Feature resource was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "deleteTime": { + "description": "Output only. When the Feature resource was deleted.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "GCP labels for this Feature.", + "type": "object" + }, + "membershipSpecs": { + "additionalProperties": { + "$ref": "MembershipFeatureSpec" + }, + "description": "Optional. Membership-specific configuration for this Feature. If this Feature does not support any per-Membership configuration, this field may be unused. The keys indicate which Membership the configuration is for, in the form: projects/{p}/locations/{l}/memberships/{m} Where {p} is the project number, {l} is a valid location and {m} is a valid Membership in this project at that location. {p} MUST match the Feature's project number.", + "type": "object" + }, + "membershipStates": { + "additionalProperties": { + "$ref": "MembershipFeatureState" + }, + "description": "Output only. Membership-specific Feature status. If this Feature does report any per-Membership status, this field may be unused. The keys indicate which Membership the state is for, in the form: projects/{p}/locations/{l}/memberships/{m} Where {p} is the project number, {l} is a valid location and {m} is a valid Membership in this project at that location. {p} MUST match the Feature's project number.", + "readOnly": true, + "type": "object" + }, + "name": { + "description": "Output only. The full, unique name of this Feature resource in the format `projects/*/locations/global/features/*`.", + "readOnly": true, + "type": "string" + }, + "resourceState": { + "$ref": "FeatureResourceState", + "description": "Output only. State of the Feature resource itself.", + "readOnly": true + }, + "spec": { + "$ref": "CommonFeatureSpec", + "description": "Optional. Hub-wide Feature configuration. If this Feature does not support any Hub-wide configuration, this field may be unused." + }, + "state": { + "$ref": "CommonFeatureState", + "description": "Output only. The Hub-wide Feature state.", + "readOnly": true + }, + "updateTime": { + "description": "Output only. When the Feature resource was last updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "FeatureResourceState": { + "description": "FeatureResourceState describes the state of a Feature *resource* in the GkeHub API. See `FeatureState` for the \"running state\" of the Feature in the Hub and across Memberships.", + "id": "FeatureResourceState", + "properties": { + "state": { + "description": "The current state of the Feature resource in the Hub API.", + "enum": [ + "STATE_UNSPECIFIED", + "ENABLING", + "ACTIVE", + "DISABLING", + "UPDATING", + "SERVICE_UPDATING" + ], + "enumDescriptions": [ + "State is unknown or not set.", + "The Feature is being enabled, and the Feature resource is being created. Once complete, the corresponding Feature will be enabled in this Hub.", + "The Feature is enabled in this Hub, and the Feature resource is fully available.", + "The Feature is being disabled in this Hub, and the Feature resource is being deleted.", + "The Feature resource is being updated.", + "The Feature resource is being updated by the Hub Service." + ], + "type": "string" + } + }, + "type": "object" + }, + "FeatureState": { + "description": "FeatureState describes the high-level state of a Feature. It may be used to describe a Feature's state at the environ-level, or per-membershop, depending on the context.", + "id": "FeatureState", + "properties": { + "code": { + "description": "The high-level, machine-readable status of this Feature.", + "enum": [ + "CODE_UNSPECIFIED", + "OK", + "WARNING", + "ERROR" + ], + "enumDescriptions": [ + "Unknown or not set.", + "The Feature is operating normally.", + "The Feature has encountered an issue, and is operating in a degraded state. The Feature may need intervention to return to normal operation. See the description and any associated Feature-specific details for more information.", + "The Feature is not operating or is in a severely degraded state. The Feature may need intervention to return to normal operation. See the description and any associated Feature-specific details for more information." + ], + "type": "string" + }, + "description": { + "description": "A human-readable description of the current status.", + "type": "string" + }, + "updateTime": { + "description": "The time this status and any related Feature-specific details were updated.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleRpcStatus": { + "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": "GoogleRpcStatus", + "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" + }, + "ListFeaturesResponse": { + "description": "Response message for the `GkeHub.ListFeatures` method.", + "id": "ListFeaturesResponse", + "properties": { + "nextPageToken": { + "description": "A token to request the next page of resources from the `ListFeatures` method. The value of an empty string means that there are no more resources to return.", + "type": "string" + }, + "resources": { + "description": "The list of matching Features", + "items": { + "$ref": "Feature" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListLocationsResponse": { + "description": "The response message for Locations.ListLocations.", + "id": "ListLocationsResponse", + "properties": { + "locations": { + "description": "A list of locations that matches the specified filter in the request.", + "items": { + "$ref": "Location" + }, + "type": "array" + }, + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + } + }, + "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" + }, + "Location": { + "description": "A resource that represents Google Cloud Platform location.", + "id": "Location", + "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" + }, + "MembershipFeatureSpec": { + "description": "MembershipFeatureSpec contains configuration information for a single Membership.", + "id": "MembershipFeatureSpec", + "properties": { + "configmanagement": { + "$ref": "ConfigManagementMembershipSpec", + "description": "Config Management-specific spec." + } + }, + "type": "object" + }, + "MembershipFeatureState": { + "description": "MembershipFeatureState contains Feature status information for a single Membership.", + "id": "MembershipFeatureState", + "properties": { + "configmanagement": { + "$ref": "ConfigManagementMembershipState", + "description": "Config Management-specific state." + }, + "metering": { + "$ref": "MeteringMembershipState", + "description": "Metering-specific spec." + }, + "servicemesh": { + "$ref": "ServiceMeshMembershipState", + "description": "Service Mesh-specific state." + }, + "state": { + "$ref": "FeatureState", + "description": "The high-level state of this Feature for a single membership." + } + }, + "type": "object" + }, + "MeteringMembershipState": { + "description": "Metering per-Membership Feature State.", + "id": "MeteringMembershipState", + "properties": { + "lastMeasurementTime": { + "description": "The time stamp of the most recent measurement of the number of vCPUs in the cluster.", + "format": "google-datetime", + "type": "string" + }, + "preciseLastMeasuredClusterVcpuCapacity": { + "description": "The vCPUs capacity in the cluster according to the most recent measurement (1/1000 precision).", + "format": "float", + "type": "number" + } + }, + "type": "object" + }, + "MultiClusterIngressFeatureSpec": { + "description": "FeatureSpec contains the input for the MultiClusterIngress feature.", + "id": "MultiClusterIngressFeatureSpec", + "properties": { + "configMembership": { + "description": "Fully-qualified Membership name which hosts the MultiClusterIngress CRD. Example: `projects/foo-proj/locations/global/memberships/bar`", + "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": "GoogleRpcStatus", + "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 response of the operation in case of success. 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" + }, + "cancelRequested": { + "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" + }, + "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" + }, + "statusDetail": { + "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" + }, + "Policy": { + "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time < timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", + "id": "Policy", + "properties": { + "auditConfigs": { + "description": "Specifies cloud audit logging configuration for this policy.", + "items": { + "$ref": "AuditConfig" + }, + "type": "array" + }, + "bindings": { + "description": "Associates a list of `members` to a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one member.", + "items": { + "$ref": "Binding" + }, + "type": "array" + }, + "etag": { + "description": "`etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.", + "format": "byte", + "type": "string" + }, + "version": { + "description": "Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "ServiceMeshAnalysisMessage": { + "description": "AnalysisMessage is a single message produced by an analyzer, and it used to communicate to the end user about the state of their Service Mesh configuration.", + "id": "ServiceMeshAnalysisMessage", + "properties": { + "args": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "A UI can combine these args with a template (based on message_base.type) to produce an internationalized message.", + "type": "object" + }, + "description": { + "description": "A human readable description of what the error means. It is suitable for non-internationalize display purposes.", + "type": "string" + }, + "messageBase": { + "$ref": "ServiceMeshAnalysisMessageBase", + "description": "Details common to all types of Istio and ServiceMesh analysis messages." + }, + "resourcePaths": { + "description": "A list of strings specifying the resource identifiers that were the cause of message generation. A \"path\" here may be: * MEMBERSHIP_ID if the cause is a specific member cluster * MEMBERSHIP_ID/(NAMESPACE\\/)?RESOURCETYPE/NAME if the cause is a resource in a cluster", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ServiceMeshAnalysisMessageBase": { + "description": "AnalysisMessageBase describes some common information that is needed for all messages.", + "id": "ServiceMeshAnalysisMessageBase", + "properties": { + "documentationUrl": { + "description": "A url pointing to the Service Mesh or Istio documentation for this specific error type.", + "type": "string" + }, + "level": { + "description": "Represents how severe a message is.", + "enum": [ + "LEVEL_UNSPECIFIED", + "ERROR", + "WARNING", + "INFO" + ], + "enumDescriptions": [ + "Illegal. Same istio.analysis.v1alpha1.AnalysisMessageBase.Level.UNKNOWN.", + "ERROR represents a misconfiguration that must be fixed.", + "WARNING represents a misconfiguration that should be fixed.", + "INFO represents an informational finding." + ], + "type": "string" + }, + "type": { + "$ref": "ServiceMeshType", + "description": "Represents the specific type of a message." + } + }, + "type": "object" + }, + "ServiceMeshFeatureState": { + "description": "FeatureState describes the state of the Service Mesh Hub Feature as analyzed by the Service Mesh Hub Controller, for the whole Hub.", + "id": "ServiceMeshFeatureState", + "properties": { + "analysisMessages": { + "description": "Output only. Results of running Service Mesh analyzers.", + "items": { + "$ref": "ServiceMeshAnalysisMessage" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "ServiceMeshMembershipState": { + "description": "MembershipState describes the state of the Service Mesh Hub Feature as analyzed by the Service Mesh Hub Controller, for single Membership.", + "id": "ServiceMeshMembershipState", + "properties": { + "analysisMessages": { + "description": "Output only. Results of running Service Mesh analyzers.", + "items": { + "$ref": "ServiceMeshAnalysisMessage" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "ServiceMeshType": { + "description": "A unique identifier for the type of message. Display_name is intended to be human-readable, code is intended to be machine readable. There should be a one-to-one mapping between display_name and code. (i.e. do not re-use display_names or codes between message types.) See istio.analysis.v1alpha1.AnalysisMessageBase.Type", + "id": "ServiceMeshType", + "properties": { + "code": { + "description": "A 7 character code matching `^IST[0-9]{4}$` or `^ASM[0-9]{4}$`, intended to uniquely identify the message type. (e.g. \"IST0001\" is mapped to the \"InternalError\" message type.)", + "type": "string" + }, + "displayName": { + "description": "A human-readable name for the message type. e.g. \"InternalError\", \"PodMissingProxy\". This should be the same for all messages of the same type. (This corresponds to the `name` field in open-source Istio.)", + "type": "string" + } + }, + "type": "object" + }, + "SetIamPolicyRequest": { + "description": "Request message for `SetIamPolicy` method.", + "id": "SetIamPolicyRequest", + "properties": { + "policy": { + "$ref": "Policy", + "description": "REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them." + }, + "updateMask": { + "description": "OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used: `paths: \"bindings, etag\"`", + "format": "google-fieldmask", + "type": "string" + } + }, + "type": "object" + }, + "TestIamPermissionsRequest": { + "description": "Request message for `TestIamPermissions` method.", + "id": "TestIamPermissionsRequest", + "properties": { + "permissions": { + "description": "The set of permissions to check for the `resource`. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "TestIamPermissionsResponse": { + "description": "Response message for `TestIamPermissions` method.", + "id": "TestIamPermissionsResponse", + "properties": { + "permissions": { + "description": "A subset of `TestPermissionsRequest.permissions` that the caller is allowed.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "GKE Hub", + "version": "v1alpha", + "version_module": true +} \ No newline at end of file diff --git a/discovery/gkehub-v1alpha2.json b/discovery/gkehub-v1alpha2.json new file mode 100644 index 00000000000..886565cf319 --- /dev/null +++ b/discovery/gkehub-v1alpha2.json @@ -0,0 +1,1380 @@ +{ + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "See, edit, configure, and delete your Google Cloud Platform data" + } + } + } + }, + "basePath": "", + "baseUrl": "https://gkehub.googleapis.com/", + "batchPath": "batch", + "canonicalName": "GKE Hub", + "description": "", + "discoveryVersion": "v1", + "documentationLink": "https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster", + "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": "gkehub:v1alpha2", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://gkehub.mtls.googleapis.com/", + "name": "gkehub", + "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": "v1alpha2/projects/{projectsId}/locations/{locationsId}", + "httpMethod": "GET", + "id": "gkehub.projects.locations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Resource name for the location.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha2/{+name}", + "response": { + "$ref": "Location" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists information about the supported locations for this service.", + "flatPath": "v1alpha2/projects/{projectsId}/locations", + "httpMethod": "GET", + "id": "gkehub.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 will select 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": "v1alpha2/{+name}/locations", + "response": { + "$ref": "ListLocationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "global": { + "resources": { + "memberships": { + "methods": { + "initializeHub": { + "description": "Initializes the Hub in this project, which includes creating the default Hub Service Account and the Hub Workload Identity Pool. Initialization is optional, and happens automatically when the first Membership is created. InitializeHub should be called when the first Membership cannot be registered without these resources. A common example is granting the Hub Service Account access to another project, which requires the account to exist first.", + "flatPath": "v1alpha2/projects/{projectsId}/locations/global/memberships:initializeHub", + "httpMethod": "POST", + "id": "gkehub.projects.locations.global.memberships.initializeHub", + "parameterOrder": [ + "project" + ], + "parameters": { + "project": { + "description": "Required. The Hub to initialize, in the format `projects/*/locations/*/memberships/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/global/memberships$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha2/{+project}:initializeHub", + "request": { + "$ref": "InitializeHubRequest" + }, + "response": { + "$ref": "InitializeHubResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, + "memberships": { + "methods": { + "create": { + "description": "Adds a new Membership.", + "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/memberships", + "httpMethod": "POST", + "id": "gkehub.projects.locations.memberships.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "membershipId": { + "description": "Required. Client chosen ID for the membership. `membership_id` must be a valid RFC 1123 compliant DNS label: 1. At most 63 characters in length 2. It must consist of lower case alphanumeric characters or `-` 3. It must start and end with an alphanumeric character Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent (project and location) where the Memberships will be created. Specified in the format `projects/*/locations/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha2/{+parent}/memberships", + "request": { + "$ref": "Membership" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Removes a Membership.", + "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/memberships/{membershipsId}", + "httpMethod": "DELETE", + "id": "gkehub.projects.locations.memberships.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The Membership resource name in the format `projects/*/locations/*/memberships/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/memberships/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha2/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "generateConnectManifest": { + "description": "Generates the manifest for deployment of the GKE connect agent.", + "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/memberships/{membershipsId}:generateConnectManifest", + "httpMethod": "GET", + "id": "gkehub.projects.locations.memberships.generateConnectManifest", + "parameterOrder": [ + "name" + ], + "parameters": { + "imagePullSecretContent": { + "description": "Optional. The image pull secret content for the registry, if not public.", + "format": "byte", + "location": "query", + "type": "string" + }, + "isUpgrade": { + "description": "Optional. If true, generate the resources for upgrade only. Some resources generated only for installation (e.g. secrets) will be excluded.", + "location": "query", + "type": "boolean" + }, + "name": { + "description": "Required. The Membership resource name the Agent will associate with, in the format `projects/*/locations/*/memberships/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/memberships/[^/]+$", + "required": true, + "type": "string" + }, + "namespace": { + "description": "Optional. Namespace for GKE Connect agent resources. Defaults to `gke-connect`. The Connect Agent is authorized automatically when run in the default namespace. Otherwise, explicit authorization must be granted with an additional IAM binding.", + "location": "query", + "type": "string" + }, + "proxy": { + "description": "Optional. URI of a proxy if connectivity from the agent to gkeconnect.googleapis.com requires the use of a proxy. Format must be in the form `http(s)://{proxy_address}`, depending on the HTTP/HTTPS protocol supported by the proxy. This will direct the connect agent's outbound traffic through a HTTP(S) proxy.", + "format": "byte", + "location": "query", + "type": "string" + }, + "registry": { + "description": "Optional. The registry to fetch the connect agent image from. Defaults to gcr.io/gkeconnect.", + "location": "query", + "type": "string" + }, + "version": { + "description": "Optional. The Connect agent version to use. Defaults to the most current version.", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha2/{+name}:generateConnectManifest", + "response": { + "$ref": "GenerateConnectManifestResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the details of a Membership.", + "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/memberships/{membershipsId}", + "httpMethod": "GET", + "id": "gkehub.projects.locations.memberships.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The Membership resource name in the format `projects/*/locations/*/memberships/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/memberships/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha2/{+name}", + "response": { + "$ref": "Membership" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/memberships/{membershipsId}:getIamPolicy", + "httpMethod": "GET", + "id": "gkehub.projects.locations.memberships.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "options.requestedPolicyVersion": { + "description": "Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "location": "query", + "type": "integer" + }, + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/memberships/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha2/{+resource}:getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists Memberships in a given project and location.", + "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/memberships", + "httpMethod": "GET", + "id": "gkehub.projects.locations.memberships.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Lists Memberships that match the filter expression, following the syntax outlined in https://google.aip.dev/160. Examples: - Name is `bar` in project `foo-proj` and location `global`: name = \"projects/foo-proj/locations/global/membership/bar\" - Memberships that have a label called `foo`: labels.foo:* - Memberships that have a label called `foo` whose value is `bar`: labels.foo = bar - Memberships in the CREATING state: state = CREATING", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. One or more fields to compare and use to sort the output. See https://google.aip.dev/132#ordering.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. When requesting a 'page' of resources, `page_size` specifies number of resources to return. If unspecified or set to 0, all resources will be returned.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. Token returned by previous call to `ListMemberships` which specifies the position in the list from where to continue listing the resources.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent (project and location) where the Memberships will be listed. Specified in the format `projects/*/locations/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha2/{+parent}/memberships", + "response": { + "$ref": "ListMembershipsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates an existing Membership.", + "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/memberships/{membershipsId}", + "httpMethod": "PATCH", + "id": "gkehub.projects.locations.memberships.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The Membership resource name in the format `projects/*/locations/*/memberships/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/memberships/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. Mask of fields to update.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha2/{+name}", + "request": { + "$ref": "Membership" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/memberships/{membershipsId}:setIamPolicy", + "httpMethod": "POST", + "id": "gkehub.projects.locations.memberships.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/memberships/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha2/{+resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/memberships/{membershipsId}:testIamPermissions", + "httpMethod": "POST", + "id": "gkehub.projects.locations.memberships.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/memberships/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha2/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "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": "v1alpha2/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", + "httpMethod": "POST", + "id": "gkehub.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": "v1alpha2/{+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": "v1alpha2/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + "httpMethod": "DELETE", + "id": "gkehub.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": "v1alpha2/{+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": "v1alpha2/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "gkehub.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": "v1alpha2/{+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`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/operations", + "httpMethod": "GET", + "id": "gkehub.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": "v1alpha2/{+name}/operations", + "response": { + "$ref": "ListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + } + }, + "revision": "20210315", + "rootUrl": "https://gkehub.googleapis.com/", + "schemas": { + "AuditConfig": { + "description": "Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { \"audit_configs\": [ { \"service\": \"allServices\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\" }, { \"log_type\": \"ADMIN_READ\" } ] }, { \"service\": \"sampleservice.googleapis.com\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\" }, { \"log_type\": \"DATA_WRITE\", \"exempted_members\": [ \"user:aliya@example.com\" ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging.", + "id": "AuditConfig", + "properties": { + "auditLogConfigs": { + "description": "The configuration for logging of each type of permission.", + "items": { + "$ref": "AuditLogConfig" + }, + "type": "array" + }, + "service": { + "description": "Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.", + "type": "string" + } + }, + "type": "object" + }, + "AuditLogConfig": { + "description": "Provides the configuration for logging a type of permissions. Example: { \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging.", + "id": "AuditLogConfig", + "properties": { + "exemptedMembers": { + "description": "Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.", + "items": { + "type": "string" + }, + "type": "array" + }, + "logType": { + "description": "The log type that this config enables.", + "enum": [ + "LOG_TYPE_UNSPECIFIED", + "ADMIN_READ", + "DATA_WRITE", + "DATA_READ" + ], + "enumDescriptions": [ + "Default case. Should never be this.", + "Admin reads. Example: CloudIAM getIamPolicy", + "Data writes. Example: CloudSQL Users create", + "Data reads. Example: CloudSQL Users list" + ], + "type": "string" + } + }, + "type": "object" + }, + "Authority": { + "description": "Authority encodes how Google will recognize identities from this Membership. See the workload identity documentation for more details: https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity", + "id": "Authority", + "properties": { + "identityProvider": { + "description": "Output only. An identity provider that reflects the `issuer` in the workload identity pool.", + "readOnly": true, + "type": "string" + }, + "issuer": { + "description": "Optional. A JSON Web Token (JWT) issuer URI. `issuer` must start with `https://` and be a valid URL with length <2000 characters. If set, then Google will allow valid OIDC tokens from this issuer to authenticate within the workload_identity_pool. OIDC discovery will be performed on this URI to validate tokens from the issuer, unless `oidc_jwks` is set. Clearing `issuer` disables Workload Identity. `issuer` cannot be directly modified; it must be cleared (and Workload Identity disabled) before using a new issuer (and re-enabling Workload Identity).", + "type": "string" + }, + "oidcJwks": { + "description": "Optional. OIDC verification keys for this Membership in JWKS format (RFC 7517). When this field is set, OIDC discovery will NOT be performed on `issuer`, and instead OIDC tokens will be validated using this field.", + "format": "byte", + "type": "string" + }, + "workloadIdentityPool": { + "description": "Output only. The name of the workload identity pool in which `issuer` will be recognized. There is a single Workload Identity Pool per Hub that is shared between all Memberships that belong to that Hub. For a Hub hosted in {PROJECT_ID}, the workload pool format is `{PROJECT_ID}.hub.id.goog`, although this is subject to change in newer versions of this API.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "Binding": { + "description": "Associates `members` with a `role`.", + "id": "Binding", + "properties": { + "condition": { + "$ref": "Expr", + "description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." + }, + "members": { + "description": "Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. ", + "items": { + "type": "string" + }, + "type": "array" + }, + "role": { + "description": "Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.", + "type": "string" + } + }, + "type": "object" + }, + "CancelOperationRequest": { + "description": "The request message for Operations.CancelOperation.", + "id": "CancelOperationRequest", + "properties": {}, + "type": "object" + }, + "ConnectAgentResource": { + "description": "ConnectAgentResource represents a Kubernetes resource manifest for Connect Agent deployment.", + "id": "ConnectAgentResource", + "properties": { + "manifest": { + "description": "YAML manifest of the resource.", + "type": "string" + }, + "type": { + "$ref": "TypeMeta", + "description": "Kubernetes type of the resource." + } + }, + "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "id": "Empty", + "properties": {}, + "type": "object" + }, + "Expr": { + "description": "Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: \"Summary size limit\" description: \"Determines if a summary is less than 100 chars\" expression: \"document.summary.size() < 100\" Example (Equality): title: \"Requestor is owner\" description: \"Determines if requestor is the document owner\" expression: \"document.owner == request.auth.claims.email\" Example (Logic): title: \"Public documents\" description: \"Determine whether the document should be publicly visible\" expression: \"document.type != 'private' && document.type != 'internal'\" Example (Data Manipulation): title: \"Notification string\" description: \"Create a notification string with a timestamp.\" expression: \"'New message received at ' + string(document.create_time)\" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.", + "id": "Expr", + "properties": { + "description": { + "description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", + "type": "string" + }, + "expression": { + "description": "Textual representation of an expression in Common Expression Language syntax.", + "type": "string" + }, + "location": { + "description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", + "type": "string" + }, + "title": { + "description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", + "type": "string" + } + }, + "type": "object" + }, + "GenerateConnectManifestResponse": { + "description": "GenerateConnectManifestResponse contains manifest information for installing/upgrading a Connect agent.", + "id": "GenerateConnectManifestResponse", + "properties": { + "manifest": { + "description": "The ordered list of Kubernetes resources that need to be applied to the cluster for GKE Connect agent installation/upgrade.", + "items": { + "$ref": "ConnectAgentResource" + }, + "type": "array" + } + }, + "type": "object" + }, + "GkeCluster": { + "description": "GkeCluster contains information specific to GKE clusters.", + "id": "GkeCluster", + "properties": { + "resourceLink": { + "description": "Immutable. Self-link of the GCP resource for the GKE cluster. For example: //container.googleapis.com/projects/my-project/locations/us-west1-a/clusters/my-cluster Zonal clusters are also supported.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleRpcStatus": { + "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": "GoogleRpcStatus", + "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" + }, + "InitializeHubRequest": { + "description": "Request message for the InitializeHub method.", + "id": "InitializeHubRequest", + "properties": {}, + "type": "object" + }, + "InitializeHubResponse": { + "description": "Response message for the InitializeHub method.", + "id": "InitializeHubResponse", + "properties": { + "serviceIdentity": { + "description": "Name of the Hub default service identity, in the format: service-@gcp-sa-gkehub.iam.gserviceaccount.com The service account has `roles/gkehub.serviceAgent` in the Hub project.", + "type": "string" + }, + "workloadIdentityPool": { + "description": "The Workload Identity Pool used for Workload Identity-enabled clusters registered with this Hub. Format: `.hub.id.goog`", + "type": "string" + } + }, + "type": "object" + }, + "KubernetesMetadata": { + "description": "KubernetesMetadata provides informational metadata for Memberships that are created from Kubernetes Endpoints (currently, these are equivalent to Kubernetes clusters).", + "id": "KubernetesMetadata", + "properties": { + "kubernetesApiServerVersion": { + "description": "Output only. Kubernetes API server version string as reported by '/version'.", + "readOnly": true, + "type": "string" + }, + "memoryMb": { + "description": "Output only. The total memory capacity as reported by the sum of all Kubernetes nodes resources, defined in MB.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "nodeCount": { + "description": "Output only. Node count as reported by Kubernetes nodes resources.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "nodeProviderId": { + "description": "Output only. Node providerID as reported by the first node in the list of nodes on the Kubernetes endpoint. On Kubernetes platforms that support zero-node clusters (like GKE-on-GCP), the node_count will be zero and the node_provider_id will be empty.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. The time at which these details were last updated. This update_time is different from the Membership-level update_time since EndpointDetails are updated internally for API consumers.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "vcpuCount": { + "description": "Output only. vCPU count as reported by Kubernetes nodes resources.", + "format": "int32", + "readOnly": true, + "type": "integer" + } + }, + "type": "object" + }, + "KubernetesResource": { + "description": "KubernetesResource contains the YAML manifests and configuration for Membership Kubernetes resources in the cluster. After CreateMembership or UpdateMembership, these resources should be re-applied in the cluster.", + "id": "KubernetesResource", + "properties": { + "connectResources": { + "description": "Output only. The Kubernetes resources for installing the GKE Connect agent. This field is only populated in the Membership returned from a successful long-running operation from CreateMembership or UpdateMembership. It is not populated during normal GetMembership or ListMemberships requests. To get the resource manifest after the initial registration, the caller should make a UpdateMembership call with an empty field mask.", + "items": { + "$ref": "ResourceManifest" + }, + "readOnly": true, + "type": "array" + }, + "membershipCrManifest": { + "description": "Input only. The YAML representation of the Membership CR. This field is ignored for GKE clusters where Hub can read the CR directly. Callers should provide the CR that is currently present in the cluster during Create or Update, or leave this field empty if none exists. The CR manifest is used to validate the cluster has not been registered with another Membership.", + "type": "string" + }, + "membershipResources": { + "description": "Output only. Additional Kubernetes resources that need to be applied to the cluster after Membership creation, and after every update. This field is only populated in the Membership returned from a successful long-running operation from CreateMembership or UpdateMembership. It is not populated during normal GetMembership or ListMemberships requests. To get the resource manifest after the initial registration, the caller should make a UpdateMembership call with an empty field mask.", + "items": { + "$ref": "ResourceManifest" + }, + "readOnly": true, + "type": "array" + }, + "resourceOptions": { + "$ref": "ResourceOptions", + "description": "Optional. Options for Kubernetes resource generation." + } + }, + "type": "object" + }, + "ListLocationsResponse": { + "description": "The response message for Locations.ListLocations.", + "id": "ListLocationsResponse", + "properties": { + "locations": { + "description": "A list of locations that matches the specified filter in the request.", + "items": { + "$ref": "Location" + }, + "type": "array" + }, + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + } + }, + "type": "object" + }, + "ListMembershipsResponse": { + "description": "Response message for the `GkeHub.ListMemberships` method.", + "id": "ListMembershipsResponse", + "properties": { + "nextPageToken": { + "description": "A token to request the next page of resources from the `ListMemberships` method. The value of an empty string means that there are no more resources to return.", + "type": "string" + }, + "resources": { + "description": "The list of matching Memberships.", + "items": { + "$ref": "Membership" + }, + "type": "array" + }, + "unreachable": { + "description": "List of locations that could not be reached while fetching this list.", + "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" + }, + "Location": { + "description": "A resource that represents Google Cloud Platform location.", + "id": "Location", + "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" + }, + "Membership": { + "description": "Membership contains information about a member cluster.", + "id": "Membership", + "properties": { + "authority": { + "$ref": "Authority", + "description": "Optional. How to identify workloads from this Membership. See the documentation on Workload Identity for more details: https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity" + }, + "createTime": { + "description": "Output only. When the Membership was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "deleteTime": { + "description": "Output only. When the Membership was deleted.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Output only. Description of this membership, limited to 63 characters. Must match the regex: `a-zA-Z0-9*` This field is present for legacy purposes.", + "readOnly": true, + "type": "string" + }, + "endpoint": { + "$ref": "MembershipEndpoint", + "description": "Optional. Endpoint information to reach this member." + }, + "externalId": { + "description": "Optional. An externally-generated and managed ID for this Membership. This ID may be modified after creation, but this is not recommended. For GKE clusters, external_id is managed by the Hub API and updates will be ignored. The ID must match the regex: `a-zA-Z0-9*` If this Membership represents a Kubernetes cluster, this value should be set to the UID of the `kube-system` namespace object.", + "type": "string" + }, + "infrastructureType": { + "description": "Optional. The infrastructure type this Membership is running on.", + "enum": [ + "INFRASTRUCTURE_TYPE_UNSPECIFIED", + "ON_PREM", + "MULTI_CLOUD" + ], + "enumDescriptions": [ + "No type was specified. Some Hub functionality may require a type be specified, and will not support Memberships with this value.", + "Private infrastructure that is owned or operated by customer. This includes GKE distributions such as GKE-OnPrem and GKE-OnBareMetal.", + "Public cloud infrastructure." + ], + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. GCP labels for this membership.", + "type": "object" + }, + "lastConnectionTime": { + "description": "Output only. For clusters using Connect, the timestamp of the most recent connection established with Google Cloud. This time is updated every several minutes, not continuously. For clusters that do not use GKE Connect, or that have never connected successfully, this field will be unset.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Output only. The full, unique name of this Membership resource in the format `projects/*/locations/*/memberships/{membership_id}`, set during creation. `membership_id` must be a valid RFC 1123 compliant DNS label: 1. At most 63 characters in length 2. It must consist of lower case alphanumeric characters or `-` 3. It must start and end with an alphanumeric character Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters.", + "readOnly": true, + "type": "string" + }, + "state": { + "$ref": "MembershipState", + "description": "Output only. State of the Membership resource.", + "readOnly": true + }, + "uniqueId": { + "description": "Output only. Google-generated UUID for this resource. This is unique across all Membership resources. If a Membership resource is deleted and another resource with the same name is created, it gets a different unique_id.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. When the Membership was last updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "MembershipEndpoint": { + "description": "MembershipEndpoint contains information needed to contact a Kubernetes API, endpoint and any additional Kubernetes metadata.", + "id": "MembershipEndpoint", + "properties": { + "gkeCluster": { + "$ref": "GkeCluster", + "description": "Optional. GKE-specific information. Only present if this Membership is a GKE cluster." + }, + "kubernetesMetadata": { + "$ref": "KubernetesMetadata", + "description": "Output only. Useful Kubernetes-specific metadata.", + "readOnly": true + }, + "kubernetesResource": { + "$ref": "KubernetesResource", + "description": "Optional. The in-cluster Kubernetes Resources that should be applied for a correctly registered cluster, in the steady state. These resources: * Ensure that the cluster is exclusively registered to one and only one Hub Membership. * Propagate Workload Pool Information available in the Membership Authority field. * Ensure proper initial configuration of default Hub Features." + } + }, + "type": "object" + }, + "MembershipState": { + "description": "MembershipState describes the state of a Membership resource.", + "id": "MembershipState", + "properties": { + "code": { + "description": "Output only. The current state of the Membership resource.", + "enum": [ + "CODE_UNSPECIFIED", + "CREATING", + "READY", + "DELETING", + "UPDATING", + "SERVICE_UPDATING" + ], + "enumDescriptions": [ + "The code is not set.", + "The cluster is being registered.", + "The cluster is registered.", + "The cluster is being unregistered.", + "The Membership is being updated.", + "The Membership is being updated by the Hub Service." + ], + "readOnly": true, + "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": "GoogleRpcStatus", + "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 response of the operation in case of success. 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" + }, + "cancelRequested": { + "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" + }, + "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" + }, + "statusDetail": { + "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" + }, + "Policy": { + "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time < timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", + "id": "Policy", + "properties": { + "auditConfigs": { + "description": "Specifies cloud audit logging configuration for this policy.", + "items": { + "$ref": "AuditConfig" + }, + "type": "array" + }, + "bindings": { + "description": "Associates a list of `members` to a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one member.", + "items": { + "$ref": "Binding" + }, + "type": "array" + }, + "etag": { + "description": "`etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.", + "format": "byte", + "type": "string" + }, + "version": { + "description": "Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "ResourceManifest": { + "description": "ResourceManifest represents a single Kubernetes resource to be applied to the cluster.", + "id": "ResourceManifest", + "properties": { + "clusterScoped": { + "description": "Whether the resource provided in the manifest is `cluster_scoped`. If unset, the manifest is assumed to be namespace scoped. This field is used for REST mapping when applying the resource in a cluster.", + "type": "boolean" + }, + "manifest": { + "description": "YAML manifest of the resource.", + "type": "string" + } + }, + "type": "object" + }, + "ResourceOptions": { + "description": "ResourceOptions represent options for Kubernetes resource generation.", + "id": "ResourceOptions", + "properties": { + "connectVersion": { + "description": "Optional. The Connect agent version to use for connect_resources. Defaults to the latest GKE Connect version. The version must be a currently supported version, obsolete versions will be rejected.", + "type": "string" + }, + "v1beta1Crd": { + "description": "Optional. Use `apiextensions/v1beta1` instead of `apiextensions/v1` for CustomResourceDefinition resources. This option should be set for clusters with Kubernetes apiserver versions <1.16.", + "type": "boolean" + } + }, + "type": "object" + }, + "SetIamPolicyRequest": { + "description": "Request message for `SetIamPolicy` method.", + "id": "SetIamPolicyRequest", + "properties": { + "policy": { + "$ref": "Policy", + "description": "REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them." + }, + "updateMask": { + "description": "OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used: `paths: \"bindings, etag\"`", + "format": "google-fieldmask", + "type": "string" + } + }, + "type": "object" + }, + "TestIamPermissionsRequest": { + "description": "Request message for `TestIamPermissions` method.", + "id": "TestIamPermissionsRequest", + "properties": { + "permissions": { + "description": "The set of permissions to check for the `resource`. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "TestIamPermissionsResponse": { + "description": "Response message for `TestIamPermissions` method.", + "id": "TestIamPermissionsResponse", + "properties": { + "permissions": { + "description": "A subset of `TestPermissionsRequest.permissions` that the caller is allowed.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "TypeMeta": { + "description": "TypeMeta is the type information needed for content unmarshalling of Kubernetes resources in the manifest.", + "id": "TypeMeta", + "properties": { + "apiVersion": { + "description": "APIVersion of the resource (e.g. v1).", + "type": "string" + }, + "kind": { + "description": "Kind of the resource (e.g. Deployment).", + "type": "string" + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "GKE Hub", + "version": "v1alpha2", + "version_module": true +} \ No newline at end of file diff --git a/discovery/gkehub-v1beta.json b/discovery/gkehub-v1beta.json new file mode 100644 index 00000000000..8caf095565e --- /dev/null +++ b/discovery/gkehub-v1beta.json @@ -0,0 +1,854 @@ +{ + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "See, edit, configure, and delete your Google Cloud Platform data" + } + } + } + }, + "basePath": "", + "baseUrl": "https://gkehub.googleapis.com/", + "batchPath": "batch", + "canonicalName": "GKE Hub", + "description": "", + "discoveryVersion": "v1", + "documentationLink": "https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster", + "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": "gkehub:v1beta", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://gkehub.mtls.googleapis.com/", + "name": "gkehub", + "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": "gkehub.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": "Location" + }, + "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": "gkehub.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 will select 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": "ListLocationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "features": { + "methods": { + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/features/{featuresId}:getIamPolicy", + "httpMethod": "GET", + "id": "gkehub.projects.locations.features.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "options.requestedPolicyVersion": { + "description": "Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "location": "query", + "type": "integer" + }, + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/features/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+resource}:getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/features/{featuresId}:setIamPolicy", + "httpMethod": "POST", + "id": "gkehub.projects.locations.features.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/features/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/features/{featuresId}:testIamPermissions", + "httpMethod": "POST", + "id": "gkehub.projects.locations.features.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/features/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "memberships": { + "methods": { + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/memberships/{membershipsId}:getIamPolicy", + "httpMethod": "GET", + "id": "gkehub.projects.locations.memberships.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "options.requestedPolicyVersion": { + "description": "Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "location": "query", + "type": "integer" + }, + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/memberships/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+resource}:getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/memberships/{membershipsId}:setIamPolicy", + "httpMethod": "POST", + "id": "gkehub.projects.locations.memberships.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/memberships/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/memberships/{membershipsId}:testIamPermissions", + "httpMethod": "POST", + "id": "gkehub.projects.locations.memberships.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/memberships/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "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": "gkehub.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", + "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": "v1beta/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + "httpMethod": "DELETE", + "id": "gkehub.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": "gkehub.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`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/operations", + "httpMethod": "GET", + "id": "gkehub.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" + ] + } + } + } + } + } + } + } + }, + "revision": "20210315", + "rootUrl": "https://gkehub.googleapis.com/", + "schemas": { + "AuditConfig": { + "description": "Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { \"audit_configs\": [ { \"service\": \"allServices\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\" }, { \"log_type\": \"ADMIN_READ\" } ] }, { \"service\": \"sampleservice.googleapis.com\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\" }, { \"log_type\": \"DATA_WRITE\", \"exempted_members\": [ \"user:aliya@example.com\" ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging.", + "id": "AuditConfig", + "properties": { + "auditLogConfigs": { + "description": "The configuration for logging of each type of permission.", + "items": { + "$ref": "AuditLogConfig" + }, + "type": "array" + }, + "service": { + "description": "Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.", + "type": "string" + } + }, + "type": "object" + }, + "AuditLogConfig": { + "description": "Provides the configuration for logging a type of permissions. Example: { \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging.", + "id": "AuditLogConfig", + "properties": { + "exemptedMembers": { + "description": "Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.", + "items": { + "type": "string" + }, + "type": "array" + }, + "logType": { + "description": "The log type that this config enables.", + "enum": [ + "LOG_TYPE_UNSPECIFIED", + "ADMIN_READ", + "DATA_WRITE", + "DATA_READ" + ], + "enumDescriptions": [ + "Default case. Should never be this.", + "Admin reads. Example: CloudIAM getIamPolicy", + "Data writes. Example: CloudSQL Users create", + "Data reads. Example: CloudSQL Users list" + ], + "type": "string" + } + }, + "type": "object" + }, + "Binding": { + "description": "Associates `members` with a `role`.", + "id": "Binding", + "properties": { + "condition": { + "$ref": "Expr", + "description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." + }, + "members": { + "description": "Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. ", + "items": { + "type": "string" + }, + "type": "array" + }, + "role": { + "description": "Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.", + "type": "string" + } + }, + "type": "object" + }, + "CancelOperationRequest": { + "description": "The request message for Operations.CancelOperation.", + "id": "CancelOperationRequest", + "properties": {}, + "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "id": "Empty", + "properties": {}, + "type": "object" + }, + "Expr": { + "description": "Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: \"Summary size limit\" description: \"Determines if a summary is less than 100 chars\" expression: \"document.summary.size() < 100\" Example (Equality): title: \"Requestor is owner\" description: \"Determines if requestor is the document owner\" expression: \"document.owner == request.auth.claims.email\" Example (Logic): title: \"Public documents\" description: \"Determine whether the document should be publicly visible\" expression: \"document.type != 'private' && document.type != 'internal'\" Example (Data Manipulation): title: \"Notification string\" description: \"Create a notification string with a timestamp.\" expression: \"'New message received at ' + string(document.create_time)\" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.", + "id": "Expr", + "properties": { + "description": { + "description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", + "type": "string" + }, + "expression": { + "description": "Textual representation of an expression in Common Expression Language syntax.", + "type": "string" + }, + "location": { + "description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", + "type": "string" + }, + "title": { + "description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleRpcStatus": { + "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": "GoogleRpcStatus", + "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" + }, + "ListLocationsResponse": { + "description": "The response message for Locations.ListLocations.", + "id": "ListLocationsResponse", + "properties": { + "locations": { + "description": "A list of locations that matches the specified filter in the request.", + "items": { + "$ref": "Location" + }, + "type": "array" + }, + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + } + }, + "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" + }, + "Location": { + "description": "A resource that represents Google Cloud Platform location.", + "id": "Location", + "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" + }, + "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": "GoogleRpcStatus", + "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 response of the operation in case of success. 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" + }, + "cancelRequested": { + "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" + }, + "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" + }, + "statusDetail": { + "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" + }, + "Policy": { + "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time < timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", + "id": "Policy", + "properties": { + "auditConfigs": { + "description": "Specifies cloud audit logging configuration for this policy.", + "items": { + "$ref": "AuditConfig" + }, + "type": "array" + }, + "bindings": { + "description": "Associates a list of `members` to a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one member.", + "items": { + "$ref": "Binding" + }, + "type": "array" + }, + "etag": { + "description": "`etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.", + "format": "byte", + "type": "string" + }, + "version": { + "description": "Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "SetIamPolicyRequest": { + "description": "Request message for `SetIamPolicy` method.", + "id": "SetIamPolicyRequest", + "properties": { + "policy": { + "$ref": "Policy", + "description": "REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them." + }, + "updateMask": { + "description": "OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used: `paths: \"bindings, etag\"`", + "format": "google-fieldmask", + "type": "string" + } + }, + "type": "object" + }, + "TestIamPermissionsRequest": { + "description": "Request message for `TestIamPermissions` method.", + "id": "TestIamPermissionsRequest", + "properties": { + "permissions": { + "description": "The set of permissions to check for the `resource`. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "TestIamPermissionsResponse": { + "description": "Response message for `TestIamPermissions` method.", + "id": "TestIamPermissionsResponse", + "properties": { + "permissions": { + "description": "A subset of `TestPermissionsRequest.permissions` that the caller is allowed.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "GKE Hub", + "version": "v1beta", + "version_module": true +} \ No newline at end of file diff --git a/discovery/gkehub-v1beta1.json b/discovery/gkehub-v1beta1.json new file mode 100644 index 00000000000..50df0537b5f --- /dev/null +++ b/discovery/gkehub-v1beta1.json @@ -0,0 +1,1432 @@ +{ + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "See, edit, configure, and delete your Google Cloud Platform data" + } + } + } + }, + "basePath": "", + "baseUrl": "https://gkehub.googleapis.com/", + "batchPath": "batch", + "canonicalName": "GKE Hub", + "description": "", + "discoveryVersion": "v1", + "documentationLink": "https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster", + "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": "gkehub:v1beta1", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://gkehub.mtls.googleapis.com/", + "name": "gkehub", + "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": "v1beta1/projects/{projectsId}/locations/{locationsId}", + "httpMethod": "GET", + "id": "gkehub.projects.locations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Resource name for the location.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "Location" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists information about the supported locations for this service.", + "flatPath": "v1beta1/projects/{projectsId}/locations", + "httpMethod": "GET", + "id": "gkehub.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 will select 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": "v1beta1/{+name}/locations", + "response": { + "$ref": "ListLocationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "memberships": { + "methods": { + "create": { + "description": "Adds a new Membership.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/memberships", + "httpMethod": "POST", + "id": "gkehub.projects.locations.memberships.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "membershipId": { + "description": "Required. Client chosen ID for the membership. `membership_id` must be a valid RFC 1123 compliant DNS label: 1. At most 63 characters in length 2. It must consist of lower case alphanumeric characters or `-` 3. It must start and end with an alphanumeric character Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent (project and location) where the Memberships will be created. Specified in the format `projects/*/locations/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/memberships", + "request": { + "$ref": "Membership" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Removes a Membership.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/memberships/{membershipsId}", + "httpMethod": "DELETE", + "id": "gkehub.projects.locations.memberships.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The Membership resource name in the format `projects/*/locations/*/memberships/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/memberships/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "generateConnectManifest": { + "description": "Generates the manifest for deployment of the GKE connect agent.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/memberships/{membershipsId}:generateConnectManifest", + "httpMethod": "GET", + "id": "gkehub.projects.locations.memberships.generateConnectManifest", + "parameterOrder": [ + "name" + ], + "parameters": { + "connectAgent.name": { + "description": "Do not set.", + "location": "query", + "type": "string" + }, + "connectAgent.namespace": { + "description": "Optional. Namespace for GKE Connect agent resources. Defaults to `gke-connect`. The Connect Agent is authorized automatically when run in the default namespace. Otherwise, explicit authorization must be granted with an additional IAM binding.", + "location": "query", + "type": "string" + }, + "connectAgent.proxy": { + "description": "Optional. URI of a proxy if connectivity from the agent to gkeconnect.googleapis.com requires the use of a proxy. Format must be in the form `http(s)://{proxy_address}`, depending on the HTTP/HTTPS protocol supported by the proxy. This will direct the connect agent's outbound traffic through a HTTP(S) proxy.", + "format": "byte", + "location": "query", + "type": "string" + }, + "imagePullSecretContent": { + "description": "Optional. The image pull secret content for the registry, if not public.", + "format": "byte", + "location": "query", + "type": "string" + }, + "isUpgrade": { + "description": "Optional. If true, generate the resources for upgrade only. Some resources generated only for installation (e.g. secrets) will be excluded.", + "location": "query", + "type": "boolean" + }, + "name": { + "description": "Required. The Membership resource name the Agent will associate with, in the format `projects/*/locations/*/memberships/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/memberships/[^/]+$", + "required": true, + "type": "string" + }, + "registry": { + "description": "Optional. The registry to fetch the connect agent image from. Defaults to gcr.io/gkeconnect.", + "location": "query", + "type": "string" + }, + "version": { + "description": "Optional. The Connect agent version to use. Defaults to the most current version.", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+name}:generateConnectManifest", + "response": { + "$ref": "GenerateConnectManifestResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "generateExclusivityManifest": { + "description": "GenerateExclusivityManifest generates the manifests to update the exclusivity artifacts in the cluster if needed. Exclusivity artifacts include the Membership custom resource definition (CRD) and the singleton Membership custom resource (CR). Combined with ValidateExclusivity, exclusivity artifacts guarantee that a Kubernetes cluster is only registered to a single GKE Hub. The Membership CRD is versioned, and may require conversion when the GKE Hub API server begins serving a newer version of the CRD and corresponding CR. The response will be the converted CRD and CR if there are any differences between the versions.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/memberships/{membershipsId}:generateExclusivityManifest", + "httpMethod": "GET", + "id": "gkehub.projects.locations.memberships.generateExclusivityManifest", + "parameterOrder": [ + "name" + ], + "parameters": { + "crManifest": { + "description": "Optional. The YAML manifest of the membership CR retrieved by `kubectl get memberships membership`. Leave empty if the resource does not exist.", + "location": "query", + "type": "string" + }, + "crdManifest": { + "description": "Optional. The YAML manifest of the membership CRD retrieved by `kubectl get customresourcedefinitions membership`. Leave empty if the resource does not exist.", + "location": "query", + "type": "string" + }, + "name": { + "description": "Required. The Membership resource name in the format `projects/*/locations/*/memberships/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/memberships/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}:generateExclusivityManifest", + "response": { + "$ref": "GenerateExclusivityManifestResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the details of a Membership.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/memberships/{membershipsId}", + "httpMethod": "GET", + "id": "gkehub.projects.locations.memberships.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The Membership resource name in the format `projects/*/locations/*/memberships/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/memberships/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "Membership" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/memberships/{membershipsId}:getIamPolicy", + "httpMethod": "GET", + "id": "gkehub.projects.locations.memberships.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "options.requestedPolicyVersion": { + "description": "Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "location": "query", + "type": "integer" + }, + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/memberships/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+resource}:getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists Memberships in a given project and location.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/memberships", + "httpMethod": "GET", + "id": "gkehub.projects.locations.memberships.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Lists Memberships that match the filter expression, following the syntax outlined in https://google.aip.dev/160. Examples: - Name is `bar` in project `foo-proj` and location `global`: name = \"projects/foo-proj/locations/global/membership/bar\" - Memberships that have a label called `foo`: labels.foo:* - Memberships that have a label called `foo` whose value is `bar`: labels.foo = bar - Memberships in the CREATING state: state = CREATING", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. One or more fields to compare and use to sort the output. See https://google.aip.dev/132#ordering.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. When requesting a 'page' of resources, `page_size` specifies number of resources to return. If unspecified or set to 0, all resources will be returned.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. Token returned by previous call to `ListMemberships` which specifies the position in the list from where to continue listing the resources.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent (project and location) where the Memberships will be listed. Specified in the format `projects/*/locations/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/memberships", + "response": { + "$ref": "ListMembershipsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates an existing Membership.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/memberships/{membershipsId}", + "httpMethod": "PATCH", + "id": "gkehub.projects.locations.memberships.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The membership resource name in the format: `projects/[project_id]/locations/global/memberships/[membership_id]`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/memberships/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. Mask of fields to update. At least one field path must be specified in this mask.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "request": { + "$ref": "Membership" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/memberships/{membershipsId}:setIamPolicy", + "httpMethod": "POST", + "id": "gkehub.projects.locations.memberships.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/memberships/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/memberships/{membershipsId}:testIamPermissions", + "httpMethod": "POST", + "id": "gkehub.projects.locations.memberships.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/memberships/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "validateExclusivity": { + "description": "ValidateExclusivity validates the state of exclusivity in the cluster. The validation does not depend on an existing Hub membership resource.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/memberships:validateExclusivity", + "httpMethod": "GET", + "id": "gkehub.projects.locations.memberships.validateExclusivity", + "parameterOrder": [ + "parent" + ], + "parameters": { + "crManifest": { + "description": "Optional. The YAML of the membership CR in the cluster. Empty if the membership CR does not exist.", + "location": "query", + "type": "string" + }, + "intendedMembership": { + "description": "Required. The intended membership name under the `parent`. This method only does validation in anticipation of a CreateMembership call with the same name.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent (project and location) where the Memberships will be created. Specified in the format `projects/*/locations/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/memberships:validateExclusivity", + "response": { + "$ref": "ValidateExclusivityResponse" + }, + "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": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", + "httpMethod": "POST", + "id": "gkehub.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": "v1beta1/{+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": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + "httpMethod": "DELETE", + "id": "gkehub.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": "v1beta1/{+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": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "gkehub.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": "v1beta1/{+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`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations", + "httpMethod": "GET", + "id": "gkehub.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": "v1beta1/{+name}/operations", + "response": { + "$ref": "ListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + } + }, + "revision": "20210322", + "rootUrl": "https://gkehub.googleapis.com/", + "schemas": { + "AuditConfig": { + "description": "Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { \"audit_configs\": [ { \"service\": \"allServices\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\" }, { \"log_type\": \"ADMIN_READ\" } ] }, { \"service\": \"sampleservice.googleapis.com\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\" }, { \"log_type\": \"DATA_WRITE\", \"exempted_members\": [ \"user:aliya@example.com\" ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging.", + "id": "AuditConfig", + "properties": { + "auditLogConfigs": { + "description": "The configuration for logging of each type of permission.", + "items": { + "$ref": "AuditLogConfig" + }, + "type": "array" + }, + "service": { + "description": "Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.", + "type": "string" + } + }, + "type": "object" + }, + "AuditLogConfig": { + "description": "Provides the configuration for logging a type of permissions. Example: { \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging.", + "id": "AuditLogConfig", + "properties": { + "exemptedMembers": { + "description": "Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.", + "items": { + "type": "string" + }, + "type": "array" + }, + "logType": { + "description": "The log type that this config enables.", + "enum": [ + "LOG_TYPE_UNSPECIFIED", + "ADMIN_READ", + "DATA_WRITE", + "DATA_READ" + ], + "enumDescriptions": [ + "Default case. Should never be this.", + "Admin reads. Example: CloudIAM getIamPolicy", + "Data writes. Example: CloudSQL Users create", + "Data reads. Example: CloudSQL Users list" + ], + "type": "string" + } + }, + "type": "object" + }, + "Authority": { + "description": "Authority encodes how Google will recognize identities from this Membership. See the workload identity documentation for more details: https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity", + "id": "Authority", + "properties": { + "identityProvider": { + "description": "Output only. An identity provider that reflects the `issuer` in the workload identity pool.", + "readOnly": true, + "type": "string" + }, + "issuer": { + "description": "Optional. A JSON Web Token (JWT) issuer URI. `issuer` must start with `https://` and be a valid URL with length <2000 characters. If set, then Google will allow valid OIDC tokens from this issuer to authenticate within the workload_identity_pool. OIDC discovery will be performed on this URI to validate tokens from the issuer. Clearing `issuer` disables Workload Identity. `issuer` cannot be directly modified; it must be cleared (and Workload Identity disabled) before using a new issuer (and re-enabling Workload Identity).", + "type": "string" + }, + "oidcJwks": { + "description": "Optional. OIDC verification keys for this Membership in JWKS format (RFC 7517). When this field is set, OIDC discovery will NOT be performed on `issuer`, and instead OIDC tokens will be validated using this field.", + "format": "byte", + "type": "string" + }, + "workloadIdentityPool": { + "description": "Output only. The name of the workload identity pool in which `issuer` will be recognized. There is a single Workload Identity Pool per Hub that is shared between all Memberships that belong to that Hub. For a Hub hosted in {PROJECT_ID}, the workload pool format is `{PROJECT_ID}.hub.id.goog`, although this is subject to change in newer versions of this API.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "Binding": { + "description": "Associates `members` with a `role`.", + "id": "Binding", + "properties": { + "condition": { + "$ref": "Expr", + "description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." + }, + "members": { + "description": "Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. ", + "items": { + "type": "string" + }, + "type": "array" + }, + "role": { + "description": "Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.", + "type": "string" + } + }, + "type": "object" + }, + "CancelOperationRequest": { + "description": "The request message for Operations.CancelOperation.", + "id": "CancelOperationRequest", + "properties": {}, + "type": "object" + }, + "ConnectAgentResource": { + "description": "ConnectAgentResource represents a Kubernetes resource manifest for Connect Agent deployment.", + "id": "ConnectAgentResource", + "properties": { + "manifest": { + "description": "YAML manifest of the resource.", + "type": "string" + }, + "type": { + "$ref": "TypeMeta", + "description": "Kubernetes type of the resource." + } + }, + "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "id": "Empty", + "properties": {}, + "type": "object" + }, + "Expr": { + "description": "Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: \"Summary size limit\" description: \"Determines if a summary is less than 100 chars\" expression: \"document.summary.size() < 100\" Example (Equality): title: \"Requestor is owner\" description: \"Determines if requestor is the document owner\" expression: \"document.owner == request.auth.claims.email\" Example (Logic): title: \"Public documents\" description: \"Determine whether the document should be publicly visible\" expression: \"document.type != 'private' && document.type != 'internal'\" Example (Data Manipulation): title: \"Notification string\" description: \"Create a notification string with a timestamp.\" expression: \"'New message received at ' + string(document.create_time)\" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.", + "id": "Expr", + "properties": { + "description": { + "description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", + "type": "string" + }, + "expression": { + "description": "Textual representation of an expression in Common Expression Language syntax.", + "type": "string" + }, + "location": { + "description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", + "type": "string" + }, + "title": { + "description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", + "type": "string" + } + }, + "type": "object" + }, + "GenerateConnectManifestResponse": { + "description": "GenerateConnectManifestResponse contains manifest information for installing/upgrading a Connect agent.", + "id": "GenerateConnectManifestResponse", + "properties": { + "manifest": { + "description": "The ordered list of Kubernetes resources that need to be applied to the cluster for GKE Connect agent installation/upgrade.", + "items": { + "$ref": "ConnectAgentResource" + }, + "type": "array" + } + }, + "type": "object" + }, + "GenerateExclusivityManifestResponse": { + "description": "The response of the exclusivity artifacts manifests for the client to apply.", + "id": "GenerateExclusivityManifestResponse", + "properties": { + "crManifest": { + "description": "The YAML manifest of the membership CR to apply if a new version of the CR is available. Empty if no update needs to be applied.", + "type": "string" + }, + "crdManifest": { + "description": "The YAML manifest of the membership CRD to apply if a newer version of the CRD is available. Empty if no update needs to be applied.", + "type": "string" + } + }, + "type": "object" + }, + "GkeCluster": { + "description": "GkeCluster contains information specific to GKE clusters.", + "id": "GkeCluster", + "properties": { + "resourceLink": { + "description": "Immutable. Self-link of the GCP resource for the GKE cluster. For example: //container.googleapis.com/projects/my-project/locations/us-west1-a/clusters/my-cluster Zonal clusters are also supported.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleRpcStatus": { + "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": "GoogleRpcStatus", + "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" + }, + "KubernetesMetadata": { + "description": "KubernetesMetadata provides informational metadata for Memberships representing Kubernetes clusters.", + "id": "KubernetesMetadata", + "properties": { + "kubernetesApiServerVersion": { + "description": "Output only. Kubernetes API server version string as reported by '/version'.", + "readOnly": true, + "type": "string" + }, + "memoryMb": { + "description": "Output only. The total memory capacity as reported by the sum of all Kubernetes nodes resources, defined in MB.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "nodeCount": { + "description": "Output only. Node count as reported by Kubernetes nodes resources.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "nodeProviderId": { + "description": "Output only. Node providerID as reported by the first node in the list of nodes on the Kubernetes endpoint. On Kubernetes platforms that support zero-node clusters (like GKE-on-GCP), the node_count will be zero and the node_provider_id will be empty.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. The time at which these details were last updated. This update_time is different from the Membership-level update_time since EndpointDetails are updated internally for API consumers.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "vcpuCount": { + "description": "Output only. vCPU count as reported by Kubernetes nodes resources.", + "format": "int32", + "readOnly": true, + "type": "integer" + } + }, + "type": "object" + }, + "KubernetesResource": { + "description": "KubernetesResource contains the YAML manifests and configuration for Membership Kubernetes resources in the cluster. After CreateMembership or UpdateMembership, these resources should be re-applied in the cluster.", + "id": "KubernetesResource", + "properties": { + "connectResources": { + "description": "Output only. The Kubernetes resources for installing the GKE Connect agent This field is only populated in the Membership returned from a successful long-running operation from CreateMembership or UpdateMembership. It is not populated during normal GetMembership or ListMemberships requests. To get the resource manifest after the initial registration, the caller should make a UpdateMembership call with an empty field mask.", + "items": { + "$ref": "ResourceManifest" + }, + "readOnly": true, + "type": "array" + }, + "membershipCrManifest": { + "description": "Input only. The YAML representation of the Membership CR. This field is ignored for GKE clusters where Hub can read the CR directly. Callers should provide the CR that is currently present in the cluster during CreateMembership or UpdateMembership, or leave this field empty if none exists. The CR manifest is used to validate the cluster has not been registered with another Membership.", + "type": "string" + }, + "membershipResources": { + "description": "Output only. Additional Kubernetes resources that need to be applied to the cluster after Membership creation, and after every update. This field is only populated in the Membership returned from a successful long-running operation from CreateMembership or UpdateMembership. It is not populated during normal GetMembership or ListMemberships requests. To get the resource manifest after the initial registration, the caller should make a UpdateMembership call with an empty field mask.", + "items": { + "$ref": "ResourceManifest" + }, + "readOnly": true, + "type": "array" + }, + "resourceOptions": { + "$ref": "ResourceOptions", + "description": "Optional. Options for Kubernetes resource generation." + } + }, + "type": "object" + }, + "ListLocationsResponse": { + "description": "The response message for Locations.ListLocations.", + "id": "ListLocationsResponse", + "properties": { + "locations": { + "description": "A list of locations that matches the specified filter in the request.", + "items": { + "$ref": "Location" + }, + "type": "array" + }, + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + } + }, + "type": "object" + }, + "ListMembershipsResponse": { + "description": "Response message for the `GkeHubMembershipService.ListMemberships` method.", + "id": "ListMembershipsResponse", + "properties": { + "nextPageToken": { + "description": "A token to request the next page of resources from the `ListMemberships` method. The value of an empty string means that there are no more resources to return.", + "type": "string" + }, + "resources": { + "description": "The list of matching Memberships.", + "items": { + "$ref": "Membership" + }, + "type": "array" + }, + "unreachable": { + "description": "List of locations that could not be reached while fetching this list.", + "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" + }, + "Location": { + "description": "A resource that represents Google Cloud Platform location.", + "id": "Location", + "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" + }, + "Membership": { + "description": "Membership contains information about a member cluster.", + "id": "Membership", + "properties": { + "authority": { + "$ref": "Authority", + "description": "Optional. How to identify workloads from this Membership. See the documentation on Workload Identity for more details: https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity" + }, + "createTime": { + "description": "Output only. When the Membership was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "deleteTime": { + "description": "Output only. When the Membership was deleted.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Optional. Description of this membership, limited to 63 characters. Must match the regex: `a-zA-Z0-9*`", + "type": "string" + }, + "endpoint": { + "$ref": "MembershipEndpoint", + "description": "Optional. Endpoint information to reach this member." + }, + "externalId": { + "description": "Optional. An externally-generated and managed ID for this Membership. This ID may be modified after creation, but this is not recommended. For GKE clusters, external_id is managed by the Hub API and updates will be ignored. The ID must match the regex: `a-zA-Z0-9*` If this Membership represents a Kubernetes cluster, this value should be set to the UID of the `kube-system` namespace object.", + "type": "string" + }, + "infrastructureType": { + "description": "Optional. The infrastructure type this Membership is running on.", + "enum": [ + "INFRASTRUCTURE_TYPE_UNSPECIFIED", + "ON_PREM", + "MULTI_CLOUD" + ], + "enumDescriptions": [ + "No type was specified. Some Hub functionality may require a type be specified, and will not support Memberships with this value.", + "Private infrastructure that is owned or operated by customer. This includes GKE distributions such as GKE-OnPrem and GKE-OnBareMetal.", + "Public cloud infrastructure." + ], + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. GCP labels for this membership.", + "type": "object" + }, + "lastConnectionTime": { + "description": "Output only. For clusters using Connect, the timestamp of the most recent connection established with Google Cloud. This time is updated every several minutes, not continuously. For clusters that do not use GKE Connect, or that have never connected successfully, this field will be unset.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Output only. The full, unique name of this Membership resource in the format `projects/*/locations/*/memberships/{membership_id}`, set during creation. `membership_id` must be a valid RFC 1123 compliant DNS label: 1. At most 63 characters in length 2. It must consist of lower case alphanumeric characters or `-` 3. It must start and end with an alphanumeric character Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters.", + "readOnly": true, + "type": "string" + }, + "state": { + "$ref": "MembershipState", + "description": "Output only. State of the Membership resource.", + "readOnly": true + }, + "uniqueId": { + "description": "Output only. Google-generated UUID for this resource. This is unique across all Membership resources. If a Membership resource is deleted and another resource with the same name is created, it gets a different unique_id.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. When the Membership was last updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "MembershipEndpoint": { + "description": "MembershipEndpoint contains information needed to contact a Kubernetes API, endpoint and any additional Kubernetes metadata.", + "id": "MembershipEndpoint", + "properties": { + "gkeCluster": { + "$ref": "GkeCluster", + "description": "Optional. GKE-specific information. Only present if this Membership is a GKE cluster." + }, + "kubernetesMetadata": { + "$ref": "KubernetesMetadata", + "description": "Output only. Useful Kubernetes-specific metadata.", + "readOnly": true + }, + "kubernetesResource": { + "$ref": "KubernetesResource", + "description": "Optional. The in-cluster Kubernetes Resources that should be applied for a correctly registered cluster, in the steady state. These resources: * Ensure that the cluster is exclusively registered to one and only one Hub Membership. * Propagate Workload Pool Information available in the Membership Authority field. * Ensure proper initial configuration of default Hub Features." + } + }, + "type": "object" + }, + "MembershipState": { + "description": "State of the Membership resource.", + "id": "MembershipState", + "properties": { + "code": { + "description": "Output only. The current state of the Membership resource.", + "enum": [ + "CODE_UNSPECIFIED", + "CREATING", + "READY", + "DELETING", + "UPDATING", + "SERVICE_UPDATING" + ], + "enumDescriptions": [ + "The code is not set.", + "The cluster is being registered.", + "The cluster is registered.", + "The cluster is being unregistered.", + "The Membership is being updated.", + "The Membership is being updated by the Hub Service." + ], + "readOnly": true, + "type": "string" + }, + "description": { + "description": "This field is never set by the Hub Service.", + "type": "string" + }, + "updateTime": { + "description": "This field is never set by the Hub Service.", + "format": "google-datetime", + "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": "GoogleRpcStatus", + "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 response of the operation in case of success. 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" + }, + "cancelRequested": { + "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" + }, + "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" + }, + "statusDetail": { + "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" + }, + "Policy": { + "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time < timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", + "id": "Policy", + "properties": { + "auditConfigs": { + "description": "Specifies cloud audit logging configuration for this policy.", + "items": { + "$ref": "AuditConfig" + }, + "type": "array" + }, + "bindings": { + "description": "Associates a list of `members` to a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one member.", + "items": { + "$ref": "Binding" + }, + "type": "array" + }, + "etag": { + "description": "`etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.", + "format": "byte", + "type": "string" + }, + "version": { + "description": "Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "ResourceManifest": { + "description": "ResourceManifest represents a single Kubernetes resource to be applied to the cluster.", + "id": "ResourceManifest", + "properties": { + "clusterScoped": { + "description": "Whether the resource provided in the manifest is `cluster_scoped`. If unset, the manifest is assumed to be namespace scoped. This field is used for REST mapping when applying the resource in a cluster.", + "type": "boolean" + }, + "manifest": { + "description": "YAML manifest of the resource.", + "type": "string" + } + }, + "type": "object" + }, + "ResourceOptions": { + "description": "ResourceOptions represent options for Kubernetes resource generation.", + "id": "ResourceOptions", + "properties": { + "connectVersion": { + "description": "Optional. The Connect agent version to use for connect_resources. Defaults to the latest GKE Connect version. The version must be a currently supported version, obsolete versions will be rejected.", + "type": "string" + }, + "v1beta1Crd": { + "description": "Optional. Use `apiextensions/v1beta1` instead of `apiextensions/v1` for CustomResourceDefinition resources. This option should be set for clusters with Kubernetes apiserver versions <1.16.", + "type": "boolean" + } + }, + "type": "object" + }, + "SetIamPolicyRequest": { + "description": "Request message for `SetIamPolicy` method.", + "id": "SetIamPolicyRequest", + "properties": { + "policy": { + "$ref": "Policy", + "description": "REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them." + }, + "updateMask": { + "description": "OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used: `paths: \"bindings, etag\"`", + "format": "google-fieldmask", + "type": "string" + } + }, + "type": "object" + }, + "TestIamPermissionsRequest": { + "description": "Request message for `TestIamPermissions` method.", + "id": "TestIamPermissionsRequest", + "properties": { + "permissions": { + "description": "The set of permissions to check for the `resource`. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "TestIamPermissionsResponse": { + "description": "Response message for `TestIamPermissions` method.", + "id": "TestIamPermissionsResponse", + "properties": { + "permissions": { + "description": "A subset of `TestPermissionsRequest.permissions` that the caller is allowed.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "TypeMeta": { + "description": "TypeMeta is the type information needed for content unmarshalling of Kubernetes resources in the manifest.", + "id": "TypeMeta", + "properties": { + "apiVersion": { + "description": "APIVersion of the resource (e.g. v1).", + "type": "string" + }, + "kind": { + "description": "Kind of the resource (e.g. Deployment).", + "type": "string" + } + }, + "type": "object" + }, + "ValidateExclusivityResponse": { + "description": "The response of exclusivity artifacts validation result status.", + "id": "ValidateExclusivityResponse", + "properties": { + "status": { + "$ref": "GoogleRpcStatus", + "description": "The validation result. * `OK` means that exclusivity is validated, assuming the manifest produced by GenerateExclusivityManifest is successfully applied. * `ALREADY_EXISTS` means that the Membership CRD is already owned by another Hub. See `status.message` for more information." + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "GKE Hub", + "version": "v1beta1", + "version_module": true +} \ No newline at end of file diff --git a/discovery/groupsmigration-v1.json b/discovery/groupsmigration-v1.json index b8e3641ab71..d435d18d924 100644 --- a/discovery/groupsmigration-v1.json +++ b/discovery/groupsmigration-v1.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/apps.groups.migration": { - "description": "Manage messages in groups on your domain" + "description": "Upload messages to any Google group in your domain" } } } @@ -146,7 +146,7 @@ } } }, - "revision": "20200820", + "revision": "20210311", "rootUrl": "https://groupsmigration.googleapis.com/", "schemas": { "Groups": { diff --git a/discovery/healthcare-v1.json b/discovery/healthcare-v1.json index 6364c63f1a2..55667929610 100644 --- a/discovery/healthcare-v1.json +++ b/discovery/healthcare-v1.json @@ -3718,7 +3718,7 @@ ], "parameters": { "filter": { - "description": "Restricts messages returned to those matching a filter. The following syntax is available: * A string field value can be written as text inside quotation marks, for example `\"query text\"`. The only valid relational operation for text fields is equality (`=`), where text is searched within the field, rather than having the field be equal to the text. For example, `\"Comment = great\"` returns messages with `great` in the comment field. * A number field value can be written as an integer, a decimal, or an exponential. The valid relational operators for number fields are the equality operator (`=`), along with the less than/greater than operators (`<`, `<=`, `>`, `>=`). Note that there is no inequality (`!=`) operator. You can prepend the `NOT` operator to an expression to negate it. * A date field value must be written in `yyyy-mm-dd` form. Fields with date and time use the RFC3339 time format. Leading zeros are required for one-digit months and days. The valid relational operators for date fields are the equality operator (`=`) , along with the less than/greater than operators (`<`, `<=`, `>`, `>=`). Note that there is no inequality (`!=`) operator. You can prepend the `NOT` operator to an expression to negate it. * Multiple field query expressions can be combined in one query by adding `AND` or `OR` operators between the expressions. If a boolean operator appears within a quoted string, it is not treated as special, it's just another part of the character string to be matched. You can prepend the `NOT` operator to an expression to negate it. Fields/functions available for filtering are: * `message_type`, from the MSH-9.1 field. For example, `NOT message_type = \"ADT\"`. * `send_date` or `sendDate`, the YYYY-MM-DD date the message was sent in the dataset's time_zone, from the MSH-7 segment. For example, `send_date < \"2017-01-02\"`. * `send_time`, the timestamp when the message was sent, using the RFC3339 time format for comparisons, from the MSH-7 segment. For example, `send_time < \"2017-01-02T00:00:00-05:00\"`. * `send_facility`, the care center that the message came from, from the MSH-4 segment. For example, `send_facility = \"ABC\"`. * `PatientId(value, type)`, which matches if the message lists a patient having an ID of the given value and type in the PID-2, PID-3, or PID-4 segments. For example, `PatientId(\"123456\", \"MRN\")`. * `labels.x`, a string value of the label with key `x` as set using the Message.labels map. For example, `labels.\"priority\"=\"high\"`. The operator `:*` can be used to assert the existence of a label. For example, `labels.\"priority\":*`.", + "description": "Restricts messages returned to those matching a filter. The following syntax is available: * A string field value can be written as text inside quotation marks, for example `\"query text\"`. The only valid relational operation for text fields is equality (`=`), where text is searched within the field, rather than having the field be equal to the text. For example, `\"Comment = great\"` returns messages with `great` in the comment field. * A number field value can be written as an integer, a decimal, or an exponential. The valid relational operators for number fields are the equality operator (`=`), along with the less than/greater than operators (`<`, `<=`, `>`, `>=`). Note that there is no inequality (`!=`) operator. You can prepend the `NOT` operator to an expression to negate it. * A date field value must be written in `yyyy-mm-dd` form. Fields with date and time use the RFC3339 time format. Leading zeros are required for one-digit months and days. The valid relational operators for date fields are the equality operator (`=`) , along with the less than/greater than operators (`<`, `<=`, `>`, `>=`). Note that there is no inequality (`!=`) operator. You can prepend the `NOT` operator to an expression to negate it. * Multiple field query expressions can be combined in one query by adding `AND` or `OR` operators between the expressions. If a boolean operator appears within a quoted string, it is not treated as special, it's just another part of the character string to be matched. You can prepend the `NOT` operator to an expression to negate it. Fields/functions available for filtering are: * `message_type`, from the MSH-9.1 field. For example, `NOT message_type = \"ADT\"`. * `send_date` or `sendDate`, the YYYY-MM-DD date the message was sent in the dataset's time_zone, from the MSH-7 segment. For example, `send_date < \"2017-01-02\"`. * `send_time`, the timestamp when the message was sent, using the RFC3339 time format for comparisons, from the MSH-7 segment. For example, `send_time < \"2017-01-02T00:00:00-05:00\"`. * `create_time`, the timestamp when the message was created in the HL7v2 store. Use the RFC3339 time format for comparisons. For example, `create_time < \"2017-01-02T00:00:00-05:00\"`. * `send_facility`, the care center that the message came from, from the MSH-4 segment. For example, `send_facility = \"ABC\"`. * `PatientId(value, type)`, which matches if the message lists a patient having an ID of the given value and type in the PID-2, PID-3, or PID-4 segments. For example, `PatientId(\"123456\", \"MRN\")`. * `labels.x`, a string value of the label with key `x` as set using the Message.labels map. For example, `labels.\"priority\"=\"high\"`. The operator `:*` can be used to assert the existence of a label. For example, `labels.\"priority\":*`.", "location": "query", "type": "string" }, @@ -3916,7 +3916,7 @@ } } }, - "revision": "20210217", + "revision": "20210301", "rootUrl": "https://healthcare.googleapis.com/", "schemas": { "ActivateConsentRequest": { @@ -5025,7 +5025,7 @@ "id": "Hl7V2NotificationConfig", "properties": { "filter": { - "description": "Restricts notifications sent for messages matching a filter. If this is empty, all messages are matched. The following syntax is available: * A string field value can be written as text inside quotation marks, for example `\"query text\"`. The only valid relational operation for text fields is equality (`=`), where text is searched within the field, rather than having the field be equal to the text. For example, `\"Comment = great\"` returns messages with `great` in the comment field. * A number field value can be written as an integer, a decimal, or an exponential. The valid relational operators for number fields are the equality operator (`=`), along with the less than/greater than operators (`<`, `<=`, `>`, `>=`). Note that there is no inequality (`!=`) operator. You can prepend the `NOT` operator to an expression to negate it. * A date field value must be written in `yyyy-mm-dd` form. Fields with date and time use the RFC3339 time format. Leading zeros are required for one-digit months and days. The valid relational operators for date fields are the equality operator (`=`) , along with the less than/greater than operators (`<`, `<=`, `>`, `>=`). Note that there is no inequality (`!=`) operator. You can prepend the `NOT` operator to an expression to negate it. * Multiple field query expressions can be combined in one query by adding `AND` or `OR` operators between the expressions. If a boolean operator appears within a quoted string, it is not treated as special, it's just another part of the character string to be matched. You can prepend the `NOT` operator to an expression to negate it. The following fields and functions are available for filtering: * `message_type`, from the MSH-9.1 field. For example, `NOT message_type = \"ADT\"`. * `send_date` or `sendDate`, the YYYY-MM-DD date the message was sent in the dataset's time_zone, from the MSH-7 segment. For example, `send_date < \"2017-01-02\"`. * `send_time`, the timestamp when the message was sent, using the RFC3339 time format for comparisons, from the MSH-7 segment. For example, `send_time < \"2017-01-02T00:00:00-05:00\"`. * `send_facility`, the care center that the message came from, from the MSH-4 segment. For example, `send_facility = \"ABC\"`. * `PatientId(value, type)`, which matches if the message lists a patient having an ID of the given value and type in the PID-2, PID-3, or PID-4 segments. For example, `PatientId(\"123456\", \"MRN\")`. * `labels.x`, a string value of the label with key `x` as set using the Message.labels map. For example, `labels.\"priority\"=\"high\"`. The operator `:*` can be used to assert the existence of a label. For example, `labels.\"priority\":*`.", + "description": "Restricts notifications sent for messages matching a filter. If this is empty, all messages are matched. The following syntax is available: * A string field value can be written as text inside quotation marks, for example `\"query text\"`. The only valid relational operation for text fields is equality (`=`), where text is searched within the field, rather than having the field be equal to the text. For example, `\"Comment = great\"` returns messages with `great` in the comment field. * A number field value can be written as an integer, a decimal, or an exponential. The valid relational operators for number fields are the equality operator (`=`), along with the less than/greater than operators (`<`, `<=`, `>`, `>=`). Note that there is no inequality (`!=`) operator. You can prepend the `NOT` operator to an expression to negate it. * A date field value must be written in `yyyy-mm-dd` form. Fields with date and time use the RFC3339 time format. Leading zeros are required for one-digit months and days. The valid relational operators for date fields are the equality operator (`=`) , along with the less than/greater than operators (`<`, `<=`, `>`, `>=`). Note that there is no inequality (`!=`) operator. You can prepend the `NOT` operator to an expression to negate it. * Multiple field query expressions can be combined in one query by adding `AND` or `OR` operators between the expressions. If a boolean operator appears within a quoted string, it is not treated as special, it's just another part of the character string to be matched. You can prepend the `NOT` operator to an expression to negate it. The following fields and functions are available for filtering: * `message_type`, from the MSH-9.1 field. For example, `NOT message_type = \"ADT\"`. * `send_date` or `sendDate`, the YYYY-MM-DD date the message was sent in the dataset's time_zone, from the MSH-7 segment. For example, `send_date < \"2017-01-02\"`. * `send_time`, the timestamp when the message was sent, using the RFC3339 time format for comparisons, from the MSH-7 segment. For example, `send_time < \"2017-01-02T00:00:00-05:00\"`. * `create_time`, the timestamp when the message was created in the HL7v2 store. Use the RFC3339 time format for comparisons. For example, `create_time < \"2017-01-02T00:00:00-05:00\"`. * `send_facility`, the care center that the message came from, from the MSH-4 segment. For example, `send_facility = \"ABC\"`. * `PatientId(value, type)`, which matches if the message lists a patient having an ID of the given value and type in the PID-2, PID-3, or PID-4 segments. For example, `PatientId(\"123456\", \"MRN\")`. * `labels.x`, a string value of the label with key `x` as set using the Message.labels map. For example, `labels.\"priority\"=\"high\"`. The operator `:*` can be used to assert the existence of a label. For example, `labels.\"priority\":*`.", "type": "string" }, "pubsubTopic": { diff --git a/discovery/healthcare-v1beta1.json b/discovery/healthcare-v1beta1.json index 5e39dd0049a..049d9b257ee 100644 --- a/discovery/healthcare-v1beta1.json +++ b/discovery/healthcare-v1beta1.json @@ -4601,7 +4601,7 @@ ], "parameters": { "filter": { - "description": "Restricts messages returned to those matching a filter. The following syntax is available: * A string field value can be written as text inside quotation marks, for example `\"query text\"`. The only valid relational operation for text fields is equality (`=`), where text is searched within the field, rather than having the field be equal to the text. For example, `\"Comment = great\"` returns messages with `great` in the comment field. * A number field value can be written as an integer, a decimal, or an exponential. The valid relational operators for number fields are the equality operator (`=`), along with the less than/greater than operators (`<`, `<=`, `>`, `>=`). Note that there is no inequality (`!=`) operator. You can prepend the `NOT` operator to an expression to negate it. * A date field value must be written in `yyyy-mm-dd` form. Fields with date and time use the RFC3339 time format. Leading zeros are required for one-digit months and days. The valid relational operators for date fields are the equality operator (`=`) , along with the less than/greater than operators (`<`, `<=`, `>`, `>=`). Note that there is no inequality (`!=`) operator. You can prepend the `NOT` operator to an expression to negate it. * Multiple field query expressions can be combined in one query by adding `AND` or `OR` operators between the expressions. If a boolean operator appears within a quoted string, it is not treated as special, it's just another part of the character string to be matched. You can prepend the `NOT` operator to an expression to negate it. Fields/functions available for filtering are: * `message_type`, from the MSH-9.1 field. For example, `NOT message_type = \"ADT\"`. * `send_date` or `sendDate`, the YYYY-MM-DD date the message was sent in the dataset's time_zone, from the MSH-7 segment. For example, `send_date < \"2017-01-02\"`. * `send_time`, the timestamp when the message was sent, using the RFC3339 time format for comparisons, from the MSH-7 segment. For example, `send_time < \"2017-01-02T00:00:00-05:00\"`. * `send_facility`, the care center that the message came from, from the MSH-4 segment. For example, `send_facility = \"ABC\"`. * `PatientId(value, type)`, which matches if the message lists a patient having an ID of the given value and type in the PID-2, PID-3, or PID-4 segments. For example, `PatientId(\"123456\", \"MRN\")`. * `labels.x`, a string value of the label with key `x` as set using the Message.labels map. For example, `labels.\"priority\"=\"high\"`. The operator `:*` can be used to assert the existence of a label. For example, `labels.\"priority\":*`.", + "description": "Restricts messages returned to those matching a filter. The following syntax is available: * A string field value can be written as text inside quotation marks, for example `\"query text\"`. The only valid relational operation for text fields is equality (`=`), where text is searched within the field, rather than having the field be equal to the text. For example, `\"Comment = great\"` returns messages with `great` in the comment field. * A number field value can be written as an integer, a decimal, or an exponential. The valid relational operators for number fields are the equality operator (`=`), along with the less than/greater than operators (`<`, `<=`, `>`, `>=`). Note that there is no inequality (`!=`) operator. You can prepend the `NOT` operator to an expression to negate it. * A date field value must be written in `yyyy-mm-dd` form. Fields with date and time use the RFC3339 time format. Leading zeros are required for one-digit months and days. The valid relational operators for date fields are the equality operator (`=`) , along with the less than/greater than operators (`<`, `<=`, `>`, `>=`). Note that there is no inequality (`!=`) operator. You can prepend the `NOT` operator to an expression to negate it. * Multiple field query expressions can be combined in one query by adding `AND` or `OR` operators between the expressions. If a boolean operator appears within a quoted string, it is not treated as special, it's just another part of the character string to be matched. You can prepend the `NOT` operator to an expression to negate it. Fields/functions available for filtering are: * `message_type`, from the MSH-9.1 field. For example, `NOT message_type = \"ADT\"`. * `send_date` or `sendDate`, the YYYY-MM-DD date the message was sent in the dataset's time_zone, from the MSH-7 segment. For example, `send_date < \"2017-01-02\"`. * `send_time`, the timestamp when the message was sent, using the RFC3339 time format for comparisons, from the MSH-7 segment. For example, `send_time < \"2017-01-02T00:00:00-05:00\"`. * `create_time`, the timestamp when the message was created in the HL7v2 store. Use the RFC3339 time format for comparisons. For example, `create_time < \"2017-01-02T00:00:00-05:00\"`. * `send_facility`, the care center that the message came from, from the MSH-4 segment. For example, `send_facility = \"ABC\"`. * `PatientId(value, type)`, which matches if the message lists a patient having an ID of the given value and type in the PID-2, PID-3, or PID-4 segments. For example, `PatientId(\"123456\", \"MRN\")`. * `labels.x`, a string value of the label with key `x` as set using the Message.labels map. For example, `labels.\"priority\"=\"high\"`. The operator `:*` can be used to assert the existence of a label. For example, `labels.\"priority\":*`.", "location": "query", "type": "string" }, @@ -4837,7 +4837,7 @@ } } }, - "revision": "20210217", + "revision": "20210301", "rootUrl": "https://healthcare.googleapis.com/", "schemas": { "ActivateConsentRequest": { @@ -6521,7 +6521,7 @@ "id": "Hl7V2NotificationConfig", "properties": { "filter": { - "description": "Restricts notifications sent for messages matching a filter. If this is empty, all messages are matched. The following syntax is available: * A string field value can be written as text inside quotation marks, for example `\"query text\"`. The only valid relational operation for text fields is equality (`=`), where text is searched within the field, rather than having the field be equal to the text. For example, `\"Comment = great\"` returns messages with `great` in the comment field. * A number field value can be written as an integer, a decimal, or an exponential. The valid relational operators for number fields are the equality operator (`=`), along with the less than/greater than operators (`<`, `<=`, `>`, `>=`). Note that there is no inequality (`!=`) operator. You can prepend the `NOT` operator to an expression to negate it. * A date field value must be written in `yyyy-mm-dd` form. Fields with date and time use the RFC3339 time format. Leading zeros are required for one-digit months and days. The valid relational operators for date fields are the equality operator (`=`) , along with the less than/greater than operators (`<`, `<=`, `>`, `>=`). Note that there is no inequality (`!=`) operator. You can prepend the `NOT` operator to an expression to negate it. * Multiple field query expressions can be combined in one query by adding `AND` or `OR` operators between the expressions. If a boolean operator appears within a quoted string, it is not treated as special, it's just another part of the character string to be matched. You can prepend the `NOT` operator to an expression to negate it. Fields/functions available for filtering are: * `message_type`, from the MSH-9.1 field. For example, `NOT message_type = \"ADT\"`. * `send_date` or `sendDate`, the YYYY-MM-DD date the message was sent in the dataset's time_zone, from the MSH-7 segment. For example, `send_date < \"2017-01-02\"`. * `send_time`, the timestamp when the message was sent, using the RFC3339 time format for comparisons, from the MSH-7 segment. For example, `send_time < \"2017-01-02T00:00:00-05:00\"`. * `send_facility`, the care center that the message came from, from the MSH-4 segment. For example, `send_facility = \"ABC\"`. * `PatientId(value, type)`, which matches if the message lists a patient having an ID of the given value and type in the PID-2, PID-3, or PID-4 segments. For example, `PatientId(\"123456\", \"MRN\")`. * `labels.x`, a string value of the label with key `x` as set using the Message.labels map. For example, `labels.\"priority\"=\"high\"`. The operator `:*` can be used to assert the existence of a label. For example, `labels.\"priority\":*`.", + "description": "Restricts notifications sent for messages matching a filter. If this is empty, all messages are matched. The following syntax is available: * A string field value can be written as text inside quotation marks, for example `\"query text\"`. The only valid relational operation for text fields is equality (`=`), where text is searched within the field, rather than having the field be equal to the text. For example, `\"Comment = great\"` returns messages with `great` in the comment field. * A number field value can be written as an integer, a decimal, or an exponential. The valid relational operators for number fields are the equality operator (`=`), along with the less than/greater than operators (`<`, `<=`, `>`, `>=`). Note that there is no inequality (`!=`) operator. You can prepend the `NOT` operator to an expression to negate it. * A date field value must be written in `yyyy-mm-dd` form. Fields with date and time use the RFC3339 time format. Leading zeros are required for one-digit months and days. The valid relational operators for date fields are the equality operator (`=`) , along with the less than/greater than operators (`<`, `<=`, `>`, `>=`). Note that there is no inequality (`!=`) operator. You can prepend the `NOT` operator to an expression to negate it. * Multiple field query expressions can be combined in one query by adding `AND` or `OR` operators between the expressions. If a boolean operator appears within a quoted string, it is not treated as special, it's just another part of the character string to be matched. You can prepend the `NOT` operator to an expression to negate it. Fields/functions available for filtering are: * `message_type`, from the MSH-9.1 field. For example, `NOT message_type = \"ADT\"`. * `send_date` or `sendDate`, the YYYY-MM-DD date the message was sent in the dataset's time_zone, from the MSH-7 segment. For example, `send_date < \"2017-01-02\"`. * `send_time`, the timestamp when the message was sent, using the RFC3339 time format for comparisons, from the MSH-7 segment. For example, `send_time < \"2017-01-02T00:00:00-05:00\"`. * `create_time`, the timestamp when the message was created in the HL7v2 store. Use the RFC3339 time format for comparisons. For example, `create_time < \"2017-01-02T00:00:00-05:00\"`. * `send_facility`, the care center that the message came from, from the MSH-4 segment. For example, `send_facility = \"ABC\"`. * `PatientId(value, type)`, which matches if the message lists a patient having an ID of the given value and type in the PID-2, PID-3, or PID-4 segments. For example, `PatientId(\"123456\", \"MRN\")`. * `labels.x`, a string value of the label with key `x` as set using the Message.labels map. For example, `labels.\"priority\"=\"high\"`. The operator `:*` can be used to assert the existence of a label. For example, `labels.\"priority\":*`.", "type": "string" }, "pubsubTopic": { diff --git a/discovery/homegraph-v1.json b/discovery/homegraph-v1.json index dce64756994..20f88a5450a 100644 --- a/discovery/homegraph-v1.json +++ b/discovery/homegraph-v1.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/homegraph": { - "description": "New Service: https://www.googleapis.com/auth/homegraph" + "description": "Private Service: https://www.googleapis.com/auth/homegraph" } } } @@ -234,7 +234,7 @@ } } }, - "revision": "20210226", + "revision": "20210310", "rootUrl": "https://homegraph.googleapis.com/", "schemas": { "AgentDeviceId": { diff --git a/discovery/iam-v1.json b/discovery/iam-v1.json index 844512ce54f..e4a35beaf87 100644 --- a/discovery/iam-v1.json +++ b/discovery/iam-v1.json @@ -1287,7 +1287,7 @@ ] }, "signBlob": { - "description": "**Note:** This method is deprecated and will stop working on July 1, 2021. Use the [`signBlob`](https://cloud.google.com/iam/help/rest-credentials/v1/projects.serviceAccounts/signBlob) method in the IAM Service Account Credentials API instead. If you currently use this method, see the [migration guide](https://cloud.google.com/iam/help/credentials/migrate-api) for instructions. Signs a blob using the system-managed private key for a ServiceAccount.", + "description": "**Note:** This method is deprecated. Use the [`signBlob`](https://cloud.google.com/iam/help/rest-credentials/v1/projects.serviceAccounts/signBlob) method in the IAM Service Account Credentials API instead. If you currently use this method, see the [migration guide](https://cloud.google.com/iam/help/credentials/migrate-api) for instructions. Signs a blob using the system-managed private key for a ServiceAccount.", "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:signBlob", "httpMethod": "POST", "id": "iam.projects.serviceAccounts.signBlob", @@ -1315,7 +1315,7 @@ ] }, "signJwt": { - "description": "**Note:** This method is deprecated and will stop working on July 1, 2021. Use the [`signJwt`](https://cloud.google.com/iam/help/rest-credentials/v1/projects.serviceAccounts/signJwt) method in the IAM Service Account Credentials API instead. If you currently use this method, see the [migration guide](https://cloud.google.com/iam/help/credentials/migrate-api) for instructions. Signs a JSON Web Token (JWT) using the system-managed private key for a ServiceAccount.", + "description": "**Note:** This method is deprecated. Use the [`signJwt`](https://cloud.google.com/iam/help/rest-credentials/v1/projects.serviceAccounts/signJwt) method in the IAM Service Account Credentials API instead. If you currently use this method, see the [migration guide](https://cloud.google.com/iam/help/credentials/migrate-api) for instructions. Signs a JSON Web Token (JWT) using the system-managed private key for a ServiceAccount.", "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}:signJwt", "httpMethod": "POST", "id": "iam.projects.serviceAccounts.signJwt", @@ -1696,7 +1696,7 @@ } } }, - "revision": "20210218", + "revision": "20210311", "rootUrl": "https://iam.googleapis.com/", "schemas": { "AdminAuditData": { diff --git a/discovery/index.json b/discovery/index.json index 2d1e368947a..542e744e882 100644 --- a/discovery/index.json +++ b/discovery/index.json @@ -307,12 +307,12 @@ }, { "kind": "discovery#directoryItem", - "id": "analyticsdata:v1alpha", + "id": "analyticsdata:v1beta", "name": "analyticsdata", - "version": "v1alpha", + "version": "v1beta", "title": "Google Analytics Data API", "description": "Accesses report data in Google Analytics.", - "discoveryRestUrl": "https://analyticsdata.googleapis.com/$discovery/rest?version=v1alpha", + "discoveryRestUrl": "https://analyticsdata.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" @@ -835,7 +835,7 @@ "name": "chromemanagement", "version": "v1", "title": "Chrome Management API", - "description": "The Chrome Management API is a suite of services that allows Chrome administrators to view, manage and gain insights on their Chrome OS The Chrome Management API is a suite of services that allows GSuite domain administrators to view, manage and gain insights on their Chrome OS and Chrome Browser devices and users.", + "description": "The Chrome Management API is a suite of services that allows Chrome administrators to view, manage and gain insights on their Chrome OS and Chrome Browser devices.", "discoveryRestUrl": "https://chromemanagement.googleapis.com/$discovery/rest?version=v1", "icons": { "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", @@ -1039,6 +1039,21 @@ "documentationLink": "https://cloud.google.com/cloud-build/docs/", "preferred": false }, + { + "kind": "discovery#directoryItem", + "id": "cloudbuild:v1beta1", + "name": "cloudbuild", + "version": "v1beta1", + "title": "Cloud Build API", + "description": "Creates and manages builds on Google Cloud Platform.", + "discoveryRestUrl": "https://cloudbuild.googleapis.com/$discovery/rest?version=v1beta1", + "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/cloud-build/docs/", + "preferred": false + }, { "kind": "discovery#directoryItem", "id": "cloudbuild:v1", @@ -1309,21 +1324,6 @@ "documentationLink": "https://developers.google.com/cloud-search/docs/guides/", "preferred": true }, - { - "kind": "discovery#directoryItem", - "id": "cloudshell:v1alpha1", - "name": "cloudshell", - "version": "v1alpha1", - "title": "Cloud Shell API", - "description": "Allows users to start, configure, and connect to interactive shell sessions running in the cloud.", - "discoveryRestUrl": "https://cloudshell.googleapis.com/$discovery/rest?version=v1alpha1", - "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/shell/docs/", - "preferred": false - }, { "kind": "discovery#directoryItem", "id": "cloudshell:v1", @@ -1700,6 +1700,21 @@ "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" }, "documentationLink": "https://cloud.google.com/database-migration/", + "preferred": false + }, + { + "kind": "discovery#directoryItem", + "id": "datamigration:v1", + "name": "datamigration", + "version": "v1", + "title": "Database Migration API", + "description": "Manage Cloud Database Migration Service resources on Google Cloud Platform.", + "discoveryRestUrl": "https://datamigration.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/database-migration/", "preferred": true }, { @@ -2394,6 +2409,21 @@ "documentationLink": "https://firebase.google.com/docs/storage/security", "preferred": true }, + { + "kind": "discovery#directoryItem", + "id": "firebasestorage:v1beta", + "name": "firebasestorage", + "version": "v1beta", + "title": "Cloud Storage for Firebase API", + "description": "The Cloud Storage for Firebase API enables programmatic management of Cloud Storage buckets for use in Firebase projects", + "discoveryRestUrl": "https://firebasestorage.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://firebase.google.com/docs/storage", + "preferred": true + }, { "kind": "discovery#directoryItem", "id": "firestore:v1beta1", @@ -2574,6 +2604,81 @@ "documentationLink": "https://cloud.google.com/genomics", "preferred": true }, + { + "kind": "discovery#directoryItem", + "id": "gkehub:v1alpha", + "name": "gkehub", + "version": "v1alpha", + "title": "GKE Hub", + "description": "", + "discoveryRestUrl": "https://gkehub.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/anthos/multicluster-management/connect/registering-a-cluster", + "preferred": false + }, + { + "kind": "discovery#directoryItem", + "id": "gkehub:v1alpha2", + "name": "gkehub", + "version": "v1alpha2", + "title": "GKE Hub", + "description": "", + "discoveryRestUrl": "https://gkehub.googleapis.com/$discovery/rest?version=v1alpha2", + "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/anthos/multicluster-management/connect/registering-a-cluster", + "preferred": false + }, + { + "kind": "discovery#directoryItem", + "id": "gkehub:v1beta", + "name": "gkehub", + "version": "v1beta", + "title": "GKE Hub", + "description": "", + "discoveryRestUrl": "https://gkehub.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/anthos/multicluster-management/connect/registering-a-cluster", + "preferred": false + }, + { + "kind": "discovery#directoryItem", + "id": "gkehub:v1beta1", + "name": "gkehub", + "version": "v1beta1", + "title": "GKE Hub", + "description": "", + "discoveryRestUrl": "https://gkehub.googleapis.com/$discovery/rest?version=v1beta1", + "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/anthos/multicluster-management/connect/registering-a-cluster", + "preferred": false + }, + { + "kind": "discovery#directoryItem", + "id": "gkehub:v1", + "name": "gkehub", + "version": "v1", + "title": "GKE Hub", + "description": "", + "discoveryRestUrl": "https://gkehub.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/anthos/multicluster-management/connect/registering-a-cluster", + "preferred": true + }, { "kind": "discovery#directoryItem", "id": "gmail:v1", @@ -3235,6 +3340,21 @@ "documentationLink": "https://cloud.google.com/container-analysis/docs/on-demand-scanning/", "preferred": true }, + { + "kind": "discovery#directoryItem", + "id": "orgpolicy:v2", + "name": "orgpolicy", + "version": "v2", + "title": "Organization Policy API", + "description": "The Org Policy API allows users to configure governance ruleson their GCP resources across the Cloud Resource Hierarchy.", + "discoveryRestUrl": "https://orgpolicy.googleapis.com/$discovery/rest?version=v2", + "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/resource-manager/docs/organization-policy/understanding-constraints", + "preferred": true + }, { "kind": "discovery#directoryItem", "id": "osconfig:v1beta", diff --git a/discovery/jobs-v4.json b/discovery/jobs-v4.json index 0b6e8762e2c..0b47fe81271 100644 --- a/discovery/jobs-v4.json +++ b/discovery/jobs-v4.json @@ -110,6 +110,36 @@ "resources": { "projects": { "resources": { + "operations": { + "methods": { + "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": "v4/projects/{projectsId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "jobs.projects.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^projects/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v4/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/jobs" + ] + } + } + }, "tenants": { "methods": { "completeQuery": { @@ -873,7 +903,7 @@ } } }, - "revision": "20210226", + "revision": "20210309", "rootUrl": "https://jobs.googleapis.com/", "schemas": { "ApplicationInfo": { diff --git a/discovery/libraryagent-v1.json b/discovery/libraryagent-v1.json index f619a5ed31f..d57389c5af4 100644 --- a/discovery/libraryagent-v1.json +++ b/discovery/libraryagent-v1.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" } } } @@ -279,7 +279,7 @@ } } }, - "revision": "20200801", + "revision": "20210322", "rootUrl": "https://libraryagent.googleapis.com/", "schemas": { "GoogleExampleLibraryagentV1Book": { diff --git a/discovery/lifesciences-v2beta.json b/discovery/lifesciences-v2beta.json index 44be5681409..0973920cbb8 100644 --- a/discovery/lifesciences-v2beta.json +++ b/discovery/lifesciences-v2beta.json @@ -144,7 +144,7 @@ ], "parameters": { "filter": { - "description": "The standard list 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" }, @@ -156,13 +156,13 @@ "type": "string" }, "pageSize": { - "description": "The standard list page size.", + "description": "The maximum number of results to return. If not set, the service will select a default.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "The standard list page token.", + "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" } @@ -312,7 +312,7 @@ } } }, - "revision": "20210213", + "revision": "20210314", "rootUrl": "https://lifesciences.googleapis.com/", "schemas": { "Accelerator": { diff --git a/discovery/logging-v2.json b/discovery/logging-v2.json index cdb6a1c7b1d..cc8f3ebb70c 100644 --- a/discovery/logging-v2.json +++ b/discovery/logging-v2.json @@ -386,7 +386,7 @@ ], "parameters": { "filter": { - "description": "The standard list 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" }, @@ -398,13 +398,13 @@ "type": "string" }, "pageSize": { - "description": "The standard list page size.", + "description": "The maximum number of results to return. If not set, the service will select a default.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "The standard list page token.", + "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" } @@ -1449,7 +1449,7 @@ ], "parameters": { "filter": { - "description": "The standard list 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" }, @@ -1461,13 +1461,13 @@ "type": "string" }, "pageSize": { - "description": "The standard list page size.", + "description": "The maximum number of results to return. If not set, the service will select a default.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "The standard list page token.", + "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" } @@ -2178,7 +2178,7 @@ ], "parameters": { "filter": { - "description": "The standard list 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" }, @@ -2190,13 +2190,13 @@ "type": "string" }, "pageSize": { - "description": "The standard list page size.", + "description": "The maximum number of results to return. If not set, the service will select a default.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "The standard list page token.", + "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" } @@ -2956,7 +2956,7 @@ ], "parameters": { "filter": { - "description": "The standard list 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" }, @@ -2968,13 +2968,13 @@ "type": "string" }, "pageSize": { - "description": "The standard list page size.", + "description": "The maximum number of results to return. If not set, the service will select a default.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "The standard list page token.", + "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" } @@ -3848,7 +3848,7 @@ ], "parameters": { "filter": { - "description": "The standard list 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" }, @@ -3860,13 +3860,13 @@ "type": "string" }, "pageSize": { - "description": "The standard list page size.", + "description": "The maximum number of results to return. If not set, the service will select a default.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "The standard list page token.", + "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" } @@ -4934,7 +4934,7 @@ } } }, - "revision": "20210225", + "revision": "20210312", "rootUrl": "https://logging.googleapis.com/", "schemas": { "BigQueryOptions": { diff --git a/discovery/managedidentities-v1.json b/discovery/managedidentities-v1.json index 085b4d6c5b3..de1db61108a 100644 --- a/discovery/managedidentities-v1.json +++ b/discovery/managedidentities-v1.json @@ -703,7 +703,7 @@ } } }, - "revision": "20210218", + "revision": "20210305", "rootUrl": "https://managedidentities.googleapis.com/", "schemas": { "AttachTrustRequest": { @@ -1170,7 +1170,7 @@ "id": "GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSchedule", "properties": { "canReschedule": { - "description": "Can this scheduled update be rescheduled? By default, it's true and API needs to do explicitly check whether it's set, if it's set as false explicitly, it's false", + "description": "This field will be deprecated, and will be always set to true since reschedule can happen multiple times now.", "type": "boolean" }, "endTime": { diff --git a/discovery/managedidentities-v1alpha1.json b/discovery/managedidentities-v1alpha1.json index d0748814cc4..345b1df9806 100644 --- a/discovery/managedidentities-v1alpha1.json +++ b/discovery/managedidentities-v1alpha1.json @@ -219,7 +219,7 @@ ], "parameters": { "domainName": { - "description": "The fully qualified domain name. e.g. mydomain.myorganization.com, with the following restrictions: * Must contain only lowercase letters, numbers, periods and hyphens. * Must start with a letter. * Must contain between 2-64 characters. * Must end with a number or a letter. * Must not start with period. * Must be unique within the project. * First segement length (mydomain form example above) shouldn't exceed 15 chars. * The last segment cannot be fully numeric.", + "description": "The fully qualified domain name. e.g. mydomain.myorganization.com, with the following restrictions: * Must contain only lowercase letters, numbers, periods and hyphens. * Must start with a letter. * Must contain between 2-64 characters. * Must end with a number or a letter. * Must not start with period. * Must be unique within the project. * First segment length (mydomain form example above) shouldn't exceed 15 chars. * The last segment cannot be fully numeric.", "location": "query", "type": "string" }, @@ -772,6 +772,97 @@ ] } } + }, + "peerings": { + "methods": { + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1alpha1/projects/{projectsId}/locations/global/peerings/{peeringsId}:getIamPolicy", + "httpMethod": "GET", + "id": "managedidentities.projects.locations.global.peerings.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "options.requestedPolicyVersion": { + "description": "Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "location": "query", + "type": "integer" + }, + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/global/peerings/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha1/{+resource}:getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + "flatPath": "v1alpha1/projects/{projectsId}/locations/global/peerings/{peeringsId}:setIamPolicy", + "httpMethod": "POST", + "id": "managedidentities.projects.locations.global.peerings.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/global/peerings/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha1/{+resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "flatPath": "v1alpha1/projects/{projectsId}/locations/global/peerings/{peeringsId}:testIamPermissions", + "httpMethod": "POST", + "id": "managedidentities.projects.locations.global.peerings.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/global/peerings/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha1/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } } } } @@ -780,7 +871,7 @@ } } }, - "revision": "20210218", + "revision": "20210305", "rootUrl": "https://managedidentities.googleapis.com/", "schemas": { "AttachTrustRequest": { @@ -1243,7 +1334,7 @@ "id": "GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSchedule", "properties": { "canReschedule": { - "description": "Can this scheduled update be rescheduled? By default, it's true and API needs to do explicitly check whether it's set, if it's set as false explicitly, it's false", + "description": "This field will be deprecated, and will be always set to true since reschedule can happen multiple times now.", "type": "boolean" }, "endTime": { diff --git a/discovery/managedidentities-v1beta1.json b/discovery/managedidentities-v1beta1.json index 73a46a82831..49db8289466 100644 --- a/discovery/managedidentities-v1beta1.json +++ b/discovery/managedidentities-v1beta1.json @@ -219,7 +219,7 @@ ], "parameters": { "domainName": { - "description": "Required. A domain name, e.g. mydomain.myorg.com, with the following restrictions: * Must contain only lowercase letters, numbers, periods and hyphens. * Must start with a letter. * Must contain between 2-64 characters. * Must end with a number or a letter. * Must not start with period. * First segement length (mydomain form example above) shouldn't exceed 15 chars. * The last segment cannot be fully numeric. * Must be unique within the customer project.", + "description": "Required. A domain name, e.g. mydomain.myorg.com, with the following restrictions: * Must contain only lowercase letters, numbers, periods and hyphens. * Must start with a letter. * Must contain between 2-64 characters. * Must end with a number or a letter. * Must not start with period. * First segment length (mydomain form example above) shouldn't exceed 15 chars. * The last segment cannot be fully numeric. * Must be unique within the customer project.", "location": "query", "type": "string" }, @@ -772,6 +772,97 @@ ] } } + }, + "peerings": { + "methods": { + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1beta1/projects/{projectsId}/locations/global/peerings/{peeringsId}:getIamPolicy", + "httpMethod": "GET", + "id": "managedidentities.projects.locations.global.peerings.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "options.requestedPolicyVersion": { + "description": "Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "location": "query", + "type": "integer" + }, + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/global/peerings/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+resource}:getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + "flatPath": "v1beta1/projects/{projectsId}/locations/global/peerings/{peeringsId}:setIamPolicy", + "httpMethod": "POST", + "id": "managedidentities.projects.locations.global.peerings.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/global/peerings/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "flatPath": "v1beta1/projects/{projectsId}/locations/global/peerings/{peeringsId}:testIamPermissions", + "httpMethod": "POST", + "id": "managedidentities.projects.locations.global.peerings.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/global/peerings/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } } } } @@ -780,7 +871,7 @@ } } }, - "revision": "20210218", + "revision": "20210305", "rootUrl": "https://managedidentities.googleapis.com/", "schemas": { "AttachTrustRequest": { @@ -1252,7 +1343,7 @@ "id": "GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSchedule", "properties": { "canReschedule": { - "description": "Can this scheduled update be rescheduled? By default, it's true and API needs to do explicitly check whether it's set, if it's set as false explicitly, it's false", + "description": "This field will be deprecated, and will be always set to true since reschedule can happen multiple times now.", "type": "boolean" }, "endTime": { @@ -1805,7 +1896,7 @@ "type": "string" }, "sqlInstance": { - "description": "The full resource name of an integrated sql instance Reference to: http://google3/google/cloud/sql/v1/cloud_sql_resources.proto?l=351&rcl=354416019", + "description": "The full resource name of an integrated sql instance", "type": "string" }, "state": { diff --git a/discovery/metastore-v1alpha.json b/discovery/metastore-v1alpha.json index 00a198d0001..28aac7f5ddf 100644 --- a/discovery/metastore-v1alpha.json +++ b/discovery/metastore-v1alpha.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" } } } @@ -144,7 +144,7 @@ ], "parameters": { "filter": { - "description": "The standard list 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" }, @@ -156,13 +156,13 @@ "type": "string" }, "pageSize": { - "description": "The standard list page size.", + "description": "The maximum number of results to return. If not set, the service will select a default.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "The standard list page token.", + "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" } @@ -284,7 +284,7 @@ ], "parameters": { "parent": { - "description": "Required. The relative resource name of the location in which to create a metastore service, in the following form:\"projects/{project_number}/locations/{location_id}\".", + "description": "Required. The relative resource name of the location in which to create a metastore service, in the following form:projects/{project_number}/locations/{location_id}.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, @@ -322,7 +322,7 @@ ], "parameters": { "name": { - "description": "Required. The relative resource name of the metastore service to delete, in the following form:\"projects/{project_number}/locations/{location_id}/services/{service_id}\".", + "description": "Required. The relative resource name of the metastore service to delete, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", "required": true, @@ -352,7 +352,7 @@ ], "parameters": { "service": { - "description": "Required. The relative resource name of the metastore service to run export, in the following form:\"projects/{project_id}/locations/{location_id}/services/{service_id}", + "description": "Required. The relative resource name of the metastore service to run export, in the following form:projects/{project_id}/locations/{location_id}/services/{service_id}.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", "required": true, @@ -380,7 +380,7 @@ ], "parameters": { "name": { - "description": "Required. The relative resource name of the metastore service to retrieve, in the following form:\"projects/{project_number}/locations/{location_id}/services/{service_id}\".", + "description": "Required. The relative resource name of the metastore service to retrieve, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", "required": true, @@ -441,7 +441,7 @@ "type": "string" }, "orderBy": { - "description": "Optional. Specify the ordering of results as described in Sorting Order. If not specified, the results will be sorted in the default order.", + "description": "Optional. Specify the ordering of results as described in Sorting Order (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not specified, the results will be sorted in the default order.", "location": "query", "type": "string" }, @@ -457,7 +457,7 @@ "type": "string" }, "parent": { - "description": "Required. The relative resource name of the location of metastore services to list, in the following form:\"projects/{project_number}/locations/{location_id}\".", + "description": "Required. The relative resource name of the location of metastore services to list, in the following form:projects/{project_number}/locations/{location_id}.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, @@ -482,7 +482,7 @@ ], "parameters": { "name": { - "description": "Immutable. The relative resource name of the metastore service, of the form:\"projects/{project_number}/locations/{location_id}/services/{service_id}\".", + "description": "Immutable. The relative resource name of the metastore service, of the form:projects/{project_number}/locations/{location_id}/services/{service_id}.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", "required": true, @@ -586,7 +586,7 @@ "type": "string" }, "parent": { - "description": "Required. The relative resource name of the service in which to create a metastore import, in the following form:\"projects/{project_number}/locations/{location_id}/services/{service_id}\"", + "description": "Required. The relative resource name of the service in which to create a metastore import, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", "required": true, @@ -619,7 +619,7 @@ ], "parameters": { "name": { - "description": "Required. The relative resource name of the metadata import to retrieve, in the following form:\"projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}\".", + "description": "Required. The relative resource name of the metadata import to retrieve, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+/metadataImports/[^/]+$", "required": true, @@ -649,7 +649,7 @@ "type": "string" }, "orderBy": { - "description": "Optional. Specify the ordering of results as described in Sorting Order. If not specified, the results will be sorted in the default order.", + "description": "Optional. Specify the ordering of results as described in Sorting Order (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not specified, the results will be sorted in the default order.", "location": "query", "type": "string" }, @@ -665,7 +665,7 @@ "type": "string" }, "parent": { - "description": "Required. The relative resource name of the service whose metadata imports to list, in the following form:\"projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports\".", + "description": "Required. The relative resource name of the service whose metadata imports to list, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", "required": true, @@ -690,7 +690,7 @@ ], "parameters": { "name": { - "description": "Immutable. The relative resource name of the metadata import, of the form:\"projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}\".", + "description": "Immutable. The relative resource name of the metadata import, of the form:projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+/metadataImports/[^/]+$", "required": true, @@ -728,7 +728,7 @@ } } }, - "revision": "20210226", + "revision": "20210318", "rootUrl": "https://metastore.googleapis.com/", "schemas": { "AuditConfig": { @@ -801,6 +801,17 @@ }, "type": "object" }, + "DataCatalogConfig": { + "description": "Specifies how metastore metadata should be integrated with the Data Catalog service.", + "id": "DataCatalogConfig", + "properties": { + "enabled": { + "description": "Defines whether the metastore metadata should be synced to Data Catalog. The default value is to disable syncing metastore metadata to Data Catalog.", + "type": "boolean" + } + }, + "type": "object" + }, "DatabaseDump": { "description": "A specification of the location of and metadata about a database dump from a relational database management system.", "id": "DatabaseDump", @@ -867,7 +878,7 @@ "type": "string" }, "destinationGcsFolder": { - "description": "Required. A Cloud Storage URI of a folder that metadata are exported to, in the format gs:///. A sub-folder containing exported files will be created below it.", + "description": "A Cloud Storage URI of a folder, in the format gs:///. A sub-folder containing exported files will be created below it.", "type": "string" }, "requestId": { @@ -913,7 +924,7 @@ }, "kerberosConfig": { "$ref": "KerberosConfig", - "description": "Information used to configure the Hive metastore service as a service principal in a Kerberos realm. To disable Kerberos, use the UpdateService method and specify this field's path (\"hive_metastore_config.kerberos_config\") in the request's update_mask while omitting this field from the request's service." + "description": "Information used to configure the Hive metastore service as a service principal in a Kerberos realm. To disable Kerberos, use the UpdateService method and specify this field's path (hive_metastore_config.kerberos_config) in the request's update_mask while omitting this field from the request's service." }, "version": { "description": "Immutable. The Hive metastore schema version.", @@ -950,7 +961,7 @@ "type": "string" }, "principal": { - "description": "A Kerberos principal that exists in the both the keytab the KDC to authenticate as. A typical principal is of the form \"primary/instance@REALM\", but there is no exact format.", + "description": "A Kerberos principal that exists in the both the keytab the KDC to authenticate as. A typical principal is of the form primary/instance@REALM, but there is no exact format.", "type": "string" } }, @@ -1146,7 +1157,7 @@ "type": "string" }, "destinationGcsUri": { - "description": "Output only. A Cloud Storage URI of a folder that metadata are exported to, in the form of gs:////, where ` is automatically generated.", + "description": "Output only. A Cloud Storage URI of a folder that metadata are exported to, in the form of gs:////, where is automatically generated.", "readOnly": true, "type": "string" }, @@ -1203,7 +1214,7 @@ "type": "string" }, "name": { - "description": "Immutable. The relative resource name of the metadata import, of the form:\"projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}\".", + "description": "Immutable. The relative resource name of the metadata import, of the form:projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}.", "type": "string" }, "state": { @@ -1237,7 +1248,12 @@ "MetadataIntegration": { "description": "Specifies how metastore metadata should be integrated with external services.", "id": "MetadataIntegration", - "properties": {}, + "properties": { + "dataCatalogConfig": { + "$ref": "DataCatalogConfig", + "description": "The integration config for the Data Catalog service." + } + }, "type": "object" }, "MetadataManagementActivity": { @@ -1334,7 +1350,7 @@ "id": "Restore", "properties": { "backup": { - "description": "Output only. The relative resource name of the metastore service backup to restore from, in the following form:projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}", + "description": "Output only. The relative resource name of the metastore service backup to restore from, in the following form:projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}.", "readOnly": true, "type": "string" }, @@ -1397,7 +1413,7 @@ "id": "Secret", "properties": { "cloudSecret": { - "description": "The relative resource name of a Secret Manager secret version, in the following form:\"projects/{project_number}/secrets/{secret_id}/versions/{version_id}\".", + "description": "The relative resource name of a Secret Manager secret version, in the following form:projects/{project_number}/secrets/{secret_id}/versions/{version_id}.", "type": "string" } }, @@ -1448,11 +1464,11 @@ "readOnly": true }, "name": { - "description": "Immutable. The relative resource name of the metastore service, of the form:\"projects/{project_number}/locations/{location_id}/services/{service_id}\".", + "description": "Immutable. The relative resource name of the metastore service, of the form:projects/{project_number}/locations/{location_id}/services/{service_id}.", "type": "string" }, "network": { - "description": "Immutable. The relative resource name of the VPC network on which the instance can be accessed. It is specified in the following form:\"projects/{project_number}/global/networks/{network_id}\".", + "description": "Immutable. The relative resource name of the VPC network on which the instance can be accessed. It is specified in the following form:projects/{project_number}/global/networks/{network_id}.", "type": "string" }, "port": { @@ -1460,6 +1476,20 @@ "format": "int32", "type": "integer" }, + "releaseChannel": { + "description": "Immutable. The release channel of the service. If unspecified, defaults to STABLE.", + "enum": [ + "RELEASE_CHANNEL_UNSPECIFIED", + "CANARY", + "STABLE" + ], + "enumDescriptions": [ + "Release channel is not specified.", + "The CANARY release channel contains the newest features, which may be unstable and subject to unresolved issues with no known workarounds. Services using the CANARY release channel are not subject to any SLAs.", + "The STABLE release channel contains features that are considered stable and have been validated for production use." + ], + "type": "string" + }, "state": { "description": "Output only. The current state of the metastore service.", "enum": [ diff --git a/discovery/metastore-v1beta.json b/discovery/metastore-v1beta.json index 9dae43bae3c..78dd9603529 100644 --- a/discovery/metastore-v1beta.json +++ b/discovery/metastore-v1beta.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" } } } @@ -144,7 +144,7 @@ ], "parameters": { "filter": { - "description": "The standard list 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" }, @@ -156,13 +156,13 @@ "type": "string" }, "pageSize": { - "description": "The standard list page size.", + "description": "The maximum number of results to return. If not set, the service will select a default.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "The standard list page token.", + "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" } @@ -284,7 +284,7 @@ ], "parameters": { "parent": { - "description": "Required. The relative resource name of the location in which to create a metastore service, in the following form:\"projects/{project_number}/locations/{location_id}\".", + "description": "Required. The relative resource name of the location in which to create a metastore service, in the following form:projects/{project_number}/locations/{location_id}.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, @@ -322,7 +322,7 @@ ], "parameters": { "name": { - "description": "Required. The relative resource name of the metastore service to delete, in the following form:\"projects/{project_number}/locations/{location_id}/services/{service_id}\".", + "description": "Required. The relative resource name of the metastore service to delete, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", "required": true, @@ -352,7 +352,7 @@ ], "parameters": { "service": { - "description": "Required. The relative resource name of the metastore service to run export, in the following form:\"projects/{project_id}/locations/{location_id}/services/{service_id}", + "description": "Required. The relative resource name of the metastore service to run export, in the following form:projects/{project_id}/locations/{location_id}/services/{service_id}.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", "required": true, @@ -380,7 +380,7 @@ ], "parameters": { "name": { - "description": "Required. The relative resource name of the metastore service to retrieve, in the following form:\"projects/{project_number}/locations/{location_id}/services/{service_id}\".", + "description": "Required. The relative resource name of the metastore service to retrieve, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", "required": true, @@ -441,7 +441,7 @@ "type": "string" }, "orderBy": { - "description": "Optional. Specify the ordering of results as described in Sorting Order. If not specified, the results will be sorted in the default order.", + "description": "Optional. Specify the ordering of results as described in Sorting Order (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not specified, the results will be sorted in the default order.", "location": "query", "type": "string" }, @@ -457,7 +457,7 @@ "type": "string" }, "parent": { - "description": "Required. The relative resource name of the location of metastore services to list, in the following form:\"projects/{project_number}/locations/{location_id}\".", + "description": "Required. The relative resource name of the location of metastore services to list, in the following form:projects/{project_number}/locations/{location_id}.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, @@ -482,7 +482,7 @@ ], "parameters": { "name": { - "description": "Immutable. The relative resource name of the metastore service, of the form:\"projects/{project_number}/locations/{location_id}/services/{service_id}\".", + "description": "Immutable. The relative resource name of the metastore service, of the form:projects/{project_number}/locations/{location_id}/services/{service_id}.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", "required": true, @@ -586,7 +586,7 @@ "type": "string" }, "parent": { - "description": "Required. The relative resource name of the service in which to create a metastore import, in the following form:\"projects/{project_number}/locations/{location_id}/services/{service_id}\"", + "description": "Required. The relative resource name of the service in which to create a metastore import, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", "required": true, @@ -619,7 +619,7 @@ ], "parameters": { "name": { - "description": "Required. The relative resource name of the metadata import to retrieve, in the following form:\"projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}\".", + "description": "Required. The relative resource name of the metadata import to retrieve, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+/metadataImports/[^/]+$", "required": true, @@ -649,7 +649,7 @@ "type": "string" }, "orderBy": { - "description": "Optional. Specify the ordering of results as described in Sorting Order. If not specified, the results will be sorted in the default order.", + "description": "Optional. Specify the ordering of results as described in Sorting Order (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not specified, the results will be sorted in the default order.", "location": "query", "type": "string" }, @@ -665,7 +665,7 @@ "type": "string" }, "parent": { - "description": "Required. The relative resource name of the service whose metadata imports to list, in the following form:\"projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports\".", + "description": "Required. The relative resource name of the service whose metadata imports to list, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", "required": true, @@ -690,7 +690,7 @@ ], "parameters": { "name": { - "description": "Immutable. The relative resource name of the metadata import, of the form:\"projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}\".", + "description": "Immutable. The relative resource name of the metadata import, of the form:projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+/metadataImports/[^/]+$", "required": true, @@ -728,7 +728,7 @@ } } }, - "revision": "20210226", + "revision": "20210318", "rootUrl": "https://metastore.googleapis.com/", "schemas": { "AuditConfig": { @@ -801,6 +801,17 @@ }, "type": "object" }, + "DataCatalogConfig": { + "description": "Specifies how metastore metadata should be integrated with the Data Catalog service.", + "id": "DataCatalogConfig", + "properties": { + "enabled": { + "description": "Defines whether the metastore metadata should be synced to Data Catalog. The default value is to disable syncing metastore metadata to Data Catalog.", + "type": "boolean" + } + }, + "type": "object" + }, "DatabaseDump": { "description": "A specification of the location of and metadata about a database dump from a relational database management system.", "id": "DatabaseDump", @@ -867,7 +878,7 @@ "type": "string" }, "destinationGcsFolder": { - "description": "Required. A Cloud Storage URI of a folder that metadata are exported to, in the format gs:///. A sub-folder containing exported files will be created below it.", + "description": "A Cloud Storage URI of a folder, in the format gs:///. A sub-folder containing exported files will be created below it.", "type": "string" }, "requestId": { @@ -913,7 +924,7 @@ }, "kerberosConfig": { "$ref": "KerberosConfig", - "description": "Information used to configure the Hive metastore service as a service principal in a Kerberos realm. To disable Kerberos, use the UpdateService method and specify this field's path (\"hive_metastore_config.kerberos_config\") in the request's update_mask while omitting this field from the request's service." + "description": "Information used to configure the Hive metastore service as a service principal in a Kerberos realm. To disable Kerberos, use the UpdateService method and specify this field's path (hive_metastore_config.kerberos_config) in the request's update_mask while omitting this field from the request's service." }, "version": { "description": "Immutable. The Hive metastore schema version.", @@ -950,7 +961,7 @@ "type": "string" }, "principal": { - "description": "A Kerberos principal that exists in the both the keytab the KDC to authenticate as. A typical principal is of the form \"primary/instance@REALM\", but there is no exact format.", + "description": "A Kerberos principal that exists in the both the keytab the KDC to authenticate as. A typical principal is of the form primary/instance@REALM, but there is no exact format.", "type": "string" } }, @@ -1146,7 +1157,7 @@ "type": "string" }, "destinationGcsUri": { - "description": "Output only. A Cloud Storage URI of a folder that metadata are exported to, in the form of gs:////, where ` is automatically generated.", + "description": "Output only. A Cloud Storage URI of a folder that metadata are exported to, in the form of gs:////, where is automatically generated.", "readOnly": true, "type": "string" }, @@ -1203,7 +1214,7 @@ "type": "string" }, "name": { - "description": "Immutable. The relative resource name of the metadata import, of the form:\"projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}\".", + "description": "Immutable. The relative resource name of the metadata import, of the form:projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}.", "type": "string" }, "state": { @@ -1237,7 +1248,12 @@ "MetadataIntegration": { "description": "Specifies how metastore metadata should be integrated with external services.", "id": "MetadataIntegration", - "properties": {}, + "properties": { + "dataCatalogConfig": { + "$ref": "DataCatalogConfig", + "description": "The integration config for the Data Catalog service." + } + }, "type": "object" }, "MetadataManagementActivity": { @@ -1334,7 +1350,7 @@ "id": "Restore", "properties": { "backup": { - "description": "Output only. The relative resource name of the metastore service backup to restore from, in the following form:projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}", + "description": "Output only. The relative resource name of the metastore service backup to restore from, in the following form:projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}.", "readOnly": true, "type": "string" }, @@ -1397,7 +1413,7 @@ "id": "Secret", "properties": { "cloudSecret": { - "description": "The relative resource name of a Secret Manager secret version, in the following form:\"projects/{project_number}/secrets/{secret_id}/versions/{version_id}\".", + "description": "The relative resource name of a Secret Manager secret version, in the following form:projects/{project_number}/secrets/{secret_id}/versions/{version_id}.", "type": "string" } }, @@ -1448,11 +1464,11 @@ "readOnly": true }, "name": { - "description": "Immutable. The relative resource name of the metastore service, of the form:\"projects/{project_number}/locations/{location_id}/services/{service_id}\".", + "description": "Immutable. The relative resource name of the metastore service, of the form:projects/{project_number}/locations/{location_id}/services/{service_id}.", "type": "string" }, "network": { - "description": "Immutable. The relative resource name of the VPC network on which the instance can be accessed. It is specified in the following form:\"projects/{project_number}/global/networks/{network_id}\".", + "description": "Immutable. The relative resource name of the VPC network on which the instance can be accessed. It is specified in the following form:projects/{project_number}/global/networks/{network_id}.", "type": "string" }, "port": { @@ -1460,6 +1476,20 @@ "format": "int32", "type": "integer" }, + "releaseChannel": { + "description": "Immutable. The release channel of the service. If unspecified, defaults to STABLE.", + "enum": [ + "RELEASE_CHANNEL_UNSPECIFIED", + "CANARY", + "STABLE" + ], + "enumDescriptions": [ + "Release channel is not specified.", + "The CANARY release channel contains the newest features, which may be unstable and subject to unresolved issues with no known workarounds. Services using the CANARY release channel are not subject to any SLAs.", + "The STABLE release channel contains features that are considered stable and have been validated for production use." + ], + "type": "string" + }, "state": { "description": "Output only. The current state of the metastore service.", "enum": [ diff --git a/discovery/monitoring-v1.json b/discovery/monitoring-v1.json index 3c9fc35d955..eed617c48a9 100644 --- a/discovery/monitoring-v1.json +++ b/discovery/monitoring-v1.json @@ -149,7 +149,7 @@ ] }, "delete": { - "description": "Deletes an existing custom dashboard.This method requires the monitoring.dashboards.delete permission on the specified dashboard. For more information, see Google Cloud IAM (https://cloud.google.com/iam).", + "description": "Deletes an existing custom dashboard.This method requires the monitoring.dashboards.delete permission on the specified dashboard. For more information, see Cloud Identity and Access Management (https://cloud.google.com/iam).", "flatPath": "v1/projects/{projectsId}/dashboards/{dashboardsId}", "httpMethod": "DELETE", "id": "monitoring.projects.dashboards.delete", @@ -176,7 +176,7 @@ ] }, "get": { - "description": "Fetches a specific dashboard.This method requires the monitoring.dashboards.get permission on the specified dashboard. For more information, see Google Cloud IAM (https://cloud.google.com/iam).", + "description": "Fetches a specific dashboard.This method requires the monitoring.dashboards.get permission on the specified dashboard. For more information, see Cloud Identity and Access Management (https://cloud.google.com/iam).", "flatPath": "v1/projects/{projectsId}/dashboards/{dashboardsId}", "httpMethod": "GET", "id": "monitoring.projects.dashboards.get", @@ -203,7 +203,7 @@ ] }, "list": { - "description": "Lists the existing dashboards.This method requires the monitoring.dashboards.list permission on the specified project. For more information, see Google Cloud IAM (https://cloud.google.com/iam).", + "description": "Lists the existing dashboards.This method requires the monitoring.dashboards.list permission on the specified project. For more information, see Cloud Identity and Access Management (https://cloud.google.com/iam).", "flatPath": "v1/projects/{projectsId}/dashboards", "httpMethod": "GET", "id": "monitoring.projects.dashboards.list", @@ -241,7 +241,7 @@ ] }, "patch": { - "description": "Replaces an existing custom dashboard with a new definition.This method requires the monitoring.dashboards.update permission on the specified dashboard. For more information, see Google Cloud IAM (https://cloud.google.com/iam).", + "description": "Replaces an existing custom dashboard with a new definition.This method requires the monitoring.dashboards.update permission on the specified dashboard. For more information, see Cloud Identity and Access Management (https://cloud.google.com/iam).", "flatPath": "v1/projects/{projectsId}/dashboards/{dashboardsId}", "httpMethod": "PATCH", "id": "monitoring.projects.dashboards.patch", @@ -275,7 +275,7 @@ } } }, - "revision": "20210227", + "revision": "20210316", "rootUrl": "https://monitoring.googleapis.com/", "schemas": { "Aggregation": { diff --git a/discovery/monitoring-v3.json b/discovery/monitoring-v3.json index 7974e5a83d8..ac1a02867a8 100644 --- a/discovery/monitoring-v3.json +++ b/discovery/monitoring-v3.json @@ -2541,7 +2541,7 @@ } } }, - "revision": "20210227", + "revision": "20210316", "rootUrl": "https://monitoring.googleapis.com/", "schemas": { "Aggregation": { @@ -5096,7 +5096,7 @@ }, "monitoredResource": { "$ref": "MonitoredResource", - "description": "The monitored resource (https://cloud.google.com/monitoring/api/resources) associated with the configuration. The following monitored resource types are supported for Uptime checks: uptime_url, gce_instance, gae_app, aws_ec2_instance, aws_elb_load_balancer" + "description": "The monitored resource (https://cloud.google.com/monitoring/api/resources) associated with the configuration. The following monitored resource types are valid for this field: uptime_url, gce_instance, gae_app, aws_ec2_instance, aws_elb_load_balancer" }, "name": { "description": "A unique resource name for this Uptime check configuration. The format is: projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID] [PROJECT_ID_OR_NUMBER] is the Workspace host project associated with the Uptime check.This field should be omitted when creating the Uptime check configuration; on create, the resource name is assigned by the server and included in the response.", diff --git a/discovery/networkmanagement-v1.json b/discovery/networkmanagement-v1.json index a8660e4e8ea..aec1a5bb1d9 100644 --- a/discovery/networkmanagement-v1.json +++ b/discovery/networkmanagement-v1.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" } } } @@ -144,7 +144,7 @@ ], "parameters": { "filter": { - "description": "The standard list 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" }, @@ -156,13 +156,13 @@ "type": "string" }, "pageSize": { - "description": "The standard list page size.", + "description": "The maximum number of results to return. If not set, the service will select a default.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "The standard list page token.", + "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" } @@ -591,7 +591,7 @@ } } }, - "revision": "20201029", + "revision": "20210316", "rootUrl": "https://networkmanagement.googleapis.com/", "schemas": { "AbortInfo": { @@ -687,9 +687,6 @@ "description": "Associates `members` with a `role`.", "id": "Binding", "properties": { - "bindingId": { - "type": "string" - }, "condition": { "$ref": "Expr", "description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." @@ -831,22 +828,22 @@ ], "enumDescriptions": [ "Cause is unspecified.", - "Destination external address cannot be resolved to a known target.", - "a Compute Engine instance can only send or receive a packet with a foreign IP if ip_forward is enabled.", - "Dropped due to a firewall rule unless allowed due to connection tracking.", + "Destination external address cannot be resolved to a known target. If the address is used in a GCP project, provide the project ID as test input.", + "A Compute Engine instance can send or receive a packet with a foreign IP only if ip_forward is enabled.", + "Dropped due to a firewall rule, unless allowed due to connection tracking.", "Dropped due to no routes.", "Dropped due to invalid route. Route's next hop is a blackhole.", - "Packet is sent to a wrong (unintended) network. Example: user traces a packet from VM1:Network1 to VM2:Network2, however, the route configured in Network1 sends the packet destined for VM2's IP addresss to Network3.", + "Packet is sent to a wrong (unintended) network. Example: you trace a packet from VM1:Network1 to VM2:Network2, however, the route configured in Network1 sends the packet destined for VM2's IP addresss to Network3.", "Packet with internal destination address sent to Internet gateway.", "Instance with only an internal IP tries to access Google API and Services, and private Google access is not enabled.", "Instance with only internal IP tries to access external hosts, but Cloud NAT is not enabled in the subnet, unless special configurations on a VM allows this connection. See [Special Configurations for VM instances](/vpc/docs/special-configurations) for details.", - "Destination internal address cannot be resolved to a known target.", + "Destination internal address cannot be resolved to a known target. If this is a shared VPC scenario, verify if the service project ID is provided as test input. Otherwise, verify if the IP address is being used in the project.", "Forwarding rule's protocol and ports do not match the packet header.", "Forwarding rule does not have backends configured.", - "Firewalls block the health check probes to the backends and cause the backends to be unavailable for traffic from the load balancer. See [Health check firewall rules](/load-balancing/docs/ health-checks#firewall_rules) for more details.", + "Firewalls block the health check probes to the backends and cause the backends to be unavailable for traffic from the load balancer. See [Health check firewall rules](/load-balancing/docs/health-checks#firewall_rules) for more details.", "Packet is sent from or to a Compute Engine instance that is not in a running state.", - "The type of traffic is blocked and the user cannot configure a firewall rule to enable it. See [Always blocked traffic](/vpc/docs/firewalls# blockedtraffic) for more details.", - "Access to GKE master's endpoint is not authorized. See [Access to the cluster endpoints](/kubernetes-engine/docs/how-to/ private-clusters#access_to_the_cluster_endpoints) for more details." + "The type of traffic is blocked and the user cannot configure a firewall rule to enable it. See [Always blocked traffic](/vpc/docs/firewalls#blockedtraffic) for more details.", + "Access to GKE master's endpoint is not authorized. See [Access to the cluster endpoints](/docs/how-to/private-clusters#access_to_the_cluster_endpoints) for more details." ], "type": "string" }, @@ -966,7 +963,7 @@ "type": "object" }, "FirewallInfo": { - "description": "For display only. Metadata associated with a Compute Engine firewall rule.", + "description": "For display only. Metadata associated with a VPC firewall rule, an implied VPC firewall rule, or a hierarchical firewall policy rule.", "id": "FirewallInfo", "properties": { "action": { @@ -978,34 +975,54 @@ "type": "string" }, "displayName": { - "description": "Name of a Compute Engine firewall rule.", + "description": "The display name of the VPC firewall rule. This field is not applicable to hierarchical firewall policy rules.", + "type": "string" + }, + "firewallRuleType": { + "description": "The firewall rule's type.", + "enum": [ + "FIREWALL_RULE_TYPE_UNSPECIFIED", + "HIERARCHICAL_FIREWALL_POLICY_RULE", + "VPC_FIREWALL_RULE", + "IMPLIED_VPC_FIREWALL_RULE" + ], + "enumDescriptions": [ + "Unspecified type.", + "Hierarchical firewall policy rule. For details, see [Hierarchical firewall policy rules](https://cloud.google.com/vpc/docs/firewall-policies).", + "VPC firewall rule. For details, see [VPC firewall rules overview](https://cloud.google.com/vpc/docs/firewalls).", + "Implied VPC firewall rule. For details, see [Implied rules](https://cloud.google.com/vpc/docs/firewalls#default_firewall_rules)." + ], "type": "string" }, "networkUri": { - "description": "URI of a Compute Engine network.", + "description": "The URI of the VPC network that the firewall rule is associated with. This field is not applicable to hierarchical firewall policy rules.", + "type": "string" + }, + "policy": { + "description": "The hierarchical firewall policy that this rule is associated with. This field is not applicable to VPC firewall rules.", "type": "string" }, "priority": { - "description": "Priority of the firewall rule.", + "description": "The priority of the firewall rule.", "format": "int32", "type": "integer" }, "targetServiceAccounts": { - "description": "Target service accounts of the firewall rule.", + "description": "The target service accounts specified by the firewall rule.", "items": { "type": "string" }, "type": "array" }, "targetTags": { - "description": "Target tags of the firewall rule.", + "description": "The target tags defined by the VPC firewall rule. This field is not applicable to hierarchical firewall policy rules.", "items": { "type": "string" }, "type": "array" }, "uri": { - "description": "URI of a Compute Engine firewall rule. Implied default rule does not have URI.", + "description": "The URI of the VPC firewall rule. This field is not applicable to implied firewall rules or hierarchical firewall policy rules.", "type": "string" } }, @@ -1033,7 +1050,7 @@ "Target not specified.", "Forwarded to a VPC peering network.", "Forwarded to a Cloud VPN gateway.", - "Forwarded to an Cloud Interconnect connection.", + "Forwarded to a Cloud Interconnect connection.", "Forwarded to a Google Kubernetes Engine Container cluster master.", "Forwarded to the next hop of a custom route imported from a peering VPC." ], @@ -1436,7 +1453,7 @@ "type": "object" }, "ReachabilityDetails": { - "description": "The details of reachability state from the latest run.", + "description": "Results of the configuration analysis from the last run of the test.", "id": "ReachabilityDetails", "properties": { "error": { @@ -1444,7 +1461,7 @@ "description": "The details of a failure or a cancellation of reachability analysis." }, "result": { - "description": "The overall reachability result of the test.", + "description": "The overall result of the test's configuration analysis.", "enum": [ "RESULT_UNSPECIFIED", "REACHABLE", @@ -1453,11 +1470,11 @@ "UNDETERMINED" ], "enumDescriptions": [ - "Result is not specified.", - "Packet originating from source is expected to reach destination.", - "Packet originating from source is expected to be dropped before reaching destination.", - "If the source and destination endpoint does not uniquely identify the test location in the network, and the reachability result contains multiple traces with mixed reachable and unreachable states, then this result is returned.", - "The reachability could not be determined. Possible reasons are: * Analysis is aborted due to permission error. User does not have read permission to the projects listed in the test. * Analysis is aborted due to internal errors. * Analysis is partially complete based on configurations where the user has permission. The Final state indicates that the packet is forwarded to another network where the user has no permission to access the configurations." + "No result was specified.", + "Possible scenarios are: * The configuration analysis determined that a packet originating from the source is expected to reach the destination. * The analysis didn't complete because the user lacks permission for some of the resources in the trace. However, at the time the user's permission became insufficient, the trace had been successful so far.", + "A packet originating from the source is expected to be dropped before reaching the destination.", + "The source and destination endpoints do not uniquely identify the test location in the network, and the reachability result contains multiple traces. For some traces, a packet could be delivered, and for others, it would not be.", + "The configuration analysis did not complete. Possible reasons are: * A permissions error occurred--for example, the user might not have read permission for all of the resources named in the test. * An internal error occurred. * The analyzer received an invalid or unsupported argument or was unable to identify a known endpoint." ], "type": "string" }, @@ -1469,7 +1486,7 @@ "type": "array" }, "verifyTime": { - "description": "The time the reachability state was verified.", + "description": "The time of the configuration analysis.", "format": "google-datetime", "type": "string" } @@ -1532,7 +1549,7 @@ "Next hop is a peering VPC.", "Next hop is an interconnect.", "Next hop is a VPN tunnel.", - "Next hop is a VPN Gateway. This scenario only happens when tracing connectivity from an on-premises network to GCP through a VPN. The analysis simulates a packet departing from the on-premises network through a VPN tunnel and arrives at a Cloud VPN gateway.", + "Next hop is a VPN Gateway. This scenario happens only when tracing connectivity from an on-premises network to GCP through a VPN. The analysis simulates a packet departing from the on-premises network through a VPN tunnel and arriving at a Cloud VPN gateway.", "Next hop is an internet gateway.", "Next hop is blackhole; that is, the next hop either does not exist or is not running.", "Next hop is the forwarding rule of an Internal Load Balancer." @@ -1558,7 +1575,7 @@ "enumDescriptions": [ "Unspecified type. Default value.", "Route is a subnet route automatically created by the system.", - "Static route created by the user including the default route to the Internet.", + "Static route created by the user, including the default route to the Internet.", "Dynamic route exchanged between BGP peers.", "A subnet route received from peering network.", "A static route received from peering network.", @@ -1642,7 +1659,7 @@ }, "endpoint": { "$ref": "EndpointInfo", - "description": "Display info of the source and destination under analysis. The endpiont info in an intermediate state may differ with the initial input, as it might be modified by state like NAT, or Connection Proxy." + "description": "Display info of the source and destination under analysis. The endpoint info in an intermediate state may differ with the initial input, as it might be modified by state like NAT, or Connection Proxy." }, "firewall": { "$ref": "FirewallInfo", @@ -1718,9 +1735,9 @@ "Forwarding state: arriving at a Cloud VPN tunnel.", "Transition state: packet header translated.", "Transition state: original connection is terminated and a new proxied connection is initiated.", - "Final state: packet delivered.", - "Final state: packet dropped.", - "Final state: packet forwarded to a network with an unknown configuration.", + "Final state: packet could be delivered.", + "Final state: packet coud be dropped.", + "Final state: packet could be forwarded to a network with an unknown configuration.", "Final state: analysis is aborted.", "Special state: viewer of the test result does not have permission to see the configuration in this step." ], @@ -1766,7 +1783,7 @@ "type": "object" }, "Trace": { - "description": "Trace represents one simulated packet forwarding path. - Each trace contains multiple ordered steps. - Each step is in a particular state and has an associated configuration. - State is categorized as a final or non-final state. - Each final state has a reason associated with it. - Each trace must end with a final state (the last step). |---------------------Trace----------------------| Step1(State) Step2(State) --- StepN(State(final)) ", + "description": "Trace represents one simulated packet forwarding path. * Each trace contains multiple ordered Steps. * Each step is in a particular state with associated configuration. * State is categorized as final or non-final states. * Each final state has a reason associated. * Each trace must end with a final state (the last step). ``` |---------------------Trace----------------------| Step1(State) Step2(State) --- StepN(State(final)) ```", "id": "Trace", "properties": { "endpointInfo": { diff --git a/discovery/networkmanagement-v1beta1.json b/discovery/networkmanagement-v1beta1.json index 2c7f792e823..71ff9e81508 100644 --- a/discovery/networkmanagement-v1beta1.json +++ b/discovery/networkmanagement-v1beta1.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" } } } @@ -144,7 +144,7 @@ ], "parameters": { "filter": { - "description": "The standard list 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" }, @@ -156,13 +156,13 @@ "type": "string" }, "pageSize": { - "description": "The standard list page size.", + "description": "The maximum number of results to return. If not set, the service will select a default.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "The standard list page token.", + "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" } @@ -591,7 +591,7 @@ } } }, - "revision": "20201029", + "revision": "20210316", "rootUrl": "https://networkmanagement.googleapis.com/", "schemas": { "AbortInfo": { @@ -687,9 +687,6 @@ "description": "Associates `members` with a `role`.", "id": "Binding", "properties": { - "bindingId": { - "type": "string" - }, "condition": { "$ref": "Expr", "description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." @@ -874,16 +871,16 @@ ], "enumDescriptions": [ "Cause is unspecified.", - "Destination external address cannot be resolved to a known target.", + "Destination external address cannot be resolved to a known target. If the address is used in a GCP project, provide the project ID as test input.", "a Compute Engine instance can only send or receive a packet with a foreign IP if ip_forward is enabled.", - "Dropped due to a firewall rule unless allowed due to connection tracking.", + "Dropped due to a firewall rule, unless allowed due to connection tracking.", "Dropped due to no routes.", "Dropped due to invalid route. Route's next hop is a blackhole.", - "Packet is sent to a wrong (unintended) network. Example: user traces a packet from VM1:Network1 to VM2:Network2, however, the route configured in Network1 sends the packet destined for VM2's IP addresss to Network3.", + "Packet is sent to a wrong (unintended) network. Example: you trace a packet from VM1:Network1 to VM2:Network2, however, the route configured in Network1 sends the packet destined for VM2's IP addresss to Network3.", "Packet with internal destination address sent to Internet gateway.", - "Instance with only an internal IP tries to access Google API and Services, and private Google access is not enabled.", - "Instance with only internal IP tries to access external hosts, but Cloud NAT is not enabled in the subnet, unless special configurations on a VM allows this connection. See [Special Configurations for VM instances](https://cloud.google.com/vpc/docs/special-configurations) for details.", - "Destination internal address cannot be resolved to a known target.", + "Instance with only an internal IP tries to access Google API and Services, but private Google access is not enabled.", + "Instance with only internal IP tries to access external hosts, but Cloud NAT is not enabled in the subnet, unless special configurations on a VM allows this connection. See [Special Configurations for VM instances](https://cloud.google.com/vpc/docs/special-configurations) for more details.", + "Destination internal address cannot be resolved to a known target. If this is a shared VPC scenario, verify if the service project ID is provided as test input. Otherwise, verify if the IP address is being used in the project.", "Forwarding rule's protocol and ports do not match the packet header.", "Forwarding rule does not have backends configured.", "Firewalls block the health check probes to the backends and cause the backends to be unavailable for traffic from the load balancer. See [Health check firewall rules](https://cloud.google.com/load-balancing/docs/health-checks#firewall_rules) for more details.", @@ -1020,7 +1017,7 @@ "type": "object" }, "FirewallInfo": { - "description": "For display only. Metadata associated with a Compute Engine firewall rule.", + "description": "For display only. Metadata associated with a VPC firewall rule, an implied VPC firewall rule, or a hierarchical firewall policy rule.", "id": "FirewallInfo", "properties": { "action": { @@ -1032,34 +1029,54 @@ "type": "string" }, "displayName": { - "description": "Name of a Compute Engine firewall rule.", + "description": "The display name of the VPC firewall rule. This field is not applicable to hierarchical firewall policy rules.", + "type": "string" + }, + "firewallRuleType": { + "description": "The firewall rule's type.", + "enum": [ + "FIREWALL_RULE_TYPE_UNSPECIFIED", + "HIERARCHICAL_FIREWALL_POLICY_RULE", + "VPC_FIREWALL_RULE", + "IMPLIED_VPC_FIREWALL_RULE" + ], + "enumDescriptions": [ + "Unspecified type.", + "Hierarchical firewall policy rule. For details, see [Hierarchical firewall policy rules](https://cloud.google.com/vpc/docs/firewall-policies).", + "VPC firewall rule. For details, see [VPC firewall rules overview](https://cloud.google.com/vpc/docs/firewalls).", + "Implied VPC firewall rule. For details, see [Implied rules](https://cloud.google.com/vpc/docs/firewalls#default_firewall_rules)." + ], "type": "string" }, "networkUri": { - "description": "URI of a Compute Engine network.", + "description": "The URI of the VPC network that the firewall rule is associated with. This field is not applicable to hierarchical firewall policy rules.", + "type": "string" + }, + "policy": { + "description": "The hierarchical firewall policy that this rule is associated with. This field is not applicable to VPC firewall rules.", "type": "string" }, "priority": { - "description": "Priority of the firewall rule.", + "description": "The priority of the firewall rule.", "format": "int32", "type": "integer" }, "targetServiceAccounts": { - "description": "Target service accounts of the firewall rule.", + "description": "The target service accounts specified by the firewall rule.", "items": { "type": "string" }, "type": "array" }, "targetTags": { - "description": "Target tags of the firewall rule.", + "description": "The target tags defined by the VPC firewall rule. This field is not applicable to hierarchical firewall policy rules.", "items": { "type": "string" }, "type": "array" }, "uri": { - "description": "URI of a Compute Engine firewall rule. Implied default rule does not have URI.", + "description": "The URI of the VPC firewall rule. This field is not applicable to implied firewall rules or hierarchical firewall policy rules.", "type": "string" } }, @@ -1088,7 +1105,7 @@ "Target not specified.", "Forwarded to a VPC peering network.", "Forwarded to a Cloud VPN gateway.", - "Forwarded to an Cloud Interconnect connection.", + "Forwarded to a Cloud Interconnect connection.", "Forwarded to a Google Kubernetes Engine Container cluster master.", "Forwarded to the next hop of a custom route imported from a peering VPC.", "Forwarded to a Cloud SQL Instance." @@ -1546,37 +1563,37 @@ "type": "object" }, "ProbingDetails": { - "description": "The details of probing from the latest run.", + "description": "Results of active probing from the last run of the test.", "id": "ProbingDetails", "properties": { "abortCause": { - "description": "Causes that the probing was aborted.", + "description": "The reason probing was aborted.", "enum": [ "PROBING_ABORT_CAUSE_UNSPECIFIED", "PERMISSION_DENIED", "NO_SOURCE_LOCATION" ], "enumDescriptions": [ - "Abort reason unspecified.", - "Aborted because the user lacks the permission to access all or part of the network configurations required to run the test.", - "Aborted because no valid source endpoint is derived from the input test request." + "No reason was specified.", + "The user lacks permission to access some of the network resources required to run the test.", + "No valid source endpoint could be derived from the request." ], "type": "string" }, "endpointInfo": { "$ref": "EndpointInfo", - "description": "Derived from the test input. The actual source and destination endpoint where the probing was run." + "description": "The source and destination endpoints derived from the test input and used for active probing." }, "error": { "$ref": "Status", - "description": "The details of an internal failure or a cancellation of reachability analysis." + "description": "Details about an internal failure or the cancellation of active probing." }, "probingLatency": { "$ref": "LatencyDistribution", - "description": "One way probing latency distribution. The latency is measured as duration of packet traversal of Google Cloud network, from source to destination endpoint." + "description": "Latency as measured by active probing in one direction: from the source to the destination endpoint." }, "result": { - "description": "The overall reachability result of the test.", + "description": "The overall result of active probing.", "enum": [ "PROBING_RESULT_UNSPECIFIED", "REACHABLE", @@ -1585,11 +1602,11 @@ "UNDETERMINED" ], "enumDescriptions": [ - "Result is not specified.", - "95% or more packets originating from source reached destination.", - "No packet originating from source reached destination.", - "Less than 95% packets originating from source reached destination.", - "The reachability could not be determined. Possible reasons are: * Analysis is aborted due to permission error. User does not have read permission to the projects listed in the test. * Analysis is aborted due to internal errors." + "No result was specified.", + "At least 95% of packets reached the destination.", + "No packets reached the destination.", + "Less than 95% of packets reached the destination.", + "Reachability could not be determined. Possible reasons are: * The user lacks permission to access some of the network resources required to run the test. * No valid source endpoint could be derived from the request. * An internal error occurred." ], "type": "string" }, @@ -1599,12 +1616,12 @@ "type": "integer" }, "successfulProbeCount": { - "description": "Number of probes that reached destination.", + "description": "Number of probes that reached the destination.", "format": "int32", "type": "integer" }, "verifyTime": { - "description": "The time the reachability state was verified.", + "description": "The time that reachability was assessed through active probing.", "format": "google-datetime", "type": "string" } @@ -1612,7 +1629,7 @@ "type": "object" }, "ReachabilityDetails": { - "description": "The details of reachability state from the latest run.", + "description": "Results of the configuration analysis from the last run of the test.", "id": "ReachabilityDetails", "properties": { "error": { @@ -1620,7 +1637,7 @@ "description": "The details of a failure or a cancellation of reachability analysis." }, "result": { - "description": "The overall reachability result of the test.", + "description": "The overall result of the test's configuration analysis.", "enum": [ "RESULT_UNSPECIFIED", "REACHABLE", @@ -1629,11 +1646,11 @@ "UNDETERMINED" ], "enumDescriptions": [ - "Result is not specified.", - "Packet originating from source is expected to reach destination.", - "Packet originating from source is expected to be dropped before reaching destination.", - "If the source and destination endpoint does not uniquely identify the test location in the network, and the reachability result contains multiple traces with mixed reachable and unreachable states, then this result is returned.", - "The reachability could not be determined. Possible reasons are: * Analysis is aborted due to permission error. User does not have read permission to the projects listed in the test. * Analysis is aborted due to internal errors. * Analysis is partially complete based on configurations where the user has permission. The Final state indicates that the packet is forwarded to another network where the user has no permission to access the configurations." + "No result was specified.", + "Possible scenarios are: * The configuration analysis determined that a packet originating from the source is expected to reach the destination. * The analysis didn't complete because the user lacks permission for some of the resources in the trace. However, at the time the user's permission became insufficient, the trace had been successful so far.", + "A packet originating from the source is expected to be dropped before reaching the destination.", + "The source and destination endpoints do not uniquely identify the test location in the network, and the reachability result contains multiple traces. For some traces, a packet could be delivered, and for others, it would not be.", + "The configuration analysis did not complete. Possible reasons are: * A permissions error occurred--for example, the user might not have read permission for all of the resources named in the test. * An internal error occurred. * The analyzer received an invalid or unsupported argument or was unable to identify a known endpoint." ], "type": "string" }, @@ -1645,7 +1662,7 @@ "type": "array" }, "verifyTime": { - "description": "The time the reachability state was verified.", + "description": "The time of the configuration analysis.", "format": "google-datetime", "type": "string" } @@ -1708,7 +1725,7 @@ "Next hop is a peering VPC.", "Next hop is an interconnect.", "Next hop is a VPN tunnel.", - "Next hop is a VPN Gateway. This scenario only happens when tracing connectivity from an on-premises network to GCP through a VPN. The analysis simulates a packet departing from the on-premises network through a VPN tunnel and arrives at a Cloud VPN gateway.", + "Next hop is a VPN Gateway. This scenario only happens when tracing connectivity from an on-premises network to GCP through a VPN. The analysis simulates a packet departing from the on-premises network through a VPN tunnel and arriving at a Cloud VPN gateway.", "Next hop is an internet gateway.", "Next hop is blackhole; that is, the next hop either does not exist or is not running.", "Next hop is the forwarding rule of an Internal Load Balancer." @@ -1822,7 +1839,7 @@ }, "endpoint": { "$ref": "EndpointInfo", - "description": "Display info of the source and destination under analysis. The endpiont info in an intermediate state may differ with the initial input, as it might be modified by state like NAT, or Connection Proxy." + "description": "Display info of the source and destination under analysis. The endpoint info in an intermediate state may differ with the initial input, as it might be modified by state like NAT, or Connection Proxy." }, "firewall": { "$ref": "FirewallInfo", @@ -1906,9 +1923,9 @@ "Forwarding state: arriving at a Cloud VPN tunnel.", "Transition state: packet header translated.", "Transition state: original connection is terminated and a new proxied connection is initiated.", - "Final state: packet delivered.", - "Final state: packet dropped.", - "Final state: packet forwarded to a network with an unknown configuration.", + "Final state: packet could be delivered.", + "Final state: packet could be dropped.", + "Final state: packet could be forwarded to a network with an unknown configuration.", "Final state: analysis is aborted.", "Special state: viewer of the test result does not have permission to see the configuration in this step." ], @@ -1954,7 +1971,7 @@ "type": "object" }, "Trace": { - "description": "Trace represents one simulated packet forwarding path. - Each trace contains multiple ordered steps. - Each step is in a particular state and has an associated configuration. - State is categorized as a final or non-final state. - Each final state has a reason associated with it. - Each trace must end with a final state (the last step). |---------------------Trace----------------------| Step1(State) Step2(State) --- StepN(State(final)) ", + "description": "Trace represents one simulated packet forwarding path. * Each trace contains multiple ordered Steps. * Each step is in a particular state with associated configuration. * State is categorized as final or non-final states. * Each final state has a reason associated. * Each trace must end with a final state (the last step). ``` |---------------------Trace----------------------| Step1(State) Step2(State) --- StepN(State(final)) ```", "id": "Trace", "properties": { "endpointInfo": { diff --git a/discovery/notebooks-v1.json b/discovery/notebooks-v1.json index b8c374f1b38..76bc0b5fc4b 100644 --- a/discovery/notebooks-v1.json +++ b/discovery/notebooks-v1.json @@ -1262,7 +1262,7 @@ } } }, - "revision": "20210226", + "revision": "20210305", "rootUrl": "https://notebooks.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -1885,6 +1885,10 @@ "description": "Response for checking if a notebook instance is upgradeable.", "id": "IsInstanceUpgradeableResponse", "properties": { + "upgradeImage": { + "description": "The new image self link this instance will be upgraded to if calling the upgrade endpoint. This field will only be populated if field upgradeable is true.", + "type": "string" + }, "upgradeInfo": { "description": "Additional information about upgrade.", "type": "string" diff --git a/discovery/ondemandscanning-v1beta1.json b/discovery/ondemandscanning-v1beta1.json index d3f984f3624..2b47fdf15ce 100644 --- a/discovery/ondemandscanning-v1beta1.json +++ b/discovery/ondemandscanning-v1beta1.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" } } } @@ -339,7 +339,7 @@ } } }, - "revision": "20210308", + "revision": "20210323", "rootUrl": "https://ondemandscanning.googleapis.com/", "schemas": { "AliasContext": { diff --git a/discovery/orgpolicy-v2.json b/discovery/orgpolicy-v2.json new file mode 100644 index 00000000000..2005e1b6516 --- /dev/null +++ b/discovery/orgpolicy-v2.json @@ -0,0 +1,984 @@ +{ + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "See, edit, configure, and delete your Google Cloud Platform data" + } + } + } + }, + "basePath": "", + "baseUrl": "https://orgpolicy.googleapis.com/", + "batchPath": "batch", + "canonicalName": "OrgPolicy API", + "description": "The Org Policy API allows users to configure governance ruleson their GCP resources across the Cloud Resource Hierarchy.", + "discoveryVersion": "v1", + "documentationLink": "https://cloud.google.com/resource-manager/docs/organization-policy/understanding-constraints", + "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": "orgpolicy:v2", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://orgpolicy.mtls.googleapis.com/", + "name": "orgpolicy", + "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": { + "folders": { + "resources": { + "constraints": { + "methods": { + "list": { + "description": "Lists `Constraints` that could be applied on the specified resource.", + "flatPath": "v2/folders/{foldersId}/constraints", + "httpMethod": "GET", + "id": "orgpolicy.folders.constraints.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Size of the pages to be returned. This is currently unsupported and will be ignored. The server may at any point start using this field to limit page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Page token used to retrieve the next page. This is currently unsupported and will be ignored. The server may at any point start using this field.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The Cloud resource that parents the constraint. Must be in one of the following forms: * `projects/{project_number}` * `projects/{project_id}` * `folders/{folder_id}` * `organizations/{organization_id}`", + "location": "path", + "pattern": "^folders/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/constraints", + "response": { + "$ref": "GoogleCloudOrgpolicyV2ListConstraintsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "policies": { + "methods": { + "create": { + "description": "Creates a Policy. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the constraint does not exist. Returns a `google.rpc.Status` with `google.rpc.Code.ALREADY_EXISTS` if the policy already exists on the given Cloud resource.", + "flatPath": "v2/folders/{foldersId}/policies", + "httpMethod": "POST", + "id": "orgpolicy.folders.policies.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The Cloud resource that will parent the new Policy. Must be in one of the following forms: * `projects/{project_number}` * `projects/{project_id}` * `folders/{folder_id}` * `organizations/{organization_id}`", + "location": "path", + "pattern": "^folders/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/policies", + "request": { + "$ref": "GoogleCloudOrgpolicyV2Policy" + }, + "response": { + "$ref": "GoogleCloudOrgpolicyV2Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a Policy. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the constraint or Org Policy does not exist.", + "flatPath": "v2/folders/{foldersId}/policies/{policiesId}", + "httpMethod": "DELETE", + "id": "orgpolicy.folders.policies.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the policy to delete. See `Policy` for naming rules.", + "location": "path", + "pattern": "^folders/[^/]+/policies/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets a `Policy` on a resource. If no `Policy` is set on the resource, NOT_FOUND is returned. The `etag` value can be used with `UpdatePolicy()` to update a `Policy` during read-modify-write.", + "flatPath": "v2/folders/{foldersId}/policies/{policiesId}", + "httpMethod": "GET", + "id": "orgpolicy.folders.policies.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Resource name of the policy. See `Policy` for naming requirements.", + "location": "path", + "pattern": "^folders/[^/]+/policies/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "GoogleCloudOrgpolicyV2Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "getEffectivePolicy": { + "description": "Gets the effective `Policy` on a resource. This is the result of merging `Policies` in the resource hierarchy and evaluating conditions. The returned `Policy` will not have an `etag` or `condition` set because it is a computed `Policy` across multiple resources. Subtrees of Resource Manager resource hierarchy with 'under:' prefix will not be expanded.", + "flatPath": "v2/folders/{foldersId}/policies/{policiesId}:getEffectivePolicy", + "httpMethod": "GET", + "id": "orgpolicy.folders.policies.getEffectivePolicy", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The effective policy to compute. See `Policy` for naming rules.", + "location": "path", + "pattern": "^folders/[^/]+/policies/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}:getEffectivePolicy", + "response": { + "$ref": "GoogleCloudOrgpolicyV2Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Retrieves all of the `Policies` that exist on a particular resource.", + "flatPath": "v2/folders/{foldersId}/policies", + "httpMethod": "GET", + "id": "orgpolicy.folders.policies.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Size of the pages to be returned. This is currently unsupported and will be ignored. The server may at any point start using this field to limit page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Page token used to retrieve the next page. This is currently unsupported and will be ignored. The server may at any point start using this field.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The target Cloud resource that parents the set of constraints and policies that will be returned from this call. Must be in one of the following forms: * `projects/{project_number}` * `projects/{project_id}` * `folders/{folder_id}` * `organizations/{organization_id}`", + "location": "path", + "pattern": "^folders/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/policies", + "response": { + "$ref": "GoogleCloudOrgpolicyV2ListPoliciesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a Policy. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the constraint or the policy do not exist. Returns a `google.rpc.Status` with `google.rpc.Code.ABORTED` if the etag supplied in the request does not match the persisted etag of the policy Note: the supplied policy will perform a full overwrite of all fields.", + "flatPath": "v2/folders/{foldersId}/policies/{policiesId}", + "httpMethod": "PATCH", + "id": "orgpolicy.folders.policies.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Immutable. The resource name of the Policy. Must be one of the following forms, where constraint_name is the name of the constraint which this Policy configures: * `projects/{project_number}/policies/{constraint_name}` * `folders/{folder_id}/policies/{constraint_name}` * `organizations/{organization_id}/policies/{constraint_name}` For example, \"projects/123/policies/compute.disableSerialPortAccess\". Note: `projects/{project_id}/policies/{constraint_name}` is also an acceptable name for API requests, but responses will return the name using the equivalent project number.", + "location": "path", + "pattern": "^folders/[^/]+/policies/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "request": { + "$ref": "GoogleCloudOrgpolicyV2Policy" + }, + "response": { + "$ref": "GoogleCloudOrgpolicyV2Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, + "organizations": { + "resources": { + "constraints": { + "methods": { + "list": { + "description": "Lists `Constraints` that could be applied on the specified resource.", + "flatPath": "v2/organizations/{organizationsId}/constraints", + "httpMethod": "GET", + "id": "orgpolicy.organizations.constraints.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Size of the pages to be returned. This is currently unsupported and will be ignored. The server may at any point start using this field to limit page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Page token used to retrieve the next page. This is currently unsupported and will be ignored. The server may at any point start using this field.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The Cloud resource that parents the constraint. Must be in one of the following forms: * `projects/{project_number}` * `projects/{project_id}` * `folders/{folder_id}` * `organizations/{organization_id}`", + "location": "path", + "pattern": "^organizations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/constraints", + "response": { + "$ref": "GoogleCloudOrgpolicyV2ListConstraintsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "policies": { + "methods": { + "create": { + "description": "Creates a Policy. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the constraint does not exist. Returns a `google.rpc.Status` with `google.rpc.Code.ALREADY_EXISTS` if the policy already exists on the given Cloud resource.", + "flatPath": "v2/organizations/{organizationsId}/policies", + "httpMethod": "POST", + "id": "orgpolicy.organizations.policies.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The Cloud resource that will parent the new Policy. Must be in one of the following forms: * `projects/{project_number}` * `projects/{project_id}` * `folders/{folder_id}` * `organizations/{organization_id}`", + "location": "path", + "pattern": "^organizations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/policies", + "request": { + "$ref": "GoogleCloudOrgpolicyV2Policy" + }, + "response": { + "$ref": "GoogleCloudOrgpolicyV2Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a Policy. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the constraint or Org Policy does not exist.", + "flatPath": "v2/organizations/{organizationsId}/policies/{policiesId}", + "httpMethod": "DELETE", + "id": "orgpolicy.organizations.policies.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the policy to delete. See `Policy` for naming rules.", + "location": "path", + "pattern": "^organizations/[^/]+/policies/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets a `Policy` on a resource. If no `Policy` is set on the resource, NOT_FOUND is returned. The `etag` value can be used with `UpdatePolicy()` to update a `Policy` during read-modify-write.", + "flatPath": "v2/organizations/{organizationsId}/policies/{policiesId}", + "httpMethod": "GET", + "id": "orgpolicy.organizations.policies.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Resource name of the policy. See `Policy` for naming requirements.", + "location": "path", + "pattern": "^organizations/[^/]+/policies/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "GoogleCloudOrgpolicyV2Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "getEffectivePolicy": { + "description": "Gets the effective `Policy` on a resource. This is the result of merging `Policies` in the resource hierarchy and evaluating conditions. The returned `Policy` will not have an `etag` or `condition` set because it is a computed `Policy` across multiple resources. Subtrees of Resource Manager resource hierarchy with 'under:' prefix will not be expanded.", + "flatPath": "v2/organizations/{organizationsId}/policies/{policiesId}:getEffectivePolicy", + "httpMethod": "GET", + "id": "orgpolicy.organizations.policies.getEffectivePolicy", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The effective policy to compute. See `Policy` for naming rules.", + "location": "path", + "pattern": "^organizations/[^/]+/policies/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}:getEffectivePolicy", + "response": { + "$ref": "GoogleCloudOrgpolicyV2Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Retrieves all of the `Policies` that exist on a particular resource.", + "flatPath": "v2/organizations/{organizationsId}/policies", + "httpMethod": "GET", + "id": "orgpolicy.organizations.policies.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Size of the pages to be returned. This is currently unsupported and will be ignored. The server may at any point start using this field to limit page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Page token used to retrieve the next page. This is currently unsupported and will be ignored. The server may at any point start using this field.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The target Cloud resource that parents the set of constraints and policies that will be returned from this call. Must be in one of the following forms: * `projects/{project_number}` * `projects/{project_id}` * `folders/{folder_id}` * `organizations/{organization_id}`", + "location": "path", + "pattern": "^organizations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/policies", + "response": { + "$ref": "GoogleCloudOrgpolicyV2ListPoliciesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a Policy. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the constraint or the policy do not exist. Returns a `google.rpc.Status` with `google.rpc.Code.ABORTED` if the etag supplied in the request does not match the persisted etag of the policy Note: the supplied policy will perform a full overwrite of all fields.", + "flatPath": "v2/organizations/{organizationsId}/policies/{policiesId}", + "httpMethod": "PATCH", + "id": "orgpolicy.organizations.policies.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Immutable. The resource name of the Policy. Must be one of the following forms, where constraint_name is the name of the constraint which this Policy configures: * `projects/{project_number}/policies/{constraint_name}` * `folders/{folder_id}/policies/{constraint_name}` * `organizations/{organization_id}/policies/{constraint_name}` For example, \"projects/123/policies/compute.disableSerialPortAccess\". Note: `projects/{project_id}/policies/{constraint_name}` is also an acceptable name for API requests, but responses will return the name using the equivalent project number.", + "location": "path", + "pattern": "^organizations/[^/]+/policies/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "request": { + "$ref": "GoogleCloudOrgpolicyV2Policy" + }, + "response": { + "$ref": "GoogleCloudOrgpolicyV2Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, + "projects": { + "resources": { + "constraints": { + "methods": { + "list": { + "description": "Lists `Constraints` that could be applied on the specified resource.", + "flatPath": "v2/projects/{projectsId}/constraints", + "httpMethod": "GET", + "id": "orgpolicy.projects.constraints.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Size of the pages to be returned. This is currently unsupported and will be ignored. The server may at any point start using this field to limit page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Page token used to retrieve the next page. This is currently unsupported and will be ignored. The server may at any point start using this field.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The Cloud resource that parents the constraint. Must be in one of the following forms: * `projects/{project_number}` * `projects/{project_id}` * `folders/{folder_id}` * `organizations/{organization_id}`", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/constraints", + "response": { + "$ref": "GoogleCloudOrgpolicyV2ListConstraintsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "policies": { + "methods": { + "create": { + "description": "Creates a Policy. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the constraint does not exist. Returns a `google.rpc.Status` with `google.rpc.Code.ALREADY_EXISTS` if the policy already exists on the given Cloud resource.", + "flatPath": "v2/projects/{projectsId}/policies", + "httpMethod": "POST", + "id": "orgpolicy.projects.policies.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The Cloud resource that will parent the new Policy. Must be in one of the following forms: * `projects/{project_number}` * `projects/{project_id}` * `folders/{folder_id}` * `organizations/{organization_id}`", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/policies", + "request": { + "$ref": "GoogleCloudOrgpolicyV2Policy" + }, + "response": { + "$ref": "GoogleCloudOrgpolicyV2Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a Policy. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the constraint or Org Policy does not exist.", + "flatPath": "v2/projects/{projectsId}/policies/{policiesId}", + "httpMethod": "DELETE", + "id": "orgpolicy.projects.policies.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the policy to delete. See `Policy` for naming rules.", + "location": "path", + "pattern": "^projects/[^/]+/policies/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets a `Policy` on a resource. If no `Policy` is set on the resource, NOT_FOUND is returned. The `etag` value can be used with `UpdatePolicy()` to update a `Policy` during read-modify-write.", + "flatPath": "v2/projects/{projectsId}/policies/{policiesId}", + "httpMethod": "GET", + "id": "orgpolicy.projects.policies.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Resource name of the policy. See `Policy` for naming requirements.", + "location": "path", + "pattern": "^projects/[^/]+/policies/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "GoogleCloudOrgpolicyV2Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "getEffectivePolicy": { + "description": "Gets the effective `Policy` on a resource. This is the result of merging `Policies` in the resource hierarchy and evaluating conditions. The returned `Policy` will not have an `etag` or `condition` set because it is a computed `Policy` across multiple resources. Subtrees of Resource Manager resource hierarchy with 'under:' prefix will not be expanded.", + "flatPath": "v2/projects/{projectsId}/policies/{policiesId}:getEffectivePolicy", + "httpMethod": "GET", + "id": "orgpolicy.projects.policies.getEffectivePolicy", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The effective policy to compute. See `Policy` for naming rules.", + "location": "path", + "pattern": "^projects/[^/]+/policies/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}:getEffectivePolicy", + "response": { + "$ref": "GoogleCloudOrgpolicyV2Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Retrieves all of the `Policies` that exist on a particular resource.", + "flatPath": "v2/projects/{projectsId}/policies", + "httpMethod": "GET", + "id": "orgpolicy.projects.policies.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Size of the pages to be returned. This is currently unsupported and will be ignored. The server may at any point start using this field to limit page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Page token used to retrieve the next page. This is currently unsupported and will be ignored. The server may at any point start using this field.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The target Cloud resource that parents the set of constraints and policies that will be returned from this call. Must be in one of the following forms: * `projects/{project_number}` * `projects/{project_id}` * `folders/{folder_id}` * `organizations/{organization_id}`", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/policies", + "response": { + "$ref": "GoogleCloudOrgpolicyV2ListPoliciesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a Policy. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the constraint or the policy do not exist. Returns a `google.rpc.Status` with `google.rpc.Code.ABORTED` if the etag supplied in the request does not match the persisted etag of the policy Note: the supplied policy will perform a full overwrite of all fields.", + "flatPath": "v2/projects/{projectsId}/policies/{policiesId}", + "httpMethod": "PATCH", + "id": "orgpolicy.projects.policies.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Immutable. The resource name of the Policy. Must be one of the following forms, where constraint_name is the name of the constraint which this Policy configures: * `projects/{project_number}/policies/{constraint_name}` * `folders/{folder_id}/policies/{constraint_name}` * `organizations/{organization_id}/policies/{constraint_name}` For example, \"projects/123/policies/compute.disableSerialPortAccess\". Note: `projects/{project_id}/policies/{constraint_name}` is also an acceptable name for API requests, but responses will return the name using the equivalent project number.", + "location": "path", + "pattern": "^projects/[^/]+/policies/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "request": { + "$ref": "GoogleCloudOrgpolicyV2Policy" + }, + "response": { + "$ref": "GoogleCloudOrgpolicyV2Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + }, + "revision": "20210322", + "rootUrl": "https://orgpolicy.googleapis.com/", + "schemas": { + "GoogleCloudOrgpolicyV2Constraint": { + "description": "A `constraint` describes a way to restrict resource's configuration. For example, you could enforce a constraint that controls which cloud services can be activated across an organization, or whether a Compute Engine instance can have serial port connections established. `Constraints` can be configured by the organization's policy adminstrator to fit the needs of the organzation by setting a `policy` that includes `constraints` at different locations in the organization's resource hierarchy. Policies are inherited down the resource hierarchy from higher levels, but can also be overridden. For details about the inheritance rules please read about `policies`. `Constraints` have a default behavior determined by the `constraint_default` field, which is the enforcement behavior that is used in the absence of a `policy` being defined or inherited for the resource in question.", + "id": "GoogleCloudOrgpolicyV2Constraint", + "properties": { + "booleanConstraint": { + "$ref": "GoogleCloudOrgpolicyV2ConstraintBooleanConstraint", + "description": "Defines this constraint as being a BooleanConstraint." + }, + "constraintDefault": { + "description": "The evaluation behavior of this constraint in the absence of 'Policy'.", + "enum": [ + "CONSTRAINT_DEFAULT_UNSPECIFIED", + "ALLOW", + "DENY" + ], + "enumDescriptions": [ + "This is only used for distinguishing unset values and should never be used.", + "Indicate that all values are allowed for list constraints. Indicate that enforcement is off for boolean constraints.", + "Indicate that all values are denied for list constraints. Indicate that enforcement is on for boolean constraints." + ], + "type": "string" + }, + "description": { + "description": "Detailed description of what this `Constraint` controls as well as how and where it is enforced. Mutable.", + "type": "string" + }, + "displayName": { + "description": "The human readable name. Mutable.", + "type": "string" + }, + "listConstraint": { + "$ref": "GoogleCloudOrgpolicyV2ConstraintListConstraint", + "description": "Defines this constraint as being a ListConstraint." + }, + "name": { + "description": "Immutable. The resource name of the Constraint. Must be in one of the following forms: * `projects/{project_number}/constraints/{constraint_name}` * `folders/{folder_id}/constraints/{constraint_name}` * `organizations/{organization_id}/constraints/{constraint_name}` For example, \"/projects/123/constraints/compute.disableSerialPortAccess\".", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudOrgpolicyV2ConstraintBooleanConstraint": { + "description": "A `Constraint` that is either enforced or not. For example a constraint `constraints/compute.disableSerialPortAccess`. If it is enforced on a VM instance, serial port connections will not be opened to that instance.", + "id": "GoogleCloudOrgpolicyV2ConstraintBooleanConstraint", + "properties": {}, + "type": "object" + }, + "GoogleCloudOrgpolicyV2ConstraintListConstraint": { + "description": "A `Constraint` that allows or disallows a list of string values, which are configured by an Organization's policy administrator with a `Policy`.", + "id": "GoogleCloudOrgpolicyV2ConstraintListConstraint", + "properties": { + "supportsIn": { + "description": "Indicates whether values grouped into categories can be used in `Policy.allowed_values` and `Policy.denied_values`. For example, `\"in:Python\"` would match any value in the 'Python' group.", + "type": "boolean" + }, + "supportsUnder": { + "description": "Indicates whether subtrees of Cloud Resource Manager resource hierarchy can be used in `Policy.allowed_values` and `Policy.denied_values`. For example, `\"under:folders/123\"` would match any resource under the 'folders/123' folder.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleCloudOrgpolicyV2ListConstraintsResponse": { + "description": "The response returned from the ListConstraints method.", + "id": "GoogleCloudOrgpolicyV2ListConstraintsResponse", + "properties": { + "constraints": { + "description": "The collection of constraints that are available on the targeted resource.", + "items": { + "$ref": "GoogleCloudOrgpolicyV2Constraint" + }, + "type": "array" + }, + "nextPageToken": { + "description": "Page token used to retrieve the next page. This is currently not used.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudOrgpolicyV2ListPoliciesResponse": { + "description": "The response returned from the ListPolicies method. It will be empty if no `Policies` are set on the resource.", + "id": "GoogleCloudOrgpolicyV2ListPoliciesResponse", + "properties": { + "nextPageToken": { + "description": "Page token used to retrieve the next page. This is currently not used, but the server may at any point start supplying a valid token.", + "type": "string" + }, + "policies": { + "description": "All `Policies` that exist on the resource. It will be empty if no `Policies` are set.", + "items": { + "$ref": "GoogleCloudOrgpolicyV2Policy" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudOrgpolicyV2Policy": { + "description": "Defines a Cloud Organization `Policy` which is used to specify `Constraints` for configurations of Cloud Platform resources.", + "id": "GoogleCloudOrgpolicyV2Policy", + "properties": { + "name": { + "description": "Immutable. The resource name of the Policy. Must be one of the following forms, where constraint_name is the name of the constraint which this Policy configures: * `projects/{project_number}/policies/{constraint_name}` * `folders/{folder_id}/policies/{constraint_name}` * `organizations/{organization_id}/policies/{constraint_name}` For example, \"projects/123/policies/compute.disableSerialPortAccess\". Note: `projects/{project_id}/policies/{constraint_name}` is also an acceptable name for API requests, but responses will return the name using the equivalent project number.", + "type": "string" + }, + "spec": { + "$ref": "GoogleCloudOrgpolicyV2PolicySpec", + "description": "Basic information about the Organization Policy." + } + }, + "type": "object" + }, + "GoogleCloudOrgpolicyV2PolicySpec": { + "description": "Defines a Cloud Organization `PolicySpec` which is used to specify `Constraints` for configurations of Cloud Platform resources.", + "id": "GoogleCloudOrgpolicyV2PolicySpec", + "properties": { + "etag": { + "description": "An opaque tag indicating the current version of the `Policy`, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the `Policy` is returned from either a `GetPolicy` or a `ListPolicies` request, this `etag` indicates the version of the current `Policy` to use when executing a read-modify-write loop. When the `Policy` is returned from a `GetEffectivePolicy` request, the `etag` will be unset.", + "type": "string" + }, + "inheritFromParent": { + "description": "Determines the inheritance behavior for this `Policy`. If `inherit_from_parent` is true, PolicyRules set higher up in the hierarchy (up to the closest root) are inherited and present in the effective policy. If it is false, then no rules are inherited, and this Policy becomes the new root for evaluation. This field can be set only for Policies which configure list constraints.", + "type": "boolean" + }, + "reset": { + "description": "Ignores policies set above this resource and restores the `constraint_default` enforcement behavior of the specific `Constraint` at this resource. This field can be set in policies for either list or boolean constraints. If set, `rules` must be empty and `inherit_from_parent` must be set to false.", + "type": "boolean" + }, + "rules": { + "description": "Up to 10 PolicyRules are allowed. In Policies for boolean constraints, the following requirements apply: - There must be one and only one PolicyRule where condition is unset. - BooleanPolicyRules with conditions must set `enforced` to the opposite of the PolicyRule without a condition. - During policy evaluation, PolicyRules with conditions that are true for a target resource take precedence.", + "items": { + "$ref": "GoogleCloudOrgpolicyV2PolicySpecPolicyRule" + }, + "type": "array" + }, + "updateTime": { + "description": "Output only. The time stamp this was previously updated. This represents the last time a call to `CreatePolicy` or `UpdatePolicy` was made for that `Policy`.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudOrgpolicyV2PolicySpecPolicyRule": { + "description": "A rule used to express this policy.", + "id": "GoogleCloudOrgpolicyV2PolicySpecPolicyRule", + "properties": { + "allowAll": { + "description": "Setting this to true means that all values are allowed. This field can be set only in Policies for list constraints.", + "type": "boolean" + }, + "condition": { + "$ref": "GoogleTypeExpr", + "description": "A condition which determines whether this rule is used in the evaluation of the policy. When set, the `expression` field in the `Expr' must include from 1 to 10 subexpressions, joined by the \"||\" or \"&&\" operators. Each subexpression must be of the form \"resource.matchTag('/tag_key_short_name, 'tag_value_short_name')\". or \"resource.matchTagId('tagKeys/key_id', 'tagValues/value_id')\". where key_name and value_name are the resource names for Label Keys and Values. These names are available from the Tag Manager Service. An example expression is: \"resource.matchTag('123456789/environment, 'prod')\". or \"resource.matchTagId('tagKeys/123', 'tagValues/456')\"." + }, + "denyAll": { + "description": "Setting this to true means that all values are denied. This field can be set only in Policies for list constraints.", + "type": "boolean" + }, + "enforce": { + "description": "If `true`, then the `Policy` is enforced. If `false`, then any configuration is acceptable. This field can be set only in Policies for boolean constraints.", + "type": "boolean" + }, + "values": { + "$ref": "GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues", + "description": "List of values to be used for this PolicyRule. This field can be set only in Policies for list constraints." + } + }, + "type": "object" + }, + "GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues": { + "description": "A message that holds specific allowed and denied values. This message can define specific values and subtrees of Cloud Resource Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that are allowed or denied. This is achieved by using the `under:` and optional `is:` prefixes. The `under:` prefix is used to denote resource subtree values. The `is:` prefix is used to denote specific values, and is required only if the value contains a \":\". Values prefixed with \"is:\" are treated the same as values with no prefix. Ancestry subtrees must be in one of the following formats: - \"projects/\", e.g. \"projects/tokyo-rain-123\" - \"folders/\", e.g. \"folders/1234\" - \"organizations/\", e.g. \"organizations/1234\" The `supports_under` field of the associated `Constraint` defines whether ancestry prefixes can be used.", + "id": "GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues", + "properties": { + "allowedValues": { + "description": "List of values allowed at this resource.", + "items": { + "type": "string" + }, + "type": "array" + }, + "deniedValues": { + "description": "List of values denied at this resource.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleProtobufEmpty": { + "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); } The JSON representation for `Empty` is empty JSON object `{}`.", + "id": "GoogleProtobufEmpty", + "properties": {}, + "type": "object" + }, + "GoogleTypeExpr": { + "description": "Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: \"Summary size limit\" description: \"Determines if a summary is less than 100 chars\" expression: \"document.summary.size() < 100\" Example (Equality): title: \"Requestor is owner\" description: \"Determines if requestor is the document owner\" expression: \"document.owner == request.auth.claims.email\" Example (Logic): title: \"Public documents\" description: \"Determine whether the document should be publicly visible\" expression: \"document.type != 'private' && document.type != 'internal'\" Example (Data Manipulation): title: \"Notification string\" description: \"Create a notification string with a timestamp.\" expression: \"'New message received at ' + string(document.create_time)\" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.", + "id": "GoogleTypeExpr", + "properties": { + "description": { + "description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", + "type": "string" + }, + "expression": { + "description": "Textual representation of an expression in Common Expression Language syntax.", + "type": "string" + }, + "location": { + "description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", + "type": "string" + }, + "title": { + "description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", + "type": "string" + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "Organization Policy API", + "version": "v2", + "version_module": true +} \ No newline at end of file diff --git a/discovery/osconfig-v1.json b/discovery/osconfig-v1.json index 660a4902d47..40215b0e504 100644 --- a/discovery/osconfig-v1.json +++ b/discovery/osconfig-v1.json @@ -105,6 +105,70 @@ }, "protocol": "rest", "resources": { + "operations": { + "methods": { + "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/operations/{operationsId}", + "httpMethod": "DELETE", + "id": "osconfig.operations.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be deleted.", + "location": "path", + "pattern": "^operations/.*$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Empty" + } + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + "flatPath": "v1/operations", + "httpMethod": "GET", + "id": "osconfig.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": "^operations$", + "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}", + "response": { + "$ref": "ListOperationsResponse" + } + } + } + }, "projects": { "resources": { "patchDeployments": { @@ -406,7 +470,7 @@ } } }, - "revision": "20201112", + "revision": "20210312", "rootUrl": "https://osconfig.googleapis.com/", "schemas": { "AptSettings": { @@ -873,6 +937,24 @@ }, "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" + }, "ListPatchDeploymentsResponse": { "description": "A response message for listing patch deployments.", "id": "ListPatchDeploymentsResponse", @@ -955,6 +1037,41 @@ }, "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 response of the operation in case of success. 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" + }, "PatchConfig": { "description": "Patch configuration specifications. Contains details on how to apply the patch(es) to a VM instance.", "id": "PatchConfig", @@ -1439,6 +1556,33 @@ }, "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" + }, "TimeOfDay": { "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": "TimeOfDay", diff --git a/discovery/people-v1.json b/discovery/people-v1.json index 80b144cc512..a588eee339a 100644 --- a/discovery/people-v1.json +++ b/discovery/people-v1.json @@ -33,7 +33,7 @@ "description": "See and download your personal phone numbers" }, "https://www.googleapis.com/auth/userinfo.email": { - "description": "View your email address" + "description": "See your primary Google Account email address" }, "https://www.googleapis.com/auth/userinfo.profile": { "description": "See your personal info, including any personal info you've made publicly available" @@ -474,6 +474,60 @@ }, "people": { "methods": { + "batchCreateContacts": { + "description": "Create a batch of new contacts and return the PersonResponses for the newly created contacts.", + "flatPath": "v1/people:batchCreateContacts", + "httpMethod": "POST", + "id": "people.people.batchCreateContacts", + "parameterOrder": [], + "parameters": {}, + "path": "v1/people:batchCreateContacts", + "request": { + "$ref": "BatchCreateContactsRequest" + }, + "response": { + "$ref": "BatchCreateContactsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/contacts" + ] + }, + "batchDeleteContacts": { + "description": "Delete a batch of contacts. Any non-contact data will not be deleted.", + "flatPath": "v1/people:batchDeleteContacts", + "httpMethod": "POST", + "id": "people.people.batchDeleteContacts", + "parameterOrder": [], + "parameters": {}, + "path": "v1/people:batchDeleteContacts", + "request": { + "$ref": "BatchDeleteContactsRequest" + }, + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/contacts" + ] + }, + "batchUpdateContacts": { + "description": "Update a batch of contacts and return a map of resource names to PersonResponses for the updated contacts.", + "flatPath": "v1/people:batchUpdateContacts", + "httpMethod": "POST", + "id": "people.people.batchUpdateContacts", + "parameterOrder": [], + "parameters": {}, + "path": "v1/people:batchUpdateContacts", + "request": { + "$ref": "BatchUpdateContactsRequest" + }, + "response": { + "$ref": "BatchUpdateContactsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/contacts" + ] + }, "createContact": { "description": "Create a new contact and return the person resource for that contact. The request returns a 400 error if more than one field is specified on a field that is a singleton for contact sources: * biographies * birthdays * genders * names", "flatPath": "v1/people:createContact", @@ -1082,7 +1136,7 @@ } } }, - "revision": "20210304", + "revision": "20210322", "rootUrl": "https://people.googleapis.com/", "schemas": { "Address": { @@ -1168,6 +1222,72 @@ }, "type": "object" }, + "BatchCreateContactsRequest": { + "description": "A request to create a batch of contacts.", + "id": "BatchCreateContactsRequest", + "properties": { + "contacts": { + "description": "Required. The contact to create. Allows up to 200 contacts in a single request.", + "items": { + "$ref": "ContactToCreate" + }, + "type": "array" + }, + "readMask": { + "description": "Required. A field mask to restrict which fields on each person are returned in the response. Multiple fields can be specified by separating them with commas. If read mask is left empty, the post-mutate-get is skipped and no data will be returned in the response. Valid values are: * addresses * ageRanges * biographies * birthdays * calendarUrls * clientData * coverPhotos * emailAddresses * events * externalIds * genders * imClients * interests * locales * locations * memberships * metadata * miscKeywords * names * nicknames * occupations * organizations * phoneNumbers * photos * relations * sipAddresses * skills * urls * userDefined", + "format": "google-fieldmask", + "type": "string" + }, + "sources": { + "description": "Optional. A mask of what source types to return in the post mutate read. Defaults to READ_SOURCE_TYPE_CONTACT and READ_SOURCE_TYPE_PROFILE if not set.", + "items": { + "enum": [ + "READ_SOURCE_TYPE_UNSPECIFIED", + "READ_SOURCE_TYPE_PROFILE", + "READ_SOURCE_TYPE_CONTACT", + "READ_SOURCE_TYPE_DOMAIN_CONTACT" + ], + "enumDescriptions": [ + "Unspecified.", + "Returns SourceType.ACCOUNT, SourceType.DOMAIN_PROFILE, and SourceType.PROFILE.", + "Returns SourceType.CONTACT.", + "Returns SourceType.DOMAIN_CONTACT." + ], + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "BatchCreateContactsResponse": { + "description": "The response to a request to create a batch of contacts.", + "id": "BatchCreateContactsResponse", + "properties": { + "createdPeople": { + "description": "The contacts that were created, unless the request `read_mask` is empty.", + "items": { + "$ref": "PersonResponse" + }, + "type": "array" + } + }, + "type": "object" + }, + "BatchDeleteContactsRequest": { + "description": "A request to delete a batch of existing contacts.", + "id": "BatchDeleteContactsRequest", + "properties": { + "resourceNames": { + "description": "Required. The resource names of the contact to delete. It's repeatable. Allows up to 500 resource names in a single request.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "BatchGetContactGroupsResponse": { "description": "The response to a batch get contact groups request.", "id": "BatchGetContactGroupsResponse", @@ -1182,6 +1302,63 @@ }, "type": "object" }, + "BatchUpdateContactsRequest": { + "description": "A request to update a batch of contacts.", + "id": "BatchUpdateContactsRequest", + "properties": { + "contacts": { + "additionalProperties": { + "$ref": "Person" + }, + "description": "Required. A map of resource names to the person data to be updated. Allows up to 200 contacts in a single request.", + "type": "object" + }, + "readMask": { + "description": "Required. A field mask to restrict which fields on each person are returned. Multiple fields can be specified by separating them with commas. If read mask is left empty, the post-mutate-get is skipped and no data will be returned in the response. Valid values are: * addresses * ageRanges * biographies * birthdays * calendarUrls * clientData * coverPhotos * emailAddresses * events * externalIds * genders * imClients * interests * locales * locations * memberships * metadata * miscKeywords * names * nicknames * occupations * organizations * phoneNumbers * photos * relations * sipAddresses * skills * urls * userDefined", + "format": "google-fieldmask", + "type": "string" + }, + "sources": { + "description": "Optional. A mask of what source types to return. Defaults to READ_SOURCE_TYPE_CONTACT and READ_SOURCE_TYPE_PROFILE if not set.", + "items": { + "enum": [ + "READ_SOURCE_TYPE_UNSPECIFIED", + "READ_SOURCE_TYPE_PROFILE", + "READ_SOURCE_TYPE_CONTACT", + "READ_SOURCE_TYPE_DOMAIN_CONTACT" + ], + "enumDescriptions": [ + "Unspecified.", + "Returns SourceType.ACCOUNT, SourceType.DOMAIN_PROFILE, and SourceType.PROFILE.", + "Returns SourceType.CONTACT.", + "Returns SourceType.DOMAIN_CONTACT." + ], + "type": "string" + }, + "type": "array" + }, + "updateMask": { + "description": "Required. A field mask to restrict which fields on the person are updated. Multiple fields can be specified by separating them with commas. All specified fields will be replaced, or cleared if left empty for each person. Valid values are: * addresses * biographies * birthdays * calendarUrls * clientData * emailAddresses * events * externalIds * genders * imClients * interests * locales * locations * memberships * miscKeywords * names * nicknames * occupations * organizations * phoneNumbers * relations * sipAddresses * urls * userDefined", + "format": "google-fieldmask", + "type": "string" + } + }, + "type": "object" + }, + "BatchUpdateContactsResponse": { + "description": "The response to a request to create a batch of contacts.", + "id": "BatchUpdateContactsResponse", + "properties": { + "updateResult": { + "additionalProperties": { + "$ref": "PersonResponse" + }, + "description": "A map of resource names to the contacts that were updated, unless the request `read_mask` is empty.", + "type": "object" + } + }, + "type": "object" + }, "Biography": { "description": "A person's short biography.", "id": "Biography", @@ -1406,6 +1583,17 @@ }, "type": "object" }, + "ContactToCreate": { + "description": "A wrapper that contains the person data to populate a newly created source.", + "id": "ContactToCreate", + "properties": { + "contactPerson": { + "$ref": "Person", + "description": "Required. The person data to populate a newly created source." + } + }, + "type": "object" + }, "CopyOtherContactToMyContactsGroupRequest": { "description": "A request to copy an \"Other contact\" to my contacts group.", "id": "CopyOtherContactToMyContactsGroupRequest", diff --git a/discovery/policysimulator-v1beta1.json b/discovery/policysimulator-v1beta1.json index bf914a62193..8bf4d751d58 100644 --- a/discovery/policysimulator-v1beta1.json +++ b/discovery/policysimulator-v1beta1.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" } } } @@ -493,9 +493,122 @@ } } }, - "revision": "20210227", + "revision": "20210319", "rootUrl": "https://policysimulator.googleapis.com/", "schemas": { + "GoogleCloudPolicysimulatorV1Replay": { + "description": "A resource describing a `Replay`, or simulation.", + "id": "GoogleCloudPolicysimulatorV1Replay", + "properties": { + "config": { + "$ref": "GoogleCloudPolicysimulatorV1ReplayConfig", + "description": "Required. The configuration used for the `Replay`." + }, + "name": { + "description": "Output only. The resource name of the `Replay`, which has the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}`, where `{resource-id}` is the ID of the project, folder, or organization that owns the Replay. Example: `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", + "readOnly": true, + "type": "string" + }, + "resultsSummary": { + "$ref": "GoogleCloudPolicysimulatorV1ReplayResultsSummary", + "description": "Output only. Summary statistics about the replayed log entries.", + "readOnly": true + }, + "state": { + "description": "Output only. The current state of the `Replay`.", + "enum": [ + "STATE_UNSPECIFIED", + "PENDING", + "RUNNING", + "SUCCEEDED", + "FAILED" + ], + "enumDescriptions": [ + "The state is unspecified.", + "The `Replay` has not started yet.", + "The `Replay` is currently running.", + "The `Replay` has successfully completed.", + "The `Replay` has finished with an error." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1ReplayConfig": { + "description": "The configuration used for a Replay.", + "id": "GoogleCloudPolicysimulatorV1ReplayConfig", + "properties": { + "logSource": { + "description": "The logs to use as input for the Replay.", + "enum": [ + "LOG_SOURCE_UNSPECIFIED", + "RECENT_ACCESSES" + ], + "enumDescriptions": [ + "An unspecified log source. If the log source is unspecified, the Replay defaults to using `RECENT_ACCESSES`.", + "All access logs from the last 90 days. These logs may not include logs from the most recent 7 days." + ], + "type": "string" + }, + "policyOverlay": { + "additionalProperties": { + "$ref": "GoogleIamV1Policy" + }, + "description": "A mapping of the resources that you want to simulate policies for and the policies that you want to simulate. Keys are the full resource names for the resources. For example, `//cloudresourcemanager.googleapis.com/projects/my-project`. For examples of full resource names for Google Cloud services, see https://cloud.google.com/iam/help/troubleshooter/full-resource-names. Values are Policy objects representing the policies that you want to simulate. Replays automatically take into account any IAM policies inherited through the resource hierarchy, and any policies set on descendant resources. You do not need to include these policies in the policy overlay.", + "type": "object" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1ReplayOperationMetadata": { + "description": "Metadata about a Replay operation.", + "id": "GoogleCloudPolicysimulatorV1ReplayOperationMetadata", + "properties": { + "startTime": { + "description": "Time when the request was received.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1ReplayResultsSummary": { + "description": "Summary statistics about the replayed log entries.", + "id": "GoogleCloudPolicysimulatorV1ReplayResultsSummary", + "properties": { + "differenceCount": { + "description": "The number of replayed log entries with a difference between baseline and simulated policies.", + "format": "int32", + "type": "integer" + }, + "errorCount": { + "description": "The number of log entries that could not be replayed.", + "format": "int32", + "type": "integer" + }, + "logCount": { + "description": "The total number of log entries replayed.", + "format": "int32", + "type": "integer" + }, + "newestDate": { + "$ref": "GoogleTypeDate", + "description": "The date of the newest log entry replayed." + }, + "oldestDate": { + "$ref": "GoogleTypeDate", + "description": "The date of the oldest log entry replayed." + }, + "unchangedCount": { + "description": "The number of replayed log entries with no difference between baseline and simulated policies.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "GoogleCloudPolicysimulatorV1beta1AccessStateDiff": { "description": "A summary and comparison of the member's access under the current (baseline) policies and the proposed (simulated) policies for a single access tuple.", "id": "GoogleCloudPolicysimulatorV1beta1AccessStateDiff", diff --git a/discovery/policytroubleshooter-v1.json b/discovery/policytroubleshooter-v1.json index b2401c00d5d..728f349efba 100644 --- a/discovery/policytroubleshooter-v1.json +++ b/discovery/policytroubleshooter-v1.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" } } } @@ -128,7 +128,7 @@ } } }, - "revision": "20201107", + "revision": "20210319", "rootUrl": "https://policytroubleshooter.googleapis.com/", "schemas": { "GoogleCloudPolicytroubleshooterV1AccessTuple": { diff --git a/discovery/policytroubleshooter-v1beta.json b/discovery/policytroubleshooter-v1beta.json index 63c09ae6221..992fbfc0cfc 100644 --- a/discovery/policytroubleshooter-v1beta.json +++ b/discovery/policytroubleshooter-v1beta.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" } } } @@ -128,7 +128,7 @@ } } }, - "revision": "20201107", + "revision": "20210319", "rootUrl": "https://policytroubleshooter.googleapis.com/", "schemas": { "GoogleCloudPolicytroubleshooterV1betaAccessTuple": { diff --git a/discovery/privateca-v1beta1.json b/discovery/privateca-v1beta1.json index 8ecc4c9b7ce..a6959b4113d 100644 --- a/discovery/privateca-v1beta1.json +++ b/discovery/privateca-v1beta1.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" } } } @@ -144,7 +144,7 @@ ], "parameters": { "filter": { - "description": "The standard list 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" }, @@ -156,13 +156,13 @@ "type": "string" }, "pageSize": { - "description": "The standard list page size.", + "description": "The maximum number of results to return. If not set, the service will select a default.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "The standard list page token.", + "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" } @@ -1254,7 +1254,7 @@ } } }, - "revision": "20210218", + "revision": "20210316", "rootUrl": "https://privateca.googleapis.com/", "schemas": { "AccessUrls": { @@ -1395,20 +1395,6 @@ }, "type": "object" }, - "BillingView": { - "description": "Message for reporting billing requests through Eventstream.", - "id": "BillingView", - "properties": { - "reportRequests": { - "description": "Billing requests to be reported for cloud.eventstream.v2.ResourceEvent Each request contains billing operations to be reported under a service name. See go/billing-view-construction for documentation on constructing billing view report requests.", - "items": { - "$ref": "GoogleApiServicecontrolV1ReportRequest" - }, - "type": "array" - } - }, - "type": "object" - }, "Binding": { "description": "Associates `members` with a `role`.", "id": "Binding", @@ -1869,34 +1855,6 @@ }, "type": "object" }, - "Exemplar": { - "description": "Exemplars are example points that may be used to annotate aggregated distribution values. They are metadata that gives information about a particular value added to a Distribution bucket, such as a trace ID that was active when a value was added. They may contain further information, such as a example values and timestamps, origin, etc.", - "id": "Exemplar", - "properties": { - "attachments": { - "description": "Contextual information about the example value. Examples are: Trace: type.googleapis.com/google.monitoring.v3.SpanContext Literal string: type.googleapis.com/google.protobuf.StringValue Labels dropped during aggregation: type.googleapis.com/google.monitoring.v3.DroppedLabels There may be only a single attachment of any given message type in a single exemplar, and this is enforced by the system.", - "items": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "type": "object" - }, - "type": "array" - }, - "timestamp": { - "description": "The observation (sampling) time of the above value.", - "format": "google-datetime", - "type": "string" - }, - "value": { - "description": "Value of the exemplar point. This value determines to which bucket the exemplar belongs.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, "Expr": { "description": "Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: \"Summary size limit\" description: \"Determines if a summary is less than 100 chars\" expression: \"document.summary.size() < 100\" Example (Equality): title: \"Requestor is owner\" description: \"Determines if requestor is the document owner\" expression: \"document.owner == request.auth.claims.email\" Example (Logic): title: \"Public documents\" description: \"Determine whether the document should be publicly visible\" expression: \"document.type != 'private' && document.type != 'internal'\" Example (Data Manipulation): title: \"Notification string\" description: \"Create a notification string with a timestamp.\" expression: \"'New message received at ' + string(document.create_time)\" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.", "id": "Expr", @@ -1963,685 +1921,6 @@ }, "type": "object" }, - "GoogleApiServicecontrolV1AttributeValue": { - "description": "The allowed types for [VALUE] in a `[KEY]:[VALUE]` attribute.", - "id": "GoogleApiServicecontrolV1AttributeValue", - "properties": { - "boolValue": { - "description": "A Boolean value represented by `true` or `false`.", - "type": "boolean" - }, - "intValue": { - "description": "A 64-bit signed integer.", - "format": "int64", - "type": "string" - }, - "stringValue": { - "$ref": "GoogleApiServicecontrolV1TruncatableString", - "description": "A string up to 256 bytes long." - } - }, - "type": "object" - }, - "GoogleApiServicecontrolV1Attributes": { - "description": "A set of attributes, each in the format `[KEY]:[VALUE]`.", - "id": "GoogleApiServicecontrolV1Attributes", - "properties": { - "attributeMap": { - "additionalProperties": { - "$ref": "GoogleApiServicecontrolV1AttributeValue" - }, - "description": "The set of attributes. Each attribute's key can be up to 128 bytes long. The value can be a string up to 256 bytes, a signed 64-bit integer, or the Boolean values `true` and `false`. For example: \"/instance_id\": \"my-instance\" \"/http/user_agent\": \"\" \"/http/request_bytes\": 300 \"abc.com/myattribute\": true", - "type": "object" - }, - "droppedAttributesCount": { - "description": "The number of attributes that were discarded. Attributes can be discarded because their keys are too long or because there are too many attributes. If this value is 0 then all attributes are valid.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "GoogleApiServicecontrolV1Distribution": { - "description": "Distribution represents a frequency distribution of double-valued sample points. It contains the size of the population of sample points plus additional optional information: - the arithmetic mean of the samples - the minimum and maximum of the samples - the sum-squared-deviation of the samples, used to compute variance - a histogram of the values of the sample points", - "id": "GoogleApiServicecontrolV1Distribution", - "properties": { - "bucketCounts": { - "description": "The number of samples in each histogram bucket. `bucket_counts` are optional. If present, they must sum to the `count` value. The buckets are defined below in `bucket_option`. There are N buckets. `bucket_counts[0]` is the number of samples in the underflow bucket. `bucket_counts[1]` to `bucket_counts[N-1]` are the numbers of samples in each of the finite buckets. And `bucket_counts[N] is the number of samples in the overflow bucket. See the comments of `bucket_option` below for more details. Any suffix of trailing zeros may be omitted.", - "items": { - "format": "int64", - "type": "string" - }, - "type": "array" - }, - "count": { - "description": "The total number of samples in the distribution. Must be >= 0.", - "format": "int64", - "type": "string" - }, - "exemplars": { - "description": "Example points. Must be in increasing order of `value` field.", - "items": { - "$ref": "Exemplar" - }, - "type": "array" - }, - "explicitBuckets": { - "$ref": "GoogleApiServicecontrolV1ExplicitBuckets", - "description": "Buckets with arbitrary user-provided width." - }, - "exponentialBuckets": { - "$ref": "GoogleApiServicecontrolV1ExponentialBuckets", - "description": "Buckets with exponentially growing width." - }, - "linearBuckets": { - "$ref": "GoogleApiServicecontrolV1LinearBuckets", - "description": "Buckets with constant width." - }, - "maximum": { - "description": "The maximum of the population of values. Ignored if `count` is zero.", - "format": "double", - "type": "number" - }, - "mean": { - "description": "The arithmetic mean of the samples in the distribution. If `count` is zero then this field must be zero.", - "format": "double", - "type": "number" - }, - "minimum": { - "description": "The minimum of the population of values. Ignored if `count` is zero.", - "format": "double", - "type": "number" - }, - "sumOfSquaredDeviation": { - "description": "The sum of squared deviations from the mean: Sum[i=1..count]((x_i - mean)^2) where each x_i is a sample values. If `count` is zero then this field must be zero, otherwise validation of the request fails.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "GoogleApiServicecontrolV1ExplicitBuckets": { - "description": "Describing buckets with arbitrary user-provided width.", - "id": "GoogleApiServicecontrolV1ExplicitBuckets", - "properties": { - "bounds": { - "description": "'bound' is a list of strictly increasing boundaries between buckets. Note that a list of length N-1 defines N buckets because of fenceposting. See comments on `bucket_options` for details. The i'th finite bucket covers the interval [bound[i-1], bound[i]) where i ranges from 1 to bound_size() - 1. Note that there are no finite buckets at all if 'bound' only contains a single element; in that special case the single bound defines the boundary between the underflow and overflow buckets. bucket number lower bound upper bound i == 0 (underflow) -inf bound[i] 0 < i < bound_size() bound[i-1] bound[i] i == bound_size() (overflow) bound[i-1] +inf", - "items": { - "format": "double", - "type": "number" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleApiServicecontrolV1ExponentialBuckets": { - "description": "Describing buckets with exponentially growing width.", - "id": "GoogleApiServicecontrolV1ExponentialBuckets", - "properties": { - "growthFactor": { - "description": "The i'th exponential bucket covers the interval [scale * growth_factor^(i-1), scale * growth_factor^i) where i ranges from 1 to num_finite_buckets inclusive. Must be larger than 1.0.", - "format": "double", - "type": "number" - }, - "numFiniteBuckets": { - "description": "The number of finite buckets. With the underflow and overflow buckets, the total number of buckets is `num_finite_buckets` + 2. See comments on `bucket_options` for details.", - "format": "int32", - "type": "integer" - }, - "scale": { - "description": "The i'th exponential bucket covers the interval [scale * growth_factor^(i-1), scale * growth_factor^i) where i ranges from 1 to num_finite_buckets inclusive. Must be > 0.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "GoogleApiServicecontrolV1HttpRequest": { - "description": "A common proto for logging HTTP requests. Only contains semantics defined by the HTTP specification. Product-specific logging information MUST be defined in a separate message.", - "id": "GoogleApiServicecontrolV1HttpRequest", - "properties": { - "cacheFillBytes": { - "description": "The number of HTTP response bytes inserted into cache. Set only when a cache fill was attempted.", - "format": "int64", - "type": "string" - }, - "cacheHit": { - "description": "Whether or not an entity was served from cache (with or without validation).", - "type": "boolean" - }, - "cacheLookup": { - "description": "Whether or not a cache lookup was attempted.", - "type": "boolean" - }, - "cacheValidatedWithOriginServer": { - "description": "Whether or not the response was validated with the origin server before being served from cache. This field is only meaningful if `cache_hit` is True.", - "type": "boolean" - }, - "latency": { - "description": "The request processing latency on the server, from the time the request was received until the response was sent.", - "format": "google-duration", - "type": "string" - }, - "protocol": { - "description": "Protocol used for the request. Examples: \"HTTP/1.1\", \"HTTP/2\", \"websocket\"", - "type": "string" - }, - "referer": { - "description": "The referer URL of the request, as defined in [HTTP/1.1 Header Field Definitions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).", - "type": "string" - }, - "remoteIp": { - "description": "The IP address (IPv4 or IPv6) of the client that issued the HTTP request. Examples: `\"192.168.1.1\"`, `\"FE80::0202:B3FF:FE1E:8329\"`.", - "type": "string" - }, - "requestMethod": { - "description": "The request method. Examples: `\"GET\"`, `\"HEAD\"`, `\"PUT\"`, `\"POST\"`.", - "type": "string" - }, - "requestSize": { - "description": "The size of the HTTP request message in bytes, including the request headers and the request body.", - "format": "int64", - "type": "string" - }, - "requestUrl": { - "description": "The scheme (http, https), the host name, the path, and the query portion of the URL that was requested. Example: `\"http://example.com/some/info?color=red\"`.", - "type": "string" - }, - "responseSize": { - "description": "The size of the HTTP response message sent back to the client, in bytes, including the response headers and the response body.", - "format": "int64", - "type": "string" - }, - "serverIp": { - "description": "The IP address (IPv4 or IPv6) of the origin server that the request was sent to.", - "type": "string" - }, - "status": { - "description": "The response code indicating the status of the response. Examples: 200, 404.", - "format": "int32", - "type": "integer" - }, - "userAgent": { - "description": "The user agent sent by the client. Example: `\"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)\"`.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleApiServicecontrolV1LinearBuckets": { - "description": "Describing buckets with constant width.", - "id": "GoogleApiServicecontrolV1LinearBuckets", - "properties": { - "numFiniteBuckets": { - "description": "The number of finite buckets. With the underflow and overflow buckets, the total number of buckets is `num_finite_buckets` + 2. See comments on `bucket_options` for details.", - "format": "int32", - "type": "integer" - }, - "offset": { - "description": "The i'th linear bucket covers the interval [offset + (i-1) * width, offset + i * width) where i ranges from 1 to num_finite_buckets, inclusive.", - "format": "double", - "type": "number" - }, - "width": { - "description": "The i'th linear bucket covers the interval [offset + (i-1) * width, offset + i * width) where i ranges from 1 to num_finite_buckets, inclusive. Must be strictly positive.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "GoogleApiServicecontrolV1LogEntry": { - "description": "An individual log entry.", - "id": "GoogleApiServicecontrolV1LogEntry", - "properties": { - "httpRequest": { - "$ref": "GoogleApiServicecontrolV1HttpRequest", - "description": "Optional. Information about the HTTP request associated with this log entry, if applicable." - }, - "insertId": { - "description": "A unique ID for the log entry used for deduplication. If omitted, the implementation will generate one based on operation_id.", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "A set of user-defined (key, value) data that provides additional information about the log entry.", - "type": "object" - }, - "name": { - "description": "Required. The log to which this log entry belongs. Examples: `\"syslog\"`, `\"book_log\"`.", - "type": "string" - }, - "operation": { - "$ref": "GoogleApiServicecontrolV1LogEntryOperation", - "description": "Optional. Information about an operation associated with the log entry, if applicable." - }, - "protoPayload": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "The log entry payload, represented as a protocol buffer that is expressed as a JSON object. The only accepted type currently is AuditLog.", - "type": "object" - }, - "severity": { - "description": "The severity of the log entry. The default value is `LogSeverity.DEFAULT`.", - "enum": [ - "DEFAULT", - "DEBUG", - "INFO", - "NOTICE", - "WARNING", - "ERROR", - "CRITICAL", - "ALERT", - "EMERGENCY" - ], - "enumDescriptions": [ - "(0) The log entry has no assigned severity level.", - "(100) Debug or trace information.", - "(200) Routine information, such as ongoing status or performance.", - "(300) Normal but significant events, such as start up, shut down, or a configuration change.", - "(400) Warning events might cause problems.", - "(500) Error events are likely to cause problems.", - "(600) Critical events cause more severe problems or outages.", - "(700) A person must take an action immediately.", - "(800) One or more systems are unusable." - ], - "type": "string" - }, - "sourceLocation": { - "$ref": "GoogleApiServicecontrolV1LogEntrySourceLocation", - "description": "Optional. Source code location information associated with the log entry, if any." - }, - "structPayload": { - "additionalProperties": { - "description": "Properties of the object.", - "type": "any" - }, - "description": "The log entry payload, represented as a structure that is expressed as a JSON object.", - "type": "object" - }, - "textPayload": { - "description": "The log entry payload, represented as a Unicode string (UTF-8).", - "type": "string" - }, - "timestamp": { - "description": "The time the event described by the log entry occurred. If omitted, defaults to operation start time.", - "format": "google-datetime", - "type": "string" - }, - "trace": { - "description": "Optional. Resource name of the trace associated with the log entry, if any. If this field contains a relative resource name, you can assume the name is relative to `//tracing.googleapis.com`. Example: `projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824`", - "type": "string" - } - }, - "type": "object" - }, - "GoogleApiServicecontrolV1LogEntryOperation": { - "description": "Additional information about a potentially long-running operation with which a log entry is associated.", - "id": "GoogleApiServicecontrolV1LogEntryOperation", - "properties": { - "first": { - "description": "Optional. Set this to True if this is the first log entry in the operation.", - "type": "boolean" - }, - "id": { - "description": "Optional. An arbitrary operation identifier. Log entries with the same identifier are assumed to be part of the same operation.", - "type": "string" - }, - "last": { - "description": "Optional. Set this to True if this is the last log entry in the operation.", - "type": "boolean" - }, - "producer": { - "description": "Optional. An arbitrary producer identifier. The combination of `id` and `producer` must be globally unique. Examples for `producer`: `\"MyDivision.MyBigCompany.com\"`, `\"github.com/MyProject/MyApplication\"`.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleApiServicecontrolV1LogEntrySourceLocation": { - "description": "Additional information about the source code location that produced the log entry.", - "id": "GoogleApiServicecontrolV1LogEntrySourceLocation", - "properties": { - "file": { - "description": "Optional. Source file name. Depending on the runtime environment, this might be a simple name or a fully-qualified name.", - "type": "string" - }, - "function": { - "description": "Optional. Human-readable name of the function or method being invoked, with optional context such as the class or package name. This information may be used in contexts such as the logs viewer, where a file and line number are less meaningful. The format can vary by language. For example: `qual.if.ied.Class.method` (Java), `dir/package.func` (Go), `function` (Python).", - "type": "string" - }, - "line": { - "description": "Optional. Line within the source file. 1-based; 0 indicates no line number available.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "GoogleApiServicecontrolV1MetricValue": { - "description": "Represents a single metric value.", - "id": "GoogleApiServicecontrolV1MetricValue", - "properties": { - "boolValue": { - "description": "A boolean value.", - "type": "boolean" - }, - "distributionValue": { - "$ref": "GoogleApiServicecontrolV1Distribution", - "description": "A distribution value." - }, - "doubleValue": { - "description": "A double precision floating point value.", - "format": "double", - "type": "number" - }, - "endTime": { - "description": "The end of the time period over which this metric value's measurement applies. If not specified, google.api.servicecontrol.v1.Operation.end_time will be used.", - "format": "google-datetime", - "type": "string" - }, - "int64Value": { - "description": "A signed 64-bit integer value.", - "format": "int64", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "The labels describing the metric value. See comments on google.api.servicecontrol.v1.Operation.labels for the overriding relationship. Note that this map must not contain monitored resource labels.", - "type": "object" - }, - "moneyValue": { - "$ref": "Money", - "description": "A money value." - }, - "startTime": { - "description": "The start of the time period over which this metric value's measurement applies. The time period has different semantics for different metric types (cumulative, delta, and gauge). See the metric definition documentation in the service configuration for details. If not specified, google.api.servicecontrol.v1.Operation.start_time will be used.", - "format": "google-datetime", - "type": "string" - }, - "stringValue": { - "description": "A text string value.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleApiServicecontrolV1MetricValueSet": { - "description": "Represents a set of metric values in the same metric. Each metric value in the set should have a unique combination of start time, end time, and label values.", - "id": "GoogleApiServicecontrolV1MetricValueSet", - "properties": { - "metricName": { - "description": "The metric name defined in the service configuration.", - "type": "string" - }, - "metricValues": { - "description": "The values in this metric.", - "items": { - "$ref": "GoogleApiServicecontrolV1MetricValue" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleApiServicecontrolV1Operation": { - "description": "Represents information regarding an operation.", - "id": "GoogleApiServicecontrolV1Operation", - "properties": { - "consumerId": { - "description": "Identity of the consumer who is using the service. This field should be filled in for the operations initiated by a consumer, but not for service-initiated operations that are not related to a specific consumer. - This can be in one of the following formats: - project:PROJECT_ID, - project`_`number:PROJECT_NUMBER, - projects/PROJECT_ID or PROJECT_NUMBER, - folders/FOLDER_NUMBER, - organizations/ORGANIZATION_NUMBER, - api`_`key:API_KEY.", - "type": "string" - }, - "endTime": { - "description": "End time of the operation. Required when the operation is used in ServiceController.Report, but optional when the operation is used in ServiceController.Check.", - "format": "google-datetime", - "type": "string" - }, - "extensions": { - "description": "Unimplemented.", - "items": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "type": "object" - }, - "type": "array" - }, - "importance": { - "description": "DO NOT USE. This is an experimental field.", - "enum": [ - "LOW", - "HIGH", - "DEBUG" - ], - "enumDescriptions": [ - "Allows data caching, batching, and aggregation. It provides higher performance with higher data loss risk.", - "Disables data aggregation to minimize data loss. It is for operations that contains significant monetary value or audit trail. This feature only applies to the client libraries.", - "Deprecated. Do not use. Disables data aggregation and enables additional validation logic. It should only be used during the onboarding process. It is only available to Google internal services, and the service must be approved by chemist-dev@google.com in order to use this level." - ], - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Labels describing the operation. Only the following labels are allowed: - Labels describing monitored resources as defined in the service configuration. - Default labels of metric values. When specified, labels defined in the metric value override these default. - The following labels defined by Google Cloud Platform: - `cloud.googleapis.com/location` describing the location where the operation happened, - `servicecontrol.googleapis.com/user_agent` describing the user agent of the API request, - `servicecontrol.googleapis.com/service_agent` describing the service used to handle the API request (e.g. ESP), - `servicecontrol.googleapis.com/platform` describing the platform where the API is served, such as App Engine, Compute Engine, or Kubernetes Engine.", - "type": "object" - }, - "logEntries": { - "description": "Represents information to be logged.", - "items": { - "$ref": "GoogleApiServicecontrolV1LogEntry" - }, - "type": "array" - }, - "metricValueSets": { - "description": "Represents information about this operation. Each MetricValueSet corresponds to a metric defined in the service configuration. The data type used in the MetricValueSet must agree with the data type specified in the metric definition. Within a single operation, it is not allowed to have more than one MetricValue instances that have the same metric names and identical label value combinations. If a request has such duplicated MetricValue instances, the entire request is rejected with an invalid argument error.", - "items": { - "$ref": "GoogleApiServicecontrolV1MetricValueSet" - }, - "type": "array" - }, - "operationId": { - "description": "Identity of the operation. This must be unique within the scope of the service that generated the operation. If the service calls Check() and Report() on the same operation, the two calls should carry the same id. UUID version 4 is recommended, though not required. In scenarios where an operation is computed from existing information and an idempotent id is desirable for deduplication purpose, UUID version 5 is recommended. See RFC 4122 for details.", - "type": "string" - }, - "operationName": { - "description": "Fully qualified name of the operation. Reserved for future use.", - "type": "string" - }, - "quotaProperties": { - "$ref": "GoogleApiServicecontrolV1QuotaProperties", - "description": "Represents the properties needed for quota check. Applicable only if this operation is for a quota check request. If this is not specified, no quota check will be performed." - }, - "resources": { - "description": "The resources that are involved in the operation. The maximum supported number of entries in this field is 100.", - "items": { - "$ref": "GoogleApiServicecontrolV1ResourceInfo" - }, - "type": "array" - }, - "startTime": { - "description": "Required. Start time of the operation.", - "format": "google-datetime", - "type": "string" - }, - "traceSpans": { - "description": "Unimplemented. A list of Cloud Trace spans. The span names shall contain the id of the destination project which can be either the produce or the consumer project.", - "items": { - "$ref": "GoogleApiServicecontrolV1TraceSpan" - }, - "type": "array" - }, - "userLabels": { - "additionalProperties": { - "type": "string" - }, - "description": "Private Preview. This feature is only available for approved services. User defined labels for the resource that this operation is associated with.", - "type": "object" - } - }, - "type": "object" - }, - "GoogleApiServicecontrolV1QuotaProperties": { - "description": "Represents the properties needed for quota operations.", - "id": "GoogleApiServicecontrolV1QuotaProperties", - "properties": { - "quotaMode": { - "description": "Quota mode for this operation.", - "enum": [ - "ACQUIRE", - "ACQUIRE_BEST_EFFORT", - "CHECK", - "RELEASE" - ], - "enumDescriptions": [ - "Decreases available quota by the cost specified for the operation. If cost is higher than available quota, operation fails and returns error.", - "Decreases available quota by the cost specified for the operation. If cost is higher than available quota, operation does not fail and available quota goes down to zero but it returns error.", - "Does not change any available quota. Only checks if there is enough quota. No lock is placed on the checked tokens neither.", - "Increases available quota by the operation cost specified for the operation." - ], - "type": "string" - } - }, - "type": "object" - }, - "GoogleApiServicecontrolV1ReportRequest": { - "description": "Request message for the Report method.", - "id": "GoogleApiServicecontrolV1ReportRequest", - "properties": { - "operations": { - "description": "Operations to be reported. Typically the service should report one operation per request. Putting multiple operations into a single request is allowed, but should be used only when multiple operations are natually available at the time of the report. There is no limit on the number of operations in the same ReportRequest, however the ReportRequest size should be no larger than 1MB. See ReportResponse.report_errors for partial failure behavior.", - "items": { - "$ref": "GoogleApiServicecontrolV1Operation" - }, - "type": "array" - }, - "serviceConfigId": { - "description": "Specifies which version of service config should be used to process the request. If unspecified or no matching version can be found, the latest one will be used.", - "type": "string" - }, - "serviceName": { - "description": "The service name as specified in its service configuration. For example, `\"pubsub.googleapis.com\"`. See [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) for the definition of a service name.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleApiServicecontrolV1ResourceInfo": { - "description": "Describes a resource associated with this operation.", - "id": "GoogleApiServicecontrolV1ResourceInfo", - "properties": { - "resourceContainer": { - "description": "The identifier of the parent of this resource instance. Must be in one of the following formats: - `projects/` - `folders/` - `organizations/`", - "type": "string" - }, - "resourceLocation": { - "description": "The location of the resource. If not empty, the resource will be checked against location policy. The value must be a valid zone, region or multiregion. For example: \"europe-west4\" or \"northamerica-northeast1-a\"", - "type": "string" - }, - "resourceName": { - "description": "Name of the resource. This is used for auditing purposes.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleApiServicecontrolV1TraceSpan": { - "description": "A span represents a single operation within a trace. Spans can be nested to form a trace tree. Often, a trace contains a root span that describes the end-to-end latency, and one or more subspans for its sub-operations. A trace can also contain multiple root spans, or none at all. Spans do not need to be contiguous—there may be gaps or overlaps between spans in a trace.", - "id": "GoogleApiServicecontrolV1TraceSpan", - "properties": { - "attributes": { - "$ref": "GoogleApiServicecontrolV1Attributes", - "description": "A set of attributes on the span. You can have up to 32 attributes per span." - }, - "childSpanCount": { - "description": "An optional number of child spans that were generated while this span was active. If set, allows implementation to detect missing child spans.", - "format": "int32", - "type": "integer" - }, - "displayName": { - "$ref": "GoogleApiServicecontrolV1TruncatableString", - "description": "A description of the span's operation (up to 128 bytes). Stackdriver Trace displays the description in the Google Cloud Platform Console. For example, the display name can be a qualified method name or a file name and a line number where the operation is called. A best practice is to use the same display name within an application and at the same call point. This makes it easier to correlate spans in different traces." - }, - "endTime": { - "description": "The end time of the span. On the client side, this is the time kept by the local machine where the span execution ends. On the server side, this is the time when the server application handler stops running.", - "format": "google-datetime", - "type": "string" - }, - "name": { - "description": "The resource name of the span in the following format: projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/SPAN_ID is a unique identifier for a trace within a project; it is a 32-character hexadecimal encoding of a 16-byte array. [SPAN_ID] is a unique identifier for a span within a trace; it is a 16-character hexadecimal encoding of an 8-byte array.", - "type": "string" - }, - "parentSpanId": { - "description": "The [SPAN_ID] of this span's parent span. If this is a root span, then this field must be empty.", - "type": "string" - }, - "sameProcessAsParentSpan": { - "description": "(Optional) Set this parameter to indicate whether this span is in the same process as its parent. If you do not set this parameter, Stackdriver Trace is unable to take advantage of this helpful information.", - "type": "boolean" - }, - "spanId": { - "description": "The [SPAN_ID] portion of the span's resource name.", - "type": "string" - }, - "spanKind": { - "description": "Distinguishes between spans generated in a particular context. For example, two spans with the same name may be distinguished using `CLIENT` (caller) and `SERVER` (callee) to identify an RPC call.", - "enum": [ - "SPAN_KIND_UNSPECIFIED", - "INTERNAL", - "SERVER", - "CLIENT", - "PRODUCER", - "CONSUMER" - ], - "enumDescriptions": [ - "Unspecified. Do NOT use as default. Implementations MAY assume SpanKind.INTERNAL to be default.", - "Indicates that the span is used internally. Default value.", - "Indicates that the span covers server-side handling of an RPC or other remote network request.", - "Indicates that the span covers the client-side wrapper around an RPC or other remote request.", - "Indicates that the span describes producer sending a message to a broker. Unlike client and server, there is no direct critical path latency relationship between producer and consumer spans (e.g. publishing a message to a pubsub service).", - "Indicates that the span describes consumer receiving a message from a broker. Unlike client and server, there is no direct critical path latency relationship between producer and consumer spans (e.g. receiving a message from a pubsub service subscription)." - ], - "type": "string" - }, - "startTime": { - "description": "The start time of the span. On the client side, this is the time kept by the local machine where the span execution starts. On the server side, this is the time when the server's application handler starts running.", - "format": "google-datetime", - "type": "string" - }, - "status": { - "$ref": "Status", - "description": "An optional final status for this span." - } - }, - "type": "object" - }, - "GoogleApiServicecontrolV1TruncatableString": { - "description": "Represents a string that might be shortened to a specified length.", - "id": "GoogleApiServicecontrolV1TruncatableString", - "properties": { - "truncatedByteCount": { - "description": "The number of bytes removed from the original string. If this value is 0, then the string was not shortened.", - "format": "int32", - "type": "integer" - }, - "value": { - "description": "The shortened string. For example, if the original string is 500 bytes long and the limit of the string is 128 bytes, then `value` contains the first 128 bytes of the 500-byte string. Truncation always happens on a UTF8 character boundary. If there are multi-byte characters in the string, then the length of the shortened string might be less than the size limit.", - "type": "string" - } - }, - "type": "object" - }, "IssuanceModes": { "description": "IssuanceModes specifies the allowed ways in which Certificates may be requested from this CertificateAuthority.", "id": "IssuanceModes", @@ -2955,27 +2234,6 @@ }, "type": "object" }, - "Money": { - "description": "Represents an amount of money with its currency type.", - "id": "Money", - "properties": { - "currencyCode": { - "description": "The three-letter currency code defined in ISO 4217.", - "type": "string" - }, - "nanos": { - "description": "Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.", - "format": "int32", - "type": "integer" - }, - "units": { - "description": "The whole units of the amount. For example if `currencyCode` is `\"USD\"`, then 1 unit is one US dollar.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, "ObjectId": { "description": "An ObjectId specifies an object identifier (OID). These provide context and describe types in ASN.1 messages.", "id": "ObjectId", @@ -3127,6 +2385,17 @@ }, "type": "object" }, + "ReconciliationOperationMetadata": { + "description": "Operation metadata returned by the CLH during resource state reconciliation.", + "id": "ReconciliationOperationMetadata", + "properties": { + "deleteResource": { + "description": "If set to TRUE, the resource has to be deleted. When using this bit, the CLH should fail the operation.", + "type": "boolean" + } + }, + "type": "object" + }, "RestoreCertificateAuthorityRequest": { "description": "Request message for CertificateAuthorityService.RestoreCertificateAuthority.", "id": "RestoreCertificateAuthorityRequest", diff --git a/discovery/prod_tt_sasportal-v1alpha1.json b/discovery/prod_tt_sasportal-v1alpha1.json index 14fc93f506d..8bfe5bf75ce 100644 --- a/discovery/prod_tt_sasportal-v1alpha1.json +++ b/discovery/prod_tt_sasportal-v1alpha1.json @@ -2484,7 +2484,7 @@ } } }, - "revision": "20210307", + "revision": "20210322", "rootUrl": "https://prod-tt-sasportal.googleapis.com/", "schemas": { "SasPortalAssignment": { @@ -2505,6 +2505,22 @@ }, "type": "object" }, + "SasPortalChannelWithScore": { + "description": "The channel with score.", + "id": "SasPortalChannelWithScore", + "properties": { + "frequencyRange": { + "$ref": "SasPortalFrequencyRange", + "description": "The frequency range of the channel." + }, + "score": { + "description": "The channel score, normalized to be in [0,100].", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, "SasPortalCreateSignedDeviceRequest": { "description": "Request for CreateSignedDevice.", "id": "SasPortalCreateSignedDeviceRequest", @@ -2604,6 +2620,14 @@ "$ref": "SasPortalDeviceConfig", "description": "Output only. Current configuration of the device as registered to the SAS." }, + "currentChannels": { + "description": "Output only. Current channels with scores.", + "items": { + "$ref": "SasPortalChannelWithScore" + }, + "readOnly": true, + "type": "array" + }, "deviceMetadata": { "$ref": "SasPortalDeviceMetadata", "description": "Device parameters that can be overridden by both SAS Portal and SAS registration requests." diff --git a/discovery/pubsublite-v1.json b/discovery/pubsublite-v1.json index 8b1528a1baf..38c2d5db1c9 100644 --- a/discovery/pubsublite-v1.json +++ b/discovery/pubsublite-v1.json @@ -129,6 +129,11 @@ "required": true, "type": "string" }, + "skipBacklog": { + "description": "If true, the newly created subscription will only receive messages published after the subscription was created. Otherwise, the entire message backlog will be received on the subscription. Defaults to false.", + "location": "query", + "type": "boolean" + }, "subscriptionId": { "description": "Required. The ID to use for the subscription, which will become the final component of the subscription's name. This value is structured like: `my-sub-name`.", "location": "query", @@ -627,7 +632,7 @@ } } }, - "revision": "20210302", + "revision": "20210316", "rootUrl": "https://pubsublite.googleapis.com/", "schemas": { "Capacity": { diff --git a/discovery/realtimebidding-v1.json b/discovery/realtimebidding-v1.json index 7564ee1c188..3808608738f 100644 --- a/discovery/realtimebidding-v1.json +++ b/discovery/realtimebidding-v1.json @@ -106,6 +106,60 @@ "protocol": "rest", "resources": { "bidders": { + "methods": { + "get": { + "description": "Gets a bidder account by its name.", + "flatPath": "v1/bidders/{biddersId}", + "httpMethod": "GET", + "id": "realtimebidding.bidders.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the bidder to get. Format: `bidders/{bidderAccountId}`", + "location": "path", + "pattern": "^bidders/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Bidder" + }, + "scopes": [ + "https://www.googleapis.com/auth/realtime-bidding" + ] + }, + "list": { + "description": "Lists all the bidder accounts that belong to the caller.", + "flatPath": "v1/bidders", + "httpMethod": "GET", + "id": "realtimebidding.bidders.list", + "parameterOrder": [], + "parameters": { + "pageSize": { + "description": "The maximum number of bidders to return. If unspecified, at most 100 bidders will be returned. The maximum value is 500; values above 500 will be coerced to 500.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A token identifying a page of results the server should return. This value is received from a previous `ListBidders` call in ListBiddersResponse.nextPageToken.", + "location": "query", + "type": "string" + } + }, + "path": "v1/bidders", + "response": { + "$ref": "ListBiddersResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/realtime-bidding" + ] + } + }, "resources": { "creatives": { "methods": { @@ -195,6 +249,71 @@ } } }, + "endpoints": { + "methods": { + "get": { + "description": "Gets a bidder endpoint by its name.", + "flatPath": "v1/bidders/{biddersId}/endpoints/{endpointsId}", + "httpMethod": "GET", + "id": "realtimebidding.bidders.endpoints.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the bidder endpoint to get. Format: `bidders/{bidderAccountId}/endpoints/{endpointId}`", + "location": "path", + "pattern": "^bidders/[^/]+/endpoints/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Endpoint" + }, + "scopes": [ + "https://www.googleapis.com/auth/realtime-bidding" + ] + }, + "list": { + "description": "Lists all the bidder's endpoints.", + "flatPath": "v1/bidders/{biddersId}/endpoints", + "httpMethod": "GET", + "id": "realtimebidding.bidders.endpoints.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "The maximum number of endpoints to return. If unspecified, at most 100 endpoints will be returned. The maximum value is 500; values above 500 will be coerced to 500.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A token identifying a page of results the server should return. This value is received from a previous `ListEndpoints` call in ListEndpointsResponse.nextPageToken.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Name of the bidder whose endpoints will be listed. Format: `bidders/{bidderAccountId}`", + "location": "path", + "pattern": "^bidders/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/endpoints", + "response": { + "$ref": "ListEndpointsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/realtime-bidding" + ] + } + } + }, "pretargetingConfigs": { "methods": { "activate": { @@ -575,6 +694,31 @@ }, "buyers": { "methods": { + "get": { + "description": "Gets a buyer account by its name.", + "flatPath": "v1/buyers/{buyersId}", + "httpMethod": "GET", + "id": "realtimebidding.buyers.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the buyer to get. Format: `buyers/{buyerId}`", + "location": "path", + "pattern": "^buyers/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Buyer" + }, + "scopes": [ + "https://www.googleapis.com/auth/realtime-bidding" + ] + }, "getRemarketingTag": { "description": "Gets remarketing tag for a buyer. A remarketing tag is a piece of JavaScript code that can be placed on a web page. When a user visits a page containing a remarketing tag, Google adds the user to a user list.", "flatPath": "v1/buyers/{buyersId}:getRemarketingTag", @@ -599,6 +743,33 @@ "scopes": [ "https://www.googleapis.com/auth/realtime-bidding" ] + }, + "list": { + "description": "Lists all buyer account information the calling buyer user or service account is permissioned to manage.", + "flatPath": "v1/buyers", + "httpMethod": "GET", + "id": "realtimebidding.buyers.list", + "parameterOrder": [], + "parameters": { + "pageSize": { + "description": "The maximum number of buyers to return. If unspecified, at most 100 buyers will be returned. The maximum value is 500; values above 500 will be coerced to 500.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A token identifying a page of results the server should return. This value is received from a previous `ListBuyers` call in ListBuyersResponse.nextPageToken.", + "location": "query", + "type": "string" + } + }, + "path": "v1/buyers", + "response": { + "$ref": "ListBuyersResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/realtime-bidding" + ] } }, "resources": { @@ -969,7 +1140,7 @@ } } }, - "revision": "20201110", + "revision": "20210323", "rootUrl": "https://realtimebidding.googleapis.com/", "schemas": { "ActivatePretargetingConfigRequest": { @@ -978,6 +1149,36 @@ "properties": {}, "type": "object" }, + "AdTechnologyProviders": { + "description": "The list of detected Ad Technology Providers for this creative. Bids placed for inventory that will serve to EEA or UK users are expected to comply with GDPR requirements. You must ensure that the creatives used in such bids should contain only user consented ad technology providers as indicated in the bid request. Google reserves the right to filter non-compliant bids. User consented ad technology providers can be found in the [Google Protocol](https://developers.google.com/authorized-buyers/rtb/downloads/realtime-bidding-proto) with the `BidRequest.adslot.consented_providers_settings` field, and can be found as an [OpenRTB extension](https://developers.google.com/authorized-buyers/rtb/downloads/openrtb-adx-proto) with the `BidRequest.user.ext.consented_providers_settings` and `BidRequest.user.ext.consent` fields. See https://support.google.com/authorizedbuyers/answer/9789378 for additional information about the Google TCF v2 integration.", + "id": "AdTechnologyProviders", + "properties": { + "detectedGvlIds": { + "description": "The detected IAB Global Vendor List (GVL) IDs for this creative. See the IAB Global Vendor List at https://vendorlist.consensu.org/v2/vendor-list.json for details about the vendors.", + "items": { + "format": "int64", + "type": "string" + }, + "type": "array" + }, + "detectedProviderIds": { + "description": "The detected [Google Ad Tech Providers (ATP)](https://support.google.com/admanager/answer/9012903) for this creative. See https://storage.googleapis.com/adx-rtb-dictionaries/providers.csv for mapping of provider ID to provided name, a privacy policy URL, and a list of domains which can be attributed to the provider.", + "items": { + "format": "int64", + "type": "string" + }, + "type": "array" + }, + "unidentifiedProviderDomains": { + "description": "Domains of detected unidentified ad technology providers (if any). You must ensure that the creatives used in bids placed for inventory that will serve to EEA or UK users does not contain unidentified ad technology providers. Google reserves the right to filter non-compliant bids.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "AddTargetedAppsRequest": { "description": "A request to start targeting the provided app IDs in a specific pretargeting configuration. The pretargeting configuration itself specifies how these apps are targeted. in PretargetingConfig.appTargeting.mobileAppTargeting.", "id": "AddTargetedAppsRequest", @@ -1102,6 +1303,80 @@ }, "type": "object" }, + "Bidder": { + "description": "Bidder settings.", + "id": "Bidder", + "properties": { + "bypassNonguaranteedDealsPretargeting": { + "description": "Output only. A flag to bypass pretargeting for private auctions and preferred deals. When true, bid requests from these nonguaranteed deals will always be sent. When false, bid requests will be subject to regular pretargeting configurations. Programmatic Guaranteed deals will always be sent to the bidder, regardless of the value for this flag. Auction packages are not impacted by this value and are subject to the regular pretargeting configurations.", + "readOnly": true, + "type": "boolean" + }, + "cookieMatchingNetworkId": { + "description": "Output only. The buyer's network ID used for cookie matching. This ID corresponds to the `google_nid` parameter in the URL used in cookie match requests. Refer to https://developers.google.com/authorized-buyers/rtb/cookie-guide for further information.", + "readOnly": true, + "type": "string" + }, + "cookieMatchingUrl": { + "description": "Output only. The base URL used in cookie match requests. Refer to https://developers.google.com/authorized-buyers/rtb/cookie-guide for further information.", + "readOnly": true, + "type": "string" + }, + "dealsBillingId": { + "description": "Output only. The billing ID for the deals pretargeting config. This billing ID is sent on the bid request for guaranteed and nonguaranteed deals matched in pretargeting.", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Output only. Name of the bidder resource that must follow the pattern `bidders/{bidderAccountId}`, where `{bidderAccountId}` is the account ID of the bidder whose information is to be received. One can get their account ID on the Authorized Buyers or Open Bidding UI, or by contacting their Google account manager.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "Buyer": { + "description": "RTB Buyer account information.", + "id": "Buyer", + "properties": { + "activeCreativeCount": { + "description": "Output only. The number of creatives that this buyer submitted via the API or bid with in the last 30 days. This is counted against the maximum number of active creatives.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "bidder": { + "description": "Output only. The name of the bidder resource that is responsible for receiving bidding traffic for this account. The bidder name must follow the pattern `bidders/{bidderAccountId}`, where `{bidderAccountId}` is the account ID of the bidder receiving traffic for this buyer.", + "readOnly": true, + "type": "string" + }, + "billingIds": { + "description": "Output only. A list of billing IDs associated with this account. These IDs appear on: 1. A bid request, to signal which buyers are eligible to bid on a given opportunity, and which pretargeting configurations were matched for each eligible buyer. 2. The bid response, to attribute a winning impression to a specific account for billing, reporting, policy and publisher block enforcement.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "displayName": { + "description": "Output only. The diplay name associated with this buyer account, as visible to sellers.", + "readOnly": true, + "type": "string" + }, + "maximumActiveCreativeCount": { + "description": "Output only. The maximum number of active creatives that this buyer can have.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Output only. Name of the buyer resource that must follow the pattern `buyers/{buyerAccountId}`, where `{buyerAccountId}` is the account ID of the buyer account whose information is to be received. One can get their account ID on the Authorized Buyers or Open Bidding UI, or by contacting their Google account manager.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "CloseUserListRequest": { "description": "A request to close a specified user list.", "id": "CloseUserListRequest", @@ -1357,6 +1632,10 @@ "description": "Top level status and detected attributes of a creative.", "id": "CreativeServingDecision", "properties": { + "adTechnologyProviders": { + "$ref": "AdTechnologyProviders", + "description": "The detected ad technology providers." + }, "chinaPolicyCompliance": { "$ref": "PolicyCompliance", "description": "The policy compliance of this creative in China. When approved or disapproved, this applies to both deals and open auction in China. When pending review, this creative is allowed to serve for deals but not for open auction." @@ -1748,6 +2027,72 @@ "properties": {}, "type": "object" }, + "Endpoint": { + "description": "Bidder endpoint that receives bid requests.", + "id": "Endpoint", + "properties": { + "bidProtocol": { + "description": "The protocol that the bidder endpoint is using.", + "enum": [ + "BID_PROTOCOL_UNSPECIFIED", + "GOOGLE_RTB", + "OPENRTB_2_2", + "OPENRTB_2_3", + "OPENRTB_PROTOBUF_2_3", + "OPENRTB_2_4", + "OPENRTB_PROTOBUF_2_4", + "OPENRTB_2_5", + "OPENRTB_PROTOBUF_2_5" + ], + "enumDescriptions": [ + "Placeholder for undefined bid protocol. This value should not be used.", + "Google RTB protocol / Protobuf encoding.", + "OpenRTB / JSON encoding, specification version 2.2.", + "OpenRTB / JSON encoding, specification version 2.3.", + "OpenRTB / Protobuf encoding, specification version 2.3.", + "OpenRTB / JSON encoding, specification version 2.4.", + "OpenRTB / Protobuf encoding, specification version 2.4.", + "OpenRTB / JSON encoding, specification version 2.5.", + "OpenRTB / Protobuf encoding, specification version 2.5." + ], + "type": "string" + }, + "maximumQps": { + "description": "The maximum number of queries per second allowed to be sent to this server.", + "format": "int64", + "type": "string" + }, + "name": { + "description": "Output only. Name of the endpoint resource that must follow the pattern `bidders/{bidderAccountId}/endpoints/{endpointId}`, where {bidderAccountId} is the account ID of the bidder who operates this endpoint, and {endpointId} is a unique ID assigned by the server.", + "readOnly": true, + "type": "string" + }, + "tradingLocation": { + "description": "The trading location that bid requests should be sent from. See https://developers.google.com/authorized-buyers/rtb/peer-guide#trading-locations for further information.", + "enum": [ + "TRADING_LOCATION_UNSPECIFIED", + "US_WEST", + "US_EAST", + "EUROPE", + "ASIA" + ], + "enumDescriptions": [ + "A placeholder for an undefined trading region. This value should not be used.", + "The Western US trading location.", + "The Eastern US trading location.", + "The European trading location.", + "The Asia trading location." + ], + "type": "string" + }, + "url": { + "description": "Output only. The URL that bid requests should be sent to.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "GetRemarketingTagResponse": { "description": "Response for a request to get remarketing tag.", "id": "GetRemarketingTagResponse", @@ -1834,6 +2179,42 @@ }, "type": "object" }, + "ListBiddersResponse": { + "description": "A response containing bidders.", + "id": "ListBiddersResponse", + "properties": { + "bidders": { + "description": "List of bidders.", + "items": { + "$ref": "Bidder" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token which can be passed to a subsequent call to the `ListBidders` method to retrieve the next page of results in ListBiddersRequest.pageToken.", + "type": "string" + } + }, + "type": "object" + }, + "ListBuyersResponse": { + "description": "A response containing buyer account information.", + "id": "ListBuyersResponse", + "properties": { + "buyers": { + "description": "List of buyers.", + "items": { + "$ref": "Buyer" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token which can be passed to a subsequent call to the `ListBuyers` method to retrieve the next page of results in ListBuyersRequest.pageToken.", + "type": "string" + } + }, + "type": "object" + }, "ListCreativesResponse": { "description": "A response for listing creatives.", "id": "ListCreativesResponse", @@ -1852,6 +2233,24 @@ }, "type": "object" }, + "ListEndpointsResponse": { + "description": "A response containing bidder endpoints.", + "id": "ListEndpointsResponse", + "properties": { + "endpoints": { + "description": "List of bidder endpoints.", + "items": { + "$ref": "Endpoint" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token which can be passed to a subsequent call to the `ListEndpoints` method to retrieve the next page of results in ListEndpointsRequest.pageToken.", + "type": "string" + } + }, + "type": "object" + }, "ListPretargetingConfigsResponse": { "description": "A response containing pretargeting configurations.", "id": "ListPretargetingConfigsResponse", diff --git a/discovery/recommender-v1.json b/discovery/recommender-v1.json index 03e45ed9dcf..7552f3edc0d 100644 --- a/discovery/recommender-v1.json +++ b/discovery/recommender-v1.json @@ -164,7 +164,7 @@ "type": "string" }, "parent": { - "description": "Required. The container resource on which to execute the request. Acceptable formats: 1. \"projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]\", LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types.)", + "description": "Required. The container resource on which to execute the request. Acceptable formats: 1. `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 2. `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 3. `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 4. `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types.)", "location": "path", "pattern": "^billingAccounts/[^/]+/locations/[^/]+/insightTypes/[^/]+$", "required": true, @@ -266,7 +266,7 @@ "type": "string" }, "parent": { - "description": "Required. The container resource on which to execute the request. Acceptable formats: 1. \"projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]\", LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders.", + "description": "Required. The container resource on which to execute the request. Acceptable formats: 1. `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 2. `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 3. `folders/[FOLDER_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 4. `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders.", "location": "path", "pattern": "^billingAccounts/[^/]+/locations/[^/]+/recommenders/[^/]+$", "required": true, @@ -432,7 +432,7 @@ "type": "string" }, "parent": { - "description": "Required. The container resource on which to execute the request. Acceptable formats: 1. \"projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]\", LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types.)", + "description": "Required. The container resource on which to execute the request. Acceptable formats: 1. `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 2. `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 3. `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 4. `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types.)", "location": "path", "pattern": "^folders/[^/]+/locations/[^/]+/insightTypes/[^/]+$", "required": true, @@ -534,7 +534,7 @@ "type": "string" }, "parent": { - "description": "Required. The container resource on which to execute the request. Acceptable formats: 1. \"projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]\", LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders.", + "description": "Required. The container resource on which to execute the request. Acceptable formats: 1. `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 2. `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 3. `folders/[FOLDER_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 4. `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders.", "location": "path", "pattern": "^folders/[^/]+/locations/[^/]+/recommenders/[^/]+$", "required": true, @@ -700,7 +700,7 @@ "type": "string" }, "parent": { - "description": "Required. The container resource on which to execute the request. Acceptable formats: 1. \"projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]\", LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types.)", + "description": "Required. The container resource on which to execute the request. Acceptable formats: 1. `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 2. `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 3. `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 4. `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types.)", "location": "path", "pattern": "^organizations/[^/]+/locations/[^/]+/insightTypes/[^/]+$", "required": true, @@ -802,7 +802,7 @@ "type": "string" }, "parent": { - "description": "Required. The container resource on which to execute the request. Acceptable formats: 1. \"projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]\", LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders.", + "description": "Required. The container resource on which to execute the request. Acceptable formats: 1. `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 2. `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 3. `folders/[FOLDER_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 4. `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders.", "location": "path", "pattern": "^organizations/[^/]+/locations/[^/]+/recommenders/[^/]+$", "required": true, @@ -968,7 +968,7 @@ "type": "string" }, "parent": { - "description": "Required. The container resource on which to execute the request. Acceptable formats: 1. \"projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]\", LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types.)", + "description": "Required. The container resource on which to execute the request. Acceptable formats: 1. `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 2. `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 3. `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 4. `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types.)", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/insightTypes/[^/]+$", "required": true, @@ -1070,7 +1070,7 @@ "type": "string" }, "parent": { - "description": "Required. The container resource on which to execute the request. Acceptable formats: 1. \"projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]\", LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders.", + "description": "Required. The container resource on which to execute the request. Acceptable formats: 1. `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 2. `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 3. `folders/[FOLDER_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 4. `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/recommenders/[^/]+$", "required": true, @@ -1178,7 +1178,7 @@ } } }, - "revision": "20210227", + "revision": "20210314", "rootUrl": "https://recommender.googleapis.com/", "schemas": { "GoogleCloudRecommenderV1CostProjection": { diff --git a/discovery/recommender-v1beta1.json b/discovery/recommender-v1beta1.json index 67c8000094d..d073888fbc8 100644 --- a/discovery/recommender-v1beta1.json +++ b/discovery/recommender-v1beta1.json @@ -164,7 +164,7 @@ "type": "string" }, "parent": { - "description": "Required. The container resource on which to execute the request. Acceptable formats: 1. \"projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]\", LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types.", + "description": "Required. The container resource on which to execute the request. Acceptable formats: 1. `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 2. `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 3. `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 4. `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types.", "location": "path", "pattern": "^billingAccounts/[^/]+/locations/[^/]+/insightTypes/[^/]+$", "required": true, @@ -266,7 +266,7 @@ "type": "string" }, "parent": { - "description": "Required. The container resource on which to execute the request. Acceptable formats: 1. \"projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]\", LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders.", + "description": "Required. The container resource on which to execute the request. Acceptable formats: 1. `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 2. `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 3. `folders/[FOLDER_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 4. `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders.", "location": "path", "pattern": "^billingAccounts/[^/]+/locations/[^/]+/recommenders/[^/]+$", "required": true, @@ -432,7 +432,7 @@ "type": "string" }, "parent": { - "description": "Required. The container resource on which to execute the request. Acceptable formats: 1. \"projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]\", LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types.", + "description": "Required. The container resource on which to execute the request. Acceptable formats: 1. `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 2. `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 3. `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 4. `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types.", "location": "path", "pattern": "^folders/[^/]+/locations/[^/]+/insightTypes/[^/]+$", "required": true, @@ -534,7 +534,7 @@ "type": "string" }, "parent": { - "description": "Required. The container resource on which to execute the request. Acceptable formats: 1. \"projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]\", LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders.", + "description": "Required. The container resource on which to execute the request. Acceptable formats: 1. `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 2. `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 3. `folders/[FOLDER_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 4. `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders.", "location": "path", "pattern": "^folders/[^/]+/locations/[^/]+/recommenders/[^/]+$", "required": true, @@ -700,7 +700,7 @@ "type": "string" }, "parent": { - "description": "Required. The container resource on which to execute the request. Acceptable formats: 1. \"projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]\", LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types.", + "description": "Required. The container resource on which to execute the request. Acceptable formats: 1. `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 2. `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 3. `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 4. `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types.", "location": "path", "pattern": "^organizations/[^/]+/locations/[^/]+/insightTypes/[^/]+$", "required": true, @@ -802,7 +802,7 @@ "type": "string" }, "parent": { - "description": "Required. The container resource on which to execute the request. Acceptable formats: 1. \"projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]\", LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders.", + "description": "Required. The container resource on which to execute the request. Acceptable formats: 1. `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 2. `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 3. `folders/[FOLDER_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 4. `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders.", "location": "path", "pattern": "^organizations/[^/]+/locations/[^/]+/recommenders/[^/]+$", "required": true, @@ -968,7 +968,7 @@ "type": "string" }, "parent": { - "description": "Required. The container resource on which to execute the request. Acceptable formats: 1. \"projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]\", LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types.", + "description": "Required. The container resource on which to execute the request. Acceptable formats: 1. `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 2. `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 3. `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 4. `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/insightTypes/[^/]+$", "required": true, @@ -1070,7 +1070,7 @@ "type": "string" }, "parent": { - "description": "Required. The container resource on which to execute the request. Acceptable formats: 1. \"projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]\", LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders.", + "description": "Required. The container resource on which to execute the request. Acceptable formats: 1. `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 2. `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 3. `folders/[FOLDER_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 4. `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/recommenders/[^/]+$", "required": true, @@ -1178,7 +1178,7 @@ } } }, - "revision": "20210227", + "revision": "20210314", "rootUrl": "https://recommender.googleapis.com/", "schemas": { "GoogleCloudRecommenderV1beta1CostProjection": { diff --git a/discovery/redis-v1.json b/discovery/redis-v1.json index 82d44fe5fef..5ea5dca95cd 100644 --- a/discovery/redis-v1.json +++ b/discovery/redis-v1.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" } } } @@ -144,7 +144,7 @@ ], "parameters": { "filter": { - "description": "The standard list 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" }, @@ -156,13 +156,13 @@ "type": "string" }, "pageSize": { - "description": "The standard list page size.", + "description": "The maximum number of results to return. If not set, the service will select a default.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "The standard list page token.", + "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" } @@ -596,7 +596,7 @@ } } }, - "revision": "20210225", + "revision": "20210311", "rootUrl": "https://redis.googleapis.com/", "schemas": { "Empty": { @@ -828,7 +828,7 @@ "type": "object" }, "redisVersion": { - "description": "Optional. The version of Redis software. If not provided, latest supported version will be used. Currently, the supported values are: * `REDIS_3_2` for Redis 3.2 compatibility * `REDIS_4_0` for Redis 4.0 compatibility (default) * `REDIS_5_0` for Redis 5.0 compatibility * `REDIS_6_0` for Redis 6.0 compatibility", + "description": "Optional. The version of Redis software. If not provided, latest supported version will be used. Currently, the supported values are: * `REDIS_3_2` for Redis 3.2 compatibility * `REDIS_4_0` for Redis 4.0 compatibility (default) * `REDIS_5_0` for Redis 5.0 compatibility * `REDIS_6_X` for Redis 6.x compatibility", "type": "string" }, "reservedIpRange": { diff --git a/discovery/redis-v1beta1.json b/discovery/redis-v1beta1.json index 661d283ad53..2961a4ccc41 100644 --- a/discovery/redis-v1beta1.json +++ b/discovery/redis-v1beta1.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" } } } @@ -144,7 +144,7 @@ ], "parameters": { "filter": { - "description": "The standard list 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" }, @@ -156,13 +156,13 @@ "type": "string" }, "pageSize": { - "description": "The standard list page size.", + "description": "The maximum number of results to return. If not set, the service will select a default.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "The standard list page token.", + "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" } @@ -596,7 +596,7 @@ } } }, - "revision": "20210225", + "revision": "20210311", "rootUrl": "https://redis.googleapis.com/", "schemas": { "Empty": { diff --git a/discovery/remotebuildexecution-v1.json b/discovery/remotebuildexecution-v1.json index 6f39fd75fa7..1563aa4ca9c 100644 --- a/discovery/remotebuildexecution-v1.json +++ b/discovery/remotebuildexecution-v1.json @@ -307,7 +307,7 @@ } } }, - "revision": "20210302", + "revision": "20210316", "rootUrl": "https://remotebuildexecution.googleapis.com/", "schemas": { "BuildBazelRemoteExecutionV2Action": { @@ -853,10 +853,22 @@ "description": "An identifier that ties multiple requests to the same action. For example, multiple requests to the CAS, Action Cache, and Execution API are used in order to compile foo.cc.", "type": "string" }, + "actionMnemonic": { + "description": "A brief description of the kind of action, for example, CppCompile or GoLink. There is no standard agreed set of values for this, and they are expected to vary between different client tools.", + "type": "string" + }, + "configurationId": { + "description": "An identifier for the configuration in which the target was built, e.g. for differentiating building host tools or different target platforms. There is no expectation that this value will have any particular structure, or equality across invocations, though some client tools may offer these guarantees.", + "type": "string" + }, "correlatedInvocationsId": { "description": "An identifier to tie multiple tool invocations together. For example, runs of foo_test, bar_test and baz_test on a post-submit of a given patch.", "type": "string" }, + "targetId": { + "description": "An identifier for the target which produced this action. No guarantees are made around how many actions may relate to a single target.", + "type": "string" + }, "toolDetails": { "$ref": "BuildBazelRemoteExecutionV2ToolDetails", "description": "The details for the tool invoking the requests." diff --git a/discovery/remotebuildexecution-v1alpha.json b/discovery/remotebuildexecution-v1alpha.json index 4c1ac254f3f..fde285fc4fe 100644 --- a/discovery/remotebuildexecution-v1alpha.json +++ b/discovery/remotebuildexecution-v1alpha.json @@ -432,7 +432,7 @@ } } }, - "revision": "20210302", + "revision": "20210316", "rootUrl": "https://admin-remotebuildexecution.googleapis.com/", "schemas": { "BuildBazelRemoteExecutionV2Action": { @@ -978,10 +978,22 @@ "description": "An identifier that ties multiple requests to the same action. For example, multiple requests to the CAS, Action Cache, and Execution API are used in order to compile foo.cc.", "type": "string" }, + "actionMnemonic": { + "description": "A brief description of the kind of action, for example, CppCompile or GoLink. There is no standard agreed set of values for this, and they are expected to vary between different client tools.", + "type": "string" + }, + "configurationId": { + "description": "An identifier for the configuration in which the target was built, e.g. for differentiating building host tools or different target platforms. There is no expectation that this value will have any particular structure, or equality across invocations, though some client tools may offer these guarantees.", + "type": "string" + }, "correlatedInvocationsId": { "description": "An identifier to tie multiple tool invocations together. For example, runs of foo_test, bar_test and baz_test on a post-submit of a given patch.", "type": "string" }, + "targetId": { + "description": "An identifier for the target which produced this action. No guarantees are made around how many actions may relate to a single target.", + "type": "string" + }, "toolDetails": { "$ref": "BuildBazelRemoteExecutionV2ToolDetails", "description": "The details for the tool invoking the requests." diff --git a/discovery/remotebuildexecution-v2.json b/discovery/remotebuildexecution-v2.json index a102093e6d3..ee3cf4ad712 100644 --- a/discovery/remotebuildexecution-v2.json +++ b/discovery/remotebuildexecution-v2.json @@ -447,7 +447,7 @@ } } }, - "revision": "20210302", + "revision": "20210316", "rootUrl": "https://remotebuildexecution.googleapis.com/", "schemas": { "BuildBazelRemoteExecutionV2Action": { @@ -713,6 +713,21 @@ "format": "int64", "type": "string" }, + "supportedCompressor": { + "description": "Compressors supported by the \"compressed-blobs\" bytestream resources. Servers MUST support identity/no-compression, even if it is not listed here. Note that this does not imply which if any compressors are supported by the server at the gRPC level.", + "items": { + "enum": [ + "IDENTITY", + "ZSTD" + ], + "enumDescriptions": [ + "No compression. Servers and clients MUST always support this, and do not need to advertise it.", + "Zstandard compression." + ], + "type": "string" + }, + "type": "array" + }, "symlinkAbsolutePathStrategy": { "description": "Whether absolute symlink targets are supported.", "enum": [ @@ -1328,10 +1343,22 @@ "description": "An identifier that ties multiple requests to the same action. For example, multiple requests to the CAS, Action Cache, and Execution API are used in order to compile foo.cc.", "type": "string" }, + "actionMnemonic": { + "description": "A brief description of the kind of action, for example, CppCompile or GoLink. There is no standard agreed set of values for this, and they are expected to vary between different client tools.", + "type": "string" + }, + "configurationId": { + "description": "An identifier for the configuration in which the target was built, e.g. for differentiating building host tools or different target platforms. There is no expectation that this value will have any particular structure, or equality across invocations, though some client tools may offer these guarantees.", + "type": "string" + }, "correlatedInvocationsId": { "description": "An identifier to tie multiple tool invocations together. For example, runs of foo_test, bar_test and baz_test on a post-submit of a given patch.", "type": "string" }, + "targetId": { + "description": "An identifier for the target which produced this action. No guarantees are made around how many actions may relate to a single target.", + "type": "string" + }, "toolDetails": { "$ref": "BuildBazelRemoteExecutionV2ToolDetails", "description": "The details for the tool invoking the requests." diff --git a/discovery/retail-v2.json b/discovery/retail-v2.json index b1f30a9e11c..0ce6f88a9fe 100644 --- a/discovery/retail-v2.json +++ b/discovery/retail-v2.json @@ -452,7 +452,7 @@ ], "parameters": { "placement": { - "description": "Required. Full resource name of the format: {name=projects/*/locations/global/catalogs/default_catalog/placements/*} The id of the recommendation engine placement. This id is used to identify the set of models that will be used to make the prediction. We currently support three placements with the following IDs by default: * `shopping_cart`: Predicts products frequently bought together with one or more products in the same shopping session. Commonly displayed after `add-to-cart` events, on product detail pages, or on the shopping cart page. * `home_page`: Predicts the next product that a user will most likely engage with or purchase based on the shopping or viewing history of the specified `userId` or `visitorId`. For example - Recommendations for you. * `product_detail`: Predicts the next product that a user will most likely engage with or purchase. The prediction is based on the shopping or viewing history of the specified `userId` or `visitorId` and its relevance to a specified `CatalogItem`. Typically used on product detail pages. For example - More products like this. * `recently_viewed_default`: Returns up to 75 products recently viewed by the specified `userId` or `visitorId`, most recent ones first. Returns nothing if neither of them has viewed any products yet. For example - Recently viewed. The full list of available placements can be seen at https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements", + "description": "Required. Full resource name of the format: {name=projects/*/locations/global/catalogs/default_catalog/placements/*} The ID of the Recommendations AI placement. Before you can request predictions from your model, you must create at least one placement for it. For more information, see [Managing placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements). The full list of available placements can be seen at https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/placements/[^/]+$", "required": true, @@ -706,7 +706,7 @@ } } }, - "revision": "20210226", + "revision": "20210312", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -1102,7 +1102,7 @@ "id": "GoogleCloudRetailV2PredictRequest", "properties": { "filter": { - "description": "Filter for restricting prediction results with a length limit of 5,000 characters. Accepts values for tags and the `filterOutOfStockItems` flag. * Tag expressions. Restricts predictions to products that match all of the specified tags. Boolean operators `OR` and `NOT` are supported if the expression is enclosed in parentheses, and must be separated from the tag values by a space. `-\"tagA\"` is also supported and is equivalent to `NOT \"tagA\"`. Tag values must be double quoted UTF-8 encoded strings with a size limit of 1,000 characters. * filterOutOfStockItems. Restricts predictions to products that do not have a stockState value of OUT_OF_STOCK. Examples: * tag=(\"Red\" OR \"Blue\") tag=\"New-Arrival\" tag=(NOT \"promotional\") * filterOutOfStockItems tag=(-\"promotional\") * filterOutOfStockItems If your filter blocks all prediction results, nothing will be returned. If you want generic (unfiltered) popular products to be returned instead, set `strictFiltering` to false in `PredictRequest.params`.", + "description": "Filter for restricting prediction results with a length limit of 5,000 characters. Accepts values for tags and the `filterOutOfStockItems` flag. * Tag expressions. Restricts predictions to products that match all of the specified tags. Boolean operators `OR` and `NOT` are supported if the expression is enclosed in parentheses, and must be separated from the tag values by a space. `-\"tagA\"` is also supported and is equivalent to `NOT \"tagA\"`. Tag values must be double quoted UTF-8 encoded strings with a size limit of 1,000 characters. Note: \"Recently viewed\" models don't support tag filtering at the moment. * filterOutOfStockItems. Restricts predictions to products that do not have a stockState value of OUT_OF_STOCK. Examples: * tag=(\"Red\" OR \"Blue\") tag=\"New-Arrival\" tag=(NOT \"promotional\") * filterOutOfStockItems tag=(-\"promotional\") * filterOutOfStockItems If your filter blocks all prediction results, nothing will be returned. If you want generic (unfiltered) popular products to be returned instead, set `strictFiltering` to false in `PredictRequest.params`.", "type": "string" }, "labels": { @@ -2028,201 +2028,6 @@ }, "type": "object" }, - "GoogleCloudRetailV2mainExportErrorsConfig": { - "description": "Configuration of destination for Export related errors.", - "id": "GoogleCloudRetailV2mainExportErrorsConfig", - "properties": { - "gcsPrefix": { - "description": "Google Cloud Storage path for import errors. This must be an empty, existing Cloud Storage bucket. Export errors will be written to a file in this bucket, one per line, as a JSON-encoded `google.rpc.Status` message.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudRetailV2mainExportMetadata": { - "description": "Metadata related to the progress of the Export operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudRetailV2mainExportMetadata", - "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", - "type": "string" - }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudRetailV2mainExportProductsResponse": { - "description": "Response of the ExportProductsRequest. If the long running operation is done, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", - "id": "GoogleCloudRetailV2mainExportProductsResponse", - "properties": { - "errorSamples": { - "description": "A sample of errors encountered while processing the request.", - "items": { - "$ref": "GoogleRpcStatus" - }, - "type": "array" - }, - "errorsConfig": { - "$ref": "GoogleCloudRetailV2mainExportErrorsConfig", - "description": "Echoes the destination for the complete errors in the request if set." - } - }, - "type": "object" - }, - "GoogleCloudRetailV2mainExportUserEventsResponse": { - "description": "Response of the ExportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", - "id": "GoogleCloudRetailV2mainExportUserEventsResponse", - "properties": { - "errorSamples": { - "description": "A sample of errors encountered while processing the request.", - "items": { - "$ref": "GoogleRpcStatus" - }, - "type": "array" - }, - "errorsConfig": { - "$ref": "GoogleCloudRetailV2mainExportErrorsConfig", - "description": "Echoes the destination for the complete errors if this field was set in the request." - } - }, - "type": "object" - }, - "GoogleCloudRetailV2mainImportErrorsConfig": { - "description": "Configuration of destination for Import related errors.", - "id": "GoogleCloudRetailV2mainImportErrorsConfig", - "properties": { - "gcsPrefix": { - "description": "Google Cloud Storage path for import errors. This must be an empty, existing Cloud Storage bucket. Import errors will be written to a file in this bucket, one per line, as a JSON-encoded `google.rpc.Status` message.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudRetailV2mainImportMetadata": { - "description": "Metadata related to the progress of the Import operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudRetailV2mainImportMetadata", - "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", - "type": "string" - }, - "failureCount": { - "description": "Count of entries that encountered errors while processing.", - "format": "int64", - "type": "string" - }, - "successCount": { - "description": "Count of entries that were processed successfully.", - "format": "int64", - "type": "string" - }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudRetailV2mainImportProductsResponse": { - "description": "Response of the ImportProductsRequest. If the long running operation is done, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", - "id": "GoogleCloudRetailV2mainImportProductsResponse", - "properties": { - "errorSamples": { - "description": "A sample of errors encountered while processing the request.", - "items": { - "$ref": "GoogleRpcStatus" - }, - "type": "array" - }, - "errorsConfig": { - "$ref": "GoogleCloudRetailV2mainImportErrorsConfig", - "description": "Echoes the destination for the complete errors in the request if set." - } - }, - "type": "object" - }, - "GoogleCloudRetailV2mainImportUserEventsResponse": { - "description": "Response of the ImportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", - "id": "GoogleCloudRetailV2mainImportUserEventsResponse", - "properties": { - "errorSamples": { - "description": "A sample of errors encountered while processing the request.", - "items": { - "$ref": "GoogleRpcStatus" - }, - "type": "array" - }, - "errorsConfig": { - "$ref": "GoogleCloudRetailV2mainImportErrorsConfig", - "description": "Echoes the destination for the complete errors if this field was set in the request." - }, - "importSummary": { - "$ref": "GoogleCloudRetailV2mainUserEventImportSummary", - "description": "Aggregated statistics of user event import status." - } - }, - "type": "object" - }, - "GoogleCloudRetailV2mainPurgeMetadata": { - "description": "Metadata related to the progress of the Purge operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudRetailV2mainPurgeMetadata", - "properties": {}, - "type": "object" - }, - "GoogleCloudRetailV2mainPurgeUserEventsResponse": { - "description": "Response of the PurgeUserEventsRequest. If the long running operation is successfully done, then this message is returned by the google.longrunning.Operations.response field.", - "id": "GoogleCloudRetailV2mainPurgeUserEventsResponse", - "properties": { - "purgedEventsCount": { - "description": "The total count of events purged as a result of the operation.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudRetailV2mainRejoinUserEventsMetadata": { - "description": "Metadata for RejoinUserEvents method.", - "id": "GoogleCloudRetailV2mainRejoinUserEventsMetadata", - "properties": {}, - "type": "object" - }, - "GoogleCloudRetailV2mainRejoinUserEventsResponse": { - "description": "Response message for RejoinUserEvents method.", - "id": "GoogleCloudRetailV2mainRejoinUserEventsResponse", - "properties": { - "rejoinedUserEventsCount": { - "description": "Number of user events that were joined with latest product catalog.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudRetailV2mainUserEventImportSummary": { - "description": "A summary of import result. The UserEventImportSummary summarizes the import status for user events.", - "id": "GoogleCloudRetailV2mainUserEventImportSummary", - "properties": { - "joinedEventsCount": { - "description": "Count of user events imported with complete existing catalog information.", - "format": "int64", - "type": "string" - }, - "unjoinedEventsCount": { - "description": "Count of user events imported, but with catalog information not found in the imported catalog.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, "GoogleLongrunningListOperationsResponse": { "description": "The response message for Operations.ListOperations.", "id": "GoogleLongrunningListOperationsResponse", diff --git a/discovery/retail-v2alpha.json b/discovery/retail-v2alpha.json index d86f41ec5b3..0a43f783359 100644 --- a/discovery/retail-v2alpha.json +++ b/discovery/retail-v2alpha.json @@ -452,7 +452,7 @@ ], "parameters": { "placement": { - "description": "Required. Full resource name of the format: {name=projects/*/locations/global/catalogs/default_catalog/placements/*} The id of the recommendation engine placement. This id is used to identify the set of models that will be used to make the prediction. We currently support three placements with the following IDs by default: * `shopping_cart`: Predicts products frequently bought together with one or more products in the same shopping session. Commonly displayed after `add-to-cart` events, on product detail pages, or on the shopping cart page. * `home_page`: Predicts the next product that a user will most likely engage with or purchase based on the shopping or viewing history of the specified `userId` or `visitorId`. For example - Recommendations for you. * `product_detail`: Predicts the next product that a user will most likely engage with or purchase. The prediction is based on the shopping or viewing history of the specified `userId` or `visitorId` and its relevance to a specified `CatalogItem`. Typically used on product detail pages. For example - More products like this. * `recently_viewed_default`: Returns up to 75 products recently viewed by the specified `userId` or `visitorId`, most recent ones first. Returns nothing if neither of them has viewed any products yet. For example - Recently viewed. The full list of available placements can be seen at https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements", + "description": "Required. Full resource name of the format: {name=projects/*/locations/global/catalogs/default_catalog/placements/*} The ID of the Recommendations AI placement. Before you can request predictions from your model, you must create at least one placement for it. For more information, see [Managing placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements). The full list of available placements can be seen at https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/placements/[^/]+$", "required": true, @@ -706,7 +706,7 @@ } } }, - "revision": "20210226", + "revision": "20210312", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -1297,7 +1297,7 @@ "id": "GoogleCloudRetailV2alphaPredictRequest", "properties": { "filter": { - "description": "Filter for restricting prediction results with a length limit of 5,000 characters. Accepts values for tags and the `filterOutOfStockItems` flag. * Tag expressions. Restricts predictions to products that match all of the specified tags. Boolean operators `OR` and `NOT` are supported if the expression is enclosed in parentheses, and must be separated from the tag values by a space. `-\"tagA\"` is also supported and is equivalent to `NOT \"tagA\"`. Tag values must be double quoted UTF-8 encoded strings with a size limit of 1,000 characters. * filterOutOfStockItems. Restricts predictions to products that do not have a stockState value of OUT_OF_STOCK. Examples: * tag=(\"Red\" OR \"Blue\") tag=\"New-Arrival\" tag=(NOT \"promotional\") * filterOutOfStockItems tag=(-\"promotional\") * filterOutOfStockItems If your filter blocks all prediction results, nothing will be returned. If you want generic (unfiltered) popular products to be returned instead, set `strictFiltering` to false in `PredictRequest.params`.", + "description": "Filter for restricting prediction results with a length limit of 5,000 characters. Accepts values for tags and the `filterOutOfStockItems` flag. * Tag expressions. Restricts predictions to products that match all of the specified tags. Boolean operators `OR` and `NOT` are supported if the expression is enclosed in parentheses, and must be separated from the tag values by a space. `-\"tagA\"` is also supported and is equivalent to `NOT \"tagA\"`. Tag values must be double quoted UTF-8 encoded strings with a size limit of 1,000 characters. Note: \"Recently viewed\" models don't support tag filtering at the moment. * filterOutOfStockItems. Restricts predictions to products that do not have a stockState value of OUT_OF_STOCK. Examples: * tag=(\"Red\" OR \"Blue\") tag=\"New-Arrival\" tag=(NOT \"promotional\") * filterOutOfStockItems tag=(-\"promotional\") * filterOutOfStockItems If your filter blocks all prediction results, nothing will be returned. If you want generic (unfiltered) popular products to be returned instead, set `strictFiltering` to false in `PredictRequest.params`.", "type": "string" }, "labels": { @@ -2028,201 +2028,6 @@ }, "type": "object" }, - "GoogleCloudRetailV2mainExportErrorsConfig": { - "description": "Configuration of destination for Export related errors.", - "id": "GoogleCloudRetailV2mainExportErrorsConfig", - "properties": { - "gcsPrefix": { - "description": "Google Cloud Storage path for import errors. This must be an empty, existing Cloud Storage bucket. Export errors will be written to a file in this bucket, one per line, as a JSON-encoded `google.rpc.Status` message.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudRetailV2mainExportMetadata": { - "description": "Metadata related to the progress of the Export operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudRetailV2mainExportMetadata", - "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", - "type": "string" - }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudRetailV2mainExportProductsResponse": { - "description": "Response of the ExportProductsRequest. If the long running operation is done, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", - "id": "GoogleCloudRetailV2mainExportProductsResponse", - "properties": { - "errorSamples": { - "description": "A sample of errors encountered while processing the request.", - "items": { - "$ref": "GoogleRpcStatus" - }, - "type": "array" - }, - "errorsConfig": { - "$ref": "GoogleCloudRetailV2mainExportErrorsConfig", - "description": "Echoes the destination for the complete errors in the request if set." - } - }, - "type": "object" - }, - "GoogleCloudRetailV2mainExportUserEventsResponse": { - "description": "Response of the ExportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", - "id": "GoogleCloudRetailV2mainExportUserEventsResponse", - "properties": { - "errorSamples": { - "description": "A sample of errors encountered while processing the request.", - "items": { - "$ref": "GoogleRpcStatus" - }, - "type": "array" - }, - "errorsConfig": { - "$ref": "GoogleCloudRetailV2mainExportErrorsConfig", - "description": "Echoes the destination for the complete errors if this field was set in the request." - } - }, - "type": "object" - }, - "GoogleCloudRetailV2mainImportErrorsConfig": { - "description": "Configuration of destination for Import related errors.", - "id": "GoogleCloudRetailV2mainImportErrorsConfig", - "properties": { - "gcsPrefix": { - "description": "Google Cloud Storage path for import errors. This must be an empty, existing Cloud Storage bucket. Import errors will be written to a file in this bucket, one per line, as a JSON-encoded `google.rpc.Status` message.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudRetailV2mainImportMetadata": { - "description": "Metadata related to the progress of the Import operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudRetailV2mainImportMetadata", - "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", - "type": "string" - }, - "failureCount": { - "description": "Count of entries that encountered errors while processing.", - "format": "int64", - "type": "string" - }, - "successCount": { - "description": "Count of entries that were processed successfully.", - "format": "int64", - "type": "string" - }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudRetailV2mainImportProductsResponse": { - "description": "Response of the ImportProductsRequest. If the long running operation is done, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", - "id": "GoogleCloudRetailV2mainImportProductsResponse", - "properties": { - "errorSamples": { - "description": "A sample of errors encountered while processing the request.", - "items": { - "$ref": "GoogleRpcStatus" - }, - "type": "array" - }, - "errorsConfig": { - "$ref": "GoogleCloudRetailV2mainImportErrorsConfig", - "description": "Echoes the destination for the complete errors in the request if set." - } - }, - "type": "object" - }, - "GoogleCloudRetailV2mainImportUserEventsResponse": { - "description": "Response of the ImportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", - "id": "GoogleCloudRetailV2mainImportUserEventsResponse", - "properties": { - "errorSamples": { - "description": "A sample of errors encountered while processing the request.", - "items": { - "$ref": "GoogleRpcStatus" - }, - "type": "array" - }, - "errorsConfig": { - "$ref": "GoogleCloudRetailV2mainImportErrorsConfig", - "description": "Echoes the destination for the complete errors if this field was set in the request." - }, - "importSummary": { - "$ref": "GoogleCloudRetailV2mainUserEventImportSummary", - "description": "Aggregated statistics of user event import status." - } - }, - "type": "object" - }, - "GoogleCloudRetailV2mainPurgeMetadata": { - "description": "Metadata related to the progress of the Purge operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudRetailV2mainPurgeMetadata", - "properties": {}, - "type": "object" - }, - "GoogleCloudRetailV2mainPurgeUserEventsResponse": { - "description": "Response of the PurgeUserEventsRequest. If the long running operation is successfully done, then this message is returned by the google.longrunning.Operations.response field.", - "id": "GoogleCloudRetailV2mainPurgeUserEventsResponse", - "properties": { - "purgedEventsCount": { - "description": "The total count of events purged as a result of the operation.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudRetailV2mainRejoinUserEventsMetadata": { - "description": "Metadata for RejoinUserEvents method.", - "id": "GoogleCloudRetailV2mainRejoinUserEventsMetadata", - "properties": {}, - "type": "object" - }, - "GoogleCloudRetailV2mainRejoinUserEventsResponse": { - "description": "Response message for RejoinUserEvents method.", - "id": "GoogleCloudRetailV2mainRejoinUserEventsResponse", - "properties": { - "rejoinedUserEventsCount": { - "description": "Number of user events that were joined with latest product catalog.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudRetailV2mainUserEventImportSummary": { - "description": "A summary of import result. The UserEventImportSummary summarizes the import status for user events.", - "id": "GoogleCloudRetailV2mainUserEventImportSummary", - "properties": { - "joinedEventsCount": { - "description": "Count of user events imported with complete existing catalog information.", - "format": "int64", - "type": "string" - }, - "unjoinedEventsCount": { - "description": "Count of user events imported, but with catalog information not found in the imported catalog.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, "GoogleLongrunningListOperationsResponse": { "description": "The response message for Operations.ListOperations.", "id": "GoogleLongrunningListOperationsResponse", diff --git a/discovery/retail-v2beta.json b/discovery/retail-v2beta.json index 000d7ae82d2..65874fba8b7 100644 --- a/discovery/retail-v2beta.json +++ b/discovery/retail-v2beta.json @@ -452,7 +452,7 @@ ], "parameters": { "placement": { - "description": "Required. Full resource name of the format: {name=projects/*/locations/global/catalogs/default_catalog/placements/*} The id of the recommendation engine placement. This id is used to identify the set of models that will be used to make the prediction. We currently support three placements with the following IDs by default: * `shopping_cart`: Predicts products frequently bought together with one or more products in the same shopping session. Commonly displayed after `add-to-cart` events, on product detail pages, or on the shopping cart page. * `home_page`: Predicts the next product that a user will most likely engage with or purchase based on the shopping or viewing history of the specified `userId` or `visitorId`. For example - Recommendations for you. * `product_detail`: Predicts the next product that a user will most likely engage with or purchase. The prediction is based on the shopping or viewing history of the specified `userId` or `visitorId` and its relevance to a specified `CatalogItem`. Typically used on product detail pages. For example - More products like this. * `recently_viewed_default`: Returns up to 75 products recently viewed by the specified `userId` or `visitorId`, most recent ones first. Returns nothing if neither of them has viewed any products yet. For example - Recently viewed. The full list of available placements can be seen at https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements", + "description": "Required. Full resource name of the format: {name=projects/*/locations/global/catalogs/default_catalog/placements/*} The ID of the Recommendations AI placement. Before you can request predictions from your model, you must create at least one placement for it. For more information, see [Managing placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements). The full list of available placements can be seen at https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/placements/[^/]+$", "required": true, @@ -706,7 +706,7 @@ } } }, - "revision": "20210226", + "revision": "20210312", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -1492,7 +1492,7 @@ "id": "GoogleCloudRetailV2betaPredictRequest", "properties": { "filter": { - "description": "Filter for restricting prediction results with a length limit of 5,000 characters. Accepts values for tags and the `filterOutOfStockItems` flag. * Tag expressions. Restricts predictions to products that match all of the specified tags. Boolean operators `OR` and `NOT` are supported if the expression is enclosed in parentheses, and must be separated from the tag values by a space. `-\"tagA\"` is also supported and is equivalent to `NOT \"tagA\"`. Tag values must be double quoted UTF-8 encoded strings with a size limit of 1,000 characters. * filterOutOfStockItems. Restricts predictions to products that do not have a stockState value of OUT_OF_STOCK. Examples: * tag=(\"Red\" OR \"Blue\") tag=\"New-Arrival\" tag=(NOT \"promotional\") * filterOutOfStockItems tag=(-\"promotional\") * filterOutOfStockItems If your filter blocks all prediction results, nothing will be returned. If you want generic (unfiltered) popular products to be returned instead, set `strictFiltering` to false in `PredictRequest.params`.", + "description": "Filter for restricting prediction results with a length limit of 5,000 characters. Accepts values for tags and the `filterOutOfStockItems` flag. * Tag expressions. Restricts predictions to products that match all of the specified tags. Boolean operators `OR` and `NOT` are supported if the expression is enclosed in parentheses, and must be separated from the tag values by a space. `-\"tagA\"` is also supported and is equivalent to `NOT \"tagA\"`. Tag values must be double quoted UTF-8 encoded strings with a size limit of 1,000 characters. Note: \"Recently viewed\" models don't support tag filtering at the moment. * filterOutOfStockItems. Restricts predictions to products that do not have a stockState value of OUT_OF_STOCK. Examples: * tag=(\"Red\" OR \"Blue\") tag=\"New-Arrival\" tag=(NOT \"promotional\") * filterOutOfStockItems tag=(-\"promotional\") * filterOutOfStockItems If your filter blocks all prediction results, nothing will be returned. If you want generic (unfiltered) popular products to be returned instead, set `strictFiltering` to false in `PredictRequest.params`.", "type": "string" }, "labels": { @@ -2028,201 +2028,6 @@ }, "type": "object" }, - "GoogleCloudRetailV2mainExportErrorsConfig": { - "description": "Configuration of destination for Export related errors.", - "id": "GoogleCloudRetailV2mainExportErrorsConfig", - "properties": { - "gcsPrefix": { - "description": "Google Cloud Storage path for import errors. This must be an empty, existing Cloud Storage bucket. Export errors will be written to a file in this bucket, one per line, as a JSON-encoded `google.rpc.Status` message.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudRetailV2mainExportMetadata": { - "description": "Metadata related to the progress of the Export operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudRetailV2mainExportMetadata", - "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", - "type": "string" - }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudRetailV2mainExportProductsResponse": { - "description": "Response of the ExportProductsRequest. If the long running operation is done, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", - "id": "GoogleCloudRetailV2mainExportProductsResponse", - "properties": { - "errorSamples": { - "description": "A sample of errors encountered while processing the request.", - "items": { - "$ref": "GoogleRpcStatus" - }, - "type": "array" - }, - "errorsConfig": { - "$ref": "GoogleCloudRetailV2mainExportErrorsConfig", - "description": "Echoes the destination for the complete errors in the request if set." - } - }, - "type": "object" - }, - "GoogleCloudRetailV2mainExportUserEventsResponse": { - "description": "Response of the ExportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", - "id": "GoogleCloudRetailV2mainExportUserEventsResponse", - "properties": { - "errorSamples": { - "description": "A sample of errors encountered while processing the request.", - "items": { - "$ref": "GoogleRpcStatus" - }, - "type": "array" - }, - "errorsConfig": { - "$ref": "GoogleCloudRetailV2mainExportErrorsConfig", - "description": "Echoes the destination for the complete errors if this field was set in the request." - } - }, - "type": "object" - }, - "GoogleCloudRetailV2mainImportErrorsConfig": { - "description": "Configuration of destination for Import related errors.", - "id": "GoogleCloudRetailV2mainImportErrorsConfig", - "properties": { - "gcsPrefix": { - "description": "Google Cloud Storage path for import errors. This must be an empty, existing Cloud Storage bucket. Import errors will be written to a file in this bucket, one per line, as a JSON-encoded `google.rpc.Status` message.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudRetailV2mainImportMetadata": { - "description": "Metadata related to the progress of the Import operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudRetailV2mainImportMetadata", - "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", - "type": "string" - }, - "failureCount": { - "description": "Count of entries that encountered errors while processing.", - "format": "int64", - "type": "string" - }, - "successCount": { - "description": "Count of entries that were processed successfully.", - "format": "int64", - "type": "string" - }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudRetailV2mainImportProductsResponse": { - "description": "Response of the ImportProductsRequest. If the long running operation is done, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", - "id": "GoogleCloudRetailV2mainImportProductsResponse", - "properties": { - "errorSamples": { - "description": "A sample of errors encountered while processing the request.", - "items": { - "$ref": "GoogleRpcStatus" - }, - "type": "array" - }, - "errorsConfig": { - "$ref": "GoogleCloudRetailV2mainImportErrorsConfig", - "description": "Echoes the destination for the complete errors in the request if set." - } - }, - "type": "object" - }, - "GoogleCloudRetailV2mainImportUserEventsResponse": { - "description": "Response of the ImportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", - "id": "GoogleCloudRetailV2mainImportUserEventsResponse", - "properties": { - "errorSamples": { - "description": "A sample of errors encountered while processing the request.", - "items": { - "$ref": "GoogleRpcStatus" - }, - "type": "array" - }, - "errorsConfig": { - "$ref": "GoogleCloudRetailV2mainImportErrorsConfig", - "description": "Echoes the destination for the complete errors if this field was set in the request." - }, - "importSummary": { - "$ref": "GoogleCloudRetailV2mainUserEventImportSummary", - "description": "Aggregated statistics of user event import status." - } - }, - "type": "object" - }, - "GoogleCloudRetailV2mainPurgeMetadata": { - "description": "Metadata related to the progress of the Purge operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudRetailV2mainPurgeMetadata", - "properties": {}, - "type": "object" - }, - "GoogleCloudRetailV2mainPurgeUserEventsResponse": { - "description": "Response of the PurgeUserEventsRequest. If the long running operation is successfully done, then this message is returned by the google.longrunning.Operations.response field.", - "id": "GoogleCloudRetailV2mainPurgeUserEventsResponse", - "properties": { - "purgedEventsCount": { - "description": "The total count of events purged as a result of the operation.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudRetailV2mainRejoinUserEventsMetadata": { - "description": "Metadata for RejoinUserEvents method.", - "id": "GoogleCloudRetailV2mainRejoinUserEventsMetadata", - "properties": {}, - "type": "object" - }, - "GoogleCloudRetailV2mainRejoinUserEventsResponse": { - "description": "Response message for RejoinUserEvents method.", - "id": "GoogleCloudRetailV2mainRejoinUserEventsResponse", - "properties": { - "rejoinedUserEventsCount": { - "description": "Number of user events that were joined with latest product catalog.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudRetailV2mainUserEventImportSummary": { - "description": "A summary of import result. The UserEventImportSummary summarizes the import status for user events.", - "id": "GoogleCloudRetailV2mainUserEventImportSummary", - "properties": { - "joinedEventsCount": { - "description": "Count of user events imported with complete existing catalog information.", - "format": "int64", - "type": "string" - }, - "unjoinedEventsCount": { - "description": "Count of user events imported, but with catalog information not found in the imported catalog.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, "GoogleLongrunningListOperationsResponse": { "description": "The response message for Operations.ListOperations.", "id": "GoogleLongrunningListOperationsResponse", diff --git a/discovery/run-v1.json b/discovery/run-v1.json index e086546e57e..bdbef747ec3 100644 --- a/discovery/run-v1.json +++ b/discovery/run-v1.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" } } } @@ -248,6 +248,11 @@ "parent" ], "parameters": { + "dryRun": { + "description": "DryRun is a query string parameter which indicates that the server should run validation without persisting the request.", + "location": "query", + "type": "string" + }, "parent": { "description": "The namespace in which the domain mapping should be created. For Cloud Run (fully managed), replace {namespace_id} with the project ID or number.", "location": "path", @@ -281,6 +286,11 @@ "location": "query", "type": "string" }, + "dryRun": { + "description": "DryRun is a query string parameter which indicates that the server should run validation without persisting the request.", + "location": "query", + "type": "string" + }, "kind": { "description": "Cloud Run currently ignores this parameter.", "location": "query", @@ -411,6 +421,11 @@ "location": "query", "type": "string" }, + "dryRun": { + "description": "DryRun is a query string parameter which indicates that the server should run validation without persisting the request.", + "location": "query", + "type": "string" + }, "kind": { "description": "Cloud Run currently ignores this parameter.", "location": "query", @@ -626,6 +641,11 @@ "parent" ], "parameters": { + "dryRun": { + "description": "DryRun is a query string parameter which indicates that the server should run validation without persisting the request.", + "location": "query", + "type": "string" + }, "parent": { "description": "The namespace in which the service should be created. For Cloud Run (fully managed), replace {namespace_id} with the project ID or number.", "location": "path", @@ -659,6 +679,11 @@ "location": "query", "type": "string" }, + "dryRun": { + "description": "DryRun is a query string parameter which indicates that the server should run validation without persisting the request.", + "location": "query", + "type": "string" + }, "kind": { "description": "Cloud Run currently ignores this parameter.", "location": "query", @@ -780,6 +805,11 @@ "name" ], "parameters": { + "dryRun": { + "description": "DryRun is a query string parameter which indicates that the server should run validation without persisting the request.", + "location": "query", + "type": "string" + }, "name": { "description": "The name of the service being replaced. For Cloud Run (fully managed), replace {namespace_id} with the project ID or number.", "location": "path", @@ -857,7 +887,7 @@ ], "parameters": { "filter": { - "description": "The standard list 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" }, @@ -869,13 +899,13 @@ "type": "string" }, "pageSize": { - "description": "The standard list page size.", + "description": "The maximum number of results to return. If not set, the service will select a default.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "The standard list page token.", + "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" } @@ -1031,6 +1061,11 @@ "parent" ], "parameters": { + "dryRun": { + "description": "DryRun is a query string parameter which indicates that the server should run validation without persisting the request.", + "location": "query", + "type": "string" + }, "parent": { "description": "The namespace in which the domain mapping should be created. For Cloud Run (fully managed), replace {namespace_id} with the project ID or number.", "location": "path", @@ -1064,6 +1099,11 @@ "location": "query", "type": "string" }, + "dryRun": { + "description": "DryRun is a query string parameter which indicates that the server should run validation without persisting the request.", + "location": "query", + "type": "string" + }, "kind": { "description": "Cloud Run currently ignores this parameter.", "location": "query", @@ -1194,6 +1234,11 @@ "location": "query", "type": "string" }, + "dryRun": { + "description": "DryRun is a query string parameter which indicates that the server should run validation without persisting the request.", + "location": "query", + "type": "string" + }, "kind": { "description": "Cloud Run currently ignores this parameter.", "location": "query", @@ -1409,6 +1454,11 @@ "parent" ], "parameters": { + "dryRun": { + "description": "DryRun is a query string parameter which indicates that the server should run validation without persisting the request.", + "location": "query", + "type": "string" + }, "parent": { "description": "The namespace in which the service should be created. For Cloud Run (fully managed), replace {namespace_id} with the project ID or number.", "location": "path", @@ -1442,6 +1492,11 @@ "location": "query", "type": "string" }, + "dryRun": { + "description": "DryRun is a query string parameter which indicates that the server should run validation without persisting the request.", + "location": "query", + "type": "string" + }, "kind": { "description": "Cloud Run currently ignores this parameter.", "location": "query", @@ -1594,6 +1649,11 @@ "name" ], "parameters": { + "dryRun": { + "description": "DryRun is a query string parameter which indicates that the server should run validation without persisting the request.", + "location": "query", + "type": "string" + }, "name": { "description": "The name of the service being replaced. For Cloud Run (fully managed), replace {namespace_id} with the project ID or number.", "location": "path", @@ -1676,7 +1736,7 @@ } } }, - "revision": "20210301", + "revision": "20210312", "rootUrl": "https://run.googleapis.com/", "schemas": { "Addressable": { @@ -3317,7 +3377,7 @@ "type": "string" }, "url": { - "description": "Output only. URL displays the URL for accessing tagged traffic targets. URL is displayed in status, and is disallowed on spec. URL must contain a scheme (e.g. http://) and a hostname, but may not contain anything else (e.g. basic auth, url path, etc. Not currently supported in Cloud Run.", + "description": "Output only. URL displays the URL for accessing tagged traffic targets. URL is displayed in status, and is disallowed on spec. URL must contain a scheme (e.g. http://) and a hostname, but may not contain anything else (e.g. basic auth, url path, etc.)", "type": "string" } }, diff --git a/discovery/run-v1alpha1.json b/discovery/run-v1alpha1.json index 5e01098c210..6057c9b778f 100644 --- a/discovery/run-v1alpha1.json +++ b/discovery/run-v1alpha1.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" } } } @@ -990,7 +990,7 @@ ], "parameters": { "filter": { - "description": "The standard list 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" }, @@ -1002,13 +1002,13 @@ "type": "string" }, "pageSize": { - "description": "The standard list page size.", + "description": "The maximum number of results to return. If not set, the service will select a default.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "The standard list page token.", + "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" } @@ -1824,7 +1824,7 @@ } } }, - "revision": "20210301", + "revision": "20210312", "rootUrl": "https://run.googleapis.com/", "schemas": { "Addressable": { diff --git a/discovery/sasportal-v1alpha1.json b/discovery/sasportal-v1alpha1.json index f7857e95694..6da17ab078a 100644 --- a/discovery/sasportal-v1alpha1.json +++ b/discovery/sasportal-v1alpha1.json @@ -2483,7 +2483,7 @@ } } }, - "revision": "20210225", + "revision": "20210319", "rootUrl": "https://sasportal.googleapis.com/", "schemas": { "SasPortalAssignment": { @@ -2504,6 +2504,22 @@ }, "type": "object" }, + "SasPortalChannelWithScore": { + "description": "The channel with score.", + "id": "SasPortalChannelWithScore", + "properties": { + "frequencyRange": { + "$ref": "SasPortalFrequencyRange", + "description": "The frequency range of the channel." + }, + "score": { + "description": "The channel score, normalized to be in [0,100].", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, "SasPortalCreateSignedDeviceRequest": { "description": "Request for CreateSignedDevice.", "id": "SasPortalCreateSignedDeviceRequest", @@ -2603,6 +2619,14 @@ "$ref": "SasPortalDeviceConfig", "description": "Output only. Current configuration of the device as registered to the SAS." }, + "currentChannels": { + "description": "Output only. Current channels with scores.", + "items": { + "$ref": "SasPortalChannelWithScore" + }, + "readOnly": true, + "type": "array" + }, "deviceMetadata": { "$ref": "SasPortalDeviceMetadata", "description": "Device parameters that can be overridden by both SAS Portal and SAS registration requests." diff --git a/discovery/secretmanager-v1.json b/discovery/secretmanager-v1.json index 776412f02ee..fe9f05ad79a 100644 --- a/discovery/secretmanager-v1.json +++ b/discovery/secretmanager-v1.json @@ -144,7 +144,7 @@ ], "parameters": { "filter": { - "description": "The standard list 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" }, @@ -156,13 +156,13 @@ "type": "string" }, "pageSize": { - "description": "The standard list page size.", + "description": "The maximum number of results to return. If not set, the service will select a default.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "The standard list page token.", + "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" } @@ -628,7 +628,7 @@ } } }, - "revision": "20210205", + "revision": "20210315", "rootUrl": "https://secretmanager.googleapis.com/", "schemas": { "AccessSecretVersionResponse": { @@ -1158,7 +1158,7 @@ "type": "object" }, "Topic": { - "description": "A Pub/Sub topic which SM will publish to when control plane events occur on this secret.", + "description": "A Pub/Sub topic which Secret Manager will publish to when control plane events occur on this secret.", "id": "Topic", "properties": { "name": { diff --git a/discovery/secretmanager-v1beta1.json b/discovery/secretmanager-v1beta1.json index fa09594ea2f..4da2222e828 100644 --- a/discovery/secretmanager-v1beta1.json +++ b/discovery/secretmanager-v1beta1.json @@ -144,7 +144,7 @@ ], "parameters": { "filter": { - "description": "The standard list 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" }, @@ -156,13 +156,13 @@ "type": "string" }, "pageSize": { - "description": "The standard list page size.", + "description": "The maximum number of results to return. If not set, the service will select a default.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "The standard list page token.", + "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" } @@ -628,7 +628,7 @@ } } }, - "revision": "20201106", + "revision": "20210315", "rootUrl": "https://secretmanager.googleapis.com/", "schemas": { "AccessSecretVersionResponse": { diff --git a/discovery/serviceconsumermanagement-v1.json b/discovery/serviceconsumermanagement-v1.json index bf5b4235cda..9721008c017 100644 --- a/discovery/serviceconsumermanagement-v1.json +++ b/discovery/serviceconsumermanagement-v1.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" } } } @@ -542,7 +542,7 @@ } } }, - "revision": "20210307", + "revision": "20210322", "rootUrl": "https://serviceconsumermanagement.googleapis.com/", "schemas": { "AddTenantProjectRequest": { diff --git a/discovery/serviceconsumermanagement-v1beta1.json b/discovery/serviceconsumermanagement-v1beta1.json index 9c81a121bfd..ae0b754c6f4 100644 --- a/discovery/serviceconsumermanagement-v1beta1.json +++ b/discovery/serviceconsumermanagement-v1beta1.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" } } } @@ -500,7 +500,7 @@ } } }, - "revision": "20210307", + "revision": "20210322", "rootUrl": "https://serviceconsumermanagement.googleapis.com/", "schemas": { "Api": { diff --git a/discovery/servicedirectory-v1.json b/discovery/servicedirectory-v1.json index 68ba2320711..158d00254df 100644 --- a/discovery/servicedirectory-v1.json +++ b/discovery/servicedirectory-v1.json @@ -144,7 +144,7 @@ ], "parameters": { "filter": { - "description": "The standard list 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" }, @@ -156,13 +156,13 @@ "type": "string" }, "pageSize": { - "description": "The standard list page size.", + "description": "The maximum number of results to return. If not set, the service will select a default.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "The standard list page token.", + "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" } @@ -883,7 +883,7 @@ } } }, - "revision": "20210225", + "revision": "20210310", "rootUrl": "https://servicedirectory.googleapis.com/", "schemas": { "Binding": { @@ -1169,7 +1169,7 @@ "additionalProperties": { "type": "string" }, - "description": "Optional. Annotations for the service. This data can be consumed by service clients. Restrictions: * The entire annotations dictionary may contain up to 512 characters, spread accoss all key-value pairs. Annotations that go beyond this limit are rejected * Valid annotation keys have two segments: an optional prefix and name, separated by a slash (/). The name segment is required and must be 63 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between. The prefix is optional. If specified, the prefix must be a DNS subdomain: a series of DNS labels separated by dots (.), not longer than 253 characters in total, followed by a slash (/). Annotations that fails to meet these requirements are rejected * The `(*.)google.com/` and `(*.)googleapis.com/` prefixes are reserved for system annotations managed by Service Directory. If the user tries to write to these keyspaces, those entries are silently ignored by the system Note: This field is equivalent to the `metadata` field in the v1beta1 API. They have the same syntax and read/write to the same location in Service Directory.", + "description": "Optional. Annotations for the service. This data can be consumed by service clients. Restrictions: * The entire annotations dictionary may contain up to 2000 characters, spread accoss all key-value pairs. Annotations that go beyond this limit are rejected * Valid annotation keys have two segments: an optional prefix and name, separated by a slash (/). The name segment is required and must be 63 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between. The prefix is optional. If specified, the prefix must be a DNS subdomain: a series of DNS labels separated by dots (.), not longer than 253 characters in total, followed by a slash (/). Annotations that fails to meet these requirements are rejected * The `(*.)google.com/` and `(*.)googleapis.com/` prefixes are reserved for system annotations managed by Service Directory. If the user tries to write to these keyspaces, those entries are silently ignored by the system Note: This field is equivalent to the `metadata` field in the v1beta1 API. They have the same syntax and read/write to the same location in Service Directory.", "type": "object" }, "endpoints": { diff --git a/discovery/servicedirectory-v1beta1.json b/discovery/servicedirectory-v1beta1.json index bd8b0f398f1..4398e43000a 100644 --- a/discovery/servicedirectory-v1beta1.json +++ b/discovery/servicedirectory-v1beta1.json @@ -144,7 +144,7 @@ ], "parameters": { "filter": { - "description": "The standard list 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" }, @@ -156,13 +156,13 @@ "type": "string" }, "pageSize": { - "description": "The standard list page size.", + "description": "The maximum number of results to return. If not set, the service will select a default.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "The standard list page token.", + "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" } @@ -883,7 +883,7 @@ } } }, - "revision": "20210225", + "revision": "20210310", "rootUrl": "https://servicedirectory.googleapis.com/", "schemas": { "Binding": { @@ -1177,7 +1177,7 @@ "additionalProperties": { "type": "string" }, - "description": "Optional. Metadata for the service. This data can be consumed by service clients. Restrictions: * The entire metadata dictionary may contain up to 512 characters, spread accoss all key-value pairs. Metadata that goes beyond this limit are rejected * Valid metadata keys have two segments: an optional prefix and name, separated by a slash (/). The name segment is required and must be 63 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between. The prefix is optional. If specified, the prefix must be a DNS subdomain: a series of DNS labels separated by dots (.), not longer than 253 characters in total, followed by a slash (/). Metadata that fails to meet these requirements are rejected * The `(*.)google.com/` and `(*.)googleapis.com/` prefixes are reserved for system metadata managed by Service Directory. If the user tries to write to these keyspaces, those entries are silently ignored by the system Note: This field is equivalent to the `annotations` field in the v1 API. They have the same syntax and read/write to the same location in Service Directory.", + "description": "Optional. Metadata for the service. This data can be consumed by service clients. Restrictions: * The entire metadata dictionary may contain up to 2000 characters, spread accoss all key-value pairs. Metadata that goes beyond this limit are rejected * Valid metadata keys have two segments: an optional prefix and name, separated by a slash (/). The name segment is required and must be 63 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between. The prefix is optional. If specified, the prefix must be a DNS subdomain: a series of DNS labels separated by dots (.), not longer than 253 characters in total, followed by a slash (/). Metadata that fails to meet these requirements are rejected * The `(*.)google.com/` and `(*.)googleapis.com/` prefixes are reserved for system metadata managed by Service Directory. If the user tries to write to these keyspaces, those entries are silently ignored by the system Note: This field is equivalent to the `annotations` field in the v1 API. They have the same syntax and read/write to the same location in Service Directory.", "type": "object" }, "name": { diff --git a/discovery/servicemanagement-v1.json b/discovery/servicemanagement-v1.json index e3aa477a048..33c6cb4bde8 100644 --- a/discovery/servicemanagement-v1.json +++ b/discovery/servicemanagement-v1.json @@ -228,34 +228,6 @@ "https://www.googleapis.com/auth/service.management" ] }, - "enable": { - "description": "Enables a service for a project, so it can be used for the project. See [Cloud Auth Guide](https://cloud.google.com/docs/authentication) for more information. Operation", - "flatPath": "v1/services/{serviceName}:enable", - "httpMethod": "POST", - "id": "servicemanagement.services.enable", - "parameterOrder": [ - "serviceName" - ], - "parameters": { - "serviceName": { - "description": "Required. Name of the service to enable. Specifying an unknown service name will cause the request to fail.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "v1/services/{serviceName}:enable", - "request": { - "$ref": "EnableServiceRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/service.management" - ] - }, "generateConfigReport": { "description": "Generates and returns a report (errors, warnings and changes from existing configurations) associated with GenerateConfigReportRequest.new_value If GenerateConfigReportRequest.old_value is specified, GenerateConfigReportRequest will contain a single ChangeReport based on the comparison between GenerateConfigReportRequest.new_value and GenerateConfigReportRequest.old_value. If GenerateConfigReportRequest.old_value is not specified, this method will compare GenerateConfigReportRequest.new_value with the last pushed service configuration.", "flatPath": "v1/services:generateConfigReport", @@ -857,7 +829,7 @@ } } }, - "revision": "20210308", + "revision": "20210319", "rootUrl": "https://servicemanagement.googleapis.com/", "schemas": { "Advice": { @@ -1459,12 +1431,6 @@ }, "type": "object" }, - "DisableServiceResponse": { - "description": "Operation payload for DisableService method.", - "id": "DisableServiceResponse", - "properties": {}, - "type": "object" - }, "Documentation": { "description": "`Documentation` provides the information for describing a service. Example: documentation: summary: > The Google Calendar API gives access to most calendar features. pages: - name: Overview content: (== include google/foo/overview.md ==) - name: Tutorial content: (== include google/foo/tutorial.md ==) subpages; - name: Java content: (== include google/foo/tutorial_java.md ==) rules: - selector: google.calendar.Calendar.Get description: > ... - selector: google.calendar.Calendar.Put description: > ... Documentation is provided in markdown syntax. In addition to standard markdown features, definition lists, tables and fenced code blocks are supported. Section headers can be provided and are interpreted relative to the section nesting of the context where a documentation fragment is embedded. Documentation from the IDL is merged with documentation defined via the config at normalization time, where documentation provided by config rules overrides IDL provided. A number of constructs specific to the API platform are supported in documentation text. In order to reference a proto element, the following notation can be used: [fully.qualified.proto.name][] To override the display text used for the link, this can be used: [display text][fully.qualified.proto.name] Text can be excluded from doc using the following notation: (-- internal comment --) A few directives are available in documentation. Note that directives must appear on a single line to be properly identified. The `include` directive includes a markdown file from an external source: (== include path/to/file ==) The `resource_for` directive marks a message to be the resource of a collection in REST view. If it is not specified, tools attempt to infer the resource from the operations in a collection: (== resource_for v1.shelves.books ==) The directive `suppress_warning` does not directly affect documentation and is documented together with service config validation.", "id": "Documentation", @@ -1521,17 +1487,6 @@ }, "type": "object" }, - "EnableServiceRequest": { - "description": "Request message for EnableService method.", - "id": "EnableServiceRequest", - "properties": { - "consumerId": { - "description": "Required. The identity of consumer resource which service enablement will be applied to. The Google Service Management implementation accepts the following forms: - \"project:\" Note: this is made compatible with google.api.servicecontrol.v1.Operation.consumer_id.", - "type": "string" - } - }, - "type": "object" - }, "EnableServiceResponse": { "description": "Operation payload for EnableService method.", "id": "EnableServiceResponse", diff --git a/discovery/servicenetworking-v1.json b/discovery/servicenetworking-v1.json index 47739ee12b8..80b0a71b922 100644 --- a/discovery/servicenetworking-v1.json +++ b/discovery/servicenetworking-v1.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" }, "https://www.googleapis.com/auth/service.management": { "description": "Manage your Google API service configuration" @@ -831,7 +831,7 @@ } } }, - "revision": "20210307", + "revision": "20210319", "rootUrl": "https://servicenetworking.googleapis.com/", "schemas": { "AddDnsRecordSetMetadata": { diff --git a/discovery/servicenetworking-v1beta.json b/discovery/servicenetworking-v1beta.json index ce5917128c5..eaa6b6df091 100644 --- a/discovery/servicenetworking-v1beta.json +++ b/discovery/servicenetworking-v1beta.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" }, "https://www.googleapis.com/auth/service.management": { "description": "Manage your Google API service configuration" @@ -307,7 +307,7 @@ } } }, - "revision": "20210307", + "revision": "20210319", "rootUrl": "https://servicenetworking.googleapis.com/", "schemas": { "AddDnsRecordSetMetadata": { diff --git a/discovery/serviceusage-v1.json b/discovery/serviceusage-v1.json index ea509706e19..cdc0b74e9e6 100644 --- a/discovery/serviceusage-v1.json +++ b/discovery/serviceusage-v1.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" }, "https://www.googleapis.com/auth/cloud-platform.read-only": { "description": "View your data across Google Cloud Platform services" @@ -426,7 +426,7 @@ } } }, - "revision": "20210307", + "revision": "20210322", "rootUrl": "https://serviceusage.googleapis.com/", "schemas": { "AdminQuotaPolicy": { diff --git a/discovery/serviceusage-v1beta1.json b/discovery/serviceusage-v1beta1.json index e1c1cb56be0..549edf489a3 100644 --- a/discovery/serviceusage-v1beta1.json +++ b/discovery/serviceusage-v1beta1.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" }, "https://www.googleapis.com/auth/cloud-platform.read-only": { "description": "View your data across Google Cloud Platform services" @@ -959,7 +959,7 @@ } } }, - "revision": "20210307", + "revision": "20210322", "rootUrl": "https://serviceusage.googleapis.com/", "schemas": { "AdminQuotaPolicy": { diff --git a/discovery/sheets-v4.json b/discovery/sheets-v4.json index dbf726f86c9..a662304f223 100644 --- a/discovery/sheets-v4.json +++ b/discovery/sheets-v4.json @@ -541,7 +541,7 @@ "type": "string" }, "ranges": { - "description": "The A1 notation of the values to retrieve.", + "description": "The A1 notation or R1C1 notation of the range to retrieve values from.", "location": "query", "repeated": true, "type": "string" @@ -678,7 +678,7 @@ ], "parameters": { "range": { - "description": "The A1 notation of the values to clear.", + "description": "The A1 notation or R1C1 notation of the values to clear.", "location": "path", "required": true, "type": "string" @@ -742,7 +742,7 @@ "type": "string" }, "range": { - "description": "The A1 notation of the values to retrieve.", + "description": "The A1 notation or R1C1 notation of the range to retrieve values from.", "location": "path", "required": true, "type": "string" @@ -870,7 +870,7 @@ } } }, - "revision": "20210302", + "revision": "20210316", "rootUrl": "https://sheets.googleapis.com/", "schemas": { "AddBandingRequest": { @@ -1662,7 +1662,7 @@ "id": "BatchClearValuesRequest", "properties": { "ranges": { - "description": "The ranges to clear, in A1 notation.", + "description": "The ranges to clear, in A1 or R1C1 notation.", "items": { "type": "string" }, @@ -2272,7 +2272,7 @@ }, "bubbleSizes": { "$ref": "ChartData", - "description": "The data contianing the bubble sizes. Bubble sizes are used to draw the bubbles at different sizes relative to each other. If specified, group_ids must also be specified. This field is optional." + "description": "The data containing the bubble sizes. Bubble sizes are used to draw the bubbles at different sizes relative to each other. If specified, group_ids must also be specified. This field is optional." }, "bubbleTextStyle": { "$ref": "TextFormat", @@ -2310,7 +2310,7 @@ }, "series": { "$ref": "ChartData", - "description": "The data contianing the bubble y-values. These values locate the bubbles in the chart vertically." + "description": "The data containing the bubble y-values. These values locate the bubbles in the chart vertically." } }, "type": "object" @@ -2898,11 +2898,11 @@ "type": "object" }, "Color": { - "description": "Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to/from color representations in various languages over compactness; for example, the fields of this representation can be trivially provided to the constructor of \"java.awt.Color\" in Java; it can also be trivially provided to UIColor's \"+colorWithRed:green:blue:alpha\" method in iOS; and, with just a little work, it can be easily formatted into a CSS \"rgba()\" string in JavaScript, as well. Note: this proto does not carry information about the absolute color space that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default, applications SHOULD assume the sRGB color space. Note: when color equality needs to be decided, implementations, unless documented otherwise, will treat two colors to be equal if all their red, green, blue and alpha values each differ by at most 1e-5. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) { return rgbToCssColor_(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); }; var rgbToCssColor_ = function(red, green, blue) { var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) { resultBuilder.push('0'); } resultBuilder.push(hexString); return resultBuilder.join(''); }; // ...", + "description": "Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to/from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn't carry information about the absolute color space that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most 1e-5. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) { resultBuilder.push('0'); } resultBuilder.push(hexString); return resultBuilder.join(''); }; // ...", "id": "Color", "properties": { "alpha": { - "description": "The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: pixel color = alpha * (this color) + (1.0 - alpha) * (background color) This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is to be rendered as a solid color (as if the alpha value had been explicitly given with a value of 1.0).", + "description": "The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).", "format": "float", "type": "number" }, @@ -5464,7 +5464,7 @@ "type": "string" }, "repeatHeadings": { - "description": "True if the headings in this pivot group should be repeated. This is only valid for row groupings and is ignored by columns. By default, we minimize repitition of headings by not showing higher level headings where they are the same. For example, even though the third row below corresponds to \"Q1 Mar\", \"Q1\" is not shown because it is redundant with previous rows. Setting repeat_headings to true would cause \"Q1\" to be repeated for \"Feb\" and \"Mar\". +--------------+ | Q1 | Jan | | | Feb | | | Mar | +--------+-----+ | Q1 Total | +--------------+", + "description": "True if the headings in this pivot group should be repeated. This is only valid for row groupings and is ignored by columns. By default, we minimize repetition of headings by not showing higher level headings where they are the same. For example, even though the third row below corresponds to \"Q1 Mar\", \"Q1\" is not shown because it is redundant with previous rows. Setting repeat_headings to true would cause \"Q1\" to be repeated for \"Feb\" and \"Mar\". +--------------+ | Q1 | Jan | | | Feb | | | Mar | +--------+-----+ | Q1 Total | +--------------+", "type": "boolean" }, "showTotals": { diff --git a/discovery/spanner-v1.json b/discovery/spanner-v1.json index e8cc791569c..03e5b0c4c51 100644 --- a/discovery/spanner-v1.json +++ b/discovery/spanner-v1.json @@ -1923,7 +1923,7 @@ } } }, - "revision": "20210225", + "revision": "20210309", "rootUrl": "https://spanner.googleapis.com/", "schemas": { "Backup": { @@ -3194,8 +3194,12 @@ "description": "Query optimizer configuration.", "id": "QueryOptions", "properties": { + "optimizerStatisticsPackage": { + "description": "Query optimizer statistics package to use. This parameter allows individual queries to use a different query optimizer statistics. Specifying `latest` as a value instructs Cloud Spanner to use the latest generated statistics package. If not specified, Cloud Spanner uses statistics package set at the database level options, or latest if the database option is not set. The statistics package requested by the query has to be exempt from garbage collection. This can be achieved with the following DDL statement: ``` ALTER STATISTICS SET OPTIONS (allow_gc=false) ``` The list of available statistics packages can be queried from `SPANNER_SYS.OPTIMIZER_STATISTICS_PACKAGES`. Executing a SQL statement with an invalid optimizer statistics package or with statistics package that allows garbage collection fails with an `INVALID_ARGUMENT` error.", + "type": "string" + }, "optimizerVersion": { - "description": "An option to control the selection of optimizer version. This parameter allows individual queries to pick different query optimizer versions. Specifying \"latest\" as a value instructs Cloud Spanner to use the latest supported query optimizer version. If not specified, Cloud Spanner uses optimizer version set at the database level options. Any other positive integer (from the list of supported optimizer versions) overrides the default optimizer version for query execution. The list of supported optimizer versions can be queried from SPANNER_SYS.SUPPORTED_OPTIMIZER_VERSIONS. Executing a SQL statement with an invalid optimizer version will fail with a syntax error (`INVALID_ARGUMENT`) status. See https://cloud.google.com/spanner/docs/query-optimizer/manage-query-optimizer for more information on managing the query optimizer. The `optimizer_version` statement hint has precedence over this setting.", + "description": "An option to control the selection of optimizer version. This parameter allows individual queries to pick different query optimizer versions. Specifying `latest` as a value instructs Cloud Spanner to use the latest supported query optimizer version. If not specified, Cloud Spanner uses the optimizer version set at the database level options. Any other positive integer (from the list of supported optimizer versions) overrides the default optimizer version for query execution. The list of supported optimizer versions can be queried from SPANNER_SYS.SUPPORTED_OPTIMIZER_VERSIONS. Executing a SQL statement with an invalid optimizer version fails with an `INVALID_ARGUMENT` error. See https://cloud.google.com/spanner/docs/query-optimizer/manage-query-optimizer for more information on managing the query optimizer. The `optimizer_version` statement hint has precedence over this setting.", "type": "string" } }, diff --git a/discovery/speech-v1p1beta1.json b/discovery/speech-v1p1beta1.json index 11efd81da58..965b46ebeb1 100644 --- a/discovery/speech-v1p1beta1.json +++ b/discovery/speech-v1p1beta1.json @@ -524,7 +524,7 @@ } } }, - "revision": "20210225", + "revision": "20210318", "rootUrl": "https://speech.googleapis.com/", "schemas": { "ClassItem": { @@ -659,6 +659,11 @@ "format": "google-datetime", "type": "string" }, + "outputConfig": { + "$ref": "TranscriptOutputConfig", + "description": "Output only. A copy of the TranscriptOutputConfig if it was set in the request.", + "readOnly": true + }, "progressPercent": { "description": "Approximate percentage of audio processed thus far. Guaranteed to be 100 when the audio is fully processed and the results are available.", "format": "int32", @@ -688,6 +693,10 @@ "config": { "$ref": "RecognitionConfig", "description": "Required. Provides information to the recognizer that specifies how to process the request." + }, + "outputConfig": { + "$ref": "TranscriptOutputConfig", + "description": "Optional. Specifies an optional destination for the recognition results." } }, "type": "object" @@ -696,6 +705,14 @@ "description": "The only message returned to the client by the `LongRunningRecognize` method. It contains the result as zero or more sequential `SpeechRecognitionResult` messages. It is included in the `result.response` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.", "id": "LongRunningRecognizeResponse", "properties": { + "outputConfig": { + "$ref": "TranscriptOutputConfig", + "description": "Original output config if present in the request." + }, + "outputError": { + "$ref": "Status", + "description": "If the transcript output fails this field contains the relevant error." + }, "results": { "description": "Sequential list of transcription results corresponding to sequential portions of audio.", "items": { @@ -1195,6 +1212,17 @@ }, "type": "object" }, + "TranscriptOutputConfig": { + "description": "Specifies an optional destination for the recognition results.", + "id": "TranscriptOutputConfig", + "properties": { + "gcsUri": { + "description": "Specifies a Cloud Storage URI for the recognition results. Must be specified in the format: `gs://bucket_name/object_name`, and the bucket must already exist.", + "type": "string" + } + }, + "type": "object" + }, "WordInfo": { "description": "Word-specific information for recognized words.", "id": "WordInfo", diff --git a/discovery/sqladmin-v1beta4.json b/discovery/sqladmin-v1beta4.json index 7af76e89e16..dacf45ef495 100644 --- a/discovery/sqladmin-v1beta4.json +++ b/discovery/sqladmin-v1beta4.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" }, "https://www.googleapis.com/auth/sqlservice.admin": { "description": "Manage your Google SQL Service instances" @@ -1834,7 +1834,7 @@ } } }, - "revision": "20210302", + "revision": "20210310", "rootUrl": "https://sqladmin.googleapis.com/", "schemas": { "AclEntry": { @@ -2417,7 +2417,7 @@ "description": "The user settings." }, "state": { - "description": "The current serving state of the Cloud SQL instance. This can be one of the following. *SQL_INSTANCE_STATE_UNSPECIFIED*: The state of the instance is unknown. *RUNNABLE*: The instance is running, or has been stopped by owner. *SUSPENDED*: The instance is not available, for example due to problems with billing. for example due to problems with billing. *PENDING_DELETE*: The instance is being deleted. *PENDING_CREATE*: The instance is being created. *MAINTENANCE*: The instance is down for maintenance. *FAILED*: The instance creation failed.", + "description": "The current serving state of the Cloud SQL instance. This can be one of the following. *SQL_INSTANCE_STATE_UNSPECIFIED*: The state of the instance is unknown. *RUNNABLE*: The instance is running, or has been stopped by owner. *SUSPENDED*: The instance is not available, for example due to problems with billing. *PENDING_DELETE*: The instance is being deleted. *PENDING_CREATE*: The instance is being created. *MAINTENANCE*: The instance is down for maintenance. *FAILED*: The instance creation failed.", "enum": [ "SQL_INSTANCE_STATE_UNSPECIFIED", "RUNNABLE", @@ -2913,7 +2913,7 @@ "type": "boolean" }, "queryStringLength": { - "description": "Maximum query length stored in bytes. Default value: 1024 bytes. Range: 256-4500 bytes. Query length more than this field value will be truncated to this value. When unset, query length will be the default value.", + "description": "Maximum query length stored in bytes. Default value: 1024 bytes. Range: 256-4500 bytes. Query length more than this field value will be truncated to this value. When unset, query length will be the default value. Changing query length will restart the database.", "format": "int32", "type": "integer" }, diff --git a/discovery/texttospeech-v1beta1.json b/discovery/texttospeech-v1beta1.json index 6e4d06f706a..6b271ca1c90 100644 --- a/discovery/texttospeech-v1beta1.json +++ b/discovery/texttospeech-v1beta1.json @@ -153,7 +153,7 @@ } } }, - "revision": "20210226", + "revision": "20210312", "rootUrl": "https://texttospeech.googleapis.com/", "schemas": { "AudioConfig": { @@ -168,7 +168,8 @@ "MP3", "MP3_64_KBPS", "OGG_OPUS", - "MULAW" + "MULAW", + "ALAW" ], "enumDescriptions": [ "Not specified. Will return result google.rpc.Code.INVALID_ARGUMENT.", @@ -176,7 +177,8 @@ "MP3 audio at 32kbps.", "MP3 at 64kbps.", "Opus encoded audio wrapped in an ogg container. The result will be a file which can be played natively on Android, and in browsers (at least Chrome and Firefox). The quality of the encoding is considerably higher than MP3 while using approximately the same bitrate.", - "8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law. Audio content returned as MULAW also contains a WAV header." + "8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law. Audio content returned as MULAW also contains a WAV header.", + "8-bit samples that compand 14-bit audio samples using G.711 PCMU/A-law. Audio content returned as ALAW also contains a WAV header." ], "type": "string" }, diff --git a/discovery/transcoder-v1beta1.json b/discovery/transcoder-v1beta1.json index 14b01ee4012..dd403f0f372 100644 --- a/discovery/transcoder-v1beta1.json +++ b/discovery/transcoder-v1beta1.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" } } } @@ -355,7 +355,7 @@ } } }, - "revision": "20210301", + "revision": "20210323", "rootUrl": "https://transcoder.googleapis.com/", "schemas": { "AdBreak": { @@ -1355,12 +1355,12 @@ "type": "integer" }, "spriteHeightPixels": { - "description": "Required. The height of sprite in pixels. Must be an even integer.", + "description": "Required. The height of sprite in pixels. Must be an even integer. To preserve the source aspect ratio, set the SpriteSheet.sprite_height_pixels field or the SpriteSheet.sprite_width_pixels field, but not both (the API will automatically calculate the missing field).", "format": "int32", "type": "integer" }, "spriteWidthPixels": { - "description": "Required. The width of sprite in pixels. Must be an even integer.", + "description": "Required. The width of sprite in pixels. Must be an even integer. To preserve the source aspect ratio, set the SpriteSheet.sprite_width_pixels field or the SpriteSheet.sprite_height_pixels field, but not both (the API will automatically calculate the missing field).", "format": "int32", "type": "integer" }, diff --git a/discovery/translate-v3.json b/discovery/translate-v3.json index b1fd5eecec9..d2145719727 100644 --- a/discovery/translate-v3.json +++ b/discovery/translate-v3.json @@ -337,7 +337,7 @@ ], "parameters": { "filter": { - "description": "The standard list 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" }, @@ -349,13 +349,13 @@ "type": "string" }, "pageSize": { - "description": "The standard list page size.", + "description": "The maximum number of results to return. If not set, the service will select a default.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "The standard list page token.", + "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" } @@ -687,7 +687,7 @@ } } }, - "revision": "20210226", + "revision": "20210312", "rootUrl": "https://translation.googleapis.com/", "schemas": { "BatchTranslateTextRequest": { diff --git a/discovery/translate-v3beta1.json b/discovery/translate-v3beta1.json index 4affb997caf..be395e16b51 100644 --- a/discovery/translate-v3beta1.json +++ b/discovery/translate-v3beta1.json @@ -337,7 +337,7 @@ ], "parameters": { "filter": { - "description": "The standard list 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" }, @@ -349,13 +349,13 @@ "type": "string" }, "pageSize": { - "description": "The standard list page size.", + "description": "The maximum number of results to return. If not set, the service will select a default.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "The standard list page token.", + "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" } @@ -687,7 +687,7 @@ } } }, - "revision": "20210226", + "revision": "20210312", "rootUrl": "https://translation.googleapis.com/", "schemas": { "BatchTranslateTextRequest": { diff --git a/discovery/vision-v1.json b/discovery/vision-v1.json index 758678f152f..568395a29d1 100644 --- a/discovery/vision-v1.json +++ b/discovery/vision-v1.json @@ -1282,7 +1282,7 @@ } } }, - "revision": "20210226", + "revision": "20210317", "rootUrl": "https://vision.googleapis.com/", "schemas": { "AddProductToProductSetRequest": { @@ -1732,11 +1732,11 @@ "type": "object" }, "Color": { - "description": "Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to/from color representations in various languages over compactness; for example, the fields of this representation can be trivially provided to the constructor of \"java.awt.Color\" in Java; it can also be trivially provided to UIColor's \"+colorWithRed:green:blue:alpha\" method in iOS; and, with just a little work, it can be easily formatted into a CSS \"rgba()\" string in JavaScript, as well. Note: this proto does not carry information about the absolute color space that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default, applications SHOULD assume the sRGB color space. Note: when color equality needs to be decided, implementations, unless documented otherwise, will treat two colors to be equal if all their red, green, blue and alpha values each differ by at most 1e-5. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) { return rgbToCssColor_(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); }; var rgbToCssColor_ = function(red, green, blue) { var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) { resultBuilder.push('0'); } resultBuilder.push(hexString); return resultBuilder.join(''); }; // ...", + "description": "Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to/from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn't carry information about the absolute color space that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most 1e-5. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) { resultBuilder.push('0'); } resultBuilder.push(hexString); return resultBuilder.join(''); }; // ...", "id": "Color", "properties": { "alpha": { - "description": "The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: pixel color = alpha * (this color) + (1.0 - alpha) * (background color) This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is to be rendered as a solid color (as if the alpha value had been explicitly given with a value of 1.0).", + "description": "The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).", "format": "float", "type": "number" }, diff --git a/discovery/vision-v1p1beta1.json b/discovery/vision-v1p1beta1.json index fecfe3a3fb5..c134a7e748e 100644 --- a/discovery/vision-v1p1beta1.json +++ b/discovery/vision-v1p1beta1.json @@ -449,7 +449,7 @@ } } }, - "revision": "20210226", + "revision": "20210317", "rootUrl": "https://vision.googleapis.com/", "schemas": { "AnnotateFileResponse": { @@ -714,11 +714,11 @@ "type": "object" }, "Color": { - "description": "Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to/from color representations in various languages over compactness; for example, the fields of this representation can be trivially provided to the constructor of \"java.awt.Color\" in Java; it can also be trivially provided to UIColor's \"+colorWithRed:green:blue:alpha\" method in iOS; and, with just a little work, it can be easily formatted into a CSS \"rgba()\" string in JavaScript, as well. Note: this proto does not carry information about the absolute color space that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default, applications SHOULD assume the sRGB color space. Note: when color equality needs to be decided, implementations, unless documented otherwise, will treat two colors to be equal if all their red, green, blue and alpha values each differ by at most 1e-5. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) { return rgbToCssColor_(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); }; var rgbToCssColor_ = function(red, green, blue) { var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) { resultBuilder.push('0'); } resultBuilder.push(hexString); return resultBuilder.join(''); }; // ...", + "description": "Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to/from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn't carry information about the absolute color space that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most 1e-5. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) { resultBuilder.push('0'); } resultBuilder.push(hexString); return resultBuilder.join(''); }; // ...", "id": "Color", "properties": { "alpha": { - "description": "The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: pixel color = alpha * (this color) + (1.0 - alpha) * (background color) This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is to be rendered as a solid color (as if the alpha value had been explicitly given with a value of 1.0).", + "description": "The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).", "format": "float", "type": "number" }, diff --git a/discovery/vision-v1p2beta1.json b/discovery/vision-v1p2beta1.json index 6357407ab1d..f1fb5fe4eb0 100644 --- a/discovery/vision-v1p2beta1.json +++ b/discovery/vision-v1p2beta1.json @@ -449,7 +449,7 @@ } } }, - "revision": "20210226", + "revision": "20210317", "rootUrl": "https://vision.googleapis.com/", "schemas": { "AnnotateFileResponse": { @@ -714,11 +714,11 @@ "type": "object" }, "Color": { - "description": "Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to/from color representations in various languages over compactness; for example, the fields of this representation can be trivially provided to the constructor of \"java.awt.Color\" in Java; it can also be trivially provided to UIColor's \"+colorWithRed:green:blue:alpha\" method in iOS; and, with just a little work, it can be easily formatted into a CSS \"rgba()\" string in JavaScript, as well. Note: this proto does not carry information about the absolute color space that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default, applications SHOULD assume the sRGB color space. Note: when color equality needs to be decided, implementations, unless documented otherwise, will treat two colors to be equal if all their red, green, blue and alpha values each differ by at most 1e-5. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) { return rgbToCssColor_(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); }; var rgbToCssColor_ = function(red, green, blue) { var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) { resultBuilder.push('0'); } resultBuilder.push(hexString); return resultBuilder.join(''); }; // ...", + "description": "Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to/from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn't carry information about the absolute color space that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most 1e-5. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) { resultBuilder.push('0'); } resultBuilder.push(hexString); return resultBuilder.join(''); }; // ...", "id": "Color", "properties": { "alpha": { - "description": "The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: pixel color = alpha * (this color) + (1.0 - alpha) * (background color) This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is to be rendered as a solid color (as if the alpha value had been explicitly given with a value of 1.0).", + "description": "The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).", "format": "float", "type": "number" }, diff --git a/discovery/webrisk-v1.json b/discovery/webrisk-v1.json index 5fdd5699f07..0ff409b82cd 100644 --- a/discovery/webrisk-v1.json +++ b/discovery/webrisk-v1.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" } } } @@ -149,122 +149,122 @@ } } }, - "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/operations/{operationsId}:cancel", - "httpMethod": "POST", - "id": "webrisk.operations.cancel", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The name of the operation resource to be cancelled.", - "location": "path", - "pattern": "^operations/.*$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}:cancel", - "request": { - "$ref": "GoogleLongrunningCancelOperationRequest" - }, - "response": { - "$ref": "GoogleProtobufEmpty" - } - }, - "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/operations/{operationsId}", - "httpMethod": "DELETE", - "id": "webrisk.operations.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The name of the operation resource to be deleted.", - "location": "path", - "pattern": "^operations/.*$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "GoogleProtobufEmpty" - } - }, - "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/operations/{operationsId}", - "httpMethod": "GET", - "id": "webrisk.operations.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The name of the operation resource.", - "location": "path", - "pattern": "^operations/.*$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "GoogleLongrunningOperation" - }, - "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`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", - "flatPath": "v1/operations", - "httpMethod": "GET", - "id": "webrisk.operations.list", - "parameterOrder": [ - "name" - ], - "parameters": { - "filter": { - "description": "The standard list filter.", - "location": "query", - "type": "string" + "projects": { + "resources": { + "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}/operations/{operationsId}:cancel", + "httpMethod": "POST", + "id": "webrisk.projects.operations.cancel", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be cancelled.", + "location": "path", + "pattern": "^projects/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:cancel", + "request": { + "$ref": "GoogleLongrunningCancelOperationRequest" + }, + "response": { + "$ref": "GoogleProtobufEmpty" + } }, - "name": { - "description": "The name of the operation's parent resource.", - "location": "path", - "pattern": "^operations$", - "required": true, - "type": "string" + "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}/operations/{operationsId}", + "httpMethod": "DELETE", + "id": "webrisk.projects.operations.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be deleted.", + "location": "path", + "pattern": "^projects/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + } }, - "pageSize": { - "description": "The standard list page size.", - "format": "int32", - "location": "query", - "type": "integer" + "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}/operations/{operationsId}", + "httpMethod": "GET", + "id": "webrisk.projects.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^projects/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] }, - "pageToken": { - "description": "The standard list page token.", - "location": "query", - "type": "string" + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + "flatPath": "v1/projects/{projectsId}/operations", + "httpMethod": "GET", + "id": "webrisk.projects.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/[^/]+$", + "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": "GoogleLongrunningListOperationsResponse" + } } - }, - "path": "v1/{+name}", - "response": { - "$ref": "GoogleLongrunningListOperationsResponse" } - } - } - }, - "projects": { - "resources": { + }, "submissions": { "methods": { "create": { @@ -446,7 +446,7 @@ } } }, - "revision": "20210307", + "revision": "20210319", "rootUrl": "https://webrisk.googleapis.com/", "schemas": { "GoogleCloudWebriskV1ComputeThreatListDiffResponse": { @@ -687,6 +687,41 @@ }, "type": "object" }, + "GoogleCloudWebriskV1SubmitUriMetadata": { + "description": "Metadata for the Submit URI long-running operation.", + "id": "GoogleCloudWebriskV1SubmitUriMetadata", + "properties": { + "createTime": { + "description": "Creation time of the operation.", + "format": "google-datetime", + "type": "string" + }, + "state": { + "description": "The state of the operation.", + "enum": [ + "STATE_UNSPECIFIED", + "RUNNING", + "SUCCEEDED", + "CANCELLED", + "FAILED" + ], + "enumDescriptions": [ + "Default unspecified state.", + "The operation is currently running.", + "The operation finished with a success status.", + "The operation was cancelled.", + "The operation finished with a failure status." + ], + "type": "string" + }, + "updateTime": { + "description": "Latest update time of the operation.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudWebriskV1SubmitUriRequest": { "description": "Request to send a potentially malicious URI to WebRisk.", "id": "GoogleCloudWebriskV1SubmitUriRequest", diff --git a/discovery/workflowexecutions-v1.json b/discovery/workflowexecutions-v1.json index 90a1d89c26b..d3d62a7471a 100644 --- a/discovery/workflowexecutions-v1.json +++ b/discovery/workflowexecutions-v1.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" } } } @@ -269,7 +269,7 @@ } } }, - "revision": "20210209", + "revision": "20210309", "rootUrl": "https://workflowexecutions.googleapis.com/", "schemas": { "CancelExecutionRequest": { @@ -283,12 +283,16 @@ "id": "Error", "properties": { "context": { - "description": "Human readable error context, helpful for debugging purposes.", + "description": "Human readable stack trace string.", "type": "string" }, "payload": { - "description": "Error payload returned by the execution, represented as a JSON string.", + "description": "Error message and data returned represented as a JSON string.", "type": "string" + }, + "stackTrace": { + "$ref": "StackTrace", + "description": "Stack trace with detailed information of where error was generated." } }, "type": "object" @@ -372,6 +376,61 @@ } }, "type": "object" + }, + "Position": { + "description": "Position contains source position information about the stack trace element such as line number, column number and length of the code block in bytes.", + "id": "Position", + "properties": { + "column": { + "description": "The source code column position (of the line) the current instruction was generated from.", + "format": "int64", + "type": "string" + }, + "length": { + "description": "The length in bytes of text in this character group, e.g. digits of a number, string length, or AST (abstract syntax tree) node.", + "format": "int64", + "type": "string" + }, + "line": { + "description": "The source code line number the current instruction was generated from.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "StackTrace": { + "description": "A collection of stack elements (frames) where an error occurred.", + "id": "StackTrace", + "properties": { + "elements": { + "description": "An array of Stack elements.", + "items": { + "$ref": "StackTraceElement" + }, + "type": "array" + } + }, + "type": "object" + }, + "StackTraceElement": { + "description": "A single stack element (frame) where an error occurred.", + "id": "StackTraceElement", + "properties": { + "position": { + "$ref": "Position", + "description": "The source position information of the stacktrace element." + }, + "routine": { + "description": "The routine where the error occurred.", + "type": "string" + }, + "step": { + "description": "The step the error occurred at.", + "type": "string" + } + }, + "type": "object" } }, "servicePath": "", diff --git a/discovery/workflowexecutions-v1beta.json b/discovery/workflowexecutions-v1beta.json index c84ae64b2bb..752e8c4d739 100644 --- a/discovery/workflowexecutions-v1beta.json +++ b/discovery/workflowexecutions-v1beta.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" } } } @@ -269,7 +269,7 @@ } } }, - "revision": "20210209", + "revision": "20210309", "rootUrl": "https://workflowexecutions.googleapis.com/", "schemas": { "CancelExecutionRequest": { @@ -414,7 +414,7 @@ "type": "object" }, "StackTraceElement": { - "description": "A single stack element (frame) where an error occurred. This field currently only exists in v1Beta. We will need to roll this change out to V1 after the feature is thoroughly tested. TODO(b/178540475)", + "description": "A single stack element (frame) where an error occurred.", "id": "StackTraceElement", "properties": { "position": { diff --git a/discovery/workflows-v1.json b/discovery/workflows-v1.json index 4e67ab34e4c..8964921334b 100644 --- a/discovery/workflows-v1.json +++ b/discovery/workflows-v1.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" } } } @@ -144,7 +144,7 @@ ], "parameters": { "filter": { - "description": "The standard list 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" }, @@ -156,13 +156,13 @@ "type": "string" }, "pageSize": { - "description": "The standard list page size.", + "description": "The maximum number of results to return. If not set, the service will select a default.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "The standard list page token.", + "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" } @@ -444,7 +444,7 @@ } } }, - "revision": "20210225", + "revision": "20210310", "rootUrl": "https://workflows.googleapis.com/", "schemas": { "Empty": { @@ -680,7 +680,7 @@ "type": "string" }, "sourceContents": { - "description": "Workflow code to be executed. The size limit is 32KB.", + "description": "Workflow code to be executed. The size limit is 128KB.", "type": "string" }, "state": { diff --git a/discovery/workflows-v1beta.json b/discovery/workflows-v1beta.json index 12451be21d2..ee718e214cc 100644 --- a/discovery/workflows-v1beta.json +++ b/discovery/workflows-v1beta.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud Platform data" } } } @@ -144,7 +144,7 @@ ], "parameters": { "filter": { - "description": "The standard list 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" }, @@ -156,13 +156,13 @@ "type": "string" }, "pageSize": { - "description": "The standard list page size.", + "description": "The maximum number of results to return. If not set, the service will select a default.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "The standard list page token.", + "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" } @@ -444,7 +444,7 @@ } } }, - "revision": "20210225", + "revision": "20210310", "rootUrl": "https://workflows.googleapis.com/", "schemas": { "Empty": { @@ -680,7 +680,7 @@ "type": "string" }, "sourceContents": { - "description": "Workflow code to be executed. The size limit is 32KB.", + "description": "Workflow code to be executed. The size limit is 128KB.", "type": "string" }, "state": { diff --git a/src/apis/accessapproval/v1.ts b/src/apis/accessapproval/v1.ts index 2c175ffdebe..1888160f078 100644 --- a/src/apis/accessapproval/v1.ts +++ b/src/apis/accessapproval/v1.ts @@ -262,7 +262,7 @@ export namespace accessapproval_v1 { */ export interface Schema$EnrolledService { /** - * The product for which Access Approval will be enrolled. Allowed values are listed below (case-sensitive): * all * App Engine * BigQuery * Cloud Bigtable * Cloud Key Management Service * Compute Engine * Cloud Dataflow * Cloud Identity and Access Management * Cloud Pub/Sub * Cloud Storage * Persistent Disk Note: These values are supported as input for legacy purposes, but will not be returned from the API. * all * appengine.googleapis.com * bigquery.googleapis.com * bigtable.googleapis.com * cloudkms.googleapis.com * compute.googleapis.com * dataflow.googleapis.com * iam.googleapis.com * pubsub.googleapis.com * storage.googleapis.com Calls to UpdateAccessApprovalSettings using 'all' or any of the XXX.googleapis.com will be translated to the associated product name ('all', 'App Engine', etc.). Note: 'all' will enroll the resource in all products supported at both 'GA' and 'Preview' levels. More information about levels of support is available at https://cloud.google.com/access-approval/docs/supported-services + * The product for which Access Approval will be enrolled. Allowed values are listed below (case-sensitive): * all * App Engine * BigQuery * Cloud Bigtable * Cloud Key Management Service * Compute Engine * Cloud Dataflow * Cloud Identity and Access Management * Cloud Logging * Cloud Pub/Sub * Cloud Spanner * Cloud Storage * Persistent Disk Note: These values are supported as input for legacy purposes, but will not be returned from the API. * all * appengine.googleapis.com * bigquery.googleapis.com * bigtable.googleapis.com * cloudkms.googleapis.com * compute.googleapis.com * dataflow.googleapis.com * iam.googleapis.com * logging.googleapis.com * pubsub.googleapis.com * spanner.googleapis.com * storage.googleapis.com Calls to UpdateAccessApprovalSettings using 'all' or any of the XXX.googleapis.com will be translated to the associated product name ('all', 'App Engine', etc.). Note: 'all' will enroll the resource in all products supported at both 'GA' and 'Preview' levels. More information about levels of support is available at https://cloud.google.com/access-approval/docs/supported-services */ cloudProduct?: string | null; /** @@ -1207,7 +1207,7 @@ export namespace accessapproval_v1 { * * // Do the magic * const res = await accessapproval.folders.approvalRequests.list({ - * // A filter on the type of approval requests to retrieve. Must be one of the following values: * [not set]: Requests that are pending or have active approvals. * ALL: All requests. * PENDING: Only pending requests. * ACTIVE: Only active (i.e. currently approved) requests. * DISMISSED: Only requests that have been dismissed, or requests that . are not approved and past expiration. * EXPIRED: Only requests that have been approved, and the approval has expired. * HISTORY: Active, dismissed and expired requests. + * // A filter on the type of approval requests to retrieve. Must be one of the following values: * [not set]: Requests that are pending or have active approvals. * ALL: All requests. * PENDING: Only pending requests. * ACTIVE: Only active (i.e. currently approved) requests. * DISMISSED: Only requests that have been dismissed, or requests that are not approved and past expiration. * EXPIRED: Only requests that have been approved, and the approval has expired. * HISTORY: Active, dismissed and expired requests. * filter: 'placeholder-value', * // Requested page size. * pageSize: 'placeholder-value', @@ -1361,7 +1361,7 @@ export namespace accessapproval_v1 { export interface Params$Resource$Folders$Approvalrequests$List extends StandardParameters { /** - * A filter on the type of approval requests to retrieve. Must be one of the following values: * [not set]: Requests that are pending or have active approvals. * ALL: All requests. * PENDING: Only pending requests. * ACTIVE: Only active (i.e. currently approved) requests. * DISMISSED: Only requests that have been dismissed, or requests that . are not approved and past expiration. * EXPIRED: Only requests that have been approved, and the approval has expired. * HISTORY: Active, dismissed and expired requests. + * A filter on the type of approval requests to retrieve. Must be one of the following values: * [not set]: Requests that are pending or have active approvals. * ALL: All requests. * PENDING: Only pending requests. * ACTIVE: Only active (i.e. currently approved) requests. * DISMISSED: Only requests that have been dismissed, or requests that are not approved and past expiration. * EXPIRED: Only requests that have been approved, and the approval has expired. * HISTORY: Active, dismissed and expired requests. */ filter?: string; /** @@ -2292,7 +2292,7 @@ export namespace accessapproval_v1 { * * // Do the magic * const res = await accessapproval.organizations.approvalRequests.list({ - * // A filter on the type of approval requests to retrieve. Must be one of the following values: * [not set]: Requests that are pending or have active approvals. * ALL: All requests. * PENDING: Only pending requests. * ACTIVE: Only active (i.e. currently approved) requests. * DISMISSED: Only requests that have been dismissed, or requests that . are not approved and past expiration. * EXPIRED: Only requests that have been approved, and the approval has expired. * HISTORY: Active, dismissed and expired requests. + * // A filter on the type of approval requests to retrieve. Must be one of the following values: * [not set]: Requests that are pending or have active approvals. * ALL: All requests. * PENDING: Only pending requests. * ACTIVE: Only active (i.e. currently approved) requests. * DISMISSED: Only requests that have been dismissed, or requests that are not approved and past expiration. * EXPIRED: Only requests that have been approved, and the approval has expired. * HISTORY: Active, dismissed and expired requests. * filter: 'placeholder-value', * // Requested page size. * pageSize: 'placeholder-value', @@ -2446,7 +2446,7 @@ export namespace accessapproval_v1 { export interface Params$Resource$Organizations$Approvalrequests$List extends StandardParameters { /** - * A filter on the type of approval requests to retrieve. Must be one of the following values: * [not set]: Requests that are pending or have active approvals. * ALL: All requests. * PENDING: Only pending requests. * ACTIVE: Only active (i.e. currently approved) requests. * DISMISSED: Only requests that have been dismissed, or requests that . are not approved and past expiration. * EXPIRED: Only requests that have been approved, and the approval has expired. * HISTORY: Active, dismissed and expired requests. + * A filter on the type of approval requests to retrieve. Must be one of the following values: * [not set]: Requests that are pending or have active approvals. * ALL: All requests. * PENDING: Only pending requests. * ACTIVE: Only active (i.e. currently approved) requests. * DISMISSED: Only requests that have been dismissed, or requests that are not approved and past expiration. * EXPIRED: Only requests that have been approved, and the approval has expired. * HISTORY: Active, dismissed and expired requests. */ filter?: string; /** @@ -3377,7 +3377,7 @@ export namespace accessapproval_v1 { * * // Do the magic * const res = await accessapproval.projects.approvalRequests.list({ - * // A filter on the type of approval requests to retrieve. Must be one of the following values: * [not set]: Requests that are pending or have active approvals. * ALL: All requests. * PENDING: Only pending requests. * ACTIVE: Only active (i.e. currently approved) requests. * DISMISSED: Only requests that have been dismissed, or requests that . are not approved and past expiration. * EXPIRED: Only requests that have been approved, and the approval has expired. * HISTORY: Active, dismissed and expired requests. + * // A filter on the type of approval requests to retrieve. Must be one of the following values: * [not set]: Requests that are pending or have active approvals. * ALL: All requests. * PENDING: Only pending requests. * ACTIVE: Only active (i.e. currently approved) requests. * DISMISSED: Only requests that have been dismissed, or requests that are not approved and past expiration. * EXPIRED: Only requests that have been approved, and the approval has expired. * HISTORY: Active, dismissed and expired requests. * filter: 'placeholder-value', * // Requested page size. * pageSize: 'placeholder-value', @@ -3531,7 +3531,7 @@ export namespace accessapproval_v1 { export interface Params$Resource$Projects$Approvalrequests$List extends StandardParameters { /** - * A filter on the type of approval requests to retrieve. Must be one of the following values: * [not set]: Requests that are pending or have active approvals. * ALL: All requests. * PENDING: Only pending requests. * ACTIVE: Only active (i.e. currently approved) requests. * DISMISSED: Only requests that have been dismissed, or requests that . are not approved and past expiration. * EXPIRED: Only requests that have been approved, and the approval has expired. * HISTORY: Active, dismissed and expired requests. + * A filter on the type of approval requests to retrieve. Must be one of the following values: * [not set]: Requests that are pending or have active approvals. * ALL: All requests. * PENDING: Only pending requests. * ACTIVE: Only active (i.e. currently approved) requests. * DISMISSED: Only requests that have been dismissed, or requests that are not approved and past expiration. * EXPIRED: Only requests that have been approved, and the approval has expired. * HISTORY: Active, dismissed and expired requests. */ filter?: string; /** diff --git a/src/apis/admin/directory_v1.ts b/src/apis/admin/directory_v1.ts index 60465572f7c..8f0f5ea67ab 100644 --- a/src/apis/admin/directory_v1.ts +++ b/src/apis/admin/directory_v1.ts @@ -228,6 +228,67 @@ export namespace admin_directory_v1 { */ kind?: string | null; } + /** + * Auxiliary message about issues with printers or settings. Example: {message_type:AUXILIARY_MESSAGE_WARNING, field_mask:make_and_model, message:"Given printer is invalid or no longer supported."\} + */ + export interface Schema$AuxiliaryMessage { + /** + * Human readable message in English. Example: "Given printer is invalid or no longer supported." + */ + auxiliaryMessage?: string | null; + /** + * Field that this message concerns. + */ + fieldMask?: string | null; + /** + * Message severity + */ + severity?: string | null; + } + /** + * Request for adding new printers in batch. + */ + export interface Schema$BatchCreatePrintersRequest { + /** + * A list of Printers to be created. Max 50 at a time. + */ + requests?: Schema$CreatePrinterRequest[]; + } + /** + * Response for adding new printers in batch. + */ + export interface Schema$BatchCreatePrintersResponse { + /** + * A list of create failures. Printer IDs are not populated, as printer were not created. + */ + failures?: Schema$FailureInfo[]; + /** + * A list of successfully created printers with their IDs populated. + */ + printers?: Schema$Printer[]; + } + /** + * Request for deleting existing printers in batch. + */ + export interface Schema$BatchDeletePrintersRequest { + /** + * A list of Printer.id that should be deleted. Max 100 at a time. + */ + printerIds?: string[] | null; + } + /** + * Response for deleting existing printers in batch. + */ + export interface Schema$BatchDeletePrintersResponse { + /** + * A list of update failures. + */ + failedPrinters?: Schema$FailureInfo[]; + /** + * A list of Printer.id that were successfully deleted. + */ + printerIds?: string[] | null; + } /** * Public API: Resources.buildings */ @@ -601,6 +662,15 @@ export namespace admin_directory_v1 { * List of recent device users, in descending order, by last login time. */ recentUsers?: Schema$RecentUsers[]; + /** + * List of screenshot files to download. Type is always "SCREENSHOT_FILE". (Read-only) + */ + screenshotFiles?: Array<{ + createTime?: string; + downloadUrl?: string; + name?: string; + type?: string; + }> | null; /** * The Chrome device serial number entered when the device was enabled. This value is the same as the Admin console's *Serial Number* in the *Chrome OS Devices* tab. */ @@ -674,6 +744,19 @@ export namespace admin_directory_v1 { */ deviceIds?: string[] | null; } + /** + * Request for adding a new printer. + */ + export interface Schema$CreatePrinterRequest { + /** + * Required. The name of the customer. Format: customers/{customer_id\} + */ + parent?: string | null; + /** + * Required. A printer to create. If you want to place the printer under particular OU then populate printer.org_unit_id filed. Otherwise the printer will be placed under root OU. + */ + printer?: Schema$Printer; + } export interface Schema$Customer { /** * The customer's secondary contact email address. This email address cannot be on the same domain as the `customerDomain` @@ -906,6 +989,31 @@ export namespace admin_directory_v1 { */ kind?: string | null; } + /** + * 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); \} The JSON representation for `Empty` is empty JSON object `{\}`. + */ + export interface Schema$Empty {} + /** + * Info about failures + */ + export interface Schema$FailureInfo { + /** + * Canonical code for why the update failed to apply. + */ + errorCode?: string | null; + /** + * Failure reason message. + */ + errorMessage?: string | null; + /** + * Failed printer. + */ + printer?: Schema$Printer; + /** + * Id of a failed printer. + */ + printerId?: string | null; + } /** * JSON template for Feature object in Directory API. */ @@ -1022,6 +1130,32 @@ export namespace admin_directory_v1 { */ nextPageToken?: string | null; } + /** + * Response for listing allowed printer models. + */ + export interface Schema$ListPrinterModelsResponse { + /** + * A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. + */ + nextPageToken?: string | null; + /** + * Printer models that are currently allowed to be configured for ChromeOs. Some printers may be added or removed over time. + */ + printerModels?: Schema$PrinterModel[]; + } + /** + * Response for listing printers. + */ + export interface Schema$ListPrintersResponse { + /** + * A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. + */ + nextPageToken?: string | null; + /** + * List of printers. If `org_unit_id` was given in the request, then only printers visible for this OU will be returned. If `org_unit_id` was given in the request, then all printers will be returned. + */ + printers?: Schema$Printer[]; + } /** * A Google Groups member can be a user or another group. This member can be inside or outside of your account's domains. For more information about common group member tasks, see the [Developer's Guide](/admin-sdk/directory/v1/guides/manage-group-members). */ @@ -1336,6 +1470,68 @@ export namespace admin_directory_v1 { */ organizationUnits?: Schema$OrgUnit[]; } + /** + * Printer configuration. + */ + export interface Schema$Printer { + /** + * Output only. Auxiliary messages about issues with the printer configuration if any. + */ + auxiliaryMessages?: Schema$AuxiliaryMessage[]; + /** + * Output only. Time when printer was created. + */ + createTime?: string | null; + /** + * Editable. Description of printer. + */ + description?: string | null; + /** + * Editable. Name of printer. + */ + displayName?: string | null; + /** + * Id of the printer. (During printer creation leave empty) + */ + id?: string | null; + /** + * Editable. Make and model of printer. e.g. Lexmark MS610de Value must be in format as seen in ListPrinterModels response. + */ + makeAndModel?: string | null; + /** + * The resource name of the Printer object, in the format customers/{customer-id\}/printers/{printer-id\} (During printer creation leave empty) + */ + name?: string | null; + /** + * Organization Unit that owns this printer (Only can be set during Printer creation) + */ + orgUnitId?: string | null; + /** + * Editable. Printer URI. + */ + uri?: string | null; + /** + * Editable. flag to use driverless configuration or not. If it's set to be true, make_and_model can be ignored + */ + useDriverlessConfig?: boolean | null; + } + /** + * Printer manufacturer and model + */ + export interface Schema$PrinterModel { + /** + * Display name. eq. "Brother MFC-8840D" + */ + displayName?: string | null; + /** + * Make and model as represented in "make_and_model" field in Printer object. eq. "brother mfc-8840d" + */ + makeAndModel?: string | null; + /** + * Manufacturer. eq. "Brother" + */ + manufacturer?: string | null; + } export interface Schema$Privilege { /** * A list of child privileges. Privileges for a service form a tree. Each privilege can have a list of child privileges; this list is empty for a leaf privilege. @@ -3116,6 +3312,7 @@ export namespace admin_directory_v1 { * // "osVersion": "my_osVersion", * // "platformVersion": "my_platformVersion", * // "recentUsers": [], + * // "screenshotFiles": [], * // "serialNumber": "my_serialNumber", * // "status": "my_status", * // "supportEndDate": "my_supportEndDate", @@ -3565,6 +3762,7 @@ export namespace admin_directory_v1 { * // "osVersion": "my_osVersion", * // "platformVersion": "my_platformVersion", * // "recentUsers": [], + * // "screenshotFiles": [], * // "serialNumber": "my_serialNumber", * // "status": "my_status", * // "supportEndDate": "my_supportEndDate", @@ -3608,6 +3806,7 @@ export namespace admin_directory_v1 { * // "osVersion": "my_osVersion", * // "platformVersion": "my_platformVersion", * // "recentUsers": [], + * // "screenshotFiles": [], * // "serialNumber": "my_serialNumber", * // "status": "my_status", * // "supportEndDate": "my_supportEndDate", @@ -3776,6 +3975,7 @@ export namespace admin_directory_v1 { * // "osVersion": "my_osVersion", * // "platformVersion": "my_platformVersion", * // "recentUsers": [], + * // "screenshotFiles": [], * // "serialNumber": "my_serialNumber", * // "status": "my_status", * // "supportEndDate": "my_supportEndDate", @@ -3819,6 +4019,7 @@ export namespace admin_directory_v1 { * // "osVersion": "my_osVersion", * // "platformVersion": "my_platformVersion", * // "recentUsers": [], + * // "screenshotFiles": [], * // "serialNumber": "my_serialNumber", * // "status": "my_status", * // "supportEndDate": "my_supportEndDate", @@ -4415,8 +4616,10 @@ export namespace admin_directory_v1 { export class Resource$Customers { context: APIRequestContext; + chrome: Resource$Customers$Chrome; constructor(context: APIRequestContext) { this.context = context; + this.chrome = new Resource$Customers$Chrome(this.context); } /** @@ -4889,6 +5092,1297 @@ export namespace admin_directory_v1 { requestBody?: Schema$Customer; } + export class Resource$Customers$Chrome { + context: APIRequestContext; + printers: Resource$Customers$Chrome$Printers; + constructor(context: APIRequestContext) { + this.context = context; + this.printers = new Resource$Customers$Chrome$Printers(this.context); + } + } + + export class Resource$Customers$Chrome$Printers { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Creates printers under given Organization Unit. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/admin.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const admin = google.admin('directory_v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/admin.chrome.printers'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await admin.customers.chrome.printers.batchCreatePrinters({ + * // Required. The name of the customer. Format: customers/{customer_id\} + * parent: 'customers/my-customer', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "requests": [] + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "failures": [], + * // "printers": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + batchCreatePrinters( + params: Params$Resource$Customers$Chrome$Printers$Batchcreateprinters, + options: StreamMethodOptions + ): GaxiosPromise; + batchCreatePrinters( + params?: Params$Resource$Customers$Chrome$Printers$Batchcreateprinters, + options?: MethodOptions + ): GaxiosPromise; + batchCreatePrinters( + params: Params$Resource$Customers$Chrome$Printers$Batchcreateprinters, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + batchCreatePrinters( + params: Params$Resource$Customers$Chrome$Printers$Batchcreateprinters, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + batchCreatePrinters( + params: Params$Resource$Customers$Chrome$Printers$Batchcreateprinters, + callback: BodyResponseCallback + ): void; + batchCreatePrinters( + callback: BodyResponseCallback + ): void; + batchCreatePrinters( + paramsOrCallback?: + | Params$Resource$Customers$Chrome$Printers$Batchcreateprinters + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Customers$Chrome$Printers$Batchcreateprinters; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Customers$Chrome$Printers$Batchcreateprinters; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://admin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/admin/directory/v1/{+parent}/chrome/printers:batchCreatePrinters' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Deletes printers in batch. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/admin.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const admin = google.admin('directory_v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/admin.chrome.printers'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await admin.customers.chrome.printers.batchDeletePrinters({ + * // Required. The name of the customer. Format: customers/{customer_id\} + * parent: 'customers/my-customer', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "printerIds": [] + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "failedPrinters": [], + * // "printerIds": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + batchDeletePrinters( + params: Params$Resource$Customers$Chrome$Printers$Batchdeleteprinters, + options: StreamMethodOptions + ): GaxiosPromise; + batchDeletePrinters( + params?: Params$Resource$Customers$Chrome$Printers$Batchdeleteprinters, + options?: MethodOptions + ): GaxiosPromise; + batchDeletePrinters( + params: Params$Resource$Customers$Chrome$Printers$Batchdeleteprinters, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + batchDeletePrinters( + params: Params$Resource$Customers$Chrome$Printers$Batchdeleteprinters, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + batchDeletePrinters( + params: Params$Resource$Customers$Chrome$Printers$Batchdeleteprinters, + callback: BodyResponseCallback + ): void; + batchDeletePrinters( + callback: BodyResponseCallback + ): void; + batchDeletePrinters( + paramsOrCallback?: + | Params$Resource$Customers$Chrome$Printers$Batchdeleteprinters + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Customers$Chrome$Printers$Batchdeleteprinters; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Customers$Chrome$Printers$Batchdeleteprinters; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://admin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/admin/directory/v1/{+parent}/chrome/printers:batchDeletePrinters' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Creates a printer under given Organization Unit. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/admin.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const admin = google.admin('directory_v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/admin.chrome.printers'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await admin.customers.chrome.printers.create({ + * // Required. The name of the customer. Format: customers/{customer_id\} + * parent: 'customers/my-customer', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "auxiliaryMessages": [], + * // "createTime": "my_createTime", + * // "description": "my_description", + * // "displayName": "my_displayName", + * // "id": "my_id", + * // "makeAndModel": "my_makeAndModel", + * // "name": "my_name", + * // "orgUnitId": "my_orgUnitId", + * // "uri": "my_uri", + * // "useDriverlessConfig": false + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "auxiliaryMessages": [], + * // "createTime": "my_createTime", + * // "description": "my_description", + * // "displayName": "my_displayName", + * // "id": "my_id", + * // "makeAndModel": "my_makeAndModel", + * // "name": "my_name", + * // "orgUnitId": "my_orgUnitId", + * // "uri": "my_uri", + * // "useDriverlessConfig": false + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + create( + params: Params$Resource$Customers$Chrome$Printers$Create, + options: StreamMethodOptions + ): GaxiosPromise; + create( + params?: Params$Resource$Customers$Chrome$Printers$Create, + options?: MethodOptions + ): GaxiosPromise; + create( + params: Params$Resource$Customers$Chrome$Printers$Create, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Customers$Chrome$Printers$Create, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Customers$Chrome$Printers$Create, + callback: BodyResponseCallback + ): void; + create(callback: BodyResponseCallback): void; + create( + paramsOrCallback?: + | Params$Resource$Customers$Chrome$Printers$Create + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Customers$Chrome$Printers$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Customers$Chrome$Printers$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://admin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + '/admin/directory/v1/{+parent}/chrome/printers' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Deletes a `Printer`. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/admin.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const admin = google.admin('directory_v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/admin.chrome.printers'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await admin.customers.chrome.printers.delete({ + * // Required. The name of the printer to be updated. Format: customers/{customer_id\}/chrome/printers/{printer_id\} + * name: 'customers/my-customer/chrome/printers/my-printer', + * }); + * console.log(res.data); + * + * // Example response + * // {} + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + delete( + params: Params$Resource$Customers$Chrome$Printers$Delete, + options: StreamMethodOptions + ): GaxiosPromise; + delete( + params?: Params$Resource$Customers$Chrome$Printers$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Customers$Chrome$Printers$Delete, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Customers$Chrome$Printers$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Customers$Chrome$Printers$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Customers$Chrome$Printers$Delete + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Customers$Chrome$Printers$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Customers$Chrome$Printers$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://admin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/admin/directory/v1/{+name}').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Returns a `Printer` resource (printer's config). + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/admin.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const admin = google.admin('directory_v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/admin.chrome.printers', + * 'https://www.googleapis.com/auth/admin.chrome.printers.readonly', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await admin.customers.chrome.printers.get({ + * // Required. The name of the printer to retrieve. Format: customers/{customer_id\}/chrome/printers/{printer_id\} + * name: 'customers/my-customer/chrome/printers/my-printer', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "auxiliaryMessages": [], + * // "createTime": "my_createTime", + * // "description": "my_description", + * // "displayName": "my_displayName", + * // "id": "my_id", + * // "makeAndModel": "my_makeAndModel", + * // "name": "my_name", + * // "orgUnitId": "my_orgUnitId", + * // "uri": "my_uri", + * // "useDriverlessConfig": false + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Customers$Chrome$Printers$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Customers$Chrome$Printers$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Customers$Chrome$Printers$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Customers$Chrome$Printers$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Customers$Chrome$Printers$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Customers$Chrome$Printers$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Customers$Chrome$Printers$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Customers$Chrome$Printers$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://admin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/admin/directory/v1/{+name}').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * List printers configs. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/admin.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const admin = google.admin('directory_v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/admin.chrome.printers', + * 'https://www.googleapis.com/auth/admin.chrome.printers.readonly', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await admin.customers.chrome.printers.list({ + * // Search query. Search syntax is shared between this api and Admin Console printers pages. + * filter: 'placeholder-value', + * // Organization Unit that we want to list the printers for. When org_unit is not present in the request then all printers of the customer are returned (or filtered). When org_unit is present in the request then only printers available to this OU will be returned (owned or inherited). You may see if printer is owned or inherited for this OU by looking at Printer.org_unit_id. + * orgUnitId: 'placeholder-value', + * // The maximum number of objects to return. The service may return fewer than this value. + * pageSize: 'placeholder-value', + * // A page token, received from a previous call. + * pageToken: 'placeholder-value', + * // Required. The name of the customer who owns this collection of printers. Format: customers/{customer_id\} + * parent: 'customers/my-customer', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "nextPageToken": "my_nextPageToken", + * // "printers": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Customers$Chrome$Printers$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Customers$Chrome$Printers$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Customers$Chrome$Printers$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Customers$Chrome$Printers$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Customers$Chrome$Printers$List, + callback: BodyResponseCallback + ): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: + | Params$Resource$Customers$Chrome$Printers$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Customers$Chrome$Printers$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Customers$Chrome$Printers$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://admin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + '/admin/directory/v1/{+parent}/chrome/printers' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Lists the supported printer models. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/admin.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const admin = google.admin('directory_v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/admin.chrome.printers', + * 'https://www.googleapis.com/auth/admin.chrome.printers.readonly', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await admin.customers.chrome.printers.listPrinterModels({ + * // Filer to list only models by a given manufacturer in format: "manufacturer:Brother". Search syntax is shared between this api and Admin Console printers pages. + * filter: 'placeholder-value', + * // The maximum number of objects to return. The service may return fewer than this value. + * pageSize: 'placeholder-value', + * // A page token, received from a previous call. + * pageToken: 'placeholder-value', + * // Required. The name of the customer who owns this collection of printers. Format: customers/{customer_id\} + * parent: 'customers/my-customer', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "nextPageToken": "my_nextPageToken", + * // "printerModels": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + listPrinterModels( + params: Params$Resource$Customers$Chrome$Printers$Listprintermodels, + options: StreamMethodOptions + ): GaxiosPromise; + listPrinterModels( + params?: Params$Resource$Customers$Chrome$Printers$Listprintermodels, + options?: MethodOptions + ): GaxiosPromise; + listPrinterModels( + params: Params$Resource$Customers$Chrome$Printers$Listprintermodels, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + listPrinterModels( + params: Params$Resource$Customers$Chrome$Printers$Listprintermodels, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + listPrinterModels( + params: Params$Resource$Customers$Chrome$Printers$Listprintermodels, + callback: BodyResponseCallback + ): void; + listPrinterModels( + callback: BodyResponseCallback + ): void; + listPrinterModels( + paramsOrCallback?: + | Params$Resource$Customers$Chrome$Printers$Listprintermodels + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Customers$Chrome$Printers$Listprintermodels; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Customers$Chrome$Printers$Listprintermodels; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://admin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/admin/directory/v1/{+parent}/chrome/printers:listPrinterModels' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Updates a `Printer` resource. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/admin.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const admin = google.admin('directory_v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/admin.chrome.printers'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await admin.customers.chrome.printers.patch({ + * // The list of fields to be cleared. Note, some of the fields are read only and cannot be updated. Values for not specified fields will be patched. + * clearMask: 'placeholder-value', + * // The resource name of the Printer object, in the format customers/{customer-id\}/printers/{printer-id\} (During printer creation leave empty) + * name: 'customers/my-customer/chrome/printers/my-printer', + * // The list of fields to be updated. Note, some of the fields are read only and cannot be updated. Values for not specified fields will be patched. + * updateMask: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "auxiliaryMessages": [], + * // "createTime": "my_createTime", + * // "description": "my_description", + * // "displayName": "my_displayName", + * // "id": "my_id", + * // "makeAndModel": "my_makeAndModel", + * // "name": "my_name", + * // "orgUnitId": "my_orgUnitId", + * // "uri": "my_uri", + * // "useDriverlessConfig": false + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "auxiliaryMessages": [], + * // "createTime": "my_createTime", + * // "description": "my_description", + * // "displayName": "my_displayName", + * // "id": "my_id", + * // "makeAndModel": "my_makeAndModel", + * // "name": "my_name", + * // "orgUnitId": "my_orgUnitId", + * // "uri": "my_uri", + * // "useDriverlessConfig": false + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + patch( + params: Params$Resource$Customers$Chrome$Printers$Patch, + options: StreamMethodOptions + ): GaxiosPromise; + patch( + params?: Params$Resource$Customers$Chrome$Printers$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Customers$Chrome$Printers$Patch, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Customers$Chrome$Printers$Patch, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Customers$Chrome$Printers$Patch, + callback: BodyResponseCallback + ): void; + patch(callback: BodyResponseCallback): void; + patch( + paramsOrCallback?: + | Params$Resource$Customers$Chrome$Printers$Patch + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Customers$Chrome$Printers$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Customers$Chrome$Printers$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://admin.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/admin/directory/v1/{+name}').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'PATCH', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Customers$Chrome$Printers$Batchcreateprinters + extends StandardParameters { + /** + * Required. The name of the customer. Format: customers/{customer_id\} + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$BatchCreatePrintersRequest; + } + export interface Params$Resource$Customers$Chrome$Printers$Batchdeleteprinters + extends StandardParameters { + /** + * Required. The name of the customer. Format: customers/{customer_id\} + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$BatchDeletePrintersRequest; + } + export interface Params$Resource$Customers$Chrome$Printers$Create + extends StandardParameters { + /** + * Required. The name of the customer. Format: customers/{customer_id\} + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Printer; + } + export interface Params$Resource$Customers$Chrome$Printers$Delete + extends StandardParameters { + /** + * Required. The name of the printer to be updated. Format: customers/{customer_id\}/chrome/printers/{printer_id\} + */ + name?: string; + } + export interface Params$Resource$Customers$Chrome$Printers$Get + extends StandardParameters { + /** + * Required. The name of the printer to retrieve. Format: customers/{customer_id\}/chrome/printers/{printer_id\} + */ + name?: string; + } + export interface Params$Resource$Customers$Chrome$Printers$List + extends StandardParameters { + /** + * Search query. Search syntax is shared between this api and Admin Console printers pages. + */ + filter?: string; + /** + * Organization Unit that we want to list the printers for. When org_unit is not present in the request then all printers of the customer are returned (or filtered). When org_unit is present in the request then only printers available to this OU will be returned (owned or inherited). You may see if printer is owned or inherited for this OU by looking at Printer.org_unit_id. + */ + orgUnitId?: string; + /** + * The maximum number of objects to return. The service may return fewer than this value. + */ + pageSize?: number; + /** + * A page token, received from a previous call. + */ + pageToken?: string; + /** + * Required. The name of the customer who owns this collection of printers. Format: customers/{customer_id\} + */ + parent?: string; + } + export interface Params$Resource$Customers$Chrome$Printers$Listprintermodels + extends StandardParameters { + /** + * Filer to list only models by a given manufacturer in format: "manufacturer:Brother". Search syntax is shared between this api and Admin Console printers pages. + */ + filter?: string; + /** + * The maximum number of objects to return. The service may return fewer than this value. + */ + pageSize?: number; + /** + * A page token, received from a previous call. + */ + pageToken?: string; + /** + * Required. The name of the customer who owns this collection of printers. Format: customers/{customer_id\} + */ + parent?: string; + } + export interface Params$Resource$Customers$Chrome$Printers$Patch + extends StandardParameters { + /** + * The list of fields to be cleared. Note, some of the fields are read only and cannot be updated. Values for not specified fields will be patched. + */ + clearMask?: string; + /** + * The resource name of the Printer object, in the format customers/{customer-id\}/printers/{printer-id\} (During printer creation leave empty) + */ + name?: string; + /** + * The list of fields to be updated. Note, some of the fields are read only and cannot be updated. Values for not specified fields will be patched. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Printer; + } + export class Resource$Domainaliases { context: APIRequestContext; constructor(context: APIRequestContext) { diff --git a/src/apis/analyticsadmin/v1alpha.ts b/src/apis/analyticsadmin/v1alpha.ts index d8aca6ef1b7..821088090cb 100644 --- a/src/apis/analyticsadmin/v1alpha.ts +++ b/src/apis/analyticsadmin/v1alpha.ts @@ -750,7 +750,7 @@ export namespace analyticsadmin_v1alpha { */ parent?: string | null; /** - * Reporting Time Zone, used as the day boundary for reports, regardless of where the data originates. If the time zone honors DST, Analytics will automatically adjust for the changes. NOTE: Changing the time zone only affects data going forward, and is not applied retroactively. Format: https://www.iana.org/time-zones Example: "America/Los_Angeles" + * Required. Reporting Time Zone, used as the day boundary for reports, regardless of where the data originates. If the time zone honors DST, Analytics will automatically adjust for the changes. NOTE: Changing the time zone only affects data going forward, and is not applied retroactively. Format: https://www.iana.org/time-zones Example: "America/Los_Angeles" */ timeZone?: string | null; /** diff --git a/src/apis/analyticsdata/index.ts b/src/apis/analyticsdata/index.ts index a8036057317..227b52041be 100644 --- a/src/apis/analyticsdata/index.ts +++ b/src/apis/analyticsdata/index.ts @@ -15,9 +15,11 @@ import {AuthPlus, getAPI, GoogleConfigurable} from 'googleapis-common'; import {analyticsdata_v1alpha} from './v1alpha'; +import {analyticsdata_v1beta} from './v1beta'; export const VERSIONS = { v1alpha: analyticsdata_v1alpha.Analyticsdata, + v1beta: analyticsdata_v1beta.Analyticsdata, }; export function analyticsdata( @@ -26,9 +28,21 @@ export function analyticsdata( export function analyticsdata( options: analyticsdata_v1alpha.Options ): analyticsdata_v1alpha.Analyticsdata; -export function analyticsdata( +export function analyticsdata( + version: 'v1beta' +): analyticsdata_v1beta.Analyticsdata; +export function analyticsdata( + options: analyticsdata_v1beta.Options +): analyticsdata_v1beta.Analyticsdata; +export function analyticsdata< + T = analyticsdata_v1alpha.Analyticsdata | analyticsdata_v1beta.Analyticsdata +>( this: GoogleConfigurable, - versionOrOptions: 'v1alpha' | analyticsdata_v1alpha.Options + versionOrOptions: + | 'v1alpha' + | analyticsdata_v1alpha.Options + | 'v1beta' + | analyticsdata_v1beta.Options ) { return getAPI('analyticsdata', versionOrOptions, VERSIONS, this); } @@ -36,6 +50,7 @@ export function analyticsdata( const auth = new AuthPlus(); export {auth}; export {analyticsdata_v1alpha}; +export {analyticsdata_v1beta}; export { AuthPlus, GlobalOptions, diff --git a/src/apis/analyticsdata/v1beta.ts b/src/apis/analyticsdata/v1beta.ts new file mode 100644 index 00000000000..e4024bfca59 --- /dev/null +++ b/src/apis/analyticsdata/v1beta.ts @@ -0,0 +1,2004 @@ +// Copyright 2020 Google LLC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/* eslint-disable @typescript-eslint/no-explicit-any */ +/* eslint-disable @typescript-eslint/class-name-casing */ +/* eslint-disable @typescript-eslint/no-unused-vars */ +/* eslint-disable @typescript-eslint/no-empty-interface */ +/* eslint-disable @typescript-eslint/no-namespace */ +/* eslint-disable no-irregular-whitespace */ + +import { + OAuth2Client, + JWT, + Compute, + UserRefreshClient, + BaseExternalAccountClient, + GaxiosPromise, + GoogleConfigurable, + createAPIRequest, + MethodOptions, + StreamMethodOptions, + GlobalOptions, + GoogleAuth, + BodyResponseCallback, + APIRequestContext, +} from 'googleapis-common'; +import {Readable} from 'stream'; + +export namespace analyticsdata_v1beta { + export interface Options extends GlobalOptions { + version: 'v1beta'; + } + + interface StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: + | string + | OAuth2Client + | JWT + | Compute + | UserRefreshClient + | BaseExternalAccountClient + | GoogleAuth; + + /** + * V1 error format. + */ + '$.xgafv'?: string; + /** + * OAuth access token. + */ + access_token?: string; + /** + * Data format for response. + */ + alt?: string; + /** + * JSONP + */ + callback?: string; + /** + * Selector specifying which fields to include in a partial response. + */ + fields?: string; + /** + * 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. + */ + key?: string; + /** + * OAuth 2.0 token for the current user. + */ + oauth_token?: string; + /** + * Returns response with indentations and line breaks. + */ + prettyPrint?: boolean; + /** + * 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. + */ + quotaUser?: string; + /** + * Legacy upload protocol for media (e.g. "media", "multipart"). + */ + uploadType?: string; + /** + * Upload protocol for media (e.g. "raw", "multipart"). + */ + upload_protocol?: string; + } + + /** + * Google Analytics Data API + * + * Accesses report data in Google Analytics. + * + * @example + * ```js + * const {google} = require('googleapis'); + * const analyticsdata = google.analyticsdata('v1beta'); + * ``` + */ + export class Analyticsdata { + context: APIRequestContext; + properties: Resource$Properties; + + constructor(options: GlobalOptions, google?: GoogleConfigurable) { + this.context = { + _options: options || {}, + google, + }; + + this.properties = new Resource$Properties(this.context); + } + } + + /** + * The batch request containing multiple pivot report requests. + */ + export interface Schema$BatchRunPivotReportsRequest { + /** + * Individual requests. Each request has a separate pivot report response. Each batch request is allowed up to 5 requests. + */ + requests?: Schema$RunPivotReportRequest[]; + } + /** + * The batch response containing multiple pivot reports. + */ + export interface Schema$BatchRunPivotReportsResponse { + /** + * Identifies what kind of resource this message is. This `kind` is always the fixed string "analyticsData#batchRunPivotReports". Useful to distinguish between response types in JSON. + */ + kind?: string | null; + /** + * Individual responses. Each response has a separate pivot report request. + */ + pivotReports?: Schema$RunPivotReportResponse[]; + } + /** + * The batch request containing multiple report requests. + */ + export interface Schema$BatchRunReportsRequest { + /** + * Individual requests. Each request has a separate report response. Each batch request is allowed up to 5 requests. + */ + requests?: Schema$RunReportRequest[]; + } + /** + * The batch response containing multiple reports. + */ + export interface Schema$BatchRunReportsResponse { + /** + * Identifies what kind of resource this message is. This `kind` is always the fixed string "analyticsData#batchRunReports". Useful to distinguish between response types in JSON. + */ + kind?: string | null; + /** + * Individual responses. Each response has a separate report request. + */ + reports?: Schema$RunReportResponse[]; + } + /** + * To express that the result needs to be between two numbers (inclusive). + */ + export interface Schema$BetweenFilter { + /** + * Begins with this number. + */ + fromValue?: Schema$NumericValue; + /** + * Ends with this number. + */ + toValue?: Schema$NumericValue; + } + /** + * Used to convert a dimension value to a single case. + */ + export interface Schema$CaseExpression { + /** + * Name of a dimension. The name must refer back to a name in dimensions field of the request. + */ + dimensionName?: string | null; + } + /** + * Defines a cohort selection criteria. A cohort is a group of users who share a common characteristic. For example, users with the same `firstSessionDate` belong to the same cohort. + */ + export interface Schema$Cohort { + /** + * The cohort selects users whose first touch date is between start date and end date defined in the `dateRange`. This `dateRange` does not specify the full date range of event data that is present in a cohort report. In a cohort report, this `dateRange` is extended by the granularity and offset present in the `cohortsRange`; event data for the extended reporting date range is present in a cohort report. In a cohort request, this `dateRange` is required and the `dateRanges` in the `RunReportRequest` or `RunPivotReportRequest` must be unspecified. This `dateRange` should generally be aligned with the cohort's granularity. If `CohortsRange` uses daily granularity, this `dateRange` can be a single day. If `CohortsRange` uses weekly granularity, this `dateRange` can be aligned to a week boundary, starting at Sunday and ending Saturday. If `CohortsRange` uses monthly granularity, this `dateRange` can be aligned to a month, starting at the first and ending on the last day of the month. + */ + dateRange?: Schema$DateRange; + /** + * Dimension used by the cohort. Required and only supports `firstSessionDate`. + */ + dimension?: string | null; + /** + * Assigns a name to this cohort. The dimension `cohort` is valued to this name in a report response. If set, cannot begin with `cohort_` or `RESERVED_`. If not set, cohorts are named by their zero based index `cohort_0`, `cohort_1`, etc. + */ + name?: string | null; + } + /** + * Optional settings of a cohort report. + */ + export interface Schema$CohortReportSettings { + /** + * If true, accumulates the result from first touch day to the end day. Not supported in `RunReportRequest`. + */ + accumulate?: boolean | null; + } + /** + * The specification of cohorts for a cohort report. Cohort reports create a time series of user retention for the cohort. For example, you could select the cohort of users that were acquired in the first week of September and follow that cohort for the next six weeks. Selecting the users acquired in the first week of September cohort is specified in the `cohort` object. Following that cohort for the next six weeks is specified in the `cohortsRange` object. For examples, see [Cohort Report Examples](https://developers.google.com/analytics/devguides/reporting/data/v1/advanced#cohort_report_examples). The report response could show a weekly time series where say your app has retained 60% of this cohort after three weeks and 25% of this cohort after six weeks. These two percentages can be calculated by the metric `cohortActiveUsers/cohortTotalUsers` and will be separate rows in the report. + */ + export interface Schema$CohortSpec { + /** + * Optional settings for a cohort report. + */ + cohortReportSettings?: Schema$CohortReportSettings; + /** + * Defines the selection criteria to group users into cohorts. Most cohort reports define only a single cohort. If multiple cohorts are specified, each cohort can be recognized in the report by their name. + */ + cohorts?: Schema$Cohort[]; + /** + * Cohort reports follow cohorts over an extended reporting date range. This range specifies an offset duration to follow the cohorts over. + */ + cohortsRange?: Schema$CohortsRange; + } + /** + * Configures the extended reporting date range for a cohort report. Specifies an offset duration to follow the cohorts over. + */ + export interface Schema$CohortsRange { + /** + * Required. `endOffset` specifies the end date of the extended reporting date range for a cohort report. `endOffset` can be any positive integer but is commonly set to 5 to 10 so that reports contain data on the cohort for the next several granularity time periods. If `granularity` is `DAILY`, the `endDate` of the extended reporting date range is `endDate` of the cohort plus `endOffset` days. If `granularity` is `WEEKLY`, the `endDate` of the extended reporting date range is `endDate` of the cohort plus `endOffset * 7` days. If `granularity` is `MONTHLY`, the `endDate` of the extended reporting date range is `endDate` of the cohort plus `endOffset * 30` days. + */ + endOffset?: number | null; + /** + * Required. The granularity used to interpret the `startOffset` and `endOffset` for the extended reporting date range for a cohort report. + */ + granularity?: string | null; + /** + * `startOffset` specifies the start date of the extended reporting date range for a cohort report. `startOffset` is commonly set to 0 so that reports contain data from the acquisition of the cohort forward. If `granularity` is `DAILY`, the `startDate` of the extended reporting date range is `startDate` of the cohort plus `startOffset` days. If `granularity` is `WEEKLY`, the `startDate` of the extended reporting date range is `startDate` of the cohort plus `startOffset * 7` days. If `granularity` is `MONTHLY`, the `startDate` of the extended reporting date range is `startDate` of the cohort plus `startOffset * 30` days. + */ + startOffset?: number | null; + } + /** + * Used to combine dimension values to a single dimension. + */ + export interface Schema$ConcatenateExpression { + /** + * The delimiter placed between dimension names. Delimiters are often single characters such as "|" or "," but can be longer strings. If a dimension value contains the delimiter, both will be present in response with no distinction. For example if dimension 1 value = "US,FR", dimension 2 value = "JP", and delimiter = ",", then the response will contain "US,FR,JP". + */ + delimiter?: string | null; + /** + * Names of dimensions. The names must refer back to names in the dimensions field of the request. + */ + dimensionNames?: string[] | null; + } + /** + * A contiguous set of days: startDate, startDate + 1, ..., endDate. Requests are allowed up to 4 date ranges. + */ + export interface Schema$DateRange { + /** + * The inclusive end date for the query in the format `YYYY-MM-DD`. Cannot be before `start_date`. The format `NdaysAgo`, `yesterday`, or `today` is also accepted, and in that case, the date is inferred based on the property's reporting time zone. + */ + endDate?: string | null; + /** + * Assigns a name to this date range. The dimension `dateRange` is valued to this name in a report response. If set, cannot begin with `date_range_` or `RESERVED_`. If not set, date ranges are named by their zero based index in the request: `date_range_0`, `date_range_1`, etc. + */ + name?: string | null; + /** + * The inclusive start date for the query in the format `YYYY-MM-DD`. Cannot be after `end_date`. The format `NdaysAgo`, `yesterday`, or `today` is also accepted, and in that case, the date is inferred based on the property's reporting time zone. + */ + startDate?: string | null; + } + /** + * Dimensions are attributes of your data. For example, the dimension city indicates the city from which an event originates. Dimension values in report responses are strings; for example, city could be "Paris" or "New York". Requests are allowed up to 8 dimensions. + */ + export interface Schema$Dimension { + /** + * One dimension can be the result of an expression of multiple dimensions. For example, dimension "country, city": concatenate(country, ", ", city). + */ + dimensionExpression?: Schema$DimensionExpression; + /** + * The name of the dimension. See the [API Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#dimensions) for the list of dimension names. If `dimensionExpression` is specified, `name` can be any string that you would like within the allowed character set. For example if a `dimensionExpression` concatenates `country` and `city`, you could call that dimension `countryAndCity`. Dimension names that you choose must match the regular expression "^[a-zA-Z0-9_]$". Dimensions are referenced by `name` in `dimensionFilter`, `orderBys`, `dimensionExpression`, and `pivots`. + */ + name?: string | null; + } + /** + * Used to express a dimension which is the result of a formula of multiple dimensions. Example usages: 1) lower_case(dimension) 2) concatenate(dimension1, symbol, dimension2). + */ + export interface Schema$DimensionExpression { + /** + * Used to combine dimension values to a single dimension. For example, dimension "country, city": concatenate(country, ", ", city). + */ + concatenate?: Schema$ConcatenateExpression; + /** + * Used to convert a dimension value to lower case. + */ + lowerCase?: Schema$CaseExpression; + /** + * Used to convert a dimension value to upper case. + */ + upperCase?: Schema$CaseExpression; + } + /** + * Describes a dimension column in the report. Dimensions requested in a report produce column entries within rows and DimensionHeaders. However, dimensions used exclusively within filters or expressions do not produce columns in a report; correspondingly, those dimensions do not produce headers. + */ + export interface Schema$DimensionHeader { + /** + * The dimension's name. + */ + name?: string | null; + } + /** + * Explains a dimension. + */ + export interface Schema$DimensionMetadata { + /** + * This dimension's name. Useable in [Dimension](#Dimension)'s `name`. For example, `eventName`. + */ + apiName?: string | null; + /** + * True if the dimension is a custom dimension for this property. + */ + customDefinition?: boolean | null; + /** + * Still usable but deprecated names for this dimension. If populated, this dimension is available by either `apiName` or one of `deprecatedApiNames` for a period of time. After the deprecation period, the dimension will be available only by `apiName`. + */ + deprecatedApiNames?: string[] | null; + /** + * Description of how this dimension is used and calculated. + */ + description?: string | null; + /** + * This dimension's name within the Google Analytics user interface. For example, `Event name`. + */ + uiName?: string | null; + } + /** + * Sorts by dimension values. + */ + export interface Schema$DimensionOrderBy { + /** + * A dimension name in the request to order by. + */ + dimensionName?: string | null; + /** + * Controls the rule for dimension value ordering. + */ + orderType?: string | null; + } + /** + * The value of a dimension. + */ + export interface Schema$DimensionValue { + /** + * Value as a string if the dimension type is a string. + */ + value?: string | null; + } + /** + * An expression to filter dimension or metric values. + */ + export interface Schema$Filter { + /** + * A filter for two values. + */ + betweenFilter?: Schema$BetweenFilter; + /** + * The dimension name or metric name. Must be a name defined in dimensions or metrics. + */ + fieldName?: string | null; + /** + * A filter for in list values. + */ + inListFilter?: Schema$InListFilter; + /** + * A filter for numeric or date values. + */ + numericFilter?: Schema$NumericFilter; + /** + * Strings related filter. + */ + stringFilter?: Schema$StringFilter; + } + /** + * To express dimension or metric filters. The fields in the same FilterExpression need to be either all dimensions or all metrics. + */ + export interface Schema$FilterExpression { + /** + * The FilterExpressions in and_group have an AND relationship. + */ + andGroup?: Schema$FilterExpressionList; + /** + * A primitive filter. All fields in filter in same FilterExpression needs to be either all dimensions or metrics. + */ + filter?: Schema$Filter; + /** + * The FilterExpression is NOT of not_expression. + */ + notExpression?: Schema$FilterExpression; + /** + * The FilterExpressions in or_group have an OR relationship. + */ + orGroup?: Schema$FilterExpressionList; + } + /** + * A list of filter expressions. + */ + export interface Schema$FilterExpressionList { + /** + * A list of filter expressions. + */ + expressions?: Schema$FilterExpression[]; + } + /** + * The result needs to be in a list of string values. + */ + export interface Schema$InListFilter { + /** + * If true, the string value is case sensitive. + */ + caseSensitive?: boolean | null; + /** + * The list of string values. Must be non-empty. + */ + values?: string[] | null; + } + /** + * The dimensions and metrics currently accepted in reporting methods. + */ + export interface Schema$Metadata { + /** + * The dimension descriptions. + */ + dimensions?: Schema$DimensionMetadata[]; + /** + * The metric descriptions. + */ + metrics?: Schema$MetricMetadata[]; + /** + * Resource name of this metadata. + */ + name?: string | null; + } + /** + * The quantitative measurements of a report. For example, the metric `eventCount` is the total number of events. Requests are allowed up to 10 metrics. + */ + export interface Schema$Metric { + /** + * A mathematical expression for derived metrics. For example, the metric Event count per user is `eventCount/totalUsers`. + */ + expression?: string | null; + /** + * Indicates if a metric is invisible in the report response. If a metric is invisible, the metric will not produce a column in the response, but can be used in `metricFilter`, `orderBys`, or a metric `expression`. + */ + invisible?: boolean | null; + /** + * The name of the metric. See the [API Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#metrics) for the list of metric names. If `expression` is specified, `name` can be any string that you would like within the allowed character set. For example if `expression` is `screenPageViews/sessions`, you could call that metric's name = `viewsPerSession`. Metric names that you choose must match the regular expression "^[a-zA-Z0-9_]$". Metrics are referenced by `name` in `metricFilter`, `orderBys`, and metric `expression`. + */ + name?: string | null; + } + /** + * Describes a metric column in the report. Visible metrics requested in a report produce column entries within rows and MetricHeaders. However, metrics used exclusively within filters or expressions do not produce columns in a report; correspondingly, those metrics do not produce headers. + */ + export interface Schema$MetricHeader { + /** + * The metric's name. + */ + name?: string | null; + /** + * The metric's data type. + */ + type?: string | null; + } + /** + * Explains a metric. + */ + export interface Schema$MetricMetadata { + /** + * A metric name. Useable in [Metric](#Metric)'s `name`. For example, `eventCount`. + */ + apiName?: string | null; + /** + * True if the metric is a custom metric for this property. + */ + customDefinition?: boolean | null; + /** + * Still usable but deprecated names for this metric. If populated, this metric is available by either `apiName` or one of `deprecatedApiNames` for a period of time. After the deprecation period, the metric will be available only by `apiName`. + */ + deprecatedApiNames?: string[] | null; + /** + * Description of how this metric is used and calculated. + */ + description?: string | null; + /** + * The mathematical expression for this derived metric. Can be used in [Metric](#Metric)'s `expression` field for equivalent reports. Most metrics are not expressions, and for non-expressions, this field is empty. + */ + expression?: string | null; + /** + * The type of this metric. + */ + type?: string | null; + /** + * This metric's name within the Google Analytics user interface. For example, `Event count`. + */ + uiName?: string | null; + } + /** + * Sorts by metric values. + */ + export interface Schema$MetricOrderBy { + /** + * A metric name in the request to order by. + */ + metricName?: string | null; + } + /** + * The value of a metric. + */ + export interface Schema$MetricValue { + /** + * Measurement value. See MetricHeader for type. + */ + value?: string | null; + } + /** + * Filters for numeric or date values. + */ + export interface Schema$NumericFilter { + /** + * The operation type for this filter. + */ + operation?: string | null; + /** + * A numeric value or a date value. + */ + value?: Schema$NumericValue; + } + /** + * To represent a number. + */ + export interface Schema$NumericValue { + /** + * Double value + */ + doubleValue?: number | null; + /** + * Integer value + */ + int64Value?: string | null; + } + /** + * The sort options. + */ + export interface Schema$OrderBy { + /** + * If true, sorts by descending order. + */ + desc?: boolean | null; + /** + * Sorts results by a dimension's values. + */ + dimension?: Schema$DimensionOrderBy; + /** + * Sorts results by a metric's values. + */ + metric?: Schema$MetricOrderBy; + /** + * Sorts results by a metric's values within a pivot column group. + */ + pivot?: Schema$PivotOrderBy; + } + /** + * Describes the visible dimension columns and rows in the report response. + */ + export interface Schema$Pivot { + /** + * Dimension names for visible columns in the report response. Including "dateRange" produces a date range column; for each row in the response, dimension values in the date range column will indicate the corresponding date range from the request. + */ + fieldNames?: string[] | null; + /** + * The number of unique combinations of dimension values to return in this pivot. The `limit` parameter is required. A `limit` of 10,000 is common for single pivot requests. The product of the `limit` for each `pivot` in a `RunPivotReportRequest` must not exceed 100,000. For example, a two pivot request with `limit: 1000` in each pivot will fail because the product is `1,000,000`. + */ + limit?: string | null; + /** + * Aggregate the metrics by dimensions in this pivot using the specified metric_aggregations. + */ + metricAggregations?: string[] | null; + /** + * The row count of the start row. The first row is counted as row 0. + */ + offset?: string | null; + /** + * Specifies how dimensions are ordered in the pivot. In the first Pivot, the OrderBys determine Row and PivotDimensionHeader ordering; in subsequent Pivots, the OrderBys determine only PivotDimensionHeader ordering. Dimensions specified in these OrderBys must be a subset of Pivot.field_names. + */ + orderBys?: Schema$OrderBy[]; + } + /** + * Summarizes dimension values from a row for this pivot. + */ + export interface Schema$PivotDimensionHeader { + /** + * Values of multiple dimensions in a pivot. + */ + dimensionValues?: Schema$DimensionValue[]; + } + /** + * Dimensions' values in a single pivot. + */ + export interface Schema$PivotHeader { + /** + * The size is the same as the cardinality of the corresponding dimension combinations. + */ + pivotDimensionHeaders?: Schema$PivotDimensionHeader[]; + /** + * The cardinality of the pivot. The total number of rows for this pivot's fields regardless of how the parameters `offset` and `limit` are specified in the request. + */ + rowCount?: number | null; + } + /** + * Sorts by a pivot column group. + */ + export interface Schema$PivotOrderBy { + /** + * In the response to order by, order rows by this column. Must be a metric name from the request. + */ + metricName?: string | null; + /** + * Used to select a dimension name and value pivot. If multiple pivot selections are given, the sort occurs on rows where all pivot selection dimension name and value pairs match the row's dimension name and value pair. + */ + pivotSelections?: Schema$PivotSelection[]; + } + /** + * A pair of dimension names and values. Rows with this dimension pivot pair are ordered by the metric's value. For example if pivots = {{"browser", "Chrome"\}\} and metric_name = "Sessions", then the rows will be sorted based on Sessions in Chrome. ---------|----------|----------------|----------|---------------- | Chrome | Chrome | Safari | Safari ---------|----------|----------------|----------|---------------- Country | Sessions | Pages/Sessions | Sessions | Pages/Sessions ---------|----------|----------------|----------|---------------- US | 2 | 2 | 3 | 1 ---------|----------|----------------|----------|---------------- Canada | 3 | 1 | 4 | 1 ---------|----------|----------------|----------|---------------- + */ + export interface Schema$PivotSelection { + /** + * Must be a dimension name from the request. + */ + dimensionName?: string | null; + /** + * Order by only when the named dimension is this value. + */ + dimensionValue?: string | null; + } + /** + * Current state of all quotas for this Analytics Property. If any quota for a property is exhausted, all requests to that property will return Resource Exhausted errors. + */ + export interface Schema$PropertyQuota { + /** + * Standard Analytics Properties can send up to 10 concurrent requests; Analytics 360 Properties can use up to 50 concurrent requests. + */ + concurrentRequests?: Schema$QuotaStatus; + /** + * Analytics Properties can send up to 120 requests with potentially thresholded dimensions per hour. In a batch request, each report request is individually counted for this quota if the request contains potentially thresholded dimensions. + */ + potentiallyThresholdedRequestsPerHour?: Schema$QuotaStatus; + /** + * Standard Analytics Properties and cloud project pairs can have up to 10 server errors per hour; Analytics 360 Properties and cloud project pairs can have up to 50 server errors per hour. + */ + serverErrorsPerProjectPerHour?: Schema$QuotaStatus; + /** + * Standard Analytics Properties can use up to 25,000 tokens per day; Analytics 360 Properties can use 250,000 tokens per day. Most requests consume fewer than 10 tokens. + */ + tokensPerDay?: Schema$QuotaStatus; + /** + * Standard Analytics Properties can use up to 5,000 tokens per hour; Analytics 360 Properties can use 50,000 tokens per hour. An API request consumes a single number of tokens, and that number is deducted from both the hourly and daily quotas. + */ + tokensPerHour?: Schema$QuotaStatus; + } + /** + * Current state for a particular quota group. + */ + export interface Schema$QuotaStatus { + /** + * Quota consumed by this request. + */ + consumed?: number | null; + /** + * Quota remaining after this request. + */ + remaining?: number | null; + } + /** + * Response's metadata carrying additional information about the report content. + */ + export interface Schema$ResponseMetaData { + /** + * If true, indicates some buckets of dimension combinations are rolled into "(other)" row. This can happen for high cardinality reports. + */ + dataLossFromOtherRow?: boolean | null; + } + /** + * Report data for each row. For example if RunReportRequest contains: ```none "dimensions": [ { "name": "eventName" \}, { "name": "countryId" \} ], "metrics": [ { "name": "eventCount" \} ] ``` One row with 'in_app_purchase' as the eventName, 'JP' as the countryId, and 15 as the eventCount, would be: ```none "dimensionValues": [ { "value": "in_app_purchase" \}, { "value": "JP" \} ], "metricValues": [ { "value": "15" \} ] ``` + */ + export interface Schema$Row { + /** + * List of requested dimension values. In a PivotReport, dimension_values are only listed for dimensions included in a pivot. + */ + dimensionValues?: Schema$DimensionValue[]; + /** + * List of requested visible metric values. + */ + metricValues?: Schema$MetricValue[]; + } + /** + * The request to generate a pivot report. + */ + export interface Schema$RunPivotReportRequest { + /** + * Cohort group associated with this request. If there is a cohort group in the request the 'cohort' dimension must be present. + */ + cohortSpec?: Schema$CohortSpec; + /** + * A currency code in ISO4217 format, such as "AED", "USD", "JPY". If the field is empty, the report uses the property's default currency. + */ + currencyCode?: string | null; + /** + * The date range to retrieve event data for the report. If multiple date ranges are specified, event data from each date range is used in the report. A special dimension with field name "dateRange" can be included in a Pivot's field names; if included, the report compares between date ranges. In a cohort request, this `dateRanges` must be unspecified. + */ + dateRanges?: Schema$DateRange[]; + /** + * The filter clause of dimensions. Dimensions must be requested to be used in this filter. Metrics cannot be used in this filter. + */ + dimensionFilter?: Schema$FilterExpression; + /** + * The dimensions requested. All defined dimensions must be used by one of the following: dimension_expression, dimension_filter, pivots, order_bys. + */ + dimensions?: Schema$Dimension[]; + /** + * If false or unspecified, each row with all metrics equal to 0 will not be returned. If true, these rows will be returned if they are not separately removed by a filter. + */ + keepEmptyRows?: boolean | null; + /** + * The filter clause of metrics. Applied at post aggregation phase, similar to SQL having-clause. Metrics must be requested to be used in this filter. Dimensions cannot be used in this filter. + */ + metricFilter?: Schema$FilterExpression; + /** + * The metrics requested, at least one metric needs to be specified. All defined metrics must be used by one of the following: metric_expression, metric_filter, order_bys. + */ + metrics?: Schema$Metric[]; + /** + * Describes the visual format of the report's dimensions in columns or rows. The union of the fieldNames (dimension names) in all pivots must be a subset of dimension names defined in Dimensions. No two pivots can share a dimension. A dimension is only visible if it appears in a pivot. + */ + pivots?: Schema$Pivot[]; + /** + * A Google Analytics GA4 property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). Within a batch request, this property should either be unspecified or consistent with the batch-level property. Example: properties/1234 + */ + property?: string | null; + /** + * Toggles whether to return the current state of this Analytics Property's quota. Quota is returned in [PropertyQuota](#PropertyQuota). + */ + returnPropertyQuota?: boolean | null; + } + /** + * The response pivot report table corresponding to a pivot request. + */ + export interface Schema$RunPivotReportResponse { + /** + * Aggregation of metric values. Can be totals, minimums, or maximums. The returned aggregations are controlled by the metric_aggregations in the pivot. The type of aggregation returned in each row is shown by the dimension_values which are set to "RESERVED_". + */ + aggregates?: Schema$Row[]; + /** + * Describes dimension columns. The number of DimensionHeaders and ordering of DimensionHeaders matches the dimensions present in rows. + */ + dimensionHeaders?: Schema$DimensionHeader[]; + /** + * Identifies what kind of resource this message is. This `kind` is always the fixed string "analyticsData#runPivotReport". Useful to distinguish between response types in JSON. + */ + kind?: string | null; + /** + * Metadata for the report. + */ + metadata?: Schema$ResponseMetaData; + /** + * Describes metric columns. The number of MetricHeaders and ordering of MetricHeaders matches the metrics present in rows. + */ + metricHeaders?: Schema$MetricHeader[]; + /** + * Summarizes the columns and rows created by a pivot. Each pivot in the request produces one header in the response. If we have a request like this: "pivots": [{ "fieldNames": ["country", "city"] \}, { "fieldNames": "eventName" \}] We will have the following `pivotHeaders` in the response: "pivotHeaders" : [{ "dimensionHeaders": [{ "dimensionValues": [ { "value": "United Kingdom" \}, { "value": "London" \} ] \}, { "dimensionValues": [ { "value": "Japan" \}, { "value": "Osaka" \} ] \}] \}, { "dimensionHeaders": [{ "dimensionValues": [{ "value": "session_start" \}] \}, { "dimensionValues": [{ "value": "scroll" \}] \}] \}] + */ + pivotHeaders?: Schema$PivotHeader[]; + /** + * This Analytics Property's quota state including this request. + */ + propertyQuota?: Schema$PropertyQuota; + /** + * Rows of dimension value combinations and metric values in the report. + */ + rows?: Schema$Row[]; + } + /** + * The request to generate a realtime report. + */ + export interface Schema$RunRealtimeReportRequest { + /** + * The filter clause of dimensions. Dimensions must be requested to be used in this filter. Metrics cannot be used in this filter. + */ + dimensionFilter?: Schema$FilterExpression; + /** + * The dimensions requested and displayed. + */ + dimensions?: Schema$Dimension[]; + /** + * The number of rows to return. If unspecified, 10,000 rows are returned. The API returns a maximum of 100,000 rows per request, no matter how many you ask for. `limit` must be positive. The API can also return fewer rows than the requested `limit`, if there aren't as many dimension values as the `limit`. For instance, there are fewer than 300 possible values for the dimension `country`, so when reporting on only `country`, you can't get more than 300 rows, even if you set `limit` to a higher value. + */ + limit?: string | null; + /** + * Aggregation of metrics. Aggregated metric values will be shown in rows where the dimension_values are set to "RESERVED_(MetricAggregation)". + */ + metricAggregations?: string[] | null; + /** + * The filter clause of metrics. Applied at post aggregation phase, similar to SQL having-clause. Metrics must be requested to be used in this filter. Dimensions cannot be used in this filter. + */ + metricFilter?: Schema$FilterExpression; + /** + * The metrics requested and displayed. + */ + metrics?: Schema$Metric[]; + /** + * Specifies how rows are ordered in the response. + */ + orderBys?: Schema$OrderBy[]; + /** + * Toggles whether to return the current state of this Analytics Property's Realtime quota. Quota is returned in [PropertyQuota](#PropertyQuota). + */ + returnPropertyQuota?: boolean | null; + } + /** + * The response realtime report table corresponding to a request. + */ + export interface Schema$RunRealtimeReportResponse { + /** + * Describes dimension columns. The number of DimensionHeaders and ordering of DimensionHeaders matches the dimensions present in rows. + */ + dimensionHeaders?: Schema$DimensionHeader[]; + /** + * Identifies what kind of resource this message is. This `kind` is always the fixed string "analyticsData#runRealtimeReport". Useful to distinguish between response types in JSON. + */ + kind?: string | null; + /** + * If requested, the maximum values of metrics. + */ + maximums?: Schema$Row[]; + /** + * Describes metric columns. The number of MetricHeaders and ordering of MetricHeaders matches the metrics present in rows. + */ + metricHeaders?: Schema$MetricHeader[]; + /** + * If requested, the minimum values of metrics. + */ + minimums?: Schema$Row[]; + /** + * This Analytics Property's Realtime quota state including this request. + */ + propertyQuota?: Schema$PropertyQuota; + /** + * The total number of rows in the query result. `rowCount` is independent of the number of rows returned in the response and the `limit` request parameter. For example if a query returns 175 rows and includes `limit` of 50 in the API request, the response will contain `rowCount` of 175 but only 50 rows. + */ + rowCount?: number | null; + /** + * Rows of dimension value combinations and metric values in the report. + */ + rows?: Schema$Row[]; + /** + * If requested, the totaled values of metrics. + */ + totals?: Schema$Row[]; + } + /** + * The request to generate a report. + */ + export interface Schema$RunReportRequest { + /** + * Cohort group associated with this request. If there is a cohort group in the request the 'cohort' dimension must be present. + */ + cohortSpec?: Schema$CohortSpec; + /** + * A currency code in ISO4217 format, such as "AED", "USD", "JPY". If the field is empty, the report uses the property's default currency. + */ + currencyCode?: string | null; + /** + * Date ranges of data to read. If multiple date ranges are requested, each response row will contain a zero based date range index. If two date ranges overlap, the event data for the overlapping days is included in the response rows for both date ranges. In a cohort request, this `dateRanges` must be unspecified. + */ + dateRanges?: Schema$DateRange[]; + /** + * The filter clause of dimensions. Dimensions must be requested to be used in this filter. Metrics cannot be used in this filter. + */ + dimensionFilter?: Schema$FilterExpression; + /** + * The dimensions requested and displayed. + */ + dimensions?: Schema$Dimension[]; + /** + * If false or unspecified, each row with all metrics equal to 0 will not be returned. If true, these rows will be returned if they are not separately removed by a filter. + */ + keepEmptyRows?: boolean | null; + /** + * The number of rows to return. If unspecified, 10,000 rows are returned. The API returns a maximum of 100,000 rows per request, no matter how many you ask for. `limit` must be positive. The API can also return fewer rows than the requested `limit`, if there aren't as many dimension values as the `limit`. For instance, there are fewer than 300 possible values for the dimension `country`, so when reporting on only `country`, you can't get more than 300 rows, even if you set `limit` to a higher value. To learn more about this pagination parameter, see [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + */ + limit?: string | null; + /** + * Aggregation of metrics. Aggregated metric values will be shown in rows where the dimension_values are set to "RESERVED_(MetricAggregation)". + */ + metricAggregations?: string[] | null; + /** + * The filter clause of metrics. Applied at post aggregation phase, similar to SQL having-clause. Metrics must be requested to be used in this filter. Dimensions cannot be used in this filter. + */ + metricFilter?: Schema$FilterExpression; + /** + * The metrics requested and displayed. + */ + metrics?: Schema$Metric[]; + /** + * The row count of the start row. The first row is counted as row 0. When paging, the first request does not specify offset; or equivalently, sets offset to 0; the first request returns the first `limit` of rows. The second request sets offset to the `limit` of the first request; the second request returns the second `limit` of rows. To learn more about this pagination parameter, see [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + */ + offset?: string | null; + /** + * Specifies how rows are ordered in the response. + */ + orderBys?: Schema$OrderBy[]; + /** + * A Google Analytics GA4 property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). Within a batch request, this property should either be unspecified or consistent with the batch-level property. Example: properties/1234 + */ + property?: string | null; + /** + * Toggles whether to return the current state of this Analytics Property's quota. Quota is returned in [PropertyQuota](#PropertyQuota). + */ + returnPropertyQuota?: boolean | null; + } + /** + * The response report table corresponding to a request. + */ + export interface Schema$RunReportResponse { + /** + * Describes dimension columns. The number of DimensionHeaders and ordering of DimensionHeaders matches the dimensions present in rows. + */ + dimensionHeaders?: Schema$DimensionHeader[]; + /** + * Identifies what kind of resource this message is. This `kind` is always the fixed string "analyticsData#runReport". Useful to distinguish between response types in JSON. + */ + kind?: string | null; + /** + * If requested, the maximum values of metrics. + */ + maximums?: Schema$Row[]; + /** + * Metadata for the report. + */ + metadata?: Schema$ResponseMetaData; + /** + * Describes metric columns. The number of MetricHeaders and ordering of MetricHeaders matches the metrics present in rows. + */ + metricHeaders?: Schema$MetricHeader[]; + /** + * If requested, the minimum values of metrics. + */ + minimums?: Schema$Row[]; + /** + * This Analytics Property's quota state including this request. + */ + propertyQuota?: Schema$PropertyQuota; + /** + * The total number of rows in the query result. `rowCount` is independent of the number of rows returned in the response, the `limit` request parameter, and the `offset` request parameter. For example if a query returns 175 rows and includes `limit` of 50 in the API request, the response will contain `rowCount` of 175 but only 50 rows. To learn more about this pagination parameter, see [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + */ + rowCount?: number | null; + /** + * Rows of dimension value combinations and metric values in the report. + */ + rows?: Schema$Row[]; + /** + * If requested, the totaled values of metrics. + */ + totals?: Schema$Row[]; + } + /** + * The filter for string + */ + export interface Schema$StringFilter { + /** + * If true, the string value is case sensitive. + */ + caseSensitive?: boolean | null; + /** + * The match type for this filter. + */ + matchType?: string | null; + /** + * The string value used for the matching. + */ + value?: string | null; + } + + export class Resource$Properties { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Returns multiple pivot reports in a batch. All reports must be for the same GA4 Property. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/analyticsdata.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const analyticsdata = google.analyticsdata('v1beta'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/analytics', + * 'https://www.googleapis.com/auth/analytics.readonly', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await analyticsdata.properties.batchRunPivotReports({ + * // A Google Analytics GA4 property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). This property must be specified for the batch. The property within RunPivotReportRequest may either be unspecified or consistent with this property. Example: properties/1234 + * property: 'properties/my-propertie', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "requests": [] + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "kind": "my_kind", + * // "pivotReports": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + batchRunPivotReports( + params: Params$Resource$Properties$Batchrunpivotreports, + options: StreamMethodOptions + ): GaxiosPromise; + batchRunPivotReports( + params?: Params$Resource$Properties$Batchrunpivotreports, + options?: MethodOptions + ): GaxiosPromise; + batchRunPivotReports( + params: Params$Resource$Properties$Batchrunpivotreports, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + batchRunPivotReports( + params: Params$Resource$Properties$Batchrunpivotreports, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + batchRunPivotReports( + params: Params$Resource$Properties$Batchrunpivotreports, + callback: BodyResponseCallback + ): void; + batchRunPivotReports( + callback: BodyResponseCallback + ): void; + batchRunPivotReports( + paramsOrCallback?: + | Params$Resource$Properties$Batchrunpivotreports + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Properties$Batchrunpivotreports; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Properties$Batchrunpivotreports; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://analyticsdata.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta/{+property}:batchRunPivotReports').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['property'], + pathParams: ['property'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Returns multiple reports in a batch. All reports must be for the same GA4 Property. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/analyticsdata.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const analyticsdata = google.analyticsdata('v1beta'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/analytics', + * 'https://www.googleapis.com/auth/analytics.readonly', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await analyticsdata.properties.batchRunReports({ + * // A Google Analytics GA4 property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). This property must be specified for the batch. The property within RunReportRequest may either be unspecified or consistent with this property. Example: properties/1234 + * property: 'properties/my-propertie', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "requests": [] + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "kind": "my_kind", + * // "reports": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + batchRunReports( + params: Params$Resource$Properties$Batchrunreports, + options: StreamMethodOptions + ): GaxiosPromise; + batchRunReports( + params?: Params$Resource$Properties$Batchrunreports, + options?: MethodOptions + ): GaxiosPromise; + batchRunReports( + params: Params$Resource$Properties$Batchrunreports, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + batchRunReports( + params: Params$Resource$Properties$Batchrunreports, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + batchRunReports( + params: Params$Resource$Properties$Batchrunreports, + callback: BodyResponseCallback + ): void; + batchRunReports( + callback: BodyResponseCallback + ): void; + batchRunReports( + paramsOrCallback?: + | Params$Resource$Properties$Batchrunreports + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Properties$Batchrunreports; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Properties$Batchrunreports; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://analyticsdata.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta/{+property}:batchRunReports').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['property'], + pathParams: ['property'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Returns metadata for dimensions and metrics available in reporting methods. Used to explore the dimensions and metrics. In this method, a Google Analytics GA4 Property Identifier is specified in the request, and the metadata response includes Custom dimensions and metrics as well as Universal metadata. For example if a custom metric with parameter name `levels_unlocked` is registered to a property, the Metadata response will contain `customEvent:levels_unlocked`. Universal metadata are dimensions and metrics applicable to any property such as `country` and `totalUsers`. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/analyticsdata.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const analyticsdata = google.analyticsdata('v1beta'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/analytics', + * 'https://www.googleapis.com/auth/analytics.readonly', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await analyticsdata.properties.getMetadata({ + * // Required. The resource name of the metadata to retrieve. This name field is specified in the URL path and not URL parameters. Property is a numeric Google Analytics GA4 Property identifier. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). Example: properties/1234/metadata Set the Property ID to 0 for dimensions and metrics common to all properties. In this special mode, this method will not return custom dimensions and metrics. + * name: 'properties/my-propertie/metadata', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "dimensions": [], + * // "metrics": [], + * // "name": "my_name" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + getMetadata( + params: Params$Resource$Properties$Getmetadata, + options: StreamMethodOptions + ): GaxiosPromise; + getMetadata( + params?: Params$Resource$Properties$Getmetadata, + options?: MethodOptions + ): GaxiosPromise; + getMetadata( + params: Params$Resource$Properties$Getmetadata, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getMetadata( + params: Params$Resource$Properties$Getmetadata, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getMetadata( + params: Params$Resource$Properties$Getmetadata, + callback: BodyResponseCallback + ): void; + getMetadata(callback: BodyResponseCallback): void; + getMetadata( + paramsOrCallback?: + | Params$Resource$Properties$Getmetadata + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Properties$Getmetadata; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Properties$Getmetadata; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://analyticsdata.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Returns a customized pivot report of your Google Analytics event data. Pivot reports are more advanced and expressive formats than regular reports. In a pivot report, dimensions are only visible if they are included in a pivot. Multiple pivots can be specified to further dissect your data. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/analyticsdata.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const analyticsdata = google.analyticsdata('v1beta'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/analytics', + * 'https://www.googleapis.com/auth/analytics.readonly', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await analyticsdata.properties.runPivotReport({ + * // A Google Analytics GA4 property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). Within a batch request, this property should either be unspecified or consistent with the batch-level property. Example: properties/1234 + * property: 'properties/my-propertie', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "cohortSpec": {}, + * // "currencyCode": "my_currencyCode", + * // "dateRanges": [], + * // "dimensionFilter": {}, + * // "dimensions": [], + * // "keepEmptyRows": false, + * // "metricFilter": {}, + * // "metrics": [], + * // "pivots": [], + * // "property": "my_property", + * // "returnPropertyQuota": false + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "aggregates": [], + * // "dimensionHeaders": [], + * // "kind": "my_kind", + * // "metadata": {}, + * // "metricHeaders": [], + * // "pivotHeaders": [], + * // "propertyQuota": {}, + * // "rows": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + runPivotReport( + params: Params$Resource$Properties$Runpivotreport, + options: StreamMethodOptions + ): GaxiosPromise; + runPivotReport( + params?: Params$Resource$Properties$Runpivotreport, + options?: MethodOptions + ): GaxiosPromise; + runPivotReport( + params: Params$Resource$Properties$Runpivotreport, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + runPivotReport( + params: Params$Resource$Properties$Runpivotreport, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + runPivotReport( + params: Params$Resource$Properties$Runpivotreport, + callback: BodyResponseCallback + ): void; + runPivotReport( + callback: BodyResponseCallback + ): void; + runPivotReport( + paramsOrCallback?: + | Params$Resource$Properties$Runpivotreport + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Properties$Runpivotreport; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Properties$Runpivotreport; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://analyticsdata.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta/{+property}:runPivotReport').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['property'], + pathParams: ['property'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * The Google Analytics Realtime API returns a customized report of realtime event data for your property. These reports show events and usage from the last 30 minutes. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/analyticsdata.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const analyticsdata = google.analyticsdata('v1beta'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/analytics', + * 'https://www.googleapis.com/auth/analytics.readonly', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await analyticsdata.properties.runRealtimeReport({ + * // A Google Analytics GA4 property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). Example: properties/1234 + * property: 'properties/my-propertie', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "dimensionFilter": {}, + * // "dimensions": [], + * // "limit": "my_limit", + * // "metricAggregations": [], + * // "metricFilter": {}, + * // "metrics": [], + * // "orderBys": [], + * // "returnPropertyQuota": false + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "dimensionHeaders": [], + * // "kind": "my_kind", + * // "maximums": [], + * // "metricHeaders": [], + * // "minimums": [], + * // "propertyQuota": {}, + * // "rowCount": 0, + * // "rows": [], + * // "totals": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + runRealtimeReport( + params: Params$Resource$Properties$Runrealtimereport, + options: StreamMethodOptions + ): GaxiosPromise; + runRealtimeReport( + params?: Params$Resource$Properties$Runrealtimereport, + options?: MethodOptions + ): GaxiosPromise; + runRealtimeReport( + params: Params$Resource$Properties$Runrealtimereport, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + runRealtimeReport( + params: Params$Resource$Properties$Runrealtimereport, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + runRealtimeReport( + params: Params$Resource$Properties$Runrealtimereport, + callback: BodyResponseCallback + ): void; + runRealtimeReport( + callback: BodyResponseCallback + ): void; + runRealtimeReport( + paramsOrCallback?: + | Params$Resource$Properties$Runrealtimereport + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Properties$Runrealtimereport; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Properties$Runrealtimereport; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://analyticsdata.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta/{+property}:runRealtimeReport').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['property'], + pathParams: ['property'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Returns a customized report of your Google Analytics event data. Reports contain statistics derived from data collected by the Google Analytics tracking code. The data returned from the API is as a table with columns for the requested dimensions and metrics. Metrics are individual measurements of user activity on your property, such as active users or event count. Dimensions break down metrics across some common criteria, such as country or event name. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/analyticsdata.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const analyticsdata = google.analyticsdata('v1beta'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/analytics', + * 'https://www.googleapis.com/auth/analytics.readonly', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await analyticsdata.properties.runReport({ + * // A Google Analytics GA4 property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). Within a batch request, this property should either be unspecified or consistent with the batch-level property. Example: properties/1234 + * property: 'properties/my-propertie', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "cohortSpec": {}, + * // "currencyCode": "my_currencyCode", + * // "dateRanges": [], + * // "dimensionFilter": {}, + * // "dimensions": [], + * // "keepEmptyRows": false, + * // "limit": "my_limit", + * // "metricAggregations": [], + * // "metricFilter": {}, + * // "metrics": [], + * // "offset": "my_offset", + * // "orderBys": [], + * // "property": "my_property", + * // "returnPropertyQuota": false + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "dimensionHeaders": [], + * // "kind": "my_kind", + * // "maximums": [], + * // "metadata": {}, + * // "metricHeaders": [], + * // "minimums": [], + * // "propertyQuota": {}, + * // "rowCount": 0, + * // "rows": [], + * // "totals": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + runReport( + params: Params$Resource$Properties$Runreport, + options: StreamMethodOptions + ): GaxiosPromise; + runReport( + params?: Params$Resource$Properties$Runreport, + options?: MethodOptions + ): GaxiosPromise; + runReport( + params: Params$Resource$Properties$Runreport, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + runReport( + params: Params$Resource$Properties$Runreport, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + runReport( + params: Params$Resource$Properties$Runreport, + callback: BodyResponseCallback + ): void; + runReport(callback: BodyResponseCallback): void; + runReport( + paramsOrCallback?: + | Params$Resource$Properties$Runreport + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Properties$Runreport; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Properties$Runreport; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://analyticsdata.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta/{+property}:runReport').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['property'], + pathParams: ['property'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Properties$Batchrunpivotreports + extends StandardParameters { + /** + * A Google Analytics GA4 property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). This property must be specified for the batch. The property within RunPivotReportRequest may either be unspecified or consistent with this property. Example: properties/1234 + */ + property?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$BatchRunPivotReportsRequest; + } + export interface Params$Resource$Properties$Batchrunreports + extends StandardParameters { + /** + * A Google Analytics GA4 property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). This property must be specified for the batch. The property within RunReportRequest may either be unspecified or consistent with this property. Example: properties/1234 + */ + property?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$BatchRunReportsRequest; + } + export interface Params$Resource$Properties$Getmetadata + extends StandardParameters { + /** + * Required. The resource name of the metadata to retrieve. This name field is specified in the URL path and not URL parameters. Property is a numeric Google Analytics GA4 Property identifier. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). Example: properties/1234/metadata Set the Property ID to 0 for dimensions and metrics common to all properties. In this special mode, this method will not return custom dimensions and metrics. + */ + name?: string; + } + export interface Params$Resource$Properties$Runpivotreport + extends StandardParameters { + /** + * A Google Analytics GA4 property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). Within a batch request, this property should either be unspecified or consistent with the batch-level property. Example: properties/1234 + */ + property?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$RunPivotReportRequest; + } + export interface Params$Resource$Properties$Runrealtimereport + extends StandardParameters { + /** + * A Google Analytics GA4 property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). Example: properties/1234 + */ + property?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$RunRealtimeReportRequest; + } + export interface Params$Resource$Properties$Runreport + extends StandardParameters { + /** + * A Google Analytics GA4 property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). Within a batch request, this property should either be unspecified or consistent with the batch-level property. Example: properties/1234 + */ + property?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$RunReportRequest; + } +} diff --git a/src/apis/androidmanagement/v1.ts b/src/apis/androidmanagement/v1.ts index 1b37ebaf679..8cee84deda5 100644 --- a/src/apis/androidmanagement/v1.ts +++ b/src/apis/androidmanagement/v1.ts @@ -471,6 +471,23 @@ export namespace androidmanagement_v1 { */ euRepresentativePhone?: string | null; } + /** + * This feature is not generally available. + */ + export interface Schema$ContentProviderEndpoint { + /** + * This feature is not generally available. + */ + packageName?: string | null; + /** + * Required. This feature is not generally available. + */ + signingCertsSha256?: string[] | null; + /** + * This feature is not generally available. + */ + uri?: string | null; + } /** * Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: A full date, with non-zero year, month, and day values A month and day value, with a zero year, such as an anniversary A year on its own, with zero month and day values A year and month value, with a zero day, such as a credit card expiration dateRelated types are google.type.TimeOfDay and google.protobuf.Timestamp. */ @@ -1197,6 +1214,19 @@ export namespace androidmanagement_v1 { */ settingName?: string | null; } + /** + * This feature is not generally available. + */ + export interface Schema$OncCertificateProvider { + /** + * This feature is not generally available. + */ + certificateReferences?: string[] | null; + /** + * This feature is not generally available. + */ + contentProviderEndpoint?: Schema$ContentProviderEndpoint; + } /** * This resource represents a long-running operation that is the result of a network API call. */ @@ -1485,7 +1515,7 @@ export namespace androidmanagement_v1 { */ installAppsDisabled?: boolean | null; /** - * Whether the user is allowed to enable the "Unknown Sources" setting, which allows installation of apps from unknown sources. + * This field has no effect. */ installUnknownSourcesAllowed?: boolean | null; /** @@ -1544,6 +1574,10 @@ export namespace androidmanagement_v1 { * Whether resetting network settings is disabled. */ networkResetDisabled?: boolean | null; + /** + * This feature is not generally available. + */ + oncCertificateProviders?: Schema$OncCertificateProvider[]; /** * Network configuration for the device. See configure networks for more information. */ @@ -4997,6 +5031,7 @@ export namespace androidmanagement_v1 { * // "name": "my_name", * // "networkEscapeHatchEnabled": false, * // "networkResetDisabled": false, + * // "oncCertificateProviders": [], * // "openNetworkConfiguration": {}, * // "outgoingBeamDisabled": false, * // "outgoingCallsDisabled": false, @@ -5347,6 +5382,7 @@ export namespace androidmanagement_v1 { * // "name": "my_name", * // "networkEscapeHatchEnabled": false, * // "networkResetDisabled": false, + * // "oncCertificateProviders": [], * // "openNetworkConfiguration": {}, * // "outgoingBeamDisabled": false, * // "outgoingCallsDisabled": false, @@ -5436,6 +5472,7 @@ export namespace androidmanagement_v1 { * // "name": "my_name", * // "networkEscapeHatchEnabled": false, * // "networkResetDisabled": false, + * // "oncCertificateProviders": [], * // "openNetworkConfiguration": {}, * // "outgoingBeamDisabled": false, * // "outgoingCallsDisabled": false, diff --git a/src/apis/apigateway/README.md b/src/apis/apigateway/README.md index a04d44a64d8..1e6d779a98b 100644 --- a/src/apis/apigateway/README.md +++ b/src/apis/apigateway/README.md @@ -4,6 +4,15 @@ > +## Support status +**Note**: Google provides multiple libraries for this service. This library is in +maintenance mode, and will continue to be made available for users who have +existing applications. If you're building a new application, or modernizing a +legacy application, please use [@google-cloud/api-gateway](https://www.npmjs.com/package/@google-cloud/api-gateway) instead. +The [@google-cloud/api-gateway](https://www.npmjs.com/package/@google-cloud/api-gateway) library is faster, easier to use, and better maintained. + +To learn more, see [Client Libraries Explained](https://cloud.google.com/apis/docs/client-libraries-explained). + ## Installation ```sh diff --git a/src/apis/apigateway/v1.ts b/src/apis/apigateway/v1.ts index 16e64108c62..f9f38072a5e 100644 --- a/src/apis/apigateway/v1.ts +++ b/src/apis/apigateway/v1.ts @@ -781,13 +781,13 @@ export namespace apigateway_v1 { * * // Do the magic * const res = await apigateway.projects.locations.list({ - * // The standard list 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). * filter: 'placeholder-value', * // The resource that owns the locations collection, if applicable. * name: 'projects/my-project', - * // The standard list page size. + * // The maximum number of results to return. If not set, the service will select a default. * pageSize: 'placeholder-value', - * // The standard list page token. + * // A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. * pageToken: 'placeholder-value', * }); * console.log(res.data); @@ -910,7 +910,7 @@ export namespace apigateway_v1 { export interface Params$Resource$Projects$Locations$List extends StandardParameters { /** - * The standard list 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). */ filter?: string; /** @@ -918,11 +918,11 @@ export namespace apigateway_v1 { */ name?: string; /** - * The standard list page size. + * The maximum number of results to return. If not set, the service will select a default. */ pageSize?: number; /** - * The standard list page token. + * A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. */ pageToken?: string; } diff --git a/src/apis/apigateway/v1beta.ts b/src/apis/apigateway/v1beta.ts index 7d8135e8e31..3324bec5898 100644 --- a/src/apis/apigateway/v1beta.ts +++ b/src/apis/apigateway/v1beta.ts @@ -803,13 +803,13 @@ export namespace apigateway_v1beta { * * // Do the magic * const res = await apigateway.projects.locations.list({ - * // The standard list 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). * filter: 'placeholder-value', * // The resource that owns the locations collection, if applicable. * name: 'projects/my-project', - * // The standard list page size. + * // The maximum number of results to return. If not set, the service will select a default. * pageSize: 'placeholder-value', - * // The standard list page token. + * // A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. * pageToken: 'placeholder-value', * }); * console.log(res.data); @@ -932,7 +932,7 @@ export namespace apigateway_v1beta { export interface Params$Resource$Projects$Locations$List extends StandardParameters { /** - * The standard list 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). */ filter?: string; /** @@ -940,11 +940,11 @@ export namespace apigateway_v1beta { */ name?: string; /** - * The standard list page size. + * The maximum number of results to return. If not set, the service will select a default. */ pageSize?: number; /** - * The standard list page token. + * A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. */ pageToken?: string; } diff --git a/src/apis/appengine/README.md b/src/apis/appengine/README.md index 831046c7972..b1039e7c82c 100644 --- a/src/apis/appengine/README.md +++ b/src/apis/appengine/README.md @@ -4,6 +4,15 @@ > Provisions and manages developers' App Engine applications. +## Support status +**Note**: Google provides multiple libraries for this service. This library is in +maintenance mode, and will continue to be made available for users who have +existing applications. If you're building a new application, or modernizing a +legacy application, please use [@google-cloud/appengine-admin](https://www.npmjs.com/package/@google-cloud/appengine-admin) instead. +The [@google-cloud/appengine-admin](https://www.npmjs.com/package/@google-cloud/appengine-admin) library is faster, easier to use, and better maintained. + +To learn more, see [Client Libraries Explained](https://cloud.google.com/apis/docs/client-libraries-explained). + ## Installation ```sh diff --git a/src/apis/appengine/v1.ts b/src/apis/appengine/v1.ts index 026dbcffa48..44100402077 100644 --- a/src/apis/appengine/v1.ts +++ b/src/apis/appengine/v1.ts @@ -1553,6 +1553,10 @@ export namespace appengine_v1 { * The path or name of the app's main executable. */ runtimeMainExecutablePath?: string | null; + /** + * The identity that the deployed version will run as. Admin API will use the App Engine Appspot service account as default if this field is neither provided in app.yaml file nor through CLI flag. + */ + serviceAccount?: string | null; /** * Current serving status of this version. Only the versions with a SERVING status create instances and can be billed.SERVING_STATUS_UNSPECIFIED is an invalid value. Defaults to SERVING. */ @@ -5180,11 +5184,11 @@ export namespace appengine_v1 { * const res = await appengine.apps.locations.list({ * // Part of `name`. The resource that owns the locations collection, if applicable. * appsId: 'placeholder-value', - * // The standard list 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). * filter: 'placeholder-value', - * // The standard list page size. + * // The maximum number of results to return. If not set, the service will select a default. * pageSize: 'placeholder-value', - * // The standard list page token. + * // A page token received from the next_page_token field in the response. Send that page token to receive the subsequent page. * pageToken: 'placeholder-value', * }); * console.log(res.data); @@ -5311,15 +5315,15 @@ export namespace appengine_v1 { */ appsId?: string; /** - * The standard list 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). */ filter?: string; /** - * The standard list page size. + * The maximum number of results to return. If not set, the service will select a default. */ pageSize?: number; /** - * The standard list page token. + * A page token received from the next_page_token field in the response. Send that page token to receive the subsequent page. */ pageToken?: string; } @@ -6360,6 +6364,7 @@ export namespace appengine_v1 { * // "runtimeApiVersion": "my_runtimeApiVersion", * // "runtimeChannel": "my_runtimeChannel", * // "runtimeMainExecutablePath": "my_runtimeMainExecutablePath", + * // "serviceAccount": "my_serviceAccount", * // "servingStatus": "my_servingStatus", * // "threadsafe": false, * // "versionUrl": "my_versionUrl", @@ -6684,6 +6689,7 @@ export namespace appengine_v1 { * // "runtimeApiVersion": "my_runtimeApiVersion", * // "runtimeChannel": "my_runtimeChannel", * // "runtimeMainExecutablePath": "my_runtimeMainExecutablePath", + * // "serviceAccount": "my_serviceAccount", * // "servingStatus": "my_servingStatus", * // "threadsafe": false, * // "versionUrl": "my_versionUrl", @@ -7002,6 +7008,7 @@ export namespace appengine_v1 { * // "runtimeApiVersion": "my_runtimeApiVersion", * // "runtimeChannel": "my_runtimeChannel", * // "runtimeMainExecutablePath": "my_runtimeMainExecutablePath", + * // "serviceAccount": "my_serviceAccount", * // "servingStatus": "my_servingStatus", * // "threadsafe": false, * // "versionUrl": "my_versionUrl", diff --git a/src/apis/appengine/v1alpha.ts b/src/apis/appengine/v1alpha.ts index 3b1dec2ae0b..503a3b73374 100644 --- a/src/apis/appengine/v1alpha.ts +++ b/src/apis/appengine/v1alpha.ts @@ -2543,11 +2543,11 @@ export namespace appengine_v1alpha { * const res = await appengine.apps.locations.list({ * // Part of `name`. The resource that owns the locations collection, if applicable. * appsId: 'placeholder-value', - * // The standard list 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). * filter: 'placeholder-value', - * // The standard list page size. + * // The maximum number of results to return. If not set, the service will select a default. * pageSize: 'placeholder-value', - * // The standard list page token. + * // A page token received from the next_page_token field in the response. Send that page token to receive the subsequent page. * pageToken: 'placeholder-value', * }); * console.log(res.data); @@ -2674,15 +2674,15 @@ export namespace appengine_v1alpha { */ appsId?: string; /** - * The standard list 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). */ filter?: string; /** - * The standard list page size. + * The maximum number of results to return. If not set, the service will select a default. */ pageSize?: number; /** - * The standard list page token. + * A page token received from the next_page_token field in the response. Send that page token to receive the subsequent page. */ pageToken?: string; } diff --git a/src/apis/appengine/v1beta.ts b/src/apis/appengine/v1beta.ts index 918af9f86e1..fe8194a9151 100644 --- a/src/apis/appengine/v1beta.ts +++ b/src/apis/appengine/v1beta.ts @@ -1472,7 +1472,7 @@ export namespace appengine_v1beta { */ apiConfig?: Schema$ApiConfigHandler; /** - * app_engine_apis allows Second Generation runtimes to access the App Engine APIs. + * app_engine_apis allows second generation runtimes to access the App Engine APIs. */ appEngineApis?: boolean | null; /** @@ -1599,6 +1599,10 @@ export namespace appengine_v1beta { * The path or name of the app's main executable. */ runtimeMainExecutablePath?: string | null; + /** + * The identity that the deployed version will run as. Admin API will use the App Engine Appspot service account as default if this field is neither provided in app.yaml file nor through CLI flag. + */ + serviceAccount?: string | null; /** * Current serving status of this version. Only the versions with a SERVING status create instances and can be billed.SERVING_STATUS_UNSPECIFIED is an invalid value. Defaults to SERVING. */ @@ -5232,11 +5236,11 @@ export namespace appengine_v1beta { * const res = await appengine.apps.locations.list({ * // Part of `name`. The resource that owns the locations collection, if applicable. * appsId: 'placeholder-value', - * // The standard list 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). * filter: 'placeholder-value', - * // The standard list page size. + * // The maximum number of results to return. If not set, the service will select a default. * pageSize: 'placeholder-value', - * // The standard list page token. + * // A page token received from the next_page_token field in the response. Send that page token to receive the subsequent page. * pageToken: 'placeholder-value', * }); * console.log(res.data); @@ -5363,15 +5367,15 @@ export namespace appengine_v1beta { */ appsId?: string; /** - * The standard list 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). */ filter?: string; /** - * The standard list page size. + * The maximum number of results to return. If not set, the service will select a default. */ pageSize?: number; /** - * The standard list page token. + * A page token received from the next_page_token field in the response. Send that page token to receive the subsequent page. */ pageToken?: string; } @@ -6410,6 +6414,7 @@ export namespace appengine_v1beta { * // "runtimeApiVersion": "my_runtimeApiVersion", * // "runtimeChannel": "my_runtimeChannel", * // "runtimeMainExecutablePath": "my_runtimeMainExecutablePath", + * // "serviceAccount": "my_serviceAccount", * // "servingStatus": "my_servingStatus", * // "threadsafe": false, * // "versionUrl": "my_versionUrl", @@ -6735,6 +6740,7 @@ export namespace appengine_v1beta { * // "runtimeApiVersion": "my_runtimeApiVersion", * // "runtimeChannel": "my_runtimeChannel", * // "runtimeMainExecutablePath": "my_runtimeMainExecutablePath", + * // "serviceAccount": "my_serviceAccount", * // "servingStatus": "my_servingStatus", * // "threadsafe": false, * // "versionUrl": "my_versionUrl", @@ -7054,6 +7060,7 @@ export namespace appengine_v1beta { * // "runtimeApiVersion": "my_runtimeApiVersion", * // "runtimeChannel": "my_runtimeChannel", * // "runtimeMainExecutablePath": "my_runtimeMainExecutablePath", + * // "serviceAccount": "my_serviceAccount", * // "servingStatus": "my_servingStatus", * // "threadsafe": false, * // "versionUrl": "my_versionUrl", diff --git a/src/apis/area120tables/v1alpha1.ts b/src/apis/area120tables/v1alpha1.ts index 2b6a699330a..e4f19f6776b 100644 --- a/src/apis/area120tables/v1alpha1.ts +++ b/src/apis/area120tables/v1alpha1.ts @@ -1587,7 +1587,7 @@ export namespace area120tables_v1alpha1 { * * // Do the magic * const res = await area120tables.tables.rows.list({ - * // Optional. Raw text query to search for in rows of the table. Special characters must be escaped. Logical operators and field specific filtering not supported. + * // Optional. Filter to only include resources matching the requirements. For more information, see [Filtering list results](https://support.google.com/area120-tables/answer/10503371). * filter: 'placeholder-value', * // The maximum number of rows to return. The service may return fewer than this value. If unspecified, at most 50 rows are returned. The maximum value is 1,000; values above 1,000 are coerced to 1,000. * pageSize: 'placeholder-value', @@ -1920,7 +1920,7 @@ export namespace area120tables_v1alpha1 { } export interface Params$Resource$Tables$Rows$List extends StandardParameters { /** - * Optional. Raw text query to search for in rows of the table. Special characters must be escaped. Logical operators and field specific filtering not supported. + * Optional. Filter to only include resources matching the requirements. For more information, see [Filtering list results](https://support.google.com/area120-tables/answer/10503371). */ filter?: string; /** diff --git a/src/apis/artifactregistry/v1beta1.ts b/src/apis/artifactregistry/v1beta1.ts index d51275f5210..6290079d1d0 100644 --- a/src/apis/artifactregistry/v1beta1.ts +++ b/src/apis/artifactregistry/v1beta1.ts @@ -691,13 +691,13 @@ export namespace artifactregistry_v1beta1 { * * // Do the magic * const res = await artifactregistry.projects.locations.list({ - * // The standard list 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). * filter: 'placeholder-value', * // The resource that owns the locations collection, if applicable. * name: 'projects/my-project', - * // The standard list page size. + * // The maximum number of results to return. If not set, the service will select a default. * pageSize: 'placeholder-value', - * // The standard list page token. + * // A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. * pageToken: 'placeholder-value', * }); * console.log(res.data); @@ -817,7 +817,7 @@ export namespace artifactregistry_v1beta1 { export interface Params$Resource$Projects$Locations$List extends StandardParameters { /** - * The standard list 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). */ filter?: string; /** @@ -825,11 +825,11 @@ export namespace artifactregistry_v1beta1 { */ name?: string; /** - * The standard list page size. + * The maximum number of results to return. If not set, the service will select a default. */ pageSize?: number; /** - * The standard list page token. + * A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. */ pageToken?: string; } diff --git a/src/apis/artifactregistry/v1beta2.ts b/src/apis/artifactregistry/v1beta2.ts index f0827fc9fae..a3b298ba8b7 100644 --- a/src/apis/artifactregistry/v1beta2.ts +++ b/src/apis/artifactregistry/v1beta2.ts @@ -691,13 +691,13 @@ export namespace artifactregistry_v1beta2 { * * // Do the magic * const res = await artifactregistry.projects.locations.list({ - * // The standard list 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). * filter: 'placeholder-value', * // The resource that owns the locations collection, if applicable. * name: 'projects/my-project', - * // The standard list page size. + * // The maximum number of results to return. If not set, the service will select a default. * pageSize: 'placeholder-value', - * // The standard list page token. + * // A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. * pageToken: 'placeholder-value', * }); * console.log(res.data); @@ -817,7 +817,7 @@ export namespace artifactregistry_v1beta2 { export interface Params$Resource$Projects$Locations$List extends StandardParameters { /** - * The standard list 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). */ filter?: string; /** @@ -825,11 +825,11 @@ export namespace artifactregistry_v1beta2 { */ name?: string; /** - * The standard list page size. + * The maximum number of results to return. If not set, the service will select a default. */ pageSize?: number; /** - * The standard list page token. + * A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. */ pageToken?: string; } diff --git a/src/apis/assuredworkloads/v1.ts b/src/apis/assuredworkloads/v1.ts index 48272a9e150..cf70bcc92e9 100644 --- a/src/apis/assuredworkloads/v1.ts +++ b/src/apis/assuredworkloads/v1.ts @@ -206,6 +206,10 @@ export namespace assuredworkloads_v1 { * Output only. The resources associated with this workload. These resources will be created when creating the workload. If any of the projects already exist, the workload creation will fail. Always read only. */ resources?: Schema$GoogleCloudAssuredworkloadsV1beta1WorkloadResourceInfo[]; + /** + * Input only. Resource properties that are used to customize workload resources. These properties (such as custom project id) will be used to create workload resources if possible. This field is optional. + */ + resourceSettings?: Schema$GoogleCloudAssuredworkloadsV1beta1WorkloadResourceSettings[]; } /** * Settings specific to resources needed for CJIS. @@ -269,6 +273,19 @@ export namespace assuredworkloads_v1 { */ resourceType?: string | null; } + /** + * Represent the custom settings for the resources to be created. + */ + export interface Schema$GoogleCloudAssuredworkloadsV1beta1WorkloadResourceSettings { + /** + * Resource identifier. For a project this represents project_id. If the project is already taken, the workload creation will fail. + */ + resourceId?: string | null; + /** + * Indicates the type of resource. This field should be specified to correspond the id to the right project type (CONSUMER_PROJECT or ENCRYPTION_KEYS_PROJECT) + */ + resourceType?: string | null; + } /** * Operation metadata to give request details of CreateWorkload. */ diff --git a/src/apis/bigquery/v2.ts b/src/apis/bigquery/v2.ts index ba5294bf3ac..f913251e3e5 100644 --- a/src/apis/bigquery/v2.ts +++ b/src/apis/bigquery/v2.ts @@ -1542,6 +1542,10 @@ export namespace bigquery_v2 { * [Optional] Specifies whether the job is allowed to create new tables. The following values are supported: CREATE_IF_NEEDED: If the table does not exist, BigQuery creates the table. CREATE_NEVER: The table must already exist. If it does not, a 'notFound' error is returned in the job result. The default value is CREATE_IF_NEEDED. Creation, truncation and append actions occur as one atomic update upon job completion. */ createDisposition?: string | null; + /** + * If true, creates a new session, where session id will be a server generated random id. If false, runs query with an existing session_id passed in ConnectionProperty, otherwise runs query in non-session mode. + */ + createSession?: boolean | null; /** * [Optional] Specifies the default dataset to use for unqualified table names in the query. Note that this does not alter behavior of unqualified dataset names. */ @@ -1983,6 +1987,10 @@ export namespace bigquery_v2 { refreshIntervalMs?: string | null; } export interface Schema$Model { + /** + * The best trial_id across all training runs. + */ + bestTrialId?: string | null; /** * Output only. The time when this model was created, in millisecs since the epoch. */ @@ -2218,6 +2226,10 @@ export namespace bigquery_v2 { * Connection properties. */ connectionProperties?: Schema$ConnectionProperty[]; + /** + * If true, creates a new session, where session id will be a server generated random id. If false, runs query with an existing session_id passed in ConnectionProperty, otherwise runs query in non-session mode. + */ + createSession?: boolean | null; /** * [Optional] Specifies the default datasetId and projectId to assume for any unqualified table names in the query. If not set, all table names in the query string must be qualified in the format 'datasetId.tableId'. */ @@ -2443,6 +2455,10 @@ export namespace bigquery_v2 { * Output only. The time when this routine was last modified, in milliseconds since the epoch. */ lastModifiedTime?: string | null; + /** + * Optional. Set only if Routine is a "TABLE_VALUED_FUNCTION". TODO(b/173344646) - Update return_type documentation to say it cannot be set for TABLE_VALUED_FUNCTION before preview launch. + */ + returnTableType?: Schema$StandardSqlTableType; /** * Optional if language = "SQL"; required otherwise. If absent, the return type is inferred from definition_body at query time in each query that references this routine. If present, then the evaluated result will be cast to the specified returned type at query time. For example, for the functions created with the following statements: * `CREATE FUNCTION Add(x FLOAT64, y FLOAT64) RETURNS FLOAT64 AS (x + y);` * `CREATE FUNCTION Increment(x FLOAT64) AS (Add(x, 1));` * `CREATE FUNCTION Decrement(x FLOAT64) RETURNS FLOAT64 AS (Add(x, -1));` The return_type is `{type_kind: "FLOAT64"\}` for `Add` and `Decrement`, and is absent for `Increment` (inferred as FLOAT64 at query time). Suppose the function `Add` is replaced by `CREATE OR REPLACE FUNCTION Add(x INT64, y INT64) AS (x + y);` Then the inferred return type of `Increment` is automatically changed to INT64 at query time, while the return type of `Decrement` remains FLOAT64. */ @@ -2624,6 +2640,15 @@ export namespace bigquery_v2 { export interface Schema$StandardSqlStructType { fields?: Schema$StandardSqlField[]; } + /** + * A table type + */ + export interface Schema$StandardSqlTableType { + /** + * The columns in this table type + */ + columns?: Schema$StandardSqlField[]; + } export interface Schema$Streamingbuffer { /** * [Output-only] A lower-bound estimate of the number of bytes currently in the streaming buffer. @@ -5004,6 +5029,7 @@ export namespace bigquery_v2 { * // request body parameters * // { * // "connectionProperties": [], + * // "createSession": false, * // "defaultDataset": {}, * // "dryRun": false, * // "kind": "my_kind", @@ -5442,6 +5468,7 @@ export namespace bigquery_v2 { * * // Example response * // { + * // "bestTrialId": "my_bestTrialId", * // "creationTime": "my_creationTime", * // "description": "my_description", * // "encryptionConfiguration": {}, @@ -5733,6 +5760,7 @@ export namespace bigquery_v2 { * requestBody: { * // request body parameters * // { + * // "bestTrialId": "my_bestTrialId", * // "creationTime": "my_creationTime", * // "description": "my_description", * // "encryptionConfiguration": {}, @@ -5754,6 +5782,7 @@ export namespace bigquery_v2 { * * // Example response * // { + * // "bestTrialId": "my_bestTrialId", * // "creationTime": "my_creationTime", * // "description": "my_description", * // "encryptionConfiguration": {}, @@ -6421,6 +6450,7 @@ export namespace bigquery_v2 { * // "importedLibraries": [], * // "language": "my_language", * // "lastModifiedTime": "my_lastModifiedTime", + * // "returnTableType": {}, * // "returnType": {}, * // "routineReference": {}, * // "routineType": "my_routineType" @@ -6565,6 +6595,7 @@ export namespace bigquery_v2 { * // "importedLibraries": [], * // "language": "my_language", * // "lastModifiedTime": "my_lastModifiedTime", + * // "returnTableType": {}, * // "returnType": {}, * // "routineReference": {}, * // "routineType": "my_routineType" @@ -6584,6 +6615,7 @@ export namespace bigquery_v2 { * // "importedLibraries": [], * // "language": "my_language", * // "lastModifiedTime": "my_lastModifiedTime", + * // "returnTableType": {}, * // "returnType": {}, * // "routineReference": {}, * // "routineType": "my_routineType" @@ -6879,6 +6911,7 @@ export namespace bigquery_v2 { * // "importedLibraries": [], * // "language": "my_language", * // "lastModifiedTime": "my_lastModifiedTime", + * // "returnTableType": {}, * // "returnType": {}, * // "routineReference": {}, * // "routineType": "my_routineType" @@ -6898,6 +6931,7 @@ export namespace bigquery_v2 { * // "importedLibraries": [], * // "language": "my_language", * // "lastModifiedTime": "my_lastModifiedTime", + * // "returnTableType": {}, * // "returnType": {}, * // "routineReference": {}, * // "routineType": "my_routineType" diff --git a/src/apis/bigquerydatatransfer/v1.ts b/src/apis/bigquerydatatransfer/v1.ts index ecb4fb7c4d6..5a4cf5c5400 100644 --- a/src/apis/bigquerydatatransfer/v1.ts +++ b/src/apis/bigquerydatatransfer/v1.ts @@ -1311,13 +1311,13 @@ export namespace bigquerydatatransfer_v1 { * * // Do the magic * const res = await bigquerydatatransfer.projects.locations.list({ - * // The standard list 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). * filter: 'placeholder-value', * // The resource that owns the locations collection, if applicable. * name: 'projects/my-project', - * // The standard list page size. + * // The maximum number of results to return. If not set, the service will select a default. * pageSize: 'placeholder-value', - * // The standard list page token. + * // A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. * pageToken: 'placeholder-value', * }); * console.log(res.data); @@ -1437,7 +1437,7 @@ export namespace bigquerydatatransfer_v1 { export interface Params$Resource$Projects$Locations$List extends StandardParameters { /** - * The standard list 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). */ filter?: string; /** @@ -1445,11 +1445,11 @@ export namespace bigquerydatatransfer_v1 { */ name?: string; /** - * The standard list page size. + * The maximum number of results to return. If not set, the service will select a default. */ pageSize?: number; /** - * The standard list page token. + * A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. */ pageToken?: string; } diff --git a/src/apis/calendar/v3.ts b/src/apis/calendar/v3.ts index 0ee3c5c599a..0a11a108044 100644 --- a/src/apis/calendar/v3.ts +++ b/src/apis/calendar/v3.ts @@ -151,7 +151,7 @@ export namespace calendar_v3 { */ etag?: string | null; /** - * Identifier of the ACL rule. + * Identifier of the Access Control List (ACL) rule. See Sharing calendars. */ id?: string | null; /** @@ -168,7 +168,7 @@ export namespace calendar_v3 { */ role?: string | null; /** - * The scope of the rule. + * The extent to which calendar access is granted by this ACL rule. */ scope?: {type?: string; value?: string} | null; } diff --git a/src/apis/chat/v1.ts b/src/apis/chat/v1.ts index 5cb7f9c5e70..2c9b9b7a08f 100644 --- a/src/apis/chat/v1.ts +++ b/src/apis/chat/v1.ts @@ -514,9 +514,6 @@ export namespace chat_v1 { * A plain-text description of the message's cards, used when the actual cards cannot be displayed (e.g. mobile notifications). */ fallbackText?: string | null; - /** - * Resource name, in the form "spaces/x/messages/x". Example: spaces/AAAAMpdlehY/messages/UMxbHmzDlr4.UMxbHmzDlr4 - */ name?: string | null; /** * Text for generating preview chips. This text will not be displayed to the user, but any links to images, web pages, videos, etc. included here will generate preview chips. @@ -579,7 +576,7 @@ export namespace chat_v1 { widgets?: Schema$WidgetMarkup[]; } /** - * A Slash Command in Hangouts Chat. + * A Slash Command in Chat. */ export interface Schema$SlashCommand { /** @@ -666,7 +663,7 @@ export namespace chat_v1 { name?: string | null; } /** - * A user in Hangouts Chat. + * A user in Google Chat. */ export interface Schema$User { /** @@ -678,7 +675,7 @@ export namespace chat_v1 { */ domainId?: string | null; /** - * True when the user is deleted or the user's proifle is not visible. + * True when the user is deleted or the user's profile is not visible. */ isAnonymous?: boolean | null; /** @@ -3209,7 +3206,6 @@ export namespace chat_v1 { * * // Do the magic * const res = await chat.spaces.messages.update({ - * // Resource name, in the form "spaces/x/messages/x". Example: spaces/AAAAMpdlehY/messages/UMxbHmzDlr4.UMxbHmzDlr4 * name: 'spaces/my-space/messages/my-message', * // Required. The field paths to be updated, comma separated if there are multiple. Currently supported field paths: * text * cards * updateMask: 'placeholder-value', @@ -3378,7 +3374,7 @@ export namespace chat_v1 { export interface Params$Resource$Spaces$Messages$Update extends StandardParameters { /** - * Resource name, in the form "spaces/x/messages/x". Example: spaces/AAAAMpdlehY/messages/UMxbHmzDlr4.UMxbHmzDlr4 + * */ name?: string; /** diff --git a/src/apis/chromemanagement/README.md b/src/apis/chromemanagement/README.md index 4c00336c44d..d407205084f 100644 --- a/src/apis/chromemanagement/README.md +++ b/src/apis/chromemanagement/README.md @@ -2,7 +2,7 @@ # chromemanagement -> The Chrome Management API is a suite of services that allows Chrome administrators to view, manage and gain insights on their Chrome OS The Chrome Management API is a suite of services that allows GSuite domain administrators to view, manage and gain insights on their Chrome OS and Chrome Browser devices and users. +> The Chrome Management API is a suite of services that allows Chrome administrators to view, manage and gain insights on their Chrome OS and Chrome Browser devices. ## Installation diff --git a/src/apis/chromemanagement/v1.ts b/src/apis/chromemanagement/v1.ts index 695a1bd38c4..662ae328df2 100644 --- a/src/apis/chromemanagement/v1.ts +++ b/src/apis/chromemanagement/v1.ts @@ -103,7 +103,7 @@ export namespace chromemanagement_v1 { /** * Chrome Management API * - * The Chrome Management API is a suite of services that allows Chrome administrators to view, manage and gain insights on their Chrome OS The Chrome Management API is a suite of services that allows GSuite domain administrators to view, manage and gain insights on their Chrome OS and Chrome Browser devices and users. + * The Chrome Management API is a suite of services that allows Chrome administrators to view, manage and gain insights on their Chrome OS and Chrome Browser devices. * * @example * ```js @@ -618,7 +618,7 @@ export namespace chromemanagement_v1 { * customer: 'customers/my-customer', * // Query string to filter results, AND-separated fields in EBNF syntax. Note: OR operations are not supported in this filter. Supported filter fields: * last_active_date * filter: 'placeholder-value', - * // Field used to order results. Supported order by fields: * machine_name * device_id + * // Field used to order results. Supported order by fields: * machine * device_id * orderBy: 'placeholder-value', * // The ID of the organizational unit. * orgUnitId: 'placeholder-value', @@ -807,7 +807,7 @@ export namespace chromemanagement_v1 { */ filter?: string; /** - * Field used to order results. Supported order by fields: * machine_name * device_id + * Field used to order results. Supported order by fields: * machine * device_id */ orderBy?: string; /** diff --git a/src/apis/cloudasset/v1.ts b/src/apis/cloudasset/v1.ts index 32e39834929..34f328fedc2 100644 --- a/src/apis/cloudasset/v1.ts +++ b/src/apis/cloudasset/v1.ts @@ -155,6 +155,10 @@ export namespace cloudasset_v1 { */ outputConfig?: Schema$IamPolicyAnalysisOutputConfig; } + /** + * A response message for AssetService.AnalyzeIamPolicyLongrunning. + */ + export interface Schema$AnalyzeIamPolicyLongrunningResponse {} /** * A response message for AssetService.AnalyzeIamPolicy. */ diff --git a/src/apis/cloudasset/v1beta1.ts b/src/apis/cloudasset/v1beta1.ts index f0706f589e1..7efca805089 100644 --- a/src/apis/cloudasset/v1beta1.ts +++ b/src/apis/cloudasset/v1beta1.ts @@ -129,6 +129,10 @@ export namespace cloudasset_v1beta1 { } } + /** + * A response message for AssetService.AnalyzeIamPolicyLongrunning. + */ + export interface Schema$AnalyzeIamPolicyLongrunningResponse {} /** * An asset in Google Cloud. An asset can be any resource in the Google Cloud [resource hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), a resource outside the Google Cloud resource hierarchy (such as Google Kubernetes Engine clusters and objects), or a policy (e.g. Cloud IAM policy). See [Supported asset types](https://cloud.google.com/asset-inventory/docs/supported-asset-types) for more information. */ diff --git a/src/apis/cloudasset/v1p1beta1.ts b/src/apis/cloudasset/v1p1beta1.ts index b1645dd6cc5..46dff18f291 100644 --- a/src/apis/cloudasset/v1p1beta1.ts +++ b/src/apis/cloudasset/v1p1beta1.ts @@ -127,6 +127,10 @@ export namespace cloudasset_v1p1beta1 { } } + /** + * A response message for AssetService.AnalyzeIamPolicyLongrunning. + */ + export interface Schema$AnalyzeIamPolicyLongrunningResponse {} /** * Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { "audit_configs": [ { "service": "allServices", "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] \}, { "log_type": "DATA_WRITE" \}, { "log_type": "ADMIN_READ" \} ] \}, { "service": "sampleservice.googleapis.com", "audit_log_configs": [ { "log_type": "DATA_READ" \}, { "log_type": "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] \} ] \} ] \} For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging. */ diff --git a/src/apis/cloudasset/v1p4beta1.ts b/src/apis/cloudasset/v1p4beta1.ts index db6ffd450e3..889e8240023 100644 --- a/src/apis/cloudasset/v1p4beta1.ts +++ b/src/apis/cloudasset/v1p4beta1.ts @@ -138,6 +138,10 @@ export namespace cloudasset_v1p4beta1 { */ roles?: string[] | null; } + /** + * A response message for AssetService.AnalyzeIamPolicyLongrunning. + */ + export interface Schema$AnalyzeIamPolicyLongrunningResponse {} /** * A response message for AssetService.AnalyzeIamPolicy. */ diff --git a/src/apis/cloudasset/v1p5beta1.ts b/src/apis/cloudasset/v1p5beta1.ts index 80186a14d06..468a79fd99b 100644 --- a/src/apis/cloudasset/v1p5beta1.ts +++ b/src/apis/cloudasset/v1p5beta1.ts @@ -125,6 +125,10 @@ export namespace cloudasset_v1p5beta1 { } } + /** + * A response message for AssetService.AnalyzeIamPolicyLongrunning. + */ + export interface Schema$AnalyzeIamPolicyLongrunningResponse {} /** * An asset in Google Cloud. An asset can be any resource in the Google Cloud [resource hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), a resource outside the Google Cloud resource hierarchy (such as Google Kubernetes Engine clusters and objects), or a policy (e.g. Cloud IAM policy). See [Supported asset types](https://cloud.google.com/asset-inventory/docs/supported-asset-types) for more information. */ diff --git a/src/apis/cloudasset/v1p7beta1.ts b/src/apis/cloudasset/v1p7beta1.ts index a53664e4dcc..68b4ada22ad 100644 --- a/src/apis/cloudasset/v1p7beta1.ts +++ b/src/apis/cloudasset/v1p7beta1.ts @@ -113,6 +113,7 @@ export namespace cloudasset_v1p7beta1 { */ export class Cloudasset { context: APIRequestContext; + operations: Resource$Operations; v1p7beta1: Resource$V1p7beta1; constructor(options: GlobalOptions, google?: GoogleConfigurable) { @@ -121,10 +122,15 @@ export namespace cloudasset_v1p7beta1 { google, }; + this.operations = new Resource$Operations(this.context); this.v1p7beta1 = new Resource$V1p7beta1(this.context); } } + /** + * A response message for AssetService.AnalyzeIamPolicyLongrunning. + */ + export interface Schema$AnalyzeIamPolicyLongrunningResponse {} /** * Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { "audit_configs": [ { "service": "allServices", "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] \}, { "log_type": "DATA_WRITE" \}, { "log_type": "ADMIN_READ" \} ] \}, { "service": "sampleservice.googleapis.com", "audit_log_configs": [ { "log_type": "DATA_READ" \}, { "log_type": "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] \} ] \} ] \} For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging. */ @@ -881,6 +887,149 @@ export namespace cloudasset_v1p7beta1 { message?: string | null; } + export class Resource$Operations { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * 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. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/cloudasset.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const cloudasset = google.cloudasset('v1p7beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await cloudasset.operations.get({ + * // The name of the operation resource. + * name: '[^/]+/[^/]+/operations/my-operation/.*', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Operations$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Operations$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Operations$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Operations$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Operations$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Operations$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Operations$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Operations$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://cloudasset.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1p7beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Operations$Get extends StandardParameters { + /** + * The name of the operation resource. + */ + name?: string; + } + export class Resource$V1p7beta1 { context: APIRequestContext; constructor(context: APIRequestContext) { diff --git a/src/apis/cloudbilling/v1.ts b/src/apis/cloudbilling/v1.ts index 332fc0634b3..68db6c5e1c4 100644 --- a/src/apis/cloudbilling/v1.ts +++ b/src/apis/cloudbilling/v1.ts @@ -175,7 +175,7 @@ export namespace cloudbilling_v1 { */ displayName?: string | null; /** - * If this account is a [subaccount](https://cloud.google.com/billing/docs/concepts), then this will be the resource name of the master billing account that it is being resold through. Otherwise this will be empty. + * If this account is a [subaccount](https://cloud.google.com/billing/docs/concepts), then this will be the resource name of the parent billing account that it is being resold through. Otherwise this will be empty. */ masterBillingAccount?: string | null; /** @@ -540,7 +540,7 @@ export namespace cloudbilling_v1 { } /** - * Creates a billing account. This method can only be used to create [billing subaccounts](https://cloud.google.com/billing/docs/concepts) by Google Cloud resellers. When creating a subaccount, the current authenticated user must have the `billing.accounts.update` IAM permission on the master account, which is typically given to billing account [administrators](https://cloud.google.com/billing/docs/how-to/billing-access). This method will return an error if the master account has not been provisioned as a reseller account. + * This method creates [billing subaccounts](https://cloud.google.com/billing/docs/concepts#subaccounts). Google Cloud resellers should use the Channel Services APIs, [accounts.customers.create](https://cloud.google.com/channel/docs/reference/rest/v1/accounts.customers/create) and [accounts.customers.entitlements.create](https://cloud.google.com/channel/docs/reference/rest/v1/accounts.customers.entitlements/create). When creating a subaccount, the current authenticated user must have the `billing.accounts.update` IAM permission on the parent account, which is typically given to billing account [administrators](https://cloud.google.com/billing/docs/how-to/billing-access). This method will return an error if the parent account has not been provisioned as a reseller account. * @example * ```js * // Before running the sample: diff --git a/src/apis/cloudbuild/index.ts b/src/apis/cloudbuild/index.ts index d979041b354..2d0c3c4c523 100644 --- a/src/apis/cloudbuild/index.ts +++ b/src/apis/cloudbuild/index.ts @@ -17,11 +17,13 @@ import {AuthPlus, getAPI, GoogleConfigurable} from 'googleapis-common'; import {cloudbuild_v1} from './v1'; import {cloudbuild_v1alpha1} from './v1alpha1'; import {cloudbuild_v1alpha2} from './v1alpha2'; +import {cloudbuild_v1beta1} from './v1beta1'; export const VERSIONS = { v1: cloudbuild_v1.Cloudbuild, v1alpha1: cloudbuild_v1alpha1.Cloudbuild, v1alpha2: cloudbuild_v1alpha2.Cloudbuild, + v1beta1: cloudbuild_v1beta1.Cloudbuild, }; export function cloudbuild(version: 'v1'): cloudbuild_v1.Cloudbuild; @@ -36,11 +38,16 @@ export function cloudbuild(version: 'v1alpha2'): cloudbuild_v1alpha2.Cloudbuild; export function cloudbuild( options: cloudbuild_v1alpha2.Options ): cloudbuild_v1alpha2.Cloudbuild; +export function cloudbuild(version: 'v1beta1'): cloudbuild_v1beta1.Cloudbuild; +export function cloudbuild( + options: cloudbuild_v1beta1.Options +): cloudbuild_v1beta1.Cloudbuild; export function cloudbuild< T = | cloudbuild_v1.Cloudbuild | cloudbuild_v1alpha1.Cloudbuild | cloudbuild_v1alpha2.Cloudbuild + | cloudbuild_v1beta1.Cloudbuild >( this: GoogleConfigurable, versionOrOptions: @@ -50,6 +57,8 @@ export function cloudbuild< | cloudbuild_v1alpha1.Options | 'v1alpha2' | cloudbuild_v1alpha2.Options + | 'v1beta1' + | cloudbuild_v1beta1.Options ) { return getAPI('cloudbuild', versionOrOptions, VERSIONS, this); } @@ -59,6 +68,7 @@ export {auth}; export {cloudbuild_v1}; export {cloudbuild_v1alpha1}; export {cloudbuild_v1alpha2}; +export {cloudbuild_v1beta1}; export { AuthPlus, GlobalOptions, diff --git a/src/apis/cloudbuild/v1.ts b/src/apis/cloudbuild/v1.ts index de869c8c8ec..acd887749d0 100644 --- a/src/apis/cloudbuild/v1.ts +++ b/src/apis/cloudbuild/v1.ts @@ -938,6 +938,10 @@ export namespace cloudbuild_v1 { * If provided, get the source from this location in Google Cloud Storage. */ storageSource?: Schema$StorageSource; + /** + * If provided, get the source from this manifest in Google Cloud Storage. This feature is in Preview. + */ + storageSourceManifest?: Schema$StorageSourceManifest; } /** * Provenance of the source. Ways to find the original source, or verify that some source was used for this build. @@ -955,6 +959,10 @@ export namespace cloudbuild_v1 { * A copy of the build's `source.storage_source`, if exists, with any generations resolved. */ resolvedStorageSource?: Schema$StorageSource; + /** + * A copy of the build's `source.storage_source_manifest`, if exists, with any revisions resolved. This feature is in Preview. + */ + resolvedStorageSourceManifest?: Schema$StorageSourceManifest; } /** * 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). @@ -990,6 +998,23 @@ export namespace cloudbuild_v1 { */ object?: string | null; } + /** + * Location of the source manifest in Google Cloud Storage. This feature is in Preview. + */ + export interface Schema$StorageSourceManifest { + /** + * Google Cloud Storage bucket containing the source manifest (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). + */ + bucket?: string | null; + /** + * Google Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used. + */ + generation?: string | null; + /** + * Google Cloud Storage object containing the source manifest. This object must be a JSON file. + */ + object?: string | null; + } /** * Start and end times for a build execution phase. */ diff --git a/src/apis/cloudbuild/v1alpha1.ts b/src/apis/cloudbuild/v1alpha1.ts index ec33754f28f..e4e76878795 100644 --- a/src/apis/cloudbuild/v1alpha1.ts +++ b/src/apis/cloudbuild/v1alpha1.ts @@ -765,6 +765,10 @@ export namespace cloudbuild_v1alpha1 { * If provided, get the source from this location in Google Cloud Storage. */ storageSource?: Schema$StorageSource; + /** + * If provided, get the source from this manifest in Google Cloud Storage. This feature is in Preview. + */ + storageSourceManifest?: Schema$StorageSourceManifest; } /** * Provenance of the source. Ways to find the original source, or verify that some source was used for this build. @@ -782,6 +786,10 @@ export namespace cloudbuild_v1alpha1 { * A copy of the build's `source.storage_source`, if exists, with any generations resolved. */ resolvedStorageSource?: Schema$StorageSource; + /** + * A copy of the build's `source.storage_source_manifest`, if exists, with any revisions resolved. This feature is in Preview. + */ + resolvedStorageSourceManifest?: Schema$StorageSourceManifest; } /** * 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). @@ -817,6 +825,23 @@ export namespace cloudbuild_v1alpha1 { */ object?: string | null; } + /** + * Location of the source manifest in Google Cloud Storage. This feature is in Preview. + */ + export interface Schema$StorageSourceManifest { + /** + * Google Cloud Storage bucket containing the source manifest (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). + */ + bucket?: string | null; + /** + * Google Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used. + */ + generation?: string | null; + /** + * Google Cloud Storage object containing the source manifest. This object must be a JSON file. + */ + object?: string | null; + } /** * Start and end times for a build execution phase. */ diff --git a/src/apis/cloudbuild/v1alpha2.ts b/src/apis/cloudbuild/v1alpha2.ts index 0449eeb9c3c..084f543c63b 100644 --- a/src/apis/cloudbuild/v1alpha2.ts +++ b/src/apis/cloudbuild/v1alpha2.ts @@ -757,6 +757,10 @@ export namespace cloudbuild_v1alpha2 { * If provided, get the source from this location in Google Cloud Storage. */ storageSource?: Schema$StorageSource; + /** + * If provided, get the source from this manifest in Google Cloud Storage. This feature is in Preview. + */ + storageSourceManifest?: Schema$StorageSourceManifest; } /** * Provenance of the source. Ways to find the original source, or verify that some source was used for this build. @@ -774,6 +778,10 @@ export namespace cloudbuild_v1alpha2 { * A copy of the build's `source.storage_source`, if exists, with any generations resolved. */ resolvedStorageSource?: Schema$StorageSource; + /** + * A copy of the build's `source.storage_source_manifest`, if exists, with any revisions resolved. This feature is in Preview. + */ + resolvedStorageSourceManifest?: Schema$StorageSourceManifest; } /** * 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). @@ -809,6 +817,23 @@ export namespace cloudbuild_v1alpha2 { */ object?: string | null; } + /** + * Location of the source manifest in Google Cloud Storage. This feature is in Preview. + */ + export interface Schema$StorageSourceManifest { + /** + * Google Cloud Storage bucket containing the source manifest (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). + */ + bucket?: string | null; + /** + * Google Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used. + */ + generation?: string | null; + /** + * Google Cloud Storage object containing the source manifest. This object must be a JSON file. + */ + object?: string | null; + } /** * Start and end times for a build execution phase. */ diff --git a/src/apis/cloudbuild/v1beta1.ts b/src/apis/cloudbuild/v1beta1.ts new file mode 100644 index 00000000000..229aba69216 --- /dev/null +++ b/src/apis/cloudbuild/v1beta1.ts @@ -0,0 +1,1979 @@ +// Copyright 2020 Google LLC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/* eslint-disable @typescript-eslint/no-explicit-any */ +/* eslint-disable @typescript-eslint/class-name-casing */ +/* eslint-disable @typescript-eslint/no-unused-vars */ +/* eslint-disable @typescript-eslint/no-empty-interface */ +/* eslint-disable @typescript-eslint/no-namespace */ +/* eslint-disable no-irregular-whitespace */ + +import { + OAuth2Client, + JWT, + Compute, + UserRefreshClient, + BaseExternalAccountClient, + GaxiosPromise, + GoogleConfigurable, + createAPIRequest, + MethodOptions, + StreamMethodOptions, + GlobalOptions, + GoogleAuth, + BodyResponseCallback, + APIRequestContext, +} from 'googleapis-common'; +import {Readable} from 'stream'; + +export namespace cloudbuild_v1beta1 { + export interface Options extends GlobalOptions { + version: 'v1beta1'; + } + + interface StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: + | string + | OAuth2Client + | JWT + | Compute + | UserRefreshClient + | BaseExternalAccountClient + | GoogleAuth; + + /** + * V1 error format. + */ + '$.xgafv'?: string; + /** + * OAuth access token. + */ + access_token?: string; + /** + * Data format for response. + */ + alt?: string; + /** + * JSONP + */ + callback?: string; + /** + * Selector specifying which fields to include in a partial response. + */ + fields?: string; + /** + * 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. + */ + key?: string; + /** + * OAuth 2.0 token for the current user. + */ + oauth_token?: string; + /** + * Returns response with indentations and line breaks. + */ + prettyPrint?: boolean; + /** + * 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. + */ + quotaUser?: string; + /** + * Legacy upload protocol for media (e.g. "media", "multipart"). + */ + uploadType?: string; + /** + * Upload protocol for media (e.g. "raw", "multipart"). + */ + upload_protocol?: string; + } + + /** + * Cloud Build API + * + * Creates and manages builds on Google Cloud Platform. + * + * @example + * ```js + * const {google} = require('googleapis'); + * const cloudbuild = google.cloudbuild('v1beta1'); + * ``` + */ + export class Cloudbuild { + context: APIRequestContext; + projects: Resource$Projects; + + constructor(options: GlobalOptions, google?: GoogleConfigurable) { + this.context = { + _options: options || {}, + google, + }; + + this.projects = new Resource$Projects(this.context); + } + } + + /** + * Files in the workspace to upload to Cloud Storage upon successful completion of all build steps. + */ + export interface Schema$ArtifactObjects { + /** + * Cloud Storage bucket and optional object path, in the form "gs://bucket/path/to/somewhere/". (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). Files in the workspace matching any path pattern will be uploaded to Cloud Storage with this location as a prefix. + */ + location?: string | null; + /** + * Path globs used to match files in the build's workspace. + */ + paths?: string[] | null; + /** + * Output only. Stores timing information for pushing all artifact objects. + */ + timing?: Schema$TimeSpan; + } + /** + * An artifact that was uploaded during a build. This is a single record in the artifact manifest JSON file. + */ + export interface Schema$ArtifactResult { + /** + * The file hash of the artifact. + */ + fileHash?: Schema$FileHashes[]; + /** + * The path of an artifact in a Google Cloud Storage bucket, with the generation number. For example, `gs://mybucket/path/to/output.jar#generation`. + */ + location?: string | null; + } + /** + * Artifacts produced by a build that should be uploaded upon successful completion of all build steps. + */ + export interface Schema$Artifacts { + /** + * A list of images to be pushed upon the successful completion of all build steps. The images will be pushed using the builder service account's credentials. The digests of the pushed images will be stored in the Build resource's results field. If any of the images fail to be pushed, the build is marked FAILURE. + */ + images?: string[] | null; + /** + * A list of objects to be uploaded to Cloud Storage upon successful completion of all build steps. Files in the workspace matching specified paths globs will be uploaded to the specified Cloud Storage location using the builder service account's credentials. The location and generation of the uploaded objects will be stored in the Build resource's results field. If any objects fail to be pushed, the build is marked FAILURE. + */ + objects?: Schema$ArtifactObjects; + } + /** + * A build resource in the Cloud Build API. At a high level, a `Build` describes where to find source code, how to build it (for example, the builder image to run on the source), and where to store the built artifacts. Fields can include the following variables, which will be expanded when the build is created: - $PROJECT_ID: the project ID of the build. - $PROJECT_NUMBER: the project number of the build. - $BUILD_ID: the autogenerated ID of the build. - $REPO_NAME: the source repository name specified by RepoSource. - $BRANCH_NAME: the branch name specified by RepoSource. - $TAG_NAME: the tag name specified by RepoSource. - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or resolved from the specified branch or tag. - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA. + */ + export interface Schema$Build { + /** + * Artifacts produced by the build that should be uploaded upon successful completion of all build steps. + */ + artifacts?: Schema$Artifacts; + /** + * Secrets and secret environment variables. + */ + availableSecrets?: Schema$Secrets; + /** + * Output only. The ID of the `BuildTrigger` that triggered this build, if it was triggered automatically. + */ + buildTriggerId?: string | null; + /** + * Output only. Time at which the request to create the build was received. + */ + createTime?: string | null; + /** + * Output only. Time at which execution of the build was finished. The difference between finish_time and start_time is the duration of the build's execution. + */ + finishTime?: string | null; + /** + * Output only. Unique identifier of the build. + */ + id?: string | null; + /** + * A list of images to be pushed upon the successful completion of all build steps. The images are pushed using the builder service account's credentials. The digests of the pushed images will be stored in the `Build` resource's results field. If any of the images fail to be pushed, the build status is marked `FAILURE`. + */ + images?: string[] | null; + /** + * Google Cloud Storage bucket where logs should be written (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). Logs file names will be of the format `${logs_bucket\}/log-${build_id\}.txt`. + */ + logsBucket?: string | null; + /** + * Output only. URL to logs for this build in Google Cloud Console. + */ + logUrl?: string | null; + /** + * Output only. The 'Build' name with format: `projects/{project\}/locations/{location\}/builds/{build\}`, where {build\} is a unique identifier generated by the service. + */ + name?: string | null; + /** + * Special options for this build. + */ + options?: Schema$BuildOptions; + /** + * Output only. ID of the project. + */ + projectId?: string | null; + /** + * TTL in queue for this build. If provided and the build is enqueued longer than this value, the build will expire and the build status will be `EXPIRED`. The TTL starts ticking from create_time. + */ + queueTtl?: string | null; + /** + * Output only. Results of the build. + */ + results?: Schema$Results; + /** + * Secrets to decrypt using Cloud Key Management Service. Note: Secret Manager is the recommended technique for managing sensitive data with Cloud Build. Use `available_secrets` to configure builds to access secrets from Secret Manager. For instructions, see: https://cloud.google.com/cloud-build/docs/securing-builds/use-secrets + */ + secrets?: Schema$Secret[]; + /** + * IAM service account whose credentials will be used at build runtime. Must be of the format `projects/{PROJECT_ID\}/serviceAccounts/{ACCOUNT\}`. ACCOUNT can be email address or uniqueId of the service account. This field is in beta. + */ + serviceAccount?: string | null; + /** + * The location of the source files to build. + */ + source?: Schema$Source; + /** + * Output only. A permanent fixed identifier for source. + */ + sourceProvenance?: Schema$SourceProvenance; + /** + * Output only. Time at which execution of the build was started. + */ + startTime?: string | null; + /** + * Output only. Status of the build. + */ + status?: string | null; + /** + * Output only. Customer-readable message about the current status. + */ + statusDetail?: string | null; + /** + * Required. The operations to be performed on the workspace. + */ + steps?: Schema$BuildStep[]; + /** + * Substitutions data for `Build` resource. + */ + substitutions?: {[key: string]: string} | null; + /** + * Tags for annotation of a `Build`. These are not docker tags. + */ + tags?: string[] | null; + /** + * Amount of time that this build should be allowed to run, to second granularity. If this amount of time elapses, work on the build will cease and the build status will be `TIMEOUT`. `timeout` starts ticking from `startTime`. Default time is ten minutes. + */ + timeout?: string | null; + /** + * Output only. Stores timing information for phases of the build. Valid keys are: * BUILD: time to execute all build steps * PUSH: time to push all specified images. * FETCHSOURCE: time to fetch source. If the build does not specify source or images, these keys will not be included. + */ + timing?: {[key: string]: Schema$TimeSpan} | null; + } + /** + * Metadata for build operations. + */ + export interface Schema$BuildOperationMetadata { + /** + * The build that the operation is tracking. + */ + build?: Schema$Build; + } + /** + * Optional arguments to enable specific features of builds. + */ + export interface Schema$BuildOptions { + /** + * Requested disk size for the VM that runs the build. Note that this is *NOT* "disk free"; some of the space will be used by the operating system and build utilities. Also note that this is the minimum disk size that will be allocated for the build -- the build may run with a larger disk than requested. At present, the maximum disk size is 1000GB; builds that request more than the maximum are rejected with an error. + */ + diskSizeGb?: string | null; + /** + * Option to specify whether or not to apply bash style string operations to the substitutions. NOTE: this is always enabled for triggered builds and cannot be overridden in the build configuration file. + */ + dynamicSubstitutions?: boolean | null; + /** + * A list of global environment variable definitions that will exist for all build steps in this build. If a variable is defined in both globally and in a build step, the variable will use the build step value. The elements are of the form "KEY=VALUE" for the environment variable "KEY" being given the value "VALUE". + */ + env?: string[] | null; + /** + * Option to specify the logging mode, which determines if and where build logs are stored. + */ + logging?: string | null; + /** + * Option to define build log streaming behavior to Google Cloud Storage. + */ + logStreamingOption?: string | null; + /** + * Compute Engine machine type on which to run the build. + */ + machineType?: string | null; + /** + * Requested verifiability options. + */ + requestedVerifyOption?: string | null; + /** + * A list of global environment variables, which are encrypted using a Cloud Key Management Service crypto key. These values must be specified in the build's `Secret`. These variables will be available to all build steps in this build. + */ + secretEnv?: string[] | null; + /** + * Requested hash for SourceProvenance. + */ + sourceProvenanceHash?: string[] | null; + /** + * Option to specify behavior when there is an error in the substitution checks. NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot be overridden in the build configuration file. + */ + substitutionOption?: string | null; + /** + * Global list of volumes to mount for ALL build steps Each volume is created as an empty volume prior to starting the build process. Upon completion of the build, volumes and their contents are discarded. Global volume names and paths cannot conflict with the volumes defined a build step. Using a global volume in a build with only one step is not valid as it is indicative of a build request with an incorrect configuration. + */ + volumes?: Schema$Volume[]; + /** + * Option to specify a `WorkerPool` for the build. Format: projects/{project\}/locations/{location\}/workerPools/{workerPool\} This field is in beta and is available only to restricted users. + */ + workerPool?: string | null; + } + /** + * A step in the build pipeline. + */ + export interface Schema$BuildStep { + /** + * A list of arguments that will be presented to the step when it is started. If the image used to run the step's container has an entrypoint, the `args` are used as arguments to that entrypoint. If the image does not define an entrypoint, the first element in args is used as the entrypoint, and the remainder will be used as arguments. + */ + args?: string[] | null; + /** + * Working directory to use when running this step's container. If this value is a relative path, it is relative to the build's working directory. If this value is absolute, it may be outside the build's working directory, in which case the contents of the path may not be persisted across build step executions, unless a `volume` for that path is specified. If the build specifies a `RepoSource` with `dir` and a step with a `dir`, which specifies an absolute path, the `RepoSource` `dir` is ignored for the step's execution. + */ + dir?: string | null; + /** + * Entrypoint to be used instead of the build step image's default entrypoint. If unset, the image's default entrypoint is used. + */ + entrypoint?: string | null; + /** + * A list of environment variable definitions to be used when running a step. The elements are of the form "KEY=VALUE" for the environment variable "KEY" being given the value "VALUE". + */ + env?: string[] | null; + /** + * Unique identifier for this build step, used in `wait_for` to reference this build step as a dependency. + */ + id?: string | null; + /** + * Required. The name of the container image that will run this particular build step. If the image is available in the host's Docker daemon's cache, it will be run directly. If not, the host will attempt to pull the image first, using the builder service account's credentials if necessary. The Docker daemon's cache will already have the latest versions of all of the officially supported build steps ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)). The Docker daemon will also have cached many of the layers for some popular images, like "ubuntu", "debian", but they will be refreshed at the time you attempt to use them. If you built an image in a previous build step, it will be stored in the host's Docker daemon's cache and is available to use as the name for a later build step. + */ + name?: string | null; + /** + * Output only. Stores timing information for pulling this build step's builder image only. + */ + pullTiming?: Schema$TimeSpan; + /** + * A list of environment variables which are encrypted using a Cloud Key Management Service crypto key. These values must be specified in the build's `Secret`. + */ + secretEnv?: string[] | null; + /** + * Output only. Status of the build step. At this time, build step status is only updated on build completion; step status is not updated in real-time as the build progresses. + */ + status?: string | null; + /** + * Time limit for executing this build step. If not defined, the step has no time limit and will be allowed to continue to run until either it completes or the build itself times out. + */ + timeout?: string | null; + /** + * Output only. Stores timing information for executing this build step. + */ + timing?: Schema$TimeSpan; + /** + * List of volumes to mount into the build step. Each volume is created as an empty volume prior to execution of the build step. Upon completion of the build, volumes and their contents are discarded. Using a named volume in only one step is not valid as it is indicative of a build request with an incorrect configuration. + */ + volumes?: Schema$Volume[]; + /** + * The ID(s) of the step(s) that this build step depends on. This build step will not start until all the build steps in `wait_for` have completed successfully. If `wait_for` is empty, this build step will start when all previous build steps in the `Build.Steps` list have completed successfully. + */ + waitFor?: string[] | null; + } + /** + * An image built by the pipeline. + */ + export interface Schema$BuiltImage { + /** + * Docker Registry 2.0 digest. + */ + digest?: string | null; + /** + * Name used to push the container image to Google Container Registry, as presented to `docker push`. + */ + name?: string | null; + /** + * Output only. Stores timing information for pushing the specified image. + */ + pushTiming?: Schema$TimeSpan; + } + /** + * The request message for Operations.CancelOperation. + */ + export interface Schema$CancelOperationRequest {} + /** + * 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); \} The JSON representation for `Empty` is empty JSON object `{\}`. + */ + export interface Schema$Empty {} + /** + * Container message for hashes of byte content of files, used in SourceProvenance messages to verify integrity of source input to the build. + */ + export interface Schema$FileHashes { + /** + * Collection of file hashes. + */ + fileHash?: Schema$Hash[]; + } + /** + * Container message for hash values. + */ + export interface Schema$Hash { + /** + * The type of hash that was performed. + */ + type?: string | null; + /** + * The hash value. + */ + value?: string | null; + } + /** + * HTTPDelivery is the delivery configuration for an HTTP notification. + */ + export interface Schema$HTTPDelivery { + /** + * The URI to which JSON-containing HTTP POST requests should be sent. + */ + uri?: string | null; + } + /** + * Pairs a set of secret environment variables mapped to encrypted values with the Cloud KMS key to use to decrypt the value. + */ + export interface Schema$InlineSecret { + /** + * Map of environment variable name to its encrypted value. Secret environment variables must be unique across all of a build's secrets, and must be used by at least one build step. Values can be at most 64 KB in size. There can be at most 100 secret values across all of a build's secrets. + */ + envMap?: {[key: string]: string} | null; + /** + * Resource name of Cloud KMS crypto key to decrypt the encrypted value. In format: projects/x/locations/x/keyRings/x/cryptoKeys/x + */ + kmsKeyName?: string | null; + } + /** + * Response containing existing `WorkerPools`. + */ + export interface Schema$ListWorkerPoolsResponse { + /** + * `WorkerPools` for the specified project. + */ + workerPools?: Schema$WorkerPool[]; + } + /** + * Network describes the network configuration for a `WorkerPool`. + */ + export interface Schema$NetworkConfig { + /** + * Required. Immutable. The network definition that the workers are peered to. If this section is left empty, the workers will be peered to `WorkerPool.project_id` on the service producer network. Must be in the format `projects/{project\}/global/networks/{network\}`, where `{project\}` is a project number, such as `12345`, and `{network\}` is the name of a VPC network in the project. See [Understanding network configuration options](https://cloud.google.com/cloud-build/docs/custom-workers/set-up-custom-worker-pool-environment#understanding_the_network_configuration_options) + */ + peeredNetwork?: string | null; + } + /** + * Notification is the container which holds the data that is relevant to this particular notification. + */ + export interface Schema$Notification { + /** + * The filter string to use for notification filtering. Currently, this is assumed to be a CEL program. See https://opensource.google/projects/cel for more. + */ + filter?: string | null; + /** + * Configuration for HTTP delivery. + */ + httpDelivery?: Schema$HTTPDelivery; + /** + * Configuration for Slack delivery. + */ + slackDelivery?: Schema$SlackDelivery; + /** + * Configuration for SMTP (email) delivery. + */ + smtpDelivery?: Schema$SMTPDelivery; + /** + * Escape hatch for users to supply custom delivery configs. + */ + structDelivery?: {[key: string]: any} | null; + } + /** + * NotifierConfig is the top-level configuration message. + */ + export interface Schema$NotifierConfig { + /** + * The API version of this configuration format. + */ + apiVersion?: string | null; + /** + * The type of notifier to use (e.g. SMTPNotifier). + */ + kind?: string | null; + /** + * Metadata for referring to/handling/deploying this notifier. + */ + metadata?: Schema$NotifierMetadata; + /** + * The actual configuration for this notifier. + */ + spec?: Schema$NotifierSpec; + } + /** + * NotifierMetadata contains the data which can be used to reference or describe this notifier. + */ + export interface Schema$NotifierMetadata { + /** + * The human-readable and user-given name for the notifier. For example: "repo-merge-email-notifier". + */ + name?: string | null; + /** + * The string representing the name and version of notifier to deploy. Expected to be of the form of "/:". For example: "gcr.io/my-project/notifiers/smtp:1.2.34". + */ + notifier?: string | null; + } + /** + * NotifierSecret is the container that maps a secret name (reference) to its Google Cloud Secret Manager resource path. + */ + export interface Schema$NotifierSecret { + /** + * Name is the local name of the secret, such as the verbatim string "my-smtp-password". + */ + name?: string | null; + /** + * Value is interpreted to be a resource path for fetching the actual (versioned) secret data for this secret. For example, this would be a Google Cloud Secret Manager secret version resource path like: "projects/my-project/secrets/my-secret/versions/latest". + */ + value?: string | null; + } + /** + * NotifierSecretRef contains the reference to a secret stored in the corresponding NotifierSpec. + */ + export interface Schema$NotifierSecretRef { + /** + * The value of `secret_ref` should be a `name` that is registered in a `Secret` in the `secrets` list of the `Spec`. + */ + secretRef?: string | null; + } + /** + * NotifierSpec is the configuration container for notifications. + */ + export interface Schema$NotifierSpec { + /** + * The configuration of this particular notifier. + */ + notification?: Schema$Notification; + /** + * Configurations for secret resources used by this particular notifier. + */ + secrets?: Schema$NotifierSecret[]; + } + /** + * This resource represents a long-running operation that is the result of a network API call. + */ + export interface Schema$Operation { + /** + * 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?: boolean | null; + /** + * The error result of the operation in case of failure or cancellation. + */ + error?: Schema$Status; + /** + * 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?: {[key: string]: any} | null; + /** + * 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 | null; + /** + * The normal response of the operation in case of success. 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?: {[key: string]: any} | null; + } + /** + * Location of the source in a Google Cloud Source Repository. + */ + export interface Schema$RepoSource { + /** + * Regex matching branches to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax + */ + branchName?: string | null; + /** + * Explicit commit SHA to build. + */ + commitSha?: string | null; + /** + * Directory, relative to the source root, in which to run the build. This must be a relative path. If a step's `dir` is specified and is an absolute path, this value is ignored for that step's execution. + */ + dir?: string | null; + /** + * Only trigger a build if the revision regex does NOT match the revision regex. + */ + invertRegex?: boolean | null; + /** + * ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed. + */ + projectId?: string | null; + /** + * Name of the Cloud Source Repository. + */ + repoName?: string | null; + /** + * Substitutions to use in a triggered build. Should only be used with RunBuildTrigger + */ + substitutions?: {[key: string]: string} | null; + /** + * Regex matching tags to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax + */ + tagName?: string | null; + } + /** + * Artifacts created by the build pipeline. + */ + export interface Schema$Results { + /** + * Path to the artifact manifest. Only populated when artifacts are uploaded. + */ + artifactManifest?: string | null; + /** + * Time to push all non-container artifacts. + */ + artifactTiming?: Schema$TimeSpan; + /** + * List of build step digests, in the order corresponding to build step indices. + */ + buildStepImages?: string[] | null; + /** + * List of build step outputs, produced by builder images, in the order corresponding to build step indices. [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders) can produce this output by writing to `$BUILDER_OUTPUT/output`. Only the first 4KB of data is stored. + */ + buildStepOutputs?: string[] | null; + /** + * Container images that were built as a part of the build. + */ + images?: Schema$BuiltImage[]; + /** + * Number of artifacts uploaded. Only populated when artifacts are uploaded. + */ + numArtifacts?: string | null; + } + /** + * Pairs a set of secret environment variables containing encrypted values with the Cloud KMS key to use to decrypt the value. Note: Use `kmsKeyName` with `available_secrets` instead of using `kmsKeyName` with `secret`. For instructions see: https://cloud.google.com/cloud-build/docs/securing-builds/use-encrypted-credentials. + */ + export interface Schema$Secret { + /** + * Cloud KMS key name to use to decrypt these envs. + */ + kmsKeyName?: string | null; + /** + * Map of environment variable name to its encrypted value. Secret environment variables must be unique across all of a build's secrets, and must be used by at least one build step. Values can be at most 64 KB in size. There can be at most 100 secret values across all of a build's secrets. + */ + secretEnv?: {[key: string]: string} | null; + } + /** + * Pairs a secret environment variable with a SecretVersion in Secret Manager. + */ + export interface Schema$SecretManagerSecret { + /** + * Environment variable name to associate with the secret. Secret environment variables must be unique across all of a build's secrets, and must be used by at least one build step. + */ + env?: string | null; + /** + * Resource name of the SecretVersion. In format: projects/x/secrets/x/versions/x + */ + versionName?: string | null; + } + /** + * Secrets and secret environment variables. + */ + export interface Schema$Secrets { + /** + * Secrets encrypted with KMS key and the associated secret environment variable. + */ + inline?: Schema$InlineSecret[]; + /** + * Secrets in Secret Manager and associated secret environment variable. + */ + secretManager?: Schema$SecretManagerSecret[]; + } + /** + * SlackDelivery is the delivery configuration for delivering Slack messages via webhooks. See Slack webhook documentation at: https://api.slack.com/messaging/webhooks. + */ + export interface Schema$SlackDelivery { + /** + * The secret reference for the Slack webhook URI for sending messages to a channel. + */ + webhookUri?: Schema$NotifierSecretRef; + } + /** + * SMTPDelivery is the delivery configuration for an SMTP (email) notification. + */ + export interface Schema$SMTPDelivery { + /** + * This is the SMTP account/email that appears in the `From:` of the email. If empty, it is assumed to be sender. + */ + fromAddress?: string | null; + /** + * The SMTP sender's password. + */ + password?: Schema$NotifierSecretRef; + /** + * The SMTP port of the server. + */ + port?: string | null; + /** + * This is the list of addresses to which we send the email (i.e. in the `To:` of the email). + */ + recipientAddresses?: string[] | null; + /** + * This is the SMTP account/email that is used to send the message. + */ + senderAddress?: string | null; + /** + * The address of the SMTP server. + */ + server?: string | null; + } + /** + * Location of the source in a supported storage service. + */ + export interface Schema$Source { + /** + * If provided, get the source from this location in a Cloud Source Repository. + */ + repoSource?: Schema$RepoSource; + /** + * If provided, get the source from this location in Google Cloud Storage. + */ + storageSource?: Schema$StorageSource; + /** + * If provided, get the source from this manifest in Google Cloud Storage. This feature is in Preview. + */ + storageSourceManifest?: Schema$StorageSourceManifest; + } + /** + * Provenance of the source. Ways to find the original source, or verify that some source was used for this build. + */ + export interface Schema$SourceProvenance { + /** + * Output only. Hash(es) of the build source, which can be used to verify that the original source integrity was maintained in the build. Note that `FileHashes` will only be populated if `BuildOptions` has requested a `SourceProvenanceHash`. The keys to this map are file paths used as build source and the values contain the hash values for those files. If the build source came in a single package such as a gzipped tarfile (`.tar.gz`), the `FileHash` will be for the single path to that file. + */ + fileHashes?: {[key: string]: Schema$FileHashes} | null; + /** + * A copy of the build's `source.repo_source`, if exists, with any revisions resolved. + */ + resolvedRepoSource?: Schema$RepoSource; + /** + * A copy of the build's `source.storage_source`, if exists, with any generations resolved. + */ + resolvedStorageSource?: Schema$StorageSource; + /** + * A copy of the build's `source.storage_source_manifest`, if exists, with any revisions resolved. This feature is in Preview. + */ + resolvedStorageSourceManifest?: Schema$StorageSourceManifest; + } + /** + * 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). + */ + export interface Schema$Status { + /** + * The status code, which should be an enum value of google.rpc.Code. + */ + code?: number | null; + /** + * A list of messages that carry the error details. There is a common set of message types for APIs to use. + */ + details?: Array<{[key: string]: any}> | null; + /** + * 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 | null; + } + /** + * Location of the source in an archive file in Google Cloud Storage. + */ + export interface Schema$StorageSource { + /** + * Google Cloud Storage bucket containing the source (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). + */ + bucket?: string | null; + /** + * Google Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used. + */ + generation?: string | null; + /** + * Google Cloud Storage object containing the source. This object must be a gzipped archive file (`.tar.gz`) containing source to build. + */ + object?: string | null; + } + /** + * Location of the source manifest in Google Cloud Storage. This feature is in Preview. + */ + export interface Schema$StorageSourceManifest { + /** + * Google Cloud Storage bucket containing the source manifest (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). + */ + bucket?: string | null; + /** + * Google Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used. + */ + generation?: string | null; + /** + * Google Cloud Storage object containing the source manifest. This object must be a JSON file. + */ + object?: string | null; + } + /** + * Start and end times for a build execution phase. + */ + export interface Schema$TimeSpan { + /** + * End of time span. + */ + endTime?: string | null; + /** + * Start of time span. + */ + startTime?: string | null; + } + /** + * Volume describes a Docker container volume which is mounted into build steps in order to persist files across build step execution. + */ + export interface Schema$Volume { + /** + * Name of the volume to mount. Volume names must be unique per build step and must be valid names for Docker volumes. Each named volume must be used by at least two build steps. + */ + name?: string | null; + /** + * Path at which to mount the volume. Paths must be absolute and cannot conflict with other volume paths on the same build step or with certain reserved volume paths. + */ + path?: string | null; + } + /** + * Defines the configuration to be used for creating workers in the pool. + */ + export interface Schema$WorkerConfig { + /** + * Size of the disk attached to the worker, in GB. See [Worker pool config file](https://cloud.google.com/cloud-build/docs/custom-workers/worker-pool-config-file). Specify a value of up to 1000. If `0` is specified, Cloud Build will use a standard disk size. + */ + diskSizeGb?: string | null; + /** + * Machine type of a worker, such as `n1-standard-1`. See [Worker pool config file](https://cloud.google.com/cloud-build/docs/custom-workers/worker-pool-config-file). If left blank, Cloud Build will use `n1-standard-1`. + */ + machineType?: string | null; + /** + * If true, workers are created without any public address, which prevents network egress to public IPs. + */ + noExternalIp?: boolean | null; + } + /** + * Configuration for a `WorkerPool` to run the builds. Workers provide a build environment where Cloud Build runs your builds. Cloud Build owns and maintains a pool of workers for general use. By default, when you submit a build, Cloud Build uses one of the workers from this pool. Builds that run in the default worker pool have access to the public internet. If your build needs access to resources on a private network, create and use a `WorkerPool` to run your builds. Custom `WorkerPool`s give your builds access to any single VPC network that you administer, including any on-prem resources connected to that VPC network. For an overview of custom worker pools, see [Custom workers overview](https://cloud.google.com/cloud-build/docs/custom-workers/custom-workers-overview). + */ + export interface Schema$WorkerPool { + /** + * Output only. Time at which the request to create the `WorkerPool` was received. + */ + createTime?: string | null; + /** + * Output only. Time at which the request to delete the `WorkerPool` was received. + */ + deleteTime?: string | null; + /** + * Output only. The resource name of the `WorkerPool`, with format `projects/{project\}/locations/{location\}/workerPools/{worker_pool\}`. The value of `{worker_pool\}` is provided by `worker_pool_id` in `CreateWorkerPool` request and the value of `{location\}` is determined by the endpoint accessed. + */ + name?: string | null; + /** + * Network configuration for the `WorkerPool`. + */ + networkConfig?: Schema$NetworkConfig; + /** + * Output only. `WorkerPool` state. + */ + state?: string | null; + /** + * Output only. Time at which the request to update the `WorkerPool` was received. + */ + updateTime?: string | null; + /** + * Worker configuration for the `WorkerPool`. + */ + workerConfig?: Schema$WorkerConfig; + } + + export class Resource$Projects { + context: APIRequestContext; + locations: Resource$Projects$Locations; + constructor(context: APIRequestContext) { + this.context = context; + this.locations = new Resource$Projects$Locations(this.context); + } + } + + export class Resource$Projects$Locations { + context: APIRequestContext; + operations: Resource$Projects$Locations$Operations; + workerPools: Resource$Projects$Locations$Workerpools; + constructor(context: APIRequestContext) { + this.context = context; + this.operations = new Resource$Projects$Locations$Operations( + this.context + ); + this.workerPools = new Resource$Projects$Locations$Workerpools( + this.context + ); + } + } + + export class Resource$Projects$Locations$Operations { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * 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`. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/cloudbuild.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const cloudbuild = google.cloudbuild('v1beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await cloudbuild.projects.locations.operations.cancel({ + * // The name of the operation resource to be cancelled. + * name: 'projects/my-project/locations/my-location/operations/my-operation', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // {} + * }, + * }); + * console.log(res.data); + * + * // Example response + * // {} + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + cancel( + params: Params$Resource$Projects$Locations$Operations$Cancel, + options: StreamMethodOptions + ): GaxiosPromise; + cancel( + params?: Params$Resource$Projects$Locations$Operations$Cancel, + options?: MethodOptions + ): GaxiosPromise; + cancel( + params: Params$Resource$Projects$Locations$Operations$Cancel, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + cancel( + params: Params$Resource$Projects$Locations$Operations$Cancel, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + cancel( + params: Params$Resource$Projects$Locations$Operations$Cancel, + callback: BodyResponseCallback + ): void; + cancel(callback: BodyResponseCallback): void; + cancel( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Operations$Cancel + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Operations$Cancel; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Operations$Cancel; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://cloudbuild.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}:cancel').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * 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. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/cloudbuild.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const cloudbuild = google.cloudbuild('v1beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await cloudbuild.projects.locations.operations.get({ + * // The name of the operation resource. + * name: 'projects/my-project/locations/my-location/operations/my-operation', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Projects$Locations$Operations$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Projects$Locations$Operations$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Operations$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Operations$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Operations$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Operations$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Operations$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Operations$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://cloudbuild.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Locations$Operations$Cancel + extends StandardParameters { + /** + * The name of the operation resource to be cancelled. + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$CancelOperationRequest; + } + export interface Params$Resource$Projects$Locations$Operations$Get + extends StandardParameters { + /** + * The name of the operation resource. + */ + name?: string; + } + + export class Resource$Projects$Locations$Workerpools { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Creates a `WorkerPool` to run the builds, and returns the new worker pool. NOTE: As of now, this method returns an `Operation` that is always complete. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/cloudbuild.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const cloudbuild = google.cloudbuild('v1beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await cloudbuild.projects.locations.workerPools.create({ + * // Required. The parent resource where this worker pool will be created. Format: `projects/{project\}/locations/{location\}`. + * parent: 'projects/my-project/locations/my-location', + * // Required. Immutable. The ID to use for the `WorkerPool`, which will become the final component of the resource name. This value should be 1-63 characters, and valid characters are /a-z-/. + * workerPoolId: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "createTime": "my_createTime", + * // "deleteTime": "my_deleteTime", + * // "name": "my_name", + * // "networkConfig": {}, + * // "state": "my_state", + * // "updateTime": "my_updateTime", + * // "workerConfig": {} + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + create( + params: Params$Resource$Projects$Locations$Workerpools$Create, + options: StreamMethodOptions + ): GaxiosPromise; + create( + params?: Params$Resource$Projects$Locations$Workerpools$Create, + options?: MethodOptions + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Locations$Workerpools$Create, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Locations$Workerpools$Create, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Locations$Workerpools$Create, + callback: BodyResponseCallback + ): void; + create(callback: BodyResponseCallback): void; + create( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Workerpools$Create + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Workerpools$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Workerpools$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://cloudbuild.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+parent}/workerPools').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Deletes a `WorkerPool`. NOTE: As of now, this method returns an `Operation` that is always complete. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/cloudbuild.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const cloudbuild = google.cloudbuild('v1beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await cloudbuild.projects.locations.workerPools.delete({ + * // Required. The name of the `WorkerPool` to delete. Format: `projects/{project\}/locations/{workerPool\}/workerPools/{workerPool\}`. + * name: 'projects/my-project/locations/my-location/workerPools/my-workerPool', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + delete( + params: Params$Resource$Projects$Locations$Workerpools$Delete, + options: StreamMethodOptions + ): GaxiosPromise; + delete( + params?: Params$Resource$Projects$Locations$Workerpools$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Locations$Workerpools$Delete, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Workerpools$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Workerpools$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Workerpools$Delete + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Workerpools$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Workerpools$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://cloudbuild.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Returns details of a `WorkerPool`. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/cloudbuild.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const cloudbuild = google.cloudbuild('v1beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await cloudbuild.projects.locations.workerPools.get({ + * // Required. The name of the `WorkerPool` to retrieve. Format: `projects/{project\}/locations/{location\}/workerPools/{workerPool\}`. + * name: 'projects/my-project/locations/my-location/workerPools/my-workerPool', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "createTime": "my_createTime", + * // "deleteTime": "my_deleteTime", + * // "name": "my_name", + * // "networkConfig": {}, + * // "state": "my_state", + * // "updateTime": "my_updateTime", + * // "workerConfig": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Projects$Locations$Workerpools$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Projects$Locations$Workerpools$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Workerpools$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Workerpools$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Workerpools$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Workerpools$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Workerpools$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Workerpools$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://cloudbuild.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Lists `WorkerPool`s in the given project. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/cloudbuild.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const cloudbuild = google.cloudbuild('v1beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await cloudbuild.projects.locations.workerPools.list({ + * // Required. The parent of the collection of `WorkerPools`. Format: `projects/{project\}/locations/location`. + * parent: 'projects/my-project/locations/my-location', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "workerPools": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Projects$Locations$Workerpools$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Projects$Locations$Workerpools$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$Workerpools$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Workerpools$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Workerpools$List, + callback: BodyResponseCallback + ): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Workerpools$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Workerpools$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Workerpools$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://cloudbuild.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+parent}/workerPools').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Updates a `WorkerPool`. NOTE: As of now, this method returns an `Operation` that is always complete. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/cloudbuild.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const cloudbuild = google.cloudbuild('v1beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await cloudbuild.projects.locations.workerPools.patch({ + * // Output only. The resource name of the `WorkerPool`, with format `projects/{project\}/locations/{location\}/workerPools/{worker_pool\}`. The value of `{worker_pool\}` is provided by `worker_pool_id` in `CreateWorkerPool` request and the value of `{location\}` is determined by the endpoint accessed. + * name: 'projects/my-project/locations/my-location/workerPools/my-workerPool', + * // A mask specifying which fields in `WorkerPool` to update. + * updateMask: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "createTime": "my_createTime", + * // "deleteTime": "my_deleteTime", + * // "name": "my_name", + * // "networkConfig": {}, + * // "state": "my_state", + * // "updateTime": "my_updateTime", + * // "workerConfig": {} + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + patch( + params: Params$Resource$Projects$Locations$Workerpools$Patch, + options: StreamMethodOptions + ): GaxiosPromise; + patch( + params?: Params$Resource$Projects$Locations$Workerpools$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Locations$Workerpools$Patch, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Locations$Workerpools$Patch, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Locations$Workerpools$Patch, + callback: BodyResponseCallback + ): void; + patch(callback: BodyResponseCallback): void; + patch( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Workerpools$Patch + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Workerpools$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Workerpools$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://cloudbuild.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Locations$Workerpools$Create + extends StandardParameters { + /** + * Required. The parent resource where this worker pool will be created. Format: `projects/{project\}/locations/{location\}`. + */ + parent?: string; + /** + * Required. Immutable. The ID to use for the `WorkerPool`, which will become the final component of the resource name. This value should be 1-63 characters, and valid characters are /a-z-/. + */ + workerPoolId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$WorkerPool; + } + export interface Params$Resource$Projects$Locations$Workerpools$Delete + extends StandardParameters { + /** + * Required. The name of the `WorkerPool` to delete. Format: `projects/{project\}/locations/{workerPool\}/workerPools/{workerPool\}`. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Workerpools$Get + extends StandardParameters { + /** + * Required. The name of the `WorkerPool` to retrieve. Format: `projects/{project\}/locations/{location\}/workerPools/{workerPool\}`. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Workerpools$List + extends StandardParameters { + /** + * Required. The parent of the collection of `WorkerPools`. Format: `projects/{project\}/locations/location`. + */ + parent?: string; + } + export interface Params$Resource$Projects$Locations$Workerpools$Patch + extends StandardParameters { + /** + * Output only. The resource name of the `WorkerPool`, with format `projects/{project\}/locations/{location\}/workerPools/{worker_pool\}`. The value of `{worker_pool\}` is provided by `worker_pool_id` in `CreateWorkerPool` request and the value of `{location\}` is determined by the endpoint accessed. + */ + name?: string; + /** + * A mask specifying which fields in `WorkerPool` to update. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$WorkerPool; + } +} diff --git a/src/apis/cloudchannel/v1.ts b/src/apis/cloudchannel/v1.ts index ad254395573..9d6d5367e02 100644 --- a/src/apis/cloudchannel/v1.ts +++ b/src/apis/cloudchannel/v1.ts @@ -134,7 +134,7 @@ export namespace cloudchannel_v1 { */ export interface Schema$GoogleCloudChannelV1ActivateEntitlementRequest { /** - * 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. 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 the original operation with the same request ID was received, and if so, will ignore the second request. The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) with the exception that zero UUID is not supported (`00000000-0000-0000-0000-000000000000`). + * Optional. You can specify an optional unique request ID, and if you need to retry your request, the server will know to ignore the request if it's complete. For example, 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 it received the original operation with the same request ID. If it did, it will ignore the second request. The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) with the exception that zero UUID is not supported (`00000000-0000-0000-0000-000000000000`). */ requestId?: string | null; } @@ -375,11 +375,11 @@ export namespace cloudchannel_v1 { entitlementEvent?: Schema$GoogleCloudChannelV1alpha1EntitlementEvent; } /** - * Response message for CloudChannelService.TransferEntitlements. This will be put into the response field of google.longrunning.Operation. + * Response message for CloudChannelService.TransferEntitlements. This is put in the response field of google.longrunning.Operation. */ export interface Schema$GoogleCloudChannelV1alpha1TransferEntitlementsResponse { /** - * The entitlements that have been transferred. + * The transferred entitlements. */ entitlements?: Schema$GoogleCloudChannelV1alpha1Entitlement[]; } @@ -431,7 +431,7 @@ export namespace cloudchannel_v1 { */ export interface Schema$GoogleCloudChannelV1CancelEntitlementRequest { /** - * 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. 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 the original operation with the same request ID was received, and if so, will ignore the second request. The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) with the exception that zero UUID is not supported (`00000000-0000-0000-0000-000000000000`). + * Optional. You can specify an optional unique request ID, and if you need to retry your request, the server will know to ignore the request if it's complete. For example, 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 it received the original operation with the same request ID. If it did, it will ignore the second request. The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) with the exception that zero UUID is not supported (`00000000-0000-0000-0000-000000000000`). */ requestId?: string | null; } @@ -452,7 +452,7 @@ export namespace cloudchannel_v1 { */ purchaseOrderId?: string | null; /** - * 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. 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 the original operation with the same request ID was received, and if so, will ignore the second request. The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) with the exception that zero UUID is not supported (`00000000-0000-0000-0000-000000000000`). + * Optional. You can specify an optional unique request ID, and if you need to retry your request, the server will know to ignore the request if it's complete. For example, 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 it received the original operation with the same request ID. If it did, it will ignore the second request. The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) with the exception that zero UUID is not supported (`00000000-0000-0000-0000-000000000000`). */ requestId?: string | null; } @@ -461,7 +461,7 @@ export namespace cloudchannel_v1 { */ export interface Schema$GoogleCloudChannelV1ChangeParametersRequest { /** - * Required. Entitlement parameters to update. Only editable parameters are allowed to be changed. + * Required. Entitlement parameters to update. You can only change editable parameters. */ parameters?: Schema$GoogleCloudChannelV1Parameter[]; /** @@ -469,7 +469,7 @@ export namespace cloudchannel_v1 { */ purchaseOrderId?: string | null; /** - * 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. 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 the original operation with the same request ID was received, and if so, will ignore the second request. The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) with the exception that zero UUID is not supported (`00000000-0000-0000-0000-000000000000`). + * Optional. You can specify an optional unique request ID, and if you need to retry your request, the server will know to ignore the request if it's complete. For example, 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 it received the original operation with the same request ID. If it did, it will ignore the second request. The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) with the exception that zero UUID is not supported (`00000000-0000-0000-0000-000000000000`). */ requestId?: string | null; } @@ -482,7 +482,7 @@ export namespace cloudchannel_v1 { */ renewalSettings?: Schema$GoogleCloudChannelV1RenewalSettings; /** - * Optional. A 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. 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 the original operation with the same request ID was received, and if so, will ignore the second request. The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) with the exception that zero UUID is not supported (`00000000-0000-0000-0000-000000000000`). + * Optional. You can specify an optional unique request ID, and if you need to retry your request, the server will know to ignore the request if it's complete. For example, 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 it received the original operation with the same request ID. If it did, it will ignore the second request. The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) with the exception that zero UUID is not supported (`00000000-0000-0000-0000-000000000000`). */ requestId?: string | null; } @@ -528,7 +528,7 @@ export namespace cloudchannel_v1 { */ export interface Schema$GoogleCloudChannelV1CheckCloudIdentityAccountsExistRequest { /** - * Required. Domain for which the Cloud Identity account customer is fetched. + * Required. Domain to fetch for Cloud Identity account customer. */ domain?: string | null; } @@ -542,23 +542,23 @@ export namespace cloudchannel_v1 { cloudIdentityAccounts?: Schema$GoogleCloudChannelV1CloudIdentityCustomerAccount[]; } /** - * Entity representing a Cloud Identity account which may or may not be associated with a Channel Services API partner. + * Entity representing a Cloud Identity account that may be associated with a Channel Services API partner. */ export interface Schema$GoogleCloudChannelV1CloudIdentityCustomerAccount { /** - * Cloud Identity ID of the customer. This field is populated ONLY if existing = true. + * If existing = true, the Cloud Identity ID of the customer. */ customerCloudIdentityId?: string | null; /** - * Name of the customer that owns the Cloud Identity account. This field is populated ONLY if owned = true. The customer_name takes the format: accounts/{account_id\}/customers/{customer_id\} + * If owned = true, the name of the customer that owns the Cloud Identity account. Customer_name uses the format: accounts/{account_id\}/customers/{customer_id\} */ customerName?: string | null; /** - * True if a Cloud Identity account exists for a specific domain. + * Returns true if a Cloud Identity account exists for a specific domain. */ existing?: boolean | null; /** - * True if the Cloud Identity account is associated with a customer belonging to the Channel Services partner making the API call. + * Returns true if the Cloud Identity account is associated with a customer of the Channel Services partner. */ owned?: boolean | null; } @@ -663,7 +663,7 @@ export namespace cloudchannel_v1 { */ entitlement?: Schema$GoogleCloudChannelV1Entitlement; /** - * 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. 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 the original operation with the same request ID was received, and if so, will ignore the second request. The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) with the exception that zero UUID is not supported (`00000000-0000-0000-0000-000000000000`). + * Optional. You can specify an optional unique request ID, and if you need to retry your request, the server will know to ignore the request if it's complete. For example, 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 it received the original operation with the same request ID. If it did, it will ignore the second request. The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) with the exception that zero UUID is not supported (`00000000-0000-0000-0000-000000000000`). */ requestId?: string | null; } @@ -851,7 +851,7 @@ export namespace cloudchannel_v1 { */ export interface Schema$GoogleCloudChannelV1ListCustomersResponse { /** - * The customers belonging to the reseller or distributor. + * The customers belonging to a reseller or distributor. */ customers?: Schema$GoogleCloudChannelV1Customer[]; /** @@ -864,11 +864,11 @@ export namespace cloudchannel_v1 { */ export interface Schema$GoogleCloudChannelV1ListEntitlementsResponse { /** - * The entitlements belonging to the reseller's customer. + * The reseller customer's entitlements. */ entitlements?: Schema$GoogleCloudChannelV1Entitlement[]; /** - * A token to List next page of results. Pass to ListEntitlementsRequest.page_token to obtain that page. + * A token to list the next page of results. Pass to ListEntitlementsRequest.page_token to obtain that page. */ nextPageToken?: string | null; } @@ -963,23 +963,23 @@ export namespace cloudchannel_v1 { */ cloudIdentityId?: string | null; /** - * A reseller should create a customer and use the resource name of the created customer here. + * A reseller should create a customer and use the resource name of that customer here. */ customerName?: string | null; /** - * The BCP-47 language code, such as "en-US". If specified, the response will be localized to the corresponding language code. Default is "en-US". + * The BCP-47 language code. For example, "en-US". The response will localize in the corresponding language code, if specified. The default value is "en-US". */ languageCode?: string | null; /** - * Requested page size. Server might return fewer results than requested. If unspecified, at most 100 Offers will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. + * Requested page size. Server might return fewer results than requested. If unspecified, returns at most 100 offers. The maximum value is 1000; the server will coerce values above 1000. */ pageSize?: number | null; /** - * A token identifying a page of results, if other than the first one. Typically obtained via ListTransferableOffersResponse.next_page_token of the previous CloudChannelService.ListTransferableOffers call. + * A token for a page of results other than the first page. Obtained using ListTransferableOffersResponse.next_page_token of the previous CloudChannelService.ListTransferableOffers call. */ pageToken?: string | null; /** - * Required. SKU for which the Offers are being looked up. + * Required. The SKU to look up Offers for. */ sku?: string | null; } @@ -1001,7 +1001,7 @@ export namespace cloudchannel_v1 { */ export interface Schema$GoogleCloudChannelV1ListTransferableSkusRequest { /** - * This token is generated by the Super Admin of the resold customer to authorize a reseller to access their Cloud Identity and purchase entitlements on their behalf. This token can be omitted once the authorization is generated. See https://support.google.com/a/answer/7643790 for more details. + * The super admin of the resold customer generates this token to authorize a reseller to access their Cloud Identity and purchase entitlements on their behalf. You can omit this token after authorization. See https://support.google.com/a/answer/7643790 for more details. */ authToken?: string | null; /** @@ -1009,19 +1009,19 @@ export namespace cloudchannel_v1 { */ cloudIdentityId?: string | null; /** - * A reseller is required to create a customer and use the resource name of the created customer here. The customer_name takes the format: accounts/{account_id\}/customers/{customer_id\} + * A reseller is required to create a customer and use the resource name of the created customer here. Customer_name uses the format: accounts/{account_id\}/customers/{customer_id\} */ customerName?: string | null; /** - * The BCP-47 language code, such as "en-US". If specified, the response will be localized to the corresponding language code. Default is "en-US". Optional. + * The BCP-47 language code. For example, "en-US". The response will localize in the corresponding language code, if specified. The default value is "en-US". Optional. */ languageCode?: string | null; /** - * Requested page size. Server might return fewer results than requested. If unspecified, at most 100 SKUs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. Optional. + * The requested page size. Server might return fewer results than requested. If unspecified, returns at most 100 SKUs. The maximum value is 1000; the server will coerce values above 1000. Optional. */ pageSize?: number | null; /** - * A token identifying a page of results, if other than the first one. Typically obtained via ListTransferableSkusResponse.next_page_token of the previous CloudChannelService.ListTransferableSkus call. Optional. + * A token for a page of results other than the first page. Obtained using ListTransferableSkusResponse.next_page_token of the previous CloudChannelService.ListTransferableSkus call. Optional. */ pageToken?: string | null; } @@ -1034,7 +1034,7 @@ export namespace cloudchannel_v1 { */ nextPageToken?: string | null; /** - * Information about existing SKUs for a customer that would need to be transferred. + * Information about existing SKUs for a customer that needs a transfer. */ transferableSkus?: Schema$GoogleCloudChannelV1TransferableSku[]; } @@ -1312,7 +1312,7 @@ export namespace cloudchannel_v1 { */ user?: Schema$GoogleCloudChannelV1AdminUser; /** - * If set, validate the request and preview the review, but do not actually post it. + * Validate the request and preview the review, but do not post it. */ validateOnly?: boolean | null; } @@ -1334,7 +1334,7 @@ export namespace cloudchannel_v1 { skuId?: string | null; } /** - * Offer that can be puchased for a customer. This is used in ListPurchasableOffer API response. + * Offer that you can purchase for a customer. This is used in the ListPurchasableOffer API response. */ export interface Schema$GoogleCloudChannelV1PurchasableOffer { /** @@ -1343,7 +1343,7 @@ export namespace cloudchannel_v1 { offer?: Schema$GoogleCloudChannelV1Offer; } /** - * SKU that can be used for a puchase. This is used in ListPurchasableSku API response. + * SKU that you can purchase. This is used in ListPurchasableSku API response. */ export interface Schema$GoogleCloudChannelV1PurchasableSku { /** @@ -1356,7 +1356,7 @@ export namespace cloudchannel_v1 { */ export interface Schema$GoogleCloudChannelV1RegisterSubscriberRequest { /** - * Required. Service account which will provide subscriber access to the registered topic. + * Required. Service account that provides subscriber access to the registered topic. */ serviceAccount?: string | null; } @@ -1365,7 +1365,7 @@ export namespace cloudchannel_v1 { */ export interface Schema$GoogleCloudChannelV1RegisterSubscriberResponse { /** - * Name of the topic to which the subscriber will listen to. + * Name of the topic the subscriber will listen to. */ topic?: string | null; } @@ -1412,7 +1412,7 @@ export namespace cloudchannel_v1 { */ export interface Schema$GoogleCloudChannelV1StartPaidServiceRequest { /** - * 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. 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 the original operation with the same request ID was received, and if so, will ignore the second request. The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) with the exception that zero UUID is not supported (`00000000-0000-0000-0000-000000000000`). + * Optional. You can specify an optional unique request ID, and if you need to retry your request, the server will know to ignore the request if it's complete. For example, 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 it received the original operation with the same request ID. If it did, it will ignore the second request. The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) with the exception that zero UUID is not supported (`00000000-0000-0000-0000-000000000000`). */ requestId?: string | null; } @@ -1434,7 +1434,7 @@ export namespace cloudchannel_v1 { */ export interface Schema$GoogleCloudChannelV1SuspendEntitlementRequest { /** - * 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. 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 the original operation with the same request ID was received, and if so, will ignore the second request. The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) with the exception that zero UUID is not supported (`00000000-0000-0000-0000-000000000000`). + * Optional. You can specify an optional unique request ID, and if you need to retry your request, the server will know to ignore the request if it's complete. For example, 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 it received the original operation with the same request ID. If it did, it will ignore the second request. The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) with the exception that zero UUID is not supported (`00000000-0000-0000-0000-000000000000`). */ requestId?: string | null; } @@ -1482,24 +1482,24 @@ export namespace cloudchannel_v1 { */ export interface Schema$GoogleCloudChannelV1TransferEntitlementsRequest { /** - * This token is generated by the Super Admin of the resold customer to authorize a reseller to access their Cloud Identity and purchase entitlements on their behalf. This token can be omitted once the authorization is generated. See https://support.google.com/a/answer/7643790 for more details. + * The super admin of the resold customer generates this token to authorize a reseller to access their Cloud Identity and purchase entitlements on their behalf. You can omit this token after authorization. See https://support.google.com/a/answer/7643790 for more details. */ authToken?: string | null; /** - * Required. The new entitlements to be created or transferred. + * Required. The new entitlements to create or transfer. */ entitlements?: Schema$GoogleCloudChannelV1Entitlement[]; /** - * 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. 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 the original operation with the same request ID was received, and if so, will ignore the second request. The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) with the exception that zero UUID is not supported (`00000000-0000-0000-0000-000000000000`). + * Optional. You can specify an optional unique request ID, and if you need to retry your request, the server will know to ignore the request if it's complete. For example, 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 it received the original operation with the same request ID. If it did, it will ignore the second request. The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) with the exception that zero UUID is not supported (`00000000-0000-0000-0000-000000000000`). */ requestId?: string | null; } /** - * Response message for CloudChannelService.TransferEntitlements. This will be put into the response field of google.longrunning.Operation. + * Response message for CloudChannelService.TransferEntitlements. This is put in the response field of google.longrunning.Operation. */ export interface Schema$GoogleCloudChannelV1TransferEntitlementsResponse { /** - * The entitlements that have been transferred. + * The transferred entitlements. */ entitlements?: Schema$GoogleCloudChannelV1Entitlement[]; } @@ -1508,11 +1508,11 @@ export namespace cloudchannel_v1 { */ export interface Schema$GoogleCloudChannelV1TransferEntitlementsToGoogleRequest { /** - * Required. The entitlements to be transferred to Google. + * Required. The entitlements to transfer to Google. */ entitlements?: Schema$GoogleCloudChannelV1Entitlement[]; /** - * 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. 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 the original operation with the same request ID was received, and if so, will ignore the second request. The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) with the exception that zero UUID is not supported (`00000000-0000-0000-0000-000000000000`). + * Optional. You can specify an optional unique request ID, and if you need to retry your request, the server will know to ignore the request if it's complete. For example, 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 it received the original operation with the same request ID. If it did, it will ignore the second request. The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) with the exception that zero UUID is not supported (`00000000-0000-0000-0000-000000000000`). */ requestId?: string | null; } @@ -1534,7 +1534,7 @@ export namespace cloudchannel_v1 { */ export interface Schema$GoogleCloudChannelV1UnregisterSubscriberRequest { /** - * Required. Service account which will be unregistered from getting subscriber access to the topic. + * Required. Service account to unregister from subscriber access to the topic. */ serviceAccount?: string | null; } @@ -1543,7 +1543,7 @@ export namespace cloudchannel_v1 { */ export interface Schema$GoogleCloudChannelV1UnregisterSubscriberResponse { /** - * Name of the topic from which the service account subscriber access has been removed. + * Name of the topic the service account subscriber access was removed from. */ topic?: string | null; } @@ -1552,11 +1552,11 @@ export namespace cloudchannel_v1 { */ export interface Schema$GoogleCloudChannelV1UpdateChannelPartnerLinkRequest { /** - * Required. The channel partner link to update. Only field channel_partner_link.link_state is allowed to be updated. + * Required. The channel partner link to update. Only channel_partner_link.link_state is allowed for updates. */ channelPartnerLink?: Schema$GoogleCloudChannelV1ChannelPartnerLink; /** - * Required. The update mask that applies to the resource. The only allowable value for update mask is channel_partner_link.link_state. + * Required. The update mask that applies to the resource. The only allowable value for an update mask is channel_partner_link.link_state. */ updateMask?: string | null; } @@ -1726,7 +1726,7 @@ export namespace cloudchannel_v1 { } /** - * Confirms the existence of Cloud Identity accounts, based on the domain and whether the Cloud Identity accounts are owned by the reseller. Possible Error Codes: * PERMISSION_DENIED: If the reseller account making the request and the reseller account being queried for are different. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. * INVALID_VALUE: Invalid domain value in the request. Return Value: List of CloudIdentityCustomerAccount resources for the domain. List may be empty. Note: in the v1alpha1 version of the API, a NOT_FOUND error is returned if no CloudIdentityCustomerAccount resources match the domain. + * Confirms the existence of Cloud Identity accounts based on the domain and if the Cloud Identity accounts are owned by the reseller. Possible error codes: * PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * INVALID_VALUE: Invalid domain value in the request. Return value: A list of CloudIdentityCustomerAccount resources for the domain (may be empty) Note: in the v1alpha1 version of the API, a NOT_FOUND error returns if no CloudIdentityCustomerAccount resources match the domain. * @example * ```js * // Before running the sample: @@ -1752,7 +1752,7 @@ export namespace cloudchannel_v1 { * * // Do the magic * const res = await cloudchannel.accounts.checkCloudIdentityAccountsExist({ - * // Required. The resource name of the reseller account. The parent takes the format: accounts/{account_id\} + * // Required. The reseller account's resource name. Parent uses the format: accounts/{account_id\} * parent: 'accounts/my-account', * * // Request body metadata @@ -1871,7 +1871,7 @@ export namespace cloudchannel_v1 { } /** - * Lists service accounts with subscriber privileges on the Cloud Pub/Sub topic created for this Channel Services account. Possible Error Codes: * PERMISSION_DENIED: If the reseller account making the request and the reseller account being provided are different, or if the account is not a super admin. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. * NOT_FOUND: If the topic resource doesn't exist. * INTERNAL: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support. Return Value: List of service email addresses if successful, otherwise error is returned. + * Lists service accounts with subscriber privileges on the Cloud Pub/Sub topic created for this Channel Services account. Possible error codes: * PERMISSION_DENIED: The reseller account making the request and the provided reseller account are different, or the impersonated user is not a super admin. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: The topic resource doesn't exist. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: A list of service email addresses. * @example * ```js * // Before running the sample: @@ -1899,7 +1899,7 @@ export namespace cloudchannel_v1 { * const res = await cloudchannel.accounts.listSubscribers({ * // Required. Resource name of the account. * account: 'accounts/my-account', - * // Optional. The maximum number of service accounts to return. The service may return fewer than this value. If unspecified, at most 100 service accounts will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. + * // Optional. The maximum number of service accounts to return. The service may return fewer than this value. If unspecified, returns at most 100 service accounts. The maximum value is 1000; the server will coerce values above 1000. * pageSize: 'placeholder-value', * // Optional. A page token, received from a previous `ListSubscribers` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListSubscribers` must match the call that provided the page token. * pageToken: 'placeholder-value', @@ -2015,7 +2015,7 @@ export namespace cloudchannel_v1 { } /** - * List TransferableOffers of a customer based on Cloud Identity ID or Customer Name in the request. This method is used when a reseller gets the entitlement information of a customer that is not owned. The reseller should provide the customer's Cloud Identity ID or Customer Name. Possible Error Codes: * PERMISSION_DENIED: Appears because of one of the following: * If the customer doesn't belong to the reseller and no auth token or invalid auth token is supplied. * If the reseller account making the request and the reseller account being queried for are different. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. Return Value: List of TransferableOffer for the given customer and SKU. + * List TransferableOffers of a customer based on Cloud Identity ID or Customer Name in the request. Use this method when a reseller gets the entitlement information of an unowned customer. The reseller should provide the customer's Cloud Identity ID or Customer Name. Possible error codes: * PERMISSION_DENIED: * The customer doesn't belong to the reseller and has no auth token. * The supplied auth token is invalid. * The reseller account making the request is different from the reseller account in the query. * INVALID_ARGUMENT: Required request parameters are missing or invalid. Return value: List of TransferableOffer for the given customer and SKU. * @example * ```js * // Before running the sample: @@ -2167,7 +2167,7 @@ export namespace cloudchannel_v1 { } /** - * List TransferableSkus of a customer based on Cloud Identity ID or Customer Name in the request. This method is used when a reseller lists the entitlements information of a customer that is not owned. The reseller should provide the customer's Cloud Identity ID or Customer Name. Possible Error Codes: * PERMISSION_DENIED: Appears because of one of the following - * The customer doesn't belong to the reseller and no auth token. * The supplied auth token is invalid. * The reseller account making the request and the queries reseller account are different. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. Return Value: List of TransferableSku for the given customer. + * List TransferableSkus of a customer based on the Cloud Identity ID or Customer Name in the request. Use this method to list the entitlements information of an unowned customer. You should provide the customer's Cloud Identity ID or Customer Name. Possible error codes: * PERMISSION_DENIED: * The customer doesn't belong to the reseller and has no auth token. * The supplied auth token is invalid. * The reseller account making the request is different from the reseller account in the query. * INVALID_ARGUMENT: Required request parameters are missing or invalid. Return value: A list of the customer's TransferableSku. * @example * ```js * // Before running the sample: @@ -2193,7 +2193,7 @@ export namespace cloudchannel_v1 { * * // Do the magic * const res = await cloudchannel.accounts.listTransferableSkus({ - * // Required. The resource name of the reseller's account. The parent takes the format: accounts/{account_id\} + * // Required. The reseller account's resource name. Parent uses the format: accounts/{account_id\} * parent: 'accounts/my-account', * * // Request body metadata @@ -2319,7 +2319,7 @@ export namespace cloudchannel_v1 { } /** - * Registers a service account with subscriber privileges on the Cloud Pub/Sub topic created for this Channel Services account. Once you create a subscriber, you will get the events as per SubscriberEvent Possible Error Codes: * PERMISSION_DENIED: If the reseller account making the request and the reseller account being provided are different, or if the impersonated user is not a super admin. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. * INTERNAL: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support. Return Value: Topic name with service email address registered if successful, otherwise error is returned. + * Registers a service account with subscriber privileges on the Cloud Pub/Sub topic for this Channel Services account. After you create a subscriber, you get the events through SubscriberEvent Possible error codes: * PERMISSION_DENIED: The reseller account making the request and the provided reseller account are different, or the impersonated user is not a super admin. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: The topic name with the registered service email address. * @example * ```js * // Before running the sample: @@ -2465,7 +2465,7 @@ export namespace cloudchannel_v1 { } /** - * Unregisters a service account with subscriber privileges on the Cloud Pub/Sub topic created for this Channel Services account. If there are no more service account left with sunbscriber privileges, the topic will be deleted. You can check this by calling ListSubscribers api. Possible Error Codes: * PERMISSION_DENIED: If the reseller account making the request and the reseller account being provided are different, or if the impersonated user is not a super admin. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. * NOT_FOUND: If the topic resource doesn't exist. * INTERNAL: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support. Return Value: Topic name from which service email address has been unregistered if successful, otherwise error is returned. If the service email was already not associated with the topic, the success response will be returned. + * Unregisters a service account with subscriber privileges on the Cloud Pub/Sub topic created for this Channel Services account. If there are no service accounts left with subscriber privileges, this deletes the topic. You can call ListSubscribers to check for these accounts. Possible error codes: * PERMISSION_DENIED: The reseller account making the request and the provided reseller account are different, or the impersonated user is not a super admin. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: The topic resource doesn't exist. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: The topic name that unregistered the service email address. Returns a success response if the service email address wasn't registered with the topic. * @example * ```js * // Before running the sample: @@ -2614,7 +2614,7 @@ export namespace cloudchannel_v1 { export interface Params$Resource$Accounts$Checkcloudidentityaccountsexist extends StandardParameters { /** - * Required. The resource name of the reseller account. The parent takes the format: accounts/{account_id\} + * Required. The reseller account's resource name. Parent uses the format: accounts/{account_id\} */ parent?: string; @@ -2630,7 +2630,7 @@ export namespace cloudchannel_v1 { */ account?: string; /** - * Optional. The maximum number of service accounts to return. The service may return fewer than this value. If unspecified, at most 100 service accounts will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. + * Optional. The maximum number of service accounts to return. The service may return fewer than this value. If unspecified, returns at most 100 service accounts. The maximum value is 1000; the server will coerce values above 1000. */ pageSize?: number; /** @@ -2653,7 +2653,7 @@ export namespace cloudchannel_v1 { export interface Params$Resource$Accounts$Listtransferableskus extends StandardParameters { /** - * Required. The resource name of the reseller's account. The parent takes the format: accounts/{account_id\} + * Required. The reseller account's resource name. Parent uses the format: accounts/{account_id\} */ parent?: string; @@ -2689,12 +2689,16 @@ export namespace cloudchannel_v1 { export class Resource$Accounts$Channelpartnerlinks { context: APIRequestContext; + customers: Resource$Accounts$Channelpartnerlinks$Customers; constructor(context: APIRequestContext) { this.context = context; + this.customers = new Resource$Accounts$Channelpartnerlinks$Customers( + this.context + ); } /** - * Initiates a channel partner link between a distributor and a reseller or between resellers in an n-tier reseller channel. To accept the invite, the invited partner should follow the invite_link_uri provided in the response. If the link creation is accepted, a valid link is set up between the two involved parties. To call this method, you must be a distributor. Possible Error Codes: * PERMISSION_DENIED: If the reseller account making the request and the reseller account being queried for are different. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. * ALREADY_EXISTS: If the ChannelPartnerLink sent in the request already exists. * NOT_FOUND: If no Cloud Identity customer exists for domain provided. * INTERNAL: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support. Return Value: Newly created ChannelPartnerLink resource if successful, otherwise error is returned. + * Initiates a channel partner link between a distributor and a reseller, or between resellers in an n-tier reseller channel. Invited partners need to follow the invite_link_uri provided in the response to accept. After accepting the invitation, a link is set up between the two parties. You must be a distributor to call this method. Possible error codes: * PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * ALREADY_EXISTS: The ChannelPartnerLink sent in the request already exists. * NOT_FOUND: No Cloud Identity customer exists for provided domain. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: The new ChannelPartnerLink resource. * @example * ```js * // Before running the sample: @@ -2720,7 +2724,7 @@ export namespace cloudchannel_v1 { * * // Do the magic * const res = await cloudchannel.accounts.channelPartnerLinks.create({ - * // Required. The resource name of reseller's account for which to create a channel partner link. The parent takes the format: accounts/{account_id\} + * // Required. Create a channel partner link for the provided reseller account's resource name. Parent uses the format: accounts/{account_id\} * parent: 'accounts/my-account', * * // Request body metadata @@ -2854,7 +2858,7 @@ export namespace cloudchannel_v1 { } /** - * Returns a requested ChannelPartnerLink resource. To call this method, you must be a distributor. Possible Error Codes: * PERMISSION_DENIED: If the reseller account making the request and the reseller account being queried for are different. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. * NOT_FOUND: ChannelPartnerLink resource not found. Results due invalid channel partner link name. Return Value: ChannelPartnerLink resource if found, otherwise returns an error. + * Returns a requested ChannelPartnerLink resource. You must be a distributor to call this method. Possible error codes: * PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: ChannelPartnerLink resource not found because of an invalid channel partner link name. Return value: The ChannelPartnerLink resource. * @example * ```js * // Before running the sample: @@ -2880,7 +2884,7 @@ export namespace cloudchannel_v1 { * * // Do the magic * const res = await cloudchannel.accounts.channelPartnerLinks.get({ - * // Required. The resource name of the channel partner link to retrieve. The name takes the format: accounts/{account_id\}/channelPartnerLinks/{id\} where {id\} is the Cloud Identity ID of the partner. + * // Required. The resource name of the channel partner link to retrieve. Name uses the format: accounts/{account_id\}/channelPartnerLinks/{id\} where {id\} is the Cloud Identity ID of the partner. * name: 'accounts/my-account/channelPartnerLinks/my-channelPartnerLink', * // Optional. The level of granularity the ChannelPartnerLink will display. * view: 'placeholder-value', @@ -2998,7 +3002,7 @@ export namespace cloudchannel_v1 { } /** - * List ChannelPartnerLinks belonging to a distributor. To call this method, you must be a distributor. Possible Error Codes: * PERMISSION_DENIED: If the reseller account making the request and the reseller account being queried for are different. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. Return Value: If successful, returns the list of ChannelPartnerLink resources for the distributor account, otherwise returns an error. + * List ChannelPartnerLinks belonging to a distributor. You must be a distributor to call this method. Possible error codes: * PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * INVALID_ARGUMENT: Required request parameters are missing or invalid. Return value: The list of the distributor account's ChannelPartnerLink resources. * @example * ```js * // Before running the sample: @@ -3024,11 +3028,11 @@ export namespace cloudchannel_v1 { * * // Do the magic * const res = await cloudchannel.accounts.channelPartnerLinks.list({ - * // Optional. Requested page size. Server might return fewer results than requested. If unspecified, server will pick a default size (25). The maximum value is 200, values above 200 will be coerced to 200. + * // Optional. Requested page size. Server might return fewer results than requested. If unspecified, server will pick a default size (25). The maximum value is 200; the server will coerce values above 200. * pageSize: 'placeholder-value', - * // Optional. A token identifying a page of results, if other than the first one. Typically obtained via ListChannelPartnerLinksResponse.next_page_token of the previous CloudChannelService.ListChannelPartnerLinks call. + * // Optional. A token for a page of results other than the first page. Obtained using ListChannelPartnerLinksResponse.next_page_token of the previous CloudChannelService.ListChannelPartnerLinks call. * pageToken: 'placeholder-value', - * // Required. The resource name of the reseller account for listing channel partner links. The parent takes the format: accounts/{account_id\} + * // Required. The resource name of the reseller account for listing channel partner links. Parent uses the format: accounts/{account_id\} * parent: 'accounts/my-account', * // Optional. The level of granularity the ChannelPartnerLink will display. * view: 'placeholder-value', @@ -3143,7 +3147,7 @@ export namespace cloudchannel_v1 { } /** - * Updates a channel partner link. A distributor calls this method to change a link's status. For example, suspend a partner link. To call this method, you must be a distributor. Possible Error Codes: * PERMISSION_DENIED: If the reseller account making the request and the reseller account being queried for are different. * INVALID_ARGUMENT: It can happen in following scenarios - * Missing or invalid required parameters in the request. * Updating link state from invited to active or suspended. * Sending reseller_cloud_identity_id, invite_url or name in update mask. * NOT_FOUND: ChannelPartnerLink resource not found. * INTERNAL: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support. Return Value: If successful, the updated ChannelPartnerLink resource, otherwise returns an error. + * Updates a channel partner link. Distributors call this method to change a link's status. For example, to suspend a partner link. You must be a distributor to call this method. Possible error codes: * PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * INVALID_ARGUMENT: * Required request parameters are missing or invalid. * Link state cannot change from invited to active or suspended. * Cannot send reseller_cloud_identity_id, invite_url, or name in update mask. * NOT_FOUND: ChannelPartnerLink resource not found. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: The updated ChannelPartnerLink resource. * @example * ```js * // Before running the sample: @@ -3169,7 +3173,7 @@ export namespace cloudchannel_v1 { * * // Do the magic * const res = await cloudchannel.accounts.channelPartnerLinks.patch({ - * // Required. The resource name of the channel partner link to cancel. The name takes the format: accounts/{account_id\}/channelPartnerLinks/{id\} where {id\} is the Cloud Identity ID of the partner. + * // Required. The resource name of the channel partner link to cancel. Name uses the format: accounts/{account_id\}/channelPartnerLinks/{id\} where {id\} is the Cloud Identity ID of the partner. * name: 'accounts/my-account/channelPartnerLinks/my-channelPartnerLink', * * // Request body metadata @@ -3297,7 +3301,7 @@ export namespace cloudchannel_v1 { export interface Params$Resource$Accounts$Channelpartnerlinks$Create extends StandardParameters { /** - * Required. The resource name of reseller's account for which to create a channel partner link. The parent takes the format: accounts/{account_id\} + * Required. Create a channel partner link for the provided reseller account's resource name. Parent uses the format: accounts/{account_id\} */ parent?: string; @@ -3309,7 +3313,7 @@ export namespace cloudchannel_v1 { export interface Params$Resource$Accounts$Channelpartnerlinks$Get extends StandardParameters { /** - * Required. The resource name of the channel partner link to retrieve. The name takes the format: accounts/{account_id\}/channelPartnerLinks/{id\} where {id\} is the Cloud Identity ID of the partner. + * Required. The resource name of the channel partner link to retrieve. Name uses the format: accounts/{account_id\}/channelPartnerLinks/{id\} where {id\} is the Cloud Identity ID of the partner. */ name?: string; /** @@ -3320,15 +3324,15 @@ export namespace cloudchannel_v1 { export interface Params$Resource$Accounts$Channelpartnerlinks$List extends StandardParameters { /** - * Optional. Requested page size. Server might return fewer results than requested. If unspecified, server will pick a default size (25). The maximum value is 200, values above 200 will be coerced to 200. + * Optional. Requested page size. Server might return fewer results than requested. If unspecified, server will pick a default size (25). The maximum value is 200; the server will coerce values above 200. */ pageSize?: number; /** - * Optional. A token identifying a page of results, if other than the first one. Typically obtained via ListChannelPartnerLinksResponse.next_page_token of the previous CloudChannelService.ListChannelPartnerLinks call. + * Optional. A token for a page of results other than the first page. Obtained using ListChannelPartnerLinksResponse.next_page_token of the previous CloudChannelService.ListChannelPartnerLinks call. */ pageToken?: string; /** - * Required. The resource name of the reseller account for listing channel partner links. The parent takes the format: accounts/{account_id\} + * Required. The resource name of the reseller account for listing channel partner links. Parent uses the format: accounts/{account_id\} */ parent?: string; /** @@ -3339,7 +3343,7 @@ export namespace cloudchannel_v1 { export interface Params$Resource$Accounts$Channelpartnerlinks$Patch extends StandardParameters { /** - * Required. The resource name of the channel partner link to cancel. The name takes the format: accounts/{account_id\}/channelPartnerLinks/{id\} where {id\} is the Cloud Identity ID of the partner. + * Required. The resource name of the channel partner link to cancel. Name uses the format: accounts/{account_id\}/channelPartnerLinks/{id\} where {id\} is the Cloud Identity ID of the partner. */ name?: string; @@ -3349,6 +3353,825 @@ export namespace cloudchannel_v1 { requestBody?: Schema$GoogleCloudChannelV1UpdateChannelPartnerLinkRequest; } + export class Resource$Accounts$Channelpartnerlinks$Customers { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Creates a new Customer resource under the reseller or distributor account. Possible error codes: * PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * INVALID_ARGUMENT: * Required request parameters are missing or invalid. * Domain field value doesn't match the primary email domain. Return value: The newly created Customer resource. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/cloudchannel.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const cloudchannel = google.cloudchannel('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/apps.order'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await cloudchannel.accounts.channelPartnerLinks.customers.create({ + * // Required. The resource name of reseller account in which to create the customer. Parent uses the format: accounts/{account_id\} + * parent: 'accounts/my-account/channelPartnerLinks/my-channelPartnerLink', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "alternateEmail": "my_alternateEmail", + * // "channelPartnerId": "my_channelPartnerId", + * // "cloudIdentityId": "my_cloudIdentityId", + * // "cloudIdentityInfo": {}, + * // "createTime": "my_createTime", + * // "domain": "my_domain", + * // "languageCode": "my_languageCode", + * // "name": "my_name", + * // "orgDisplayName": "my_orgDisplayName", + * // "orgPostalAddress": {}, + * // "primaryContactInfo": {}, + * // "updateTime": "my_updateTime" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "alternateEmail": "my_alternateEmail", + * // "channelPartnerId": "my_channelPartnerId", + * // "cloudIdentityId": "my_cloudIdentityId", + * // "cloudIdentityInfo": {}, + * // "createTime": "my_createTime", + * // "domain": "my_domain", + * // "languageCode": "my_languageCode", + * // "name": "my_name", + * // "orgDisplayName": "my_orgDisplayName", + * // "orgPostalAddress": {}, + * // "primaryContactInfo": {}, + * // "updateTime": "my_updateTime" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + create( + params: Params$Resource$Accounts$Channelpartnerlinks$Customers$Create, + options: StreamMethodOptions + ): GaxiosPromise; + create( + params?: Params$Resource$Accounts$Channelpartnerlinks$Customers$Create, + options?: MethodOptions + ): GaxiosPromise; + create( + params: Params$Resource$Accounts$Channelpartnerlinks$Customers$Create, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Accounts$Channelpartnerlinks$Customers$Create, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Accounts$Channelpartnerlinks$Customers$Create, + callback: BodyResponseCallback + ): void; + create( + callback: BodyResponseCallback + ): void; + create( + paramsOrCallback?: + | Params$Resource$Accounts$Channelpartnerlinks$Customers$Create + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Accounts$Channelpartnerlinks$Customers$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Accounts$Channelpartnerlinks$Customers$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://cloudchannel.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+parent}/customers').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Deletes the given Customer permanently and irreversibly. Possible error codes: * PERMISSION_DENIED: The account making the request does not own this customer. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * FAILED_PRECONDITION: The customer has existing entitlements. * NOT_FOUND: No Customer resource found for the name in the request. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/cloudchannel.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const cloudchannel = google.cloudchannel('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/apps.order'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await cloudchannel.accounts.channelPartnerLinks.customers.delete({ + * // Required. The resource name of the customer to delete. + * name: + * 'accounts/my-account/channelPartnerLinks/my-channelPartnerLink/customers/my-customer', + * }); + * console.log(res.data); + * + * // Example response + * // {} + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + delete( + params: Params$Resource$Accounts$Channelpartnerlinks$Customers$Delete, + options: StreamMethodOptions + ): GaxiosPromise; + delete( + params?: Params$Resource$Accounts$Channelpartnerlinks$Customers$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Accounts$Channelpartnerlinks$Customers$Delete, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Accounts$Channelpartnerlinks$Customers$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Accounts$Channelpartnerlinks$Customers$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Accounts$Channelpartnerlinks$Customers$Delete + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Accounts$Channelpartnerlinks$Customers$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Accounts$Channelpartnerlinks$Customers$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://cloudchannel.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Returns a requested Customer resource. Possible error codes: * PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: The customer resource doesn't exist. Usually the result of an invalid name parameter. Return value: The Customer resource. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/cloudchannel.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const cloudchannel = google.cloudchannel('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/apps.order'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await cloudchannel.accounts.channelPartnerLinks.customers.get({ + * // Required. The resource name of the customer to retrieve. Name uses the format: accounts/{account_id\}/customers/{customer_id\} + * name: + * 'accounts/my-account/channelPartnerLinks/my-channelPartnerLink/customers/my-customer', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "alternateEmail": "my_alternateEmail", + * // "channelPartnerId": "my_channelPartnerId", + * // "cloudIdentityId": "my_cloudIdentityId", + * // "cloudIdentityInfo": {}, + * // "createTime": "my_createTime", + * // "domain": "my_domain", + * // "languageCode": "my_languageCode", + * // "name": "my_name", + * // "orgDisplayName": "my_orgDisplayName", + * // "orgPostalAddress": {}, + * // "primaryContactInfo": {}, + * // "updateTime": "my_updateTime" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Accounts$Channelpartnerlinks$Customers$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Accounts$Channelpartnerlinks$Customers$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Accounts$Channelpartnerlinks$Customers$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Accounts$Channelpartnerlinks$Customers$Get, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Accounts$Channelpartnerlinks$Customers$Get, + callback: BodyResponseCallback + ): void; + get( + callback: BodyResponseCallback + ): void; + get( + paramsOrCallback?: + | Params$Resource$Accounts$Channelpartnerlinks$Customers$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Accounts$Channelpartnerlinks$Customers$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Accounts$Channelpartnerlinks$Customers$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://cloudchannel.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * List Customers. Possible error codes: * PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * INVALID_ARGUMENT: Required request parameters are missing or invalid. Return value: List of Customers, or an empty list if there are no customers. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/cloudchannel.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const cloudchannel = google.cloudchannel('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/apps.order'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await cloudchannel.accounts.channelPartnerLinks.customers.list({ + * // Optional. The maximum number of customers to return. The service may return fewer than this value. If unspecified, returns at most 10 customers. The maximum value is 50. + * pageSize: 'placeholder-value', + * // Optional. A token identifying a page of results other than the first page. Obtained through ListCustomersResponse.next_page_token of the previous CloudChannelService.ListCustomers call. + * pageToken: 'placeholder-value', + * // Required. The resource name of the reseller account to list customers from. Parent uses the format: accounts/{account_id\}. + * parent: 'accounts/my-account/channelPartnerLinks/my-channelPartnerLink', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "customers": [], + * // "nextPageToken": "my_nextPageToken" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Accounts$Channelpartnerlinks$Customers$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Accounts$Channelpartnerlinks$Customers$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Accounts$Channelpartnerlinks$Customers$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Accounts$Channelpartnerlinks$Customers$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Accounts$Channelpartnerlinks$Customers$List, + callback: BodyResponseCallback + ): void; + list( + callback: BodyResponseCallback + ): void; + list( + paramsOrCallback?: + | Params$Resource$Accounts$Channelpartnerlinks$Customers$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Accounts$Channelpartnerlinks$Customers$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Accounts$Channelpartnerlinks$Customers$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://cloudchannel.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+parent}/customers').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Updates an existing Customer resource for the reseller or distributor. Possible error codes: * PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: No Customer resource found for the name in the request. Return value: The updated Customer resource. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/cloudchannel.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const cloudchannel = google.cloudchannel('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/apps.order'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await cloudchannel.accounts.channelPartnerLinks.customers.patch({ + * // Output only. Resource name of the customer. Format: accounts/{account_id\}/customers/{customer_id\} + * name: + * 'accounts/my-account/channelPartnerLinks/my-channelPartnerLink/customers/my-customer', + * // The update mask that applies to the resource. Optional. + * updateMask: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "alternateEmail": "my_alternateEmail", + * // "channelPartnerId": "my_channelPartnerId", + * // "cloudIdentityId": "my_cloudIdentityId", + * // "cloudIdentityInfo": {}, + * // "createTime": "my_createTime", + * // "domain": "my_domain", + * // "languageCode": "my_languageCode", + * // "name": "my_name", + * // "orgDisplayName": "my_orgDisplayName", + * // "orgPostalAddress": {}, + * // "primaryContactInfo": {}, + * // "updateTime": "my_updateTime" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "alternateEmail": "my_alternateEmail", + * // "channelPartnerId": "my_channelPartnerId", + * // "cloudIdentityId": "my_cloudIdentityId", + * // "cloudIdentityInfo": {}, + * // "createTime": "my_createTime", + * // "domain": "my_domain", + * // "languageCode": "my_languageCode", + * // "name": "my_name", + * // "orgDisplayName": "my_orgDisplayName", + * // "orgPostalAddress": {}, + * // "primaryContactInfo": {}, + * // "updateTime": "my_updateTime" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + patch( + params: Params$Resource$Accounts$Channelpartnerlinks$Customers$Patch, + options: StreamMethodOptions + ): GaxiosPromise; + patch( + params?: Params$Resource$Accounts$Channelpartnerlinks$Customers$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Accounts$Channelpartnerlinks$Customers$Patch, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Accounts$Channelpartnerlinks$Customers$Patch, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Accounts$Channelpartnerlinks$Customers$Patch, + callback: BodyResponseCallback + ): void; + patch( + callback: BodyResponseCallback + ): void; + patch( + paramsOrCallback?: + | Params$Resource$Accounts$Channelpartnerlinks$Customers$Patch + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Accounts$Channelpartnerlinks$Customers$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Accounts$Channelpartnerlinks$Customers$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://cloudchannel.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + } + + export interface Params$Resource$Accounts$Channelpartnerlinks$Customers$Create + extends StandardParameters { + /** + * Required. The resource name of reseller account in which to create the customer. Parent uses the format: accounts/{account_id\} + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudChannelV1Customer; + } + export interface Params$Resource$Accounts$Channelpartnerlinks$Customers$Delete + extends StandardParameters { + /** + * Required. The resource name of the customer to delete. + */ + name?: string; + } + export interface Params$Resource$Accounts$Channelpartnerlinks$Customers$Get + extends StandardParameters { + /** + * Required. The resource name of the customer to retrieve. Name uses the format: accounts/{account_id\}/customers/{customer_id\} + */ + name?: string; + } + export interface Params$Resource$Accounts$Channelpartnerlinks$Customers$List + extends StandardParameters { + /** + * Optional. The maximum number of customers to return. The service may return fewer than this value. If unspecified, returns at most 10 customers. The maximum value is 50. + */ + pageSize?: number; + /** + * Optional. A token identifying a page of results other than the first page. Obtained through ListCustomersResponse.next_page_token of the previous CloudChannelService.ListCustomers call. + */ + pageToken?: string; + /** + * Required. The resource name of the reseller account to list customers from. Parent uses the format: accounts/{account_id\}. + */ + parent?: string; + } + export interface Params$Resource$Accounts$Channelpartnerlinks$Customers$Patch + extends StandardParameters { + /** + * Output only. Resource name of the customer. Format: accounts/{account_id\}/customers/{customer_id\} + */ + name?: string; + /** + * The update mask that applies to the resource. Optional. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudChannelV1Customer; + } + export class Resource$Accounts$Customers { context: APIRequestContext; entitlements: Resource$Accounts$Customers$Entitlements; @@ -3360,7 +4183,7 @@ export namespace cloudchannel_v1 { } /** - * Creates a new Customer resource under the reseller or distributor account. Possible Error Codes: * PERMISSION_DENIED: If the reseller account making the request and the reseller account being queried for are different. * INVALID_ARGUMENT: It can happen in following scenarios - * Missing or invalid required parameters in the request. * Domain field value doesn't match the domain specified in primary email. Return Value: If successful, the newly created Customer resource, otherwise returns an error. + * Creates a new Customer resource under the reseller or distributor account. Possible error codes: * PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * INVALID_ARGUMENT: * Required request parameters are missing or invalid. * Domain field value doesn't match the primary email domain. Return value: The newly created Customer resource. * @example * ```js * // Before running the sample: @@ -3386,7 +4209,7 @@ export namespace cloudchannel_v1 { * * // Do the magic * const res = await cloudchannel.accounts.customers.create({ - * // Required. The resource name of reseller account in which to create the customer. The parent takes the format: accounts/{account_id\} + * // Required. The resource name of reseller account in which to create the customer. Parent uses the format: accounts/{account_id\} * parent: 'accounts/my-account', * * // Request body metadata @@ -3528,7 +4351,7 @@ export namespace cloudchannel_v1 { } /** - * Deletes the given Customer permanently and irreversibly. Possible Error Codes: * PERMISSION_DENIED: If the account making the request does not own this customer. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. * FAILED_PRECONDITION: If the customer has existing entitlements. * NOT_FOUND: No Customer resource found for the name specified in the request. + * Deletes the given Customer permanently and irreversibly. Possible error codes: * PERMISSION_DENIED: The account making the request does not own this customer. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * FAILED_PRECONDITION: The customer has existing entitlements. * NOT_FOUND: No Customer resource found for the name in the request. * @example * ```js * // Before running the sample: @@ -3655,7 +4478,7 @@ export namespace cloudchannel_v1 { } /** - * Returns a requested Customer resource. Possible Error Codes: * PERMISSION_DENIED: If the reseller account making the request and the reseller account being queried for are different. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. * NOT_FOUND: If the customer resource doesn't exist. Usually the result of an invalid name parameter. Return Value: Customer resource if found, error otherwise. + * Returns a requested Customer resource. Possible error codes: * PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: The customer resource doesn't exist. Usually the result of an invalid name parameter. Return value: The Customer resource. * @example * ```js * // Before running the sample: @@ -3681,7 +4504,7 @@ export namespace cloudchannel_v1 { * * // Do the magic * const res = await cloudchannel.accounts.customers.get({ - * // Required. The resource name of the customer to retrieve. The name takes the format: accounts/{account_id\}/customers/{customer_id\} + * // Required. The resource name of the customer to retrieve. Name uses the format: accounts/{account_id\}/customers/{customer_id\} * name: 'accounts/my-account/customers/my-customer', * }); * console.log(res.data); @@ -3801,7 +4624,7 @@ export namespace cloudchannel_v1 { } /** - * List downstream Customers. Possible Error Codes: * PERMISSION_DENIED: If the reseller account making the request and the reseller account being queried for are different. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. Return Value: List of Customers pertaining to the reseller or empty list if there are none. + * List Customers. Possible error codes: * PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * INVALID_ARGUMENT: Required request parameters are missing or invalid. Return value: List of Customers, or an empty list if there are no customers. * @example * ```js * // Before running the sample: @@ -3827,11 +4650,11 @@ export namespace cloudchannel_v1 { * * // Do the magic * const res = await cloudchannel.accounts.customers.list({ - * // Optional. The maximum number of customers to return. The service may return fewer than this value. If unspecified, at most 10 customers will be returned. The maximum value is 50; values about 50 will be coerced to 50. + * // Optional. The maximum number of customers to return. The service may return fewer than this value. If unspecified, returns at most 10 customers. The maximum value is 50. * pageSize: 'placeholder-value', - * // Optional. A token identifying a page of results, if other than the first one. Typically obtained via ListCustomersResponse.next_page_token of the previous CloudChannelService.ListCustomers call. + * // Optional. A token identifying a page of results other than the first page. Obtained through ListCustomersResponse.next_page_token of the previous CloudChannelService.ListCustomers call. * pageToken: 'placeholder-value', - * // Required. The resource name of the reseller account from which to list customers. The parent takes the format: accounts/{account_id\}. + * // Required. The resource name of the reseller account to list customers from. Parent uses the format: accounts/{account_id\}. * parent: 'accounts/my-account', * }); * console.log(res.data); @@ -3944,7 +4767,7 @@ export namespace cloudchannel_v1 { } /** - * Lists the Purchasable Offers for the following cases: * Offers that can be newly purchased for a customer * Offers that can be changed to, for an entitlement. Possible Error Codes: * PERMISSION_DENIED: If the customer doesn't belong to the reseller * INVALID_ARGUMENT: Missing or invalid required parameters in the request. + * Lists the following: * Offers that you can purchase for a customer. * Offers that you can change for an entitlement. Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller * INVALID_ARGUMENT: Required request parameters are missing or invalid. * @example * ```js * // Before running the sample: @@ -3972,17 +4795,17 @@ export namespace cloudchannel_v1 { * const res = await cloudchannel.accounts.customers.listPurchasableOffers({ * // Required. Resource name of the entitlement. Format: accounts/{account_id\}/customers/{customer_id\}/entitlements/{entitlement_id\} * 'changeOfferPurchase.entitlement': 'placeholder-value', - * // Optional. Resource name of the SKU that is being changed to. Should be provided if upgrading or downgrading an entitlement. Format: products/{product_id\}/skus/{sku_id\} + * // Optional. Resource name of the new target SKU. Provide this SKU when upgrading or downgrading an entitlement. Format: products/{product_id\}/skus/{sku_id\} * 'changeOfferPurchase.newSku': 'placeholder-value', * // Required. SKU that the result should be restricted to. Format: products/{product_id\}/skus/{sku_id\}. * 'createEntitlementPurchase.sku': 'placeholder-value', - * // Required. The resource name of the customer for which to list Offers. Format: accounts/{account_id\}/customers/{customer_id\}. + * // Required. The resource name of the customer to list Offers for. Format: accounts/{account_id\}/customers/{customer_id\}. * customer: 'accounts/my-account/customers/my-customer', - * // Optional. The BCP-47 language code, such as "en-US". If specified, the response will be localized to the corresponding language code. Default is "en-US". + * // Optional. The BCP-47 language code. For example, "en-US". The response will localize in the corresponding language code, if specified. The default value is "en-US". * languageCode: 'placeholder-value', - * // Optional. Requested page size. Server might return fewer results than requested. If unspecified, at most 100 Offers will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. + * // Optional. Requested page size. Server might return fewer results than requested. If unspecified, returns at most 100 Offers. The maximum value is 1000; the server will coerce values above 1000. * pageSize: 'placeholder-value', - * // Optional. A token identifying a page of results, if other than the first one. + * // Optional. A token for a page of results other than the first page. * pageToken: 'placeholder-value', * }); * console.log(res.data); @@ -4095,7 +4918,7 @@ export namespace cloudchannel_v1 { } /** - * Lists the Purchasable SKUs for following cases: * SKUs that can be newly purchased for a customer * SKUs that can be upgraded/downgraded to, for an entitlement. Possible Error Codes: * PERMISSION_DENIED: If the customer doesn't belong to the reseller * INVALID_ARGUMENT: Missing or invalid required parameters in the request. + * Lists the following: * SKUs that you can purchase for a customer * SKUs that you can upgrade or downgrade for an entitlement. Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * @example * ```js * // Before running the sample: @@ -4127,13 +4950,13 @@ export namespace cloudchannel_v1 { * 'changeOfferPurchase.entitlement': 'placeholder-value', * // Required. List SKUs belonging to this Product. Format: products/{product_id\}. Supports products/- to retrieve SKUs for all products. * 'createEntitlementPurchase.product': 'placeholder-value', - * // Required. The resource name of the customer for which to list SKUs. Format: accounts/{account_id\}/customers/{customer_id\}. + * // Required. The resource name of the customer to list SKUs for. Format: accounts/{account_id\}/customers/{customer_id\}. * customer: 'accounts/my-account/customers/my-customer', - * // Optional. The BCP-47 language code, such as "en-US". If specified, the response will be localized to the corresponding language code. Default is "en-US". + * // Optional. The BCP-47 language code. For example, "en-US". The response will localize in the corresponding language code, if specified. The default value is "en-US". * languageCode: 'placeholder-value', - * // Optional. Requested page size. Server might return fewer results than requested. If unspecified, at most 100 SKUs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. + * // Optional. Requested page size. Server might return fewer results than requested. If unspecified, returns at most 100 SKUs. The maximum value is 1000; the server will coerce values above 1000. * pageSize: 'placeholder-value', - * // Optional. A token identifying a page of results, if other than the first one. + * // Optional. A token for a page of results other than the first page. * pageToken: 'placeholder-value', * }); * console.log(res.data); @@ -4246,7 +5069,7 @@ export namespace cloudchannel_v1 { } /** - * Updates an existing Customer resource belonging to the reseller or distributor. Possible Error Codes: * PERMISSION_DENIED: If the reseller account making the request and the reseller account being queried for are different. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. * NOT_FOUND: No Customer resource found for the name specified in the request. Return Value: If successful, the updated Customer resource, otherwise returns an error. + * Updates an existing Customer resource for the reseller or distributor. Possible error codes: * PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: No Customer resource found for the name in the request. Return value: The updated Customer resource. * @example * ```js * // Before running the sample: @@ -4413,7 +5236,7 @@ export namespace cloudchannel_v1 { } /** - * Creates a Cloud Identity for the given customer using the customer's information or the information provided here, if present. Possible Error Codes: * PERMISSION_DENIED: If the customer doesn't belong to the reseller. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. * NOT_FOUND: If the customer is not found for the reseller. * ALREADY_EXISTS: If the customer's primary email already exists. In this case, retry after changing the customer's primary contact email. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support in this case. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support in this case. Return Value: Long Running Operation ID. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata. + * Creates a Cloud Identity for the given customer using the customer's information, or the information provided here. Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: The customer was not found. * ALREADY_EXISTS: The customer's primary email already exists. Retry after changing the customer's primary contact email. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: The ID of a long-running operation. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata contains an instance of OperationMetadata. * @example * ```js * // Before running the sample: @@ -4563,7 +5386,7 @@ export namespace cloudchannel_v1 { } /** - * Transfers customer entitlements to new reseller. Possible Error Codes: * PERMISSION_DENIED: If the customer doesn't belong to the reseller. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. * NOT_FOUND: If the customer or offer resource is not found for the reseller. * ALREADY_EXISTS: If the SKU has been already transferred for the customer. * CONDITION_NOT_MET or FAILED_PRECONDITION: This failure can happen in the following cases: * Transferring a SKU that requires domain verification and the domain has not been verified. * Transferring an Add-On SKU like Vault or Drive without transferring the pre-requisite SKU, such as G Suite Basic. * Applicable only for developer accounts: reseller and resold domain must follow the domain naming convention as follows: * Domain names must start with goog-test. * Resold domain names must include the reseller domain. * All transferring entitlements must be specified. * INTERNAL: Any non-user error related to a technical issue in the backend. Please contact Cloud Channel Support in this case. * UNKNOWN: Any non-user error related to a technical issue in the backend. Please contact Cloud Channel Support in this case. Return Value: Long Running Operation ID. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata. + * Transfers customer entitlements to new reseller. Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: The customer or offer resource was not found. * ALREADY_EXISTS: The SKU was already transferred for the customer. * CONDITION_NOT_MET or FAILED_PRECONDITION: * The SKU requires domain verification to transfer, but the domain is not verified. * An Add-On SKU (example, Vault or Drive) is missing the pre-requisite SKU (example, G Suite Basic). * (Developer accounts only) Reseller and resold domain must meet the following naming requirements: * Domain names must start with goog-test. * Domain names must include the reseller domain. * Specify all transferring entitlements. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: The ID of a long-running operation. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata. * @example * ```js * // Before running the sample: @@ -4589,7 +5412,7 @@ export namespace cloudchannel_v1 { * * // Do the magic * const res = await cloudchannel.accounts.customers.transferEntitlements({ - * // Required. The resource name of reseller's customer account where the entitlements transfer to. The parent takes the format: accounts/{account_id\}/customers/{customer_id\} + * // Required. The resource name of the reseller's customer account that will receive transferred entitlements. Parent uses the format: accounts/{account_id\}/customers/{customer_id\} * parent: 'accounts/my-account/customers/my-customer', * * // Request body metadata @@ -4713,7 +5536,7 @@ export namespace cloudchannel_v1 { } /** - * Transfers customer entitlements from current reseller to Google. Possible Error Codes: * PERMISSION_DENIED: If the customer doesn't belong to the reseller. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. * NOT_FOUND: If the customer or offer resource is not found for the reseller. * ALREADY_EXISTS: If the SKU has been already transferred for the customer. * CONDITION_NOT_MET or FAILED_PRECONDITION: This failure can happen in the following cases: * Transferring a SKU that requires domain verification and the domain has not been verified. * Transferring an Add-On SKU like Vault or Drive without purchasing the pre-requisite SKU, such as G Suite Basic. * Applicable only for developer accounts: reseller and resold domain must follow the domain naming convention as follows: * Domain names must start with goog-test. * Resold domain names must include the reseller domain. * INTERNAL: Any non-user error related to a technical issue in the backend. Please contact Cloud Channel Support in this case. * UNKNOWN: Any non-user error related to a technical issue in the backend. Please contact Cloud Channel Support in this case. Return Value: Long Running Operation ID. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The response will contain google.protobuf.Empty on success. The Operation metadata will contain an instance of OperationMetadata. + * Transfers customer entitlements from their current reseller to Google. Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: The customer or offer resource was not found. * ALREADY_EXISTS: The SKU was already transferred for the customer. * CONDITION_NOT_MET or FAILED_PRECONDITION: * The SKU requires domain verification to transfer, but the domain is not verified. * An Add-On SKU (example, Vault or Drive) is missing the pre-requisite SKU (example, G Suite Basic). * (Developer accounts only) Reseller and resold domain must meet the following naming requirements: * Domain names must start with goog-test. * Domain names must include the reseller domain. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: The ID of a long-running operation. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The response will contain google.protobuf.Empty on success. The Operation metadata will contain an instance of OperationMetadata. * @example * ```js * // Before running the sample: @@ -4740,7 +5563,7 @@ export namespace cloudchannel_v1 { * // Do the magic * const res = await cloudchannel.accounts.customers.transferEntitlementsToGoogle( * { - * // Required. The resource name of reseller's customer account where the entitlements transfer from. The parent takes the format: accounts/{account_id\}/customers/{customer_id\} + * // Required. The resource name of the reseller's customer account where the entitlements transfer from. Parent uses the format: accounts/{account_id\}/customers/{customer_id\} * parent: 'accounts/my-account/customers/my-customer', * * // Request body metadata @@ -4866,7 +5689,7 @@ export namespace cloudchannel_v1 { export interface Params$Resource$Accounts$Customers$Create extends StandardParameters { /** - * Required. The resource name of reseller account in which to create the customer. The parent takes the format: accounts/{account_id\} + * Required. The resource name of reseller account in which to create the customer. Parent uses the format: accounts/{account_id\} */ parent?: string; @@ -4885,22 +5708,22 @@ export namespace cloudchannel_v1 { export interface Params$Resource$Accounts$Customers$Get extends StandardParameters { /** - * Required. The resource name of the customer to retrieve. The name takes the format: accounts/{account_id\}/customers/{customer_id\} + * Required. The resource name of the customer to retrieve. Name uses the format: accounts/{account_id\}/customers/{customer_id\} */ name?: string; } export interface Params$Resource$Accounts$Customers$List extends StandardParameters { /** - * Optional. The maximum number of customers to return. The service may return fewer than this value. If unspecified, at most 10 customers will be returned. The maximum value is 50; values about 50 will be coerced to 50. + * Optional. The maximum number of customers to return. The service may return fewer than this value. If unspecified, returns at most 10 customers. The maximum value is 50. */ pageSize?: number; /** - * Optional. A token identifying a page of results, if other than the first one. Typically obtained via ListCustomersResponse.next_page_token of the previous CloudChannelService.ListCustomers call. + * Optional. A token identifying a page of results other than the first page. Obtained through ListCustomersResponse.next_page_token of the previous CloudChannelService.ListCustomers call. */ pageToken?: string; /** - * Required. The resource name of the reseller account from which to list customers. The parent takes the format: accounts/{account_id\}. + * Required. The resource name of the reseller account to list customers from. Parent uses the format: accounts/{account_id\}. */ parent?: string; } @@ -4911,7 +5734,7 @@ export namespace cloudchannel_v1 { */ 'changeOfferPurchase.entitlement'?: string; /** - * Optional. Resource name of the SKU that is being changed to. Should be provided if upgrading or downgrading an entitlement. Format: products/{product_id\}/skus/{sku_id\} + * Optional. Resource name of the new target SKU. Provide this SKU when upgrading or downgrading an entitlement. Format: products/{product_id\}/skus/{sku_id\} */ 'changeOfferPurchase.newSku'?: string; /** @@ -4919,19 +5742,19 @@ export namespace cloudchannel_v1 { */ 'createEntitlementPurchase.sku'?: string; /** - * Required. The resource name of the customer for which to list Offers. Format: accounts/{account_id\}/customers/{customer_id\}. + * Required. The resource name of the customer to list Offers for. Format: accounts/{account_id\}/customers/{customer_id\}. */ customer?: string; /** - * Optional. The BCP-47 language code, such as "en-US". If specified, the response will be localized to the corresponding language code. Default is "en-US". + * Optional. The BCP-47 language code. For example, "en-US". The response will localize in the corresponding language code, if specified. The default value is "en-US". */ languageCode?: string; /** - * Optional. Requested page size. Server might return fewer results than requested. If unspecified, at most 100 Offers will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. + * Optional. Requested page size. Server might return fewer results than requested. If unspecified, returns at most 100 Offers. The maximum value is 1000; the server will coerce values above 1000. */ pageSize?: number; /** - * Optional. A token identifying a page of results, if other than the first one. + * Optional. A token for a page of results other than the first page. */ pageToken?: string; } @@ -4950,19 +5773,19 @@ export namespace cloudchannel_v1 { */ 'createEntitlementPurchase.product'?: string; /** - * Required. The resource name of the customer for which to list SKUs. Format: accounts/{account_id\}/customers/{customer_id\}. + * Required. The resource name of the customer to list SKUs for. Format: accounts/{account_id\}/customers/{customer_id\}. */ customer?: string; /** - * Optional. The BCP-47 language code, such as "en-US". If specified, the response will be localized to the corresponding language code. Default is "en-US". + * Optional. The BCP-47 language code. For example, "en-US". The response will localize in the corresponding language code, if specified. The default value is "en-US". */ languageCode?: string; /** - * Optional. Requested page size. Server might return fewer results than requested. If unspecified, at most 100 SKUs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. + * Optional. Requested page size. Server might return fewer results than requested. If unspecified, returns at most 100 SKUs. The maximum value is 1000; the server will coerce values above 1000. */ pageSize?: number; /** - * Optional. A token identifying a page of results, if other than the first one. + * Optional. A token for a page of results other than the first page. */ pageToken?: string; } @@ -4997,7 +5820,7 @@ export namespace cloudchannel_v1 { export interface Params$Resource$Accounts$Customers$Transferentitlements extends StandardParameters { /** - * Required. The resource name of reseller's customer account where the entitlements transfer to. The parent takes the format: accounts/{account_id\}/customers/{customer_id\} + * Required. The resource name of the reseller's customer account that will receive transferred entitlements. Parent uses the format: accounts/{account_id\}/customers/{customer_id\} */ parent?: string; @@ -5009,7 +5832,7 @@ export namespace cloudchannel_v1 { export interface Params$Resource$Accounts$Customers$Transferentitlementstogoogle extends StandardParameters { /** - * Required. The resource name of reseller's customer account where the entitlements transfer from. The parent takes the format: accounts/{account_id\}/customers/{customer_id\} + * Required. The resource name of the reseller's customer account where the entitlements transfer from. Parent uses the format: accounts/{account_id\}/customers/{customer_id\} */ parent?: string; @@ -5026,7 +5849,7 @@ export namespace cloudchannel_v1 { } /** - * Activates a previously suspended entitlement. The entitlement must be in a suspended state for it to be activated. Entitlements suspended for pending ToS acceptance can't be activated using this method. An entitlement activation is a long-running operation and can result in updates to the state of the customer entitlement. Possible Error Codes: * PERMISSION_DENIED: If the customer doesn't belong to the reseller or if the reseller account making the request and reseller account being queried for are different. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. * NOT_FOUND: Entitlement resource not found. * SUSPENSION_NOT_RESELLER_INITIATED: Can't activate an entitlement that is pending TOS acceptance. Only reseller initiated suspensions can be activated. * NOT_SUSPENDED: Can't activate entitlements that are already in ACTIVE state. Can only activate suspended entitlements. * INTERNAL: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support. Return Value: Long Running Operation ID. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata. + * Activates a previously suspended entitlement. Entitlements suspended for pending ToS acceptance can't be activated using this method. An entitlement activation is a long-running operation and it updates the state of the customer entitlement. Possible error codes: * PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: Entitlement resource not found. * SUSPENSION_NOT_RESELLER_INITIATED: Can only activate reseller-initiated suspensions and entitlements that have accepted the TOS. * NOT_SUSPENDED: Can only activate suspended entitlements not in an ACTIVE state. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: The ID of a long-running operation. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata. * @example * ```js * // Before running the sample: @@ -5052,7 +5875,7 @@ export namespace cloudchannel_v1 { * * // Do the magic * const res = await cloudchannel.accounts.customers.entitlements.activate({ - * // Required. The resource name of the entitlement to activate. The name takes the format: accounts/{account_id\}/customers/{customer_id\}/entitlements/{entitlement_id\} + * // Required. The resource name of the entitlement to activate. Name uses the format: accounts/{account_id\}/customers/{customer_id\}/entitlements/{entitlement_id\} * name: * 'accounts/my-account/customers/my-customer/entitlements/my-entitlement', * @@ -5175,7 +5998,7 @@ export namespace cloudchannel_v1 { } /** - * Cancels a previously fulfilled entitlement. An entitlement cancellation is a long-running operation. Possible Error Codes: * PERMISSION_DENIED: If the customer doesn't belong to the reseller or if the reseller account making the request and reseller account being queried for are different. * FAILED_PRECONDITION: If there are any Google Cloud projects linked to the Google Cloud entitlement's Cloud Billing subaccount. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. * NOT_FOUND: Entitlement resource not found. * DELETION_TYPE_NOT_ALLOWED: Cancel is only allowed for Google Workspace add-ons or entitlements for Google Cloud's development platform. * INTERNAL: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support. Return Value: Long Running Operation ID. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The response will contain google.protobuf.Empty on success. The Operation metadata will contain an instance of OperationMetadata. + * Cancels a previously fulfilled entitlement. An entitlement cancellation is a long-running operation. Possible error codes: * PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * FAILED_PRECONDITION: There are Google Cloud projects linked to the Google Cloud entitlement's Cloud Billing subaccount. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: Entitlement resource not found. * DELETION_TYPE_NOT_ALLOWED: Cancel is only allowed for Google Workspace add-ons, or entitlements for Google Cloud's development platform. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: The ID of a long-running operation. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The response will contain google.protobuf.Empty on success. The Operation metadata will contain an instance of OperationMetadata. * @example * ```js * // Before running the sample: @@ -5201,7 +6024,7 @@ export namespace cloudchannel_v1 { * * // Do the magic * const res = await cloudchannel.accounts.customers.entitlements.cancel({ - * // Required. The resource name of the entitlement to cancel. The name takes the format: accounts/{account_id\}/customers/{customer_id\}/entitlements/{entitlement_id\} + * // Required. The resource name of the entitlement to cancel. Name uses the format: accounts/{account_id\}/customers/{customer_id\}/entitlements/{entitlement_id\} * name: * 'accounts/my-account/customers/my-customer/entitlements/my-entitlement', * @@ -5321,7 +6144,7 @@ export namespace cloudchannel_v1 { } /** - * Updates the Offer for an existing customer entitlement. An entitlement update is a long-running operation and results in updates to the entitlement as a result of fulfillment. Possible Error Codes: * PERMISSION_DENIED: If the customer doesn't belong to the reseller. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. * NOT_FOUND: Offer or Entitlement resource not found. * INTERNAL: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support. Return Value: Long Running Operation ID. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata. + * Updates the Offer for an existing customer entitlement. An entitlement update is a long-running operation and it updates the entitlement as a result of fulfillment. Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: Offer or Entitlement resource not found. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: The ID of a long-running operation. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata. * @example * ```js * // Before running the sample: @@ -5347,7 +6170,7 @@ export namespace cloudchannel_v1 { * * // Do the magic * const res = await cloudchannel.accounts.customers.entitlements.changeOffer({ - * // Required. The name of the entitlement to update. Format: accounts/{account_id\}/customers/{customer_id\}/entitlements/{entitlement_id\} + * // Required. The resource name of the entitlement to update. Name uses the format: accounts/{account_id\}/customers/{customer_id\}/entitlements/{entitlement_id\} * name: * 'accounts/my-account/customers/my-customer/entitlements/my-entitlement', * @@ -5473,7 +6296,7 @@ export namespace cloudchannel_v1 { } /** - * Change parameters of the entitlement An entitlement parameters update is a long-running operation and results in updates to the entitlement as a result of fulfillment. Possible Error Codes: * PERMISSION_DENIED: If the customer doesn't belong to the reseller. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. For example, if the number of seats being changed to is greater than the allowed number of max seats for the resource. Or decreasing seats for a commitment based plan. * NOT_FOUND: Entitlement resource not found. * INTERNAL: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support. Return Value: Long Running Operation ID. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata. + * Change parameters of the entitlement. An entitlement update is a long-running operation and it updates the entitlement as a result of fulfillment. Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid. For example, the number of seats being changed is greater than the allowed number of max seats, or decreasing seats for a commitment based plan. * NOT_FOUND: Entitlement resource not found. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: The ID of a long-running operation. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata. * @example * ```js * // Before running the sample: @@ -5500,7 +6323,7 @@ export namespace cloudchannel_v1 { * // Do the magic * const res = await cloudchannel.accounts.customers.entitlements.changeParameters( * { - * // Required. The name of the entitlement to update. The name takes the format: accounts/{account_id\}/customers/{customer_id\}/entitlements/{entitlement_id\} + * // Required. The name of the entitlement to update. Name uses the format: accounts/{account_id\}/customers/{customer_id\}/entitlements/{entitlement_id\} * name: * 'accounts/my-account/customers/my-customer/entitlements/my-entitlement', * @@ -5626,7 +6449,7 @@ export namespace cloudchannel_v1 { } /** - * Updates the renewal settings for an existing customer entitlement. An entitlement update is a long-running operation and results in updates to the entitlement as a result of fulfillment. Possible Error Codes: * PERMISSION_DENIED: If the customer doesn't belong to the reseller. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. * NOT_FOUND: Entitlement resource not found. * NOT_COMMITMENT_PLAN: Renewal Settings are only applicable for a commitment plan. Can't enable or disable renewal for non-commitment plans. * INTERNAL: Any non user error related to a technical issue in the backend. In this case, contact Cloud Channel support. * UNKNOWN: Any non user error related to a technical issue in the backend. In this case, contact Cloud Channel support. Return Value: Long Running Operation ID. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata. + * Updates the renewal settings for an existing customer entitlement. An entitlement update is a long-running operation and it updates the entitlement as a result of fulfillment. Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: Entitlement resource not found. * NOT_COMMITMENT_PLAN: Renewal Settings are only applicable for a commitment plan. Can't enable or disable renewals for non-commitment plans. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: The ID of a long-running operation. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata. * @example * ```js * // Before running the sample: @@ -5653,7 +6476,7 @@ export namespace cloudchannel_v1 { * // Do the magic * const res = await cloudchannel.accounts.customers.entitlements.changeRenewalSettings( * { - * // Required. The name of the entitlement to update. The name takes the format: accounts/{account_id\}/customers/{customer_id\}/entitlements/{entitlement_id\} + * // Required. The name of the entitlement to update. Name uses the format: accounts/{account_id\}/customers/{customer_id\}/entitlements/{entitlement_id\} * name: * 'accounts/my-account/customers/my-customer/entitlements/my-entitlement', * @@ -5778,7 +6601,7 @@ export namespace cloudchannel_v1 { } /** - * Creates an entitlement for a customer. Possible Error Codes: * PERMISSION_DENIED: If the customer doesn't belong to the reseller. * INVALID_ARGUMENT: It can happen in below scenarios - * Missing or invalid required parameters in the request. * Cannot purchase an entitlement if there is already an entitlement for customer, for a SKU from the same product family. * INVALID_VALUE: Offer passed in isn't valid. Make sure OfferId is valid. If it is valid, then contact Google Channel support for further troubleshooting. * NOT_FOUND: If the customer or offer resource is not found for the reseller. * ALREADY_EXISTS: This failure can happen in the following cases: * If the SKU has been already purchased for the customer. * If the customer's primary email already exists. In this case retry after changing the customer's primary contact email. * CONDITION_NOT_MET or FAILED_PRECONDITION: This failure can happen in the following cases: * Purchasing a SKU that requires domain verification and the domain has not been verified. * Purchasing an Add-On SKU like Vault or Drive without purchasing the pre-requisite SKU, such as Google Workspace Business Starter. * Applicable only for developer accounts: reseller and resold domain. Must meet the following domain naming requirements: * Domain names must start with goog-test. * Resold domain names must include the reseller domain. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel Support in this case. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel Support in this case. Return Value: Long Running Operation ID. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata. + * Creates an entitlement for a customer. Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: * Required request parameters are missing or invalid. * There is already a customer entitlement for a SKU from the same product family. * INVALID_VALUE: Make sure the OfferId is valid. If it is, contact Google Channel support for further troubleshooting. * NOT_FOUND: The customer or offer resource was not found. * ALREADY_EXISTS: * The SKU was already purchased for the customer. * The customer's primary email already exists. Retry after changing the customer's primary contact email. * CONDITION_NOT_MET or FAILED_PRECONDITION: * The domain required for purchasing a SKU has not been verified. * A pre-requisite SKU required to purchase an Add-On SKU is missing. For example, Google Workspace Business Starter is required to purchase Vault or Drive. * (Developer accounts only) Reseller and resold domain must meet the following naming requirements: * Domain names must start with goog-test. * Domain names must include the reseller domain. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: The ID of a long-running operation. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata. * @example * ```js * // Before running the sample: @@ -5804,7 +6627,7 @@ export namespace cloudchannel_v1 { * * // Do the magic * const res = await cloudchannel.accounts.customers.entitlements.create({ - * // Required. The resource name of reseller's customer account in which to create the entitlement. The parent takes the format: accounts/{account_id\}/customers/{customer_id\} + * // Required. The resource name of the reseller's customer account in which to create the entitlement. Parent uses the format: accounts/{account_id\}/customers/{customer_id\} * parent: 'accounts/my-account/customers/my-customer', * * // Request body metadata @@ -5927,7 +6750,7 @@ export namespace cloudchannel_v1 { } /** - * Returns a requested Entitlement resource. Possible Error Codes: * PERMISSION_DENIED: If the customer doesn't belong to the reseller. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. * NOT_FOUND: If the entitlement is not found for the customer. Return Value: If found, the requested Entitlement resource, otherwise returns an error. + * Returns a requested Entitlement resource. Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: The customer entitlement was not found. Return value: The requested Entitlement resource. * @example * ```js * // Before running the sample: @@ -5953,7 +6776,7 @@ export namespace cloudchannel_v1 { * * // Do the magic * const res = await cloudchannel.accounts.customers.entitlements.get({ - * // Required. The resource name of the entitlement to retrieve. The name takes the format: accounts/{account_id\}/customers/{customer_id\}/entitlements/{id\} + * // Required. The resource name of the entitlement to retrieve. Name uses the format: accounts/{account_id\}/customers/{customer_id\}/entitlements/{entitlement_id\} * name: * 'accounts/my-account/customers/my-customer/entitlements/my-entitlement', * }); @@ -6074,7 +6897,7 @@ export namespace cloudchannel_v1 { } /** - * List Entitlements belonging to a customer. Possible Error Codes: * PERMISSION_DENIED: If the customer doesn't belong to the reseller. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. Return Value: List of Entitlements belonging to the customer, or empty list if there are none. + * Lists Entitlements belonging to a customer. Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid. Return value: A list of the customer's Entitlements. * @example * ```js * // Before running the sample: @@ -6100,11 +6923,11 @@ export namespace cloudchannel_v1 { * * // Do the magic * const res = await cloudchannel.accounts.customers.entitlements.list({ - * // Optional. Requested page size. Server might return fewer results than requested. If unspecified, at most 50 entitlements will be returned. The maximum value is 100; values above 100 will be coerced to 100. + * // Optional. Requested page size. Server might return fewer results than requested. If unspecified, return at most 50 entitlements. The maximum value is 100; the server will coerce values above 100. * pageSize: 'placeholder-value', - * // Optional. A token identifying a page of results, if other than the first one. Typically obtained via ListEntitlementsResponse.next_page_token of the previous CloudChannelService.ListEntitlements call. + * // Optional. A token for a page of results other than the first page. Obtained using ListEntitlementsResponse.next_page_token of the previous CloudChannelService.ListEntitlements call. * pageToken: 'placeholder-value', - * // Required. The resource name of the reseller's customer account for which to list entitlements. The parent takes the format: accounts/{account_id\}/customers/{customer_id\} + * // Required. The resource name of the reseller's customer account to list entitlements for. Parent uses the format: accounts/{account_id\}/customers/{customer_id\} * parent: 'accounts/my-account/customers/my-customer', * }); * console.log(res.data); @@ -6217,7 +7040,7 @@ export namespace cloudchannel_v1 { } /** - * Starts paid service for a trial entitlement. Starts paid service for a trial entitlement immediately. This method is only applicable if a plan has already been set up for a trial entitlement but has some trial days remaining. Possible Error Codes: * PERMISSION_DENIED: If the customer doesn't belong to the reseller. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. * NOT_FOUND: Entitlement resource not found. * FAILED_PRECONDITION/NOT_IN_TRIAL: This method only works for entitlement on trial plans. * INTERNAL: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support. Return Value: Long Running Operation ID. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata. + * Starts paid service for a trial entitlement. Starts paid service for a trial entitlement immediately. This method is only applicable if a plan is set up for a trial entitlement but has some trial days remaining. Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: Entitlement resource not found. * FAILED_PRECONDITION/NOT_IN_TRIAL: This method only works for entitlement on trial plans. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: The ID of a long-running operation. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata. * @example * ```js * // Before running the sample: @@ -6244,7 +7067,7 @@ export namespace cloudchannel_v1 { * // Do the magic * const res = await cloudchannel.accounts.customers.entitlements.startPaidService( * { - * // Required. The name of the entitlement for which paid service is being started. The name takes the format: accounts/{account_id\}/customers/{customer_id\}/entitlements/{entitlement_id\} + * // Required. The name of the entitlement to start a paid service for. Name uses the format: accounts/{account_id\}/customers/{customer_id\}/entitlements/{entitlement_id\} * name: * 'accounts/my-account/customers/my-customer/entitlements/my-entitlement', * @@ -6368,7 +7191,7 @@ export namespace cloudchannel_v1 { } /** - * Suspends a previously fulfilled entitlement. An entitlement suspension is a long-running operation. Possible Error Codes: * PERMISSION_DENIED: If the customer doesn't belong to the reseller. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. * NOT_FOUND: Entitlement resource not found. * NOT_ACTIVE: Entitlement is not active. * INTERNAL: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support. Return Value: Long Running Operation ID. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata. + * Suspends a previously fulfilled entitlement. An entitlement suspension is a long-running operation. Possible error codes: * PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: Entitlement resource not found. * NOT_ACTIVE: Entitlement is not active. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: The ID of a long-running operation. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata. * @example * ```js * // Before running the sample: @@ -6394,7 +7217,7 @@ export namespace cloudchannel_v1 { * * // Do the magic * const res = await cloudchannel.accounts.customers.entitlements.suspend({ - * // Required. The resource name of the entitlement to suspend. The name takes the format: accounts/{account_id\}/customers/{customer_id\}/entitlements/{entitlement_id\} + * // Required. The resource name of the entitlement to suspend. Name uses the format: accounts/{account_id\}/customers/{customer_id\}/entitlements/{entitlement_id\} * name: * 'accounts/my-account/customers/my-customer/entitlements/my-entitlement', * @@ -6520,7 +7343,7 @@ export namespace cloudchannel_v1 { export interface Params$Resource$Accounts$Customers$Entitlements$Activate extends StandardParameters { /** - * Required. The resource name of the entitlement to activate. The name takes the format: accounts/{account_id\}/customers/{customer_id\}/entitlements/{entitlement_id\} + * Required. The resource name of the entitlement to activate. Name uses the format: accounts/{account_id\}/customers/{customer_id\}/entitlements/{entitlement_id\} */ name?: string; @@ -6532,7 +7355,7 @@ export namespace cloudchannel_v1 { export interface Params$Resource$Accounts$Customers$Entitlements$Cancel extends StandardParameters { /** - * Required. The resource name of the entitlement to cancel. The name takes the format: accounts/{account_id\}/customers/{customer_id\}/entitlements/{entitlement_id\} + * Required. The resource name of the entitlement to cancel. Name uses the format: accounts/{account_id\}/customers/{customer_id\}/entitlements/{entitlement_id\} */ name?: string; @@ -6544,7 +7367,7 @@ export namespace cloudchannel_v1 { export interface Params$Resource$Accounts$Customers$Entitlements$Changeoffer extends StandardParameters { /** - * Required. The name of the entitlement to update. Format: accounts/{account_id\}/customers/{customer_id\}/entitlements/{entitlement_id\} + * Required. The resource name of the entitlement to update. Name uses the format: accounts/{account_id\}/customers/{customer_id\}/entitlements/{entitlement_id\} */ name?: string; @@ -6556,7 +7379,7 @@ export namespace cloudchannel_v1 { export interface Params$Resource$Accounts$Customers$Entitlements$Changeparameters extends StandardParameters { /** - * Required. The name of the entitlement to update. The name takes the format: accounts/{account_id\}/customers/{customer_id\}/entitlements/{entitlement_id\} + * Required. The name of the entitlement to update. Name uses the format: accounts/{account_id\}/customers/{customer_id\}/entitlements/{entitlement_id\} */ name?: string; @@ -6568,7 +7391,7 @@ export namespace cloudchannel_v1 { export interface Params$Resource$Accounts$Customers$Entitlements$Changerenewalsettings extends StandardParameters { /** - * Required. The name of the entitlement to update. The name takes the format: accounts/{account_id\}/customers/{customer_id\}/entitlements/{entitlement_id\} + * Required. The name of the entitlement to update. Name uses the format: accounts/{account_id\}/customers/{customer_id\}/entitlements/{entitlement_id\} */ name?: string; @@ -6580,7 +7403,7 @@ export namespace cloudchannel_v1 { export interface Params$Resource$Accounts$Customers$Entitlements$Create extends StandardParameters { /** - * Required. The resource name of reseller's customer account in which to create the entitlement. The parent takes the format: accounts/{account_id\}/customers/{customer_id\} + * Required. The resource name of the reseller's customer account in which to create the entitlement. Parent uses the format: accounts/{account_id\}/customers/{customer_id\} */ parent?: string; @@ -6592,29 +7415,29 @@ export namespace cloudchannel_v1 { export interface Params$Resource$Accounts$Customers$Entitlements$Get extends StandardParameters { /** - * Required. The resource name of the entitlement to retrieve. The name takes the format: accounts/{account_id\}/customers/{customer_id\}/entitlements/{id\} + * Required. The resource name of the entitlement to retrieve. Name uses the format: accounts/{account_id\}/customers/{customer_id\}/entitlements/{entitlement_id\} */ name?: string; } export interface Params$Resource$Accounts$Customers$Entitlements$List extends StandardParameters { /** - * Optional. Requested page size. Server might return fewer results than requested. If unspecified, at most 50 entitlements will be returned. The maximum value is 100; values above 100 will be coerced to 100. + * Optional. Requested page size. Server might return fewer results than requested. If unspecified, return at most 50 entitlements. The maximum value is 100; the server will coerce values above 100. */ pageSize?: number; /** - * Optional. A token identifying a page of results, if other than the first one. Typically obtained via ListEntitlementsResponse.next_page_token of the previous CloudChannelService.ListEntitlements call. + * Optional. A token for a page of results other than the first page. Obtained using ListEntitlementsResponse.next_page_token of the previous CloudChannelService.ListEntitlements call. */ pageToken?: string; /** - * Required. The resource name of the reseller's customer account for which to list entitlements. The parent takes the format: accounts/{account_id\}/customers/{customer_id\} + * Required. The resource name of the reseller's customer account to list entitlements for. Parent uses the format: accounts/{account_id\}/customers/{customer_id\} */ parent?: string; } export interface Params$Resource$Accounts$Customers$Entitlements$Startpaidservice extends StandardParameters { /** - * Required. The name of the entitlement for which paid service is being started. The name takes the format: accounts/{account_id\}/customers/{customer_id\}/entitlements/{entitlement_id\} + * Required. The name of the entitlement to start a paid service for. Name uses the format: accounts/{account_id\}/customers/{customer_id\}/entitlements/{entitlement_id\} */ name?: string; @@ -6626,7 +7449,7 @@ export namespace cloudchannel_v1 { export interface Params$Resource$Accounts$Customers$Entitlements$Suspend extends StandardParameters { /** - * Required. The resource name of the entitlement to suspend. The name takes the format: accounts/{account_id\}/customers/{customer_id\}/entitlements/{entitlement_id\} + * Required. The resource name of the entitlement to suspend. Name uses the format: accounts/{account_id\}/customers/{customer_id\}/entitlements/{entitlement_id\} */ name?: string; @@ -6643,7 +7466,7 @@ export namespace cloudchannel_v1 { } /** - * Lists the Offers the reseller can sell. Possible Error Codes: * INVALID_ARGUMENT: Missing or invalid required parameters in the request. + * Lists the Offers the reseller can sell. Possible error codes: * INVALID_ARGUMENT: Required request parameters are missing or invalid. * @example * ```js * // Before running the sample: @@ -6669,15 +7492,15 @@ export namespace cloudchannel_v1 { * * // Do the magic * const res = await cloudchannel.accounts.offers.list({ - * // Optional. The expression to filter results by name (name of the Offer), sku.name (name of the SKU) or sku.product.name (name of the Product). Example 1: sku.product.name=products/p1 AND sku.name!=products/p1/skus/s1 Example 2: name=accounts/a1/offers/o1 + * // Optional. The expression to filter results by name (name of the Offer), sku.name (name of the SKU), or sku.product.name (name of the Product). Example 1: sku.product.name=products/p1 AND sku.name!=products/p1/skus/s1 Example 2: name=accounts/a1/offers/o1 * filter: 'placeholder-value', - * // Optional. The BCP-47 language code, such as "en-US". If specified, the response will be localized to the corresponding language code. Default is "en-US". + * // Optional. The BCP-47 language code. For example, "en-US". The response will localize in the corresponding language code, if specified. The default value is "en-US". * languageCode: 'placeholder-value', - * // Optional. Requested page size. Server might return fewer results than requested. If unspecified, at most 500 Offers will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. + * // Optional. Requested page size. Server might return fewer results than requested. If unspecified, returns at most 500 Offers. The maximum value is 1000; the server will coerce values above 1000. * pageSize: 'placeholder-value', - * // Optional. A token identifying a page of results, if other than the first one. + * // Optional. A token for a page of results other than the first page. * pageToken: 'placeholder-value', - * // Required. The resource name of the reseller account from which to list Offers. The parent takes the format: accounts/{account_id\}. + * // Required. The resource name of the reseller account from which to list Offers. Parent uses the format: accounts/{account_id\}. * parent: 'accounts/my-account', * }); * console.log(res.data); @@ -6793,23 +7616,23 @@ export namespace cloudchannel_v1 { export interface Params$Resource$Accounts$Offers$List extends StandardParameters { /** - * Optional. The expression to filter results by name (name of the Offer), sku.name (name of the SKU) or sku.product.name (name of the Product). Example 1: sku.product.name=products/p1 AND sku.name!=products/p1/skus/s1 Example 2: name=accounts/a1/offers/o1 + * Optional. The expression to filter results by name (name of the Offer), sku.name (name of the SKU), or sku.product.name (name of the Product). Example 1: sku.product.name=products/p1 AND sku.name!=products/p1/skus/s1 Example 2: name=accounts/a1/offers/o1 */ filter?: string; /** - * Optional. The BCP-47 language code, such as "en-US". If specified, the response will be localized to the corresponding language code. Default is "en-US". + * Optional. The BCP-47 language code. For example, "en-US". The response will localize in the corresponding language code, if specified. The default value is "en-US". */ languageCode?: string; /** - * Optional. Requested page size. Server might return fewer results than requested. If unspecified, at most 500 Offers will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. + * Optional. Requested page size. Server might return fewer results than requested. If unspecified, returns at most 500 Offers. The maximum value is 1000; the server will coerce values above 1000. */ pageSize?: number; /** - * Optional. A token identifying a page of results, if other than the first one. + * Optional. A token for a page of results other than the first page. */ pageToken?: string; /** - * Required. The resource name of the reseller account from which to list Offers. The parent takes the format: accounts/{account_id\}. + * Required. The resource name of the reseller account from which to list Offers. Parent uses the format: accounts/{account_id\}. */ parent?: string; } @@ -7411,7 +8234,7 @@ export namespace cloudchannel_v1 { } /** - * Lists the Products the reseller is authorized to sell. Possible Error Codes: * INVALID_ARGUMENT: Missing or invalid required parameters in the request. + * Lists the Products the reseller is authorized to sell. Possible error codes: * INVALID_ARGUMENT: Required request parameters are missing or invalid. * @example * ```js * // Before running the sample: @@ -7439,11 +8262,11 @@ export namespace cloudchannel_v1 { * const res = await cloudchannel.products.list({ * // Required. The resource name of the reseller account. Format: accounts/{account_id\}. * account: 'placeholder-value', - * // Optional. The BCP-47 language code, such as "en-US". If specified, the response will be localized to the corresponding language code. Default is "en-US". + * // Optional. The BCP-47 language code. For example, "en-US". The response will localize in the corresponding language code, if specified. The default value is "en-US". * languageCode: 'placeholder-value', - * // Optional. Requested page size. Server might return fewer results than requested. If unspecified, at most 100 Products will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. + * // Optional. Requested page size. Server might return fewer results than requested. If unspecified, returns at most 100 Products. The maximum value is 1000; the server will coerce values above 1000. * pageSize: 'placeholder-value', - * // Optional. A token identifying a page of results, if other than the first one. + * // Optional. A token for a page of results other than the first page. * pageToken: 'placeholder-value', * }); * console.log(res.data); @@ -7558,15 +8381,15 @@ export namespace cloudchannel_v1 { */ account?: string; /** - * Optional. The BCP-47 language code, such as "en-US". If specified, the response will be localized to the corresponding language code. Default is "en-US". + * Optional. The BCP-47 language code. For example, "en-US". The response will localize in the corresponding language code, if specified. The default value is "en-US". */ languageCode?: string; /** - * Optional. Requested page size. Server might return fewer results than requested. If unspecified, at most 100 Products will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. + * Optional. Requested page size. Server might return fewer results than requested. If unspecified, returns at most 100 Products. The maximum value is 1000; the server will coerce values above 1000. */ pageSize?: number; /** - * Optional. A token identifying a page of results, if other than the first one. + * Optional. A token for a page of results other than the first page. */ pageToken?: string; } @@ -7578,7 +8401,7 @@ export namespace cloudchannel_v1 { } /** - * Lists the SKUs for a product the reseller is authorized to sell. Possible Error Codes: * INVALID_ARGUMENT: Missing or invalid required parameters in the request. + * Lists the SKUs for a product the reseller is authorized to sell. Possible error codes: * INVALID_ARGUMENT: Required request parameters are missing or invalid. * @example * ```js * // Before running the sample: @@ -7606,13 +8429,13 @@ export namespace cloudchannel_v1 { * const res = await cloudchannel.products.skus.list({ * // Required. Resource name of the reseller. Format: accounts/{account_id\}. * account: 'placeholder-value', - * // Optional. The BCP-47 language code, such as "en-US". If specified, the response will be localized to the corresponding language code. Default is "en-US". + * // Optional. The BCP-47 language code. For example, "en-US". The response will localize in the corresponding language code, if specified. The default value is "en-US". * languageCode: 'placeholder-value', - * // Optional. Requested page size. Server might return fewer results than requested. If unspecified, at most 100 SKUs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. + * // Optional. Requested page size. Server might return fewer results than requested. If unspecified, returns at most 100 SKUs. The maximum value is 1000; the server will coerce values above 1000. * pageSize: 'placeholder-value', - * // Optional. A token identifying a page of results, if other than the first one. Optional. + * // Optional. A token for a page of results other than the first page. Optional. * pageToken: 'placeholder-value', - * // Required. The resource name of the Product for which to list SKUs. The parent takes the format: products/{product_id\}. Supports products/- to retrieve SKUs for all products. + * // Required. The resource name of the Product to list SKUs for. Parent uses the format: products/{product_id\}. Supports products/- to retrieve SKUs for all products. * parent: 'products/my-product', * }); * console.log(res.data); @@ -7729,19 +8552,19 @@ export namespace cloudchannel_v1 { */ account?: string; /** - * Optional. The BCP-47 language code, such as "en-US". If specified, the response will be localized to the corresponding language code. Default is "en-US". + * Optional. The BCP-47 language code. For example, "en-US". The response will localize in the corresponding language code, if specified. The default value is "en-US". */ languageCode?: string; /** - * Optional. Requested page size. Server might return fewer results than requested. If unspecified, at most 100 SKUs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. + * Optional. Requested page size. Server might return fewer results than requested. If unspecified, returns at most 100 SKUs. The maximum value is 1000; the server will coerce values above 1000. */ pageSize?: number; /** - * Optional. A token identifying a page of results, if other than the first one. Optional. + * Optional. A token for a page of results other than the first page. Optional. */ pageToken?: string; /** - * Required. The resource name of the Product for which to list SKUs. The parent takes the format: products/{product_id\}. Supports products/- to retrieve SKUs for all products. + * Required. The resource name of the Product to list SKUs for. Parent uses the format: products/{product_id\}. Supports products/- to retrieve SKUs for all products. */ parent?: string; } diff --git a/src/apis/cloudfunctions/v1.ts b/src/apis/cloudfunctions/v1.ts index 2cf5568996e..eadfcd93767 100644 --- a/src/apis/cloudfunctions/v1.ts +++ b/src/apis/cloudfunctions/v1.ts @@ -957,13 +957,13 @@ export namespace cloudfunctions_v1 { * * // Do the magic * const res = await cloudfunctions.projects.locations.list({ - * // The standard list 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). * filter: 'placeholder-value', * // The resource that owns the locations collection, if applicable. * name: 'projects/my-project', - * // The standard list page size. + * // The maximum number of results to return. If not set, the service will select a default. * pageSize: 'placeholder-value', - * // The standard list page token. + * // A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. * pageToken: 'placeholder-value', * }); * console.log(res.data); @@ -1076,7 +1076,7 @@ export namespace cloudfunctions_v1 { export interface Params$Resource$Projects$Locations$List extends StandardParameters { /** - * The standard list 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). */ filter?: string; /** @@ -1084,11 +1084,11 @@ export namespace cloudfunctions_v1 { */ name?: string; /** - * The standard list page size. + * The maximum number of results to return. If not set, the service will select a default. */ pageSize?: number; /** - * The standard list page token. + * A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. */ pageToken?: string; } diff --git a/src/apis/cloudidentity/v1.ts b/src/apis/cloudidentity/v1.ts index c1c5df2a6f9..fae86955623 100644 --- a/src/apis/cloudidentity/v1.ts +++ b/src/apis/cloudidentity/v1.ts @@ -236,7 +236,7 @@ export namespace cloudidentity_v1 { */ export interface Schema$GoogleAppsCloudidentityDevicesV1ApproveDeviceUserRequest { /** - * Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. + * Optional. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. */ customer?: string | null; } @@ -254,7 +254,7 @@ export namespace cloudidentity_v1 { */ export interface Schema$GoogleAppsCloudidentityDevicesV1BlockDeviceUserRequest { /** - * Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. + * Optional. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. */ customer?: string | null; } @@ -272,7 +272,7 @@ export namespace cloudidentity_v1 { */ export interface Schema$GoogleAppsCloudidentityDevicesV1CancelWipeDeviceRequest { /** - * Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. + * Optional. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. */ customer?: string | null; } @@ -290,7 +290,7 @@ export namespace cloudidentity_v1 { */ export interface Schema$GoogleAppsCloudidentityDevicesV1CancelWipeDeviceUserRequest { /** - * Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. + * Optional. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. */ customer?: string | null; } @@ -600,7 +600,7 @@ export namespace cloudidentity_v1 { */ export interface Schema$GoogleAppsCloudidentityDevicesV1WipeDeviceRequest { /** - * Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. + * Optional. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. */ customer?: string | null; } @@ -618,7 +618,7 @@ export namespace cloudidentity_v1 { */ export interface Schema$GoogleAppsCloudidentityDevicesV1WipeDeviceUserRequest { /** - * Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. + * Optional. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. */ customer?: string | null; } @@ -951,7 +951,7 @@ export namespace cloudidentity_v1 { membershipRole?: Schema$MembershipRole; } /** - * The `UserInvitation` resource represents an email sent to an unmanaged user account (an email address that shares the domain of the Google Workspace customer but is not managed by it yet), inviting them to join the customer’s domain. If the user accepts the `UserInvitation`, the account will become a managed account. + * The `UserInvitation` resource represents an email that can be sent to an unmanaged user account inviting them to join the customer’s Google Workspace or Cloud Identity account. An unmanaged account shares an email address domain with the Google Workspace or Cloud Identity account but is not managed by it yet. If the user accepts the `UserInvitation`, the user account will become managed. */ export interface Schema$UserInvitation { /** @@ -1149,7 +1149,7 @@ export namespace cloudidentity_v1 { * * // Do the magic * const res = await cloudidentity.devices.create({ - * // Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. + * // Optional. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. * customer: 'placeholder-value', * * // Request body metadata @@ -1314,7 +1314,7 @@ export namespace cloudidentity_v1 { * * // Do the magic * const res = await cloudidentity.devices.delete({ - * // Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. + * // Optional. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. * customer: 'placeholder-value', * // Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the Device in format: `devices/{device_id\}`, where device_id is the unique ID assigned to the Device. * name: 'devices/my-device', @@ -1446,7 +1446,7 @@ export namespace cloudidentity_v1 { * * // Do the magic * const res = await cloudidentity.devices.get({ - * // Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the Customer in the format: `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. If you're using this API for your own organization, use `customers/my_customer`. If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. + * // Optional. [Resource name](https://cloud.google.com/apis/design/resource_names) of the Customer in the format: `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. If you're using this API for your own organization, use `customers/my_customer`. If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. * customer: 'placeholder-value', * // Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the Device in the format: `devices/{device_id\}`, where device_id is the unique ID assigned to the Device. * name: 'devices/my-device', @@ -1610,7 +1610,7 @@ export namespace cloudidentity_v1 { * * // Do the magic * const res = await cloudidentity.devices.list({ - * // Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer in the format: `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. If you're using this API for your own organization, use `customers/my_customer`. If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. + * // Optional. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer in the format: `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. If you're using this API for your own organization, use `customers/my_customer`. If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. * customer: 'placeholder-value', * // Optional. Additional restrictions when fetching list of devices. For a list of search fields, refer to [Mobile device search fields](https://developers.google.com/admin-sdk/directory/v1/search-operators). Multiple search fields are separated by the space character. * filter: 'placeholder-value', @@ -1882,7 +1882,7 @@ export namespace cloudidentity_v1 { } export interface Params$Resource$Devices$Create extends StandardParameters { /** - * Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. + * Optional. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. */ customer?: string; @@ -1893,7 +1893,7 @@ export namespace cloudidentity_v1 { } export interface Params$Resource$Devices$Delete extends StandardParameters { /** - * Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. + * Optional. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. */ customer?: string; /** @@ -1903,7 +1903,7 @@ export namespace cloudidentity_v1 { } export interface Params$Resource$Devices$Get extends StandardParameters { /** - * Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the Customer in the format: `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. If you're using this API for your own organization, use `customers/my_customer`. If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. + * Optional. [Resource name](https://cloud.google.com/apis/design/resource_names) of the Customer in the format: `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. If you're using this API for your own organization, use `customers/my_customer`. If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. */ customer?: string; /** @@ -1913,7 +1913,7 @@ export namespace cloudidentity_v1 { } export interface Params$Resource$Devices$List extends StandardParameters { /** - * Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer in the format: `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. If you're using this API for your own organization, use `customers/my_customer`. If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. + * Optional. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer in the format: `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. If you're using this API for your own organization, use `customers/my_customer`. If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. */ customer?: string; /** @@ -2409,7 +2409,7 @@ export namespace cloudidentity_v1 { * * // Do the magic * const res = await cloudidentity.devices.deviceUsers.delete({ - * // Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. + * // Optional. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. * customer: 'placeholder-value', * // Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the Device in format: `devices/{device_id\}/deviceUsers/{device_user_id\}`, where device_id is the unique ID assigned to the Device, and device_user_id is the unique ID assigned to the User. * name: 'devices/my-device/deviceUsers/my-deviceUser', @@ -2542,7 +2542,7 @@ export namespace cloudidentity_v1 { * * // Do the magic * const res = await cloudidentity.devices.deviceUsers.get({ - * // Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. + * // Optional. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. * customer: 'placeholder-value', * // Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the Device in format: `devices/{device_id\}/deviceUsers/{device_user_id\}`, where device_id is the unique ID assigned to the Device, and device_user_id is the unique ID assigned to the User. * name: 'devices/my-device/deviceUsers/my-deviceUser', @@ -2689,7 +2689,7 @@ export namespace cloudidentity_v1 { * * // Do the magic * const res = await cloudidentity.devices.deviceUsers.list({ - * // Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. + * // Optional. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. * customer: 'placeholder-value', * // Optional. Additional restrictions when fetching list of devices. For a list of search fields, refer to [Mobile device search fields](https://developers.google.com/admin-sdk/directory/v1/search-operators). Multiple search fields are separated by the space character. * filter: 'placeholder-value', @@ -3142,7 +3142,7 @@ export namespace cloudidentity_v1 { export interface Params$Resource$Devices$Deviceusers$Delete extends StandardParameters { /** - * Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. + * Optional. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. */ customer?: string; /** @@ -3153,7 +3153,7 @@ export namespace cloudidentity_v1 { export interface Params$Resource$Devices$Deviceusers$Get extends StandardParameters { /** - * Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. + * Optional. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. */ customer?: string; /** @@ -3164,7 +3164,7 @@ export namespace cloudidentity_v1 { export interface Params$Resource$Devices$Deviceusers$List extends StandardParameters { /** - * Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. + * Optional. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. */ customer?: string; /** @@ -3261,9 +3261,9 @@ export namespace cloudidentity_v1 { * * // Do the magic * const res = await cloudidentity.devices.deviceUsers.clientStates.get({ - * // Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. + * // Optional. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. * customer: 'placeholder-value', - * // Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the ClientState in format: `devices/{device_id\}/deviceUsers/{device_user_id\}/clientStates/{partner_id\}`, where device_id is the unique ID assigned to the Device, device_user_id is the unique ID assigned to the User and partner_id identifies the partner storing the data. To get the client state for devices belonging to your own organization, the `partnerId` is in the format: `customerId-*anystring*`. Where the `customerId` is your organization's customer ID and `anystring` is any suffix. This suffix is used in setting up Custom Access Levels in Context-Aware Access. You may use `my_customer` instead of the customer ID for devices managed by your own organization. + * // Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the ClientState in format: `devices/{device_id\}/deviceUsers/{device_user_id\}/clientStates/{partner_id\}`, where `device_id` is the unique ID assigned to the Device, `device_user_id` is the unique ID assigned to the User and `partner_id` identifies the partner storing the data. To get the client state for devices belonging to your own organization, the `partnerId` is in the format: `customerId-*anystring*`. Where the `customerId` is your organization's customer ID and `anystring` is any suffix. This suffix is used in setting up Custom Access Levels in Context-Aware Access. You may use `my_customer` instead of the customer ID for devices managed by your own organization. You may specify `-` in place of the `{device_id\}`, so the ClientState resource name can be: `devices/-/deviceUsers/{device_user_resource_id\}/clientStates/{partner_id\}`. * name: * 'devices/my-device/deviceUsers/my-deviceUser/clientStates/my-clientState', * }); @@ -3411,7 +3411,7 @@ export namespace cloudidentity_v1 { * * // Do the magic * const res = await cloudidentity.devices.deviceUsers.clientStates.list({ - * // Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. + * // Optional. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. * customer: 'placeholder-value', * // Optional. Additional restrictions when fetching list of client states. * filter: 'placeholder-value', @@ -3559,7 +3559,7 @@ export namespace cloudidentity_v1 { * * // Do the magic * const res = await cloudidentity.devices.deviceUsers.clientStates.patch({ - * // Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. + * // Optional. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. * customer: 'placeholder-value', * // Output only. [Resource name](https://cloud.google.com/apis/design/resource_names) of the ClientState in format: `devices/{device_id\}/deviceUsers/{device_user_id\}/clientState/{partner_id\}`, where partner_id corresponds to the partner storing the data. For partners belonging to the "BeyondCorp Alliance", this is the partner ID specified to you by Google. For all other callers, this is a string of the form: `{customer_id\}-suffix`, where `customer_id` is your customer ID. The *suffix* is any string the caller specifies. This string will be displayed verbatim in the administration console. This suffix is used in setting up Custom Access Levels in Context-Aware Access. Your organization's customer ID can be obtained from the URL: `GET https://www.googleapis.com/admin/directory/v1/customers/my_customer` The `id` field in the response contains the customer ID starting with the letter 'C'. The customer ID to be used in this API is the string after the letter 'C' (not including 'C') * name: @@ -3691,18 +3691,18 @@ export namespace cloudidentity_v1 { export interface Params$Resource$Devices$Deviceusers$Clientstates$Get extends StandardParameters { /** - * Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. + * Optional. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. */ customer?: string; /** - * Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the ClientState in format: `devices/{device_id\}/deviceUsers/{device_user_id\}/clientStates/{partner_id\}`, where device_id is the unique ID assigned to the Device, device_user_id is the unique ID assigned to the User and partner_id identifies the partner storing the data. To get the client state for devices belonging to your own organization, the `partnerId` is in the format: `customerId-*anystring*`. Where the `customerId` is your organization's customer ID and `anystring` is any suffix. This suffix is used in setting up Custom Access Levels in Context-Aware Access. You may use `my_customer` instead of the customer ID for devices managed by your own organization. + * Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the ClientState in format: `devices/{device_id\}/deviceUsers/{device_user_id\}/clientStates/{partner_id\}`, where `device_id` is the unique ID assigned to the Device, `device_user_id` is the unique ID assigned to the User and `partner_id` identifies the partner storing the data. To get the client state for devices belonging to your own organization, the `partnerId` is in the format: `customerId-*anystring*`. Where the `customerId` is your organization's customer ID and `anystring` is any suffix. This suffix is used in setting up Custom Access Levels in Context-Aware Access. You may use `my_customer` instead of the customer ID for devices managed by your own organization. You may specify `-` in place of the `{device_id\}`, so the ClientState resource name can be: `devices/-/deviceUsers/{device_user_resource_id\}/clientStates/{partner_id\}`. */ name?: string; } export interface Params$Resource$Devices$Deviceusers$Clientstates$List extends StandardParameters { /** - * Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. + * Optional. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. */ customer?: string; /** @@ -3725,7 +3725,7 @@ export namespace cloudidentity_v1 { export interface Params$Resource$Devices$Deviceusers$Clientstates$Patch extends StandardParameters { /** - * Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. + * Optional. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. */ customer?: string; /** diff --git a/src/apis/cloudidentity/v1beta1.ts b/src/apis/cloudidentity/v1beta1.ts index 04903ee3006..2b8f73c8d5d 100644 --- a/src/apis/cloudidentity/v1beta1.ts +++ b/src/apis/cloudidentity/v1beta1.ts @@ -113,6 +113,7 @@ export namespace cloudidentity_v1beta1 { */ export class Cloudidentity { context: APIRequestContext; + customers: Resource$Customers; devices: Resource$Devices; groups: Resource$Groups; @@ -122,6 +123,7 @@ export namespace cloudidentity_v1beta1 { google, }; + this.customers = new Resource$Customers(this.context); this.devices = new Resource$Devices(this.context); this.groups = new Resource$Groups(this.context); } @@ -151,12 +153,7 @@ export namespace cloudidentity_v1beta1 { /** * Request message for approving the device to access user data. */ - export interface Schema$ApproveDeviceUserRequest { - /** - * Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. - */ - customer?: string | null; - } + export interface Schema$ApproveDeviceUserRequest {} /** * Response message for approving the device to access user data. */ @@ -169,12 +166,7 @@ export namespace cloudidentity_v1beta1 { /** * Request message for blocking account on device. */ - export interface Schema$BlockDeviceUserRequest { - /** - * Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. - */ - customer?: string | null; - } + export interface Schema$BlockDeviceUserRequest {} /** * Response message for blocking the device from accessing user data. */ @@ -184,15 +176,14 @@ export namespace cloudidentity_v1beta1 { */ deviceUser?: Schema$DeviceUser; } + /** + * Request to cancel sent invitation for target email in UserInvitation. + */ + export interface Schema$CancelUserInvitationRequest {} /** * Request message for cancelling an unfinished device wipe. */ - export interface Schema$CancelWipeDeviceRequest { - /** - * Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. - */ - customer?: string | null; - } + export interface Schema$CancelWipeDeviceRequest {} /** * Response message for cancelling an unfinished device wipe. */ @@ -205,12 +196,7 @@ export namespace cloudidentity_v1beta1 { /** * Request message for cancelling an unfinished user account wipe. */ - export interface Schema$CancelWipeDeviceUserRequest { - /** - * Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. - */ - customer?: string | null; - } + export interface Schema$CancelWipeDeviceUserRequest {} /** * Response message for cancelling an unfinished user account wipe. */ @@ -287,11 +273,7 @@ export namespace cloudidentity_v1beta1 { */ export interface Schema$CreateDeviceRequest { /** - * Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. - */ - customer?: string | null; - /** - * Required. The device to be created. The name field within this device is ignored in the create method. A new name is created by the method, and returned within the response. Only the fields `device_type`, `serial_number` and `asset_tag` (if present) are used to create the device.`device_type` and `serial_number` are required. + * Required. The device to be created. The name field within this device is ignored in the create method. A new name is created by the method, and returned within the response. Only the fields `device_type`, `serial_number` and `asset_tag` (if present) are used to create the device. All other fields are ignored. The `device_type` and `serial_number` fields are required. */ device?: Schema$Device; } @@ -930,6 +912,15 @@ export namespace cloudidentity_v1beta1 { */ roles?: Schema$TransitiveMembershipRole[]; } + /** + * Response for IsInvitableUser RPC. + */ + export interface Schema$IsInvitableUserResponse { + /** + * Returns true if the email address is invitable. + */ + isInvitableUser?: boolean | null; + } /** * Response message that is returned in LRO result of ListClientStates Operation. */ @@ -995,6 +986,19 @@ export namespace cloudidentity_v1beta1 { */ nextPageToken?: string | null; } + /** + * Response message for UserInvitation listing request. + */ + export interface Schema$ListUserInvitationsResponse { + /** + * The token for the next page. If not empty, indicates that there may be more `UserInvitation` resources that match the listing request; this value can be used in a subsequent ListUserInvitationsRequest to get continued results with the current list call. + */ + nextPageToken?: string | null; + /** + * The list of UserInvitation resources. + */ + userInvitations?: Schema$UserInvitation[]; + } /** * The response message for GroupsService.LookupGroupName. */ @@ -1196,105 +1200,872 @@ export namespace cloudidentity_v1beta1 { */ memberships?: Schema$MemberRelation[]; /** - * Token to retrieve the next page of results, or empty if there are no more results. + * Token to retrieve the next page of results, or empty if there are no more results. + */ + nextPageToken?: string | null; + } + /** + * A request to send email for inviting target user corresponding to the UserInvitation. + */ + export interface Schema$SendUserInvitationRequest {} + /** + * 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). + */ + export interface Schema$Status { + /** + * The status code, which should be an enum value of google.rpc.Code. + */ + code?: number | null; + /** + * A list of messages that carry the error details. There is a common set of message types for APIs to use. + */ + details?: Array<{[key: string]: any}> | null; + /** + * 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 | null; + } + /** + * Message representing the role of a TransitiveMembership. + */ + export interface Schema$TransitiveMembershipRole { + /** + * TransitiveMembershipRole in string format. Currently supported TransitiveMembershipRoles: `"MEMBER"`, `"OWNER"`, and `"MANAGER"`. + */ + role?: string | null; + } + /** + * The details of an update to a `MembershipRole`. + */ + export interface Schema$UpdateMembershipRolesParams { + /** + * The fully-qualified names of fields to update. May only contain the field `expiry_detail`. + */ + fieldMask?: string | null; + /** + * The `MembershipRole`s to be updated. Only `MEMBER` `MembershipRoles` can currently be updated. May only contain a `MembershipRole` with `name` `MEMBER`. + */ + membershipRole?: Schema$MembershipRole; + } + /** + * The `UserInvitation` resource represents an email that can be sent to an unmanaged user account inviting them to join the customer’s Google Workspace or Cloud Identity account. An unmanaged account shares an email address domain with the Google Workspace or Cloud Identity account but is not managed by it yet. If the user accepts the `UserInvitation`, the user account will become managed. + */ + export interface Schema$UserInvitation { + /** + * Number of invitation emails sent to the user. + */ + mailsSentCount?: string | null; + /** + * Shall be of the form `customers/{customer\}/userinvitations/{user_email_address\}`. + */ + name?: string | null; + /** + * State of the `UserInvitation`. + */ + state?: string | null; + /** + * Time when the `UserInvitation` was last updated. + */ + updateTime?: string | null; + } + /** + * Request message for wiping all data on the device. + */ + export interface Schema$WipeDeviceRequest {} + /** + * Response message for wiping all data on the device. + */ + export interface Schema$WipeDeviceResponse { + /** + * Resultant Device object for the action. Note that asset tags will not be returned in the device object. + */ + device?: Schema$Device; + } + /** + * Request message for starting an account wipe on device. + */ + export interface Schema$WipeDeviceUserRequest {} + /** + * Response message for wiping the user's account from the device. + */ + export interface Schema$WipeDeviceUserResponse { + /** + * Resultant DeviceUser object for the action. + */ + deviceUser?: Schema$DeviceUser; + } + + export class Resource$Customers { + context: APIRequestContext; + userinvitations: Resource$Customers$Userinvitations; + constructor(context: APIRequestContext) { + this.context = context; + this.userinvitations = new Resource$Customers$Userinvitations( + this.context + ); + } + } + + export class Resource$Customers$Userinvitations { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Cancels a UserInvitation that was already sent. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/cloudidentity.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const cloudidentity = google.cloudidentity('v1beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await cloudidentity.customers.userinvitations.cancel({ + * // Required. `UserInvitation` name in the format `customers/{customer\}/userinvitations/{user_email_address\}` + * name: 'customers/my-customer/userinvitations/my-userinvitation', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // {} + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + cancel( + params: Params$Resource$Customers$Userinvitations$Cancel, + options: StreamMethodOptions + ): GaxiosPromise; + cancel( + params?: Params$Resource$Customers$Userinvitations$Cancel, + options?: MethodOptions + ): GaxiosPromise; + cancel( + params: Params$Resource$Customers$Userinvitations$Cancel, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + cancel( + params: Params$Resource$Customers$Userinvitations$Cancel, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + cancel( + params: Params$Resource$Customers$Userinvitations$Cancel, + callback: BodyResponseCallback + ): void; + cancel(callback: BodyResponseCallback): void; + cancel( + paramsOrCallback?: + | Params$Resource$Customers$Userinvitations$Cancel + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Customers$Userinvitations$Cancel; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Customers$Userinvitations$Cancel; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://cloudidentity.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}:cancel').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Retrieves a UserInvitation resource. **Note:** New consumer accounts with the customer’s verified domain created within the previous 48 hours will not appear in the result. This delay also applies to newly-verified domains. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/cloudidentity.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const cloudidentity = google.cloudidentity('v1beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await cloudidentity.customers.userinvitations.get({ + * // Required. `UserInvitation` name in the format `customers/{customer\}/userinvitations/{user_email_address\}` + * name: 'customers/my-customer/userinvitations/my-userinvitation', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "mailsSentCount": "my_mailsSentCount", + * // "name": "my_name", + * // "state": "my_state", + * // "updateTime": "my_updateTime" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Customers$Userinvitations$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Customers$Userinvitations$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Customers$Userinvitations$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Customers$Userinvitations$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Customers$Userinvitations$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Customers$Userinvitations$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Customers$Userinvitations$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Customers$Userinvitations$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://cloudidentity.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Verifies whether a user account is eligible to receive a UserInvitation (is an unmanaged account). Eligibility is based on the following criteria: * the email address is a consumer account and it’s the primary email address of the account, and * the domain of the email address matches an existing verified Google Workspace or Cloud Identity domain If both conditions are met, the user is eligible. **Note:** This method is not supported for Workspace Essentials customers. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/cloudidentity.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const cloudidentity = google.cloudidentity('v1beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await cloudidentity.customers.userinvitations.isInvitableUser({ + * // Required. `UserInvitation` name in the format `customers/{customer\}/userinvitations/{user_email_address\}` + * name: 'customers/my-customer/userinvitations/my-userinvitation', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "isInvitableUser": false + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + isInvitableUser( + params: Params$Resource$Customers$Userinvitations$Isinvitableuser, + options: StreamMethodOptions + ): GaxiosPromise; + isInvitableUser( + params?: Params$Resource$Customers$Userinvitations$Isinvitableuser, + options?: MethodOptions + ): GaxiosPromise; + isInvitableUser( + params: Params$Resource$Customers$Userinvitations$Isinvitableuser, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + isInvitableUser( + params: Params$Resource$Customers$Userinvitations$Isinvitableuser, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + isInvitableUser( + params: Params$Resource$Customers$Userinvitations$Isinvitableuser, + callback: BodyResponseCallback + ): void; + isInvitableUser( + callback: BodyResponseCallback + ): void; + isInvitableUser( + paramsOrCallback?: + | Params$Resource$Customers$Userinvitations$Isinvitableuser + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Customers$Userinvitations$Isinvitableuser; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Customers$Userinvitations$Isinvitableuser; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://cloudidentity.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}:isInvitableUser').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Retrieves a list of UserInvitation resources. **Note:** New consumer accounts with the customer’s verified domain created within the previous 48 hours will not appear in the result. This delay also applies to newly-verified domains. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/cloudidentity.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const cloudidentity = google.cloudidentity('v1beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await cloudidentity.customers.userinvitations.list({ + * // Optional. A query string for filtering `UserInvitation` results by their current state, in the format: `"state=='invited'"`. + * filter: 'placeholder-value', + * // Optional. The sort order of the list results. You can sort the results in descending order based on either email or last update timestamp but not both, using `order_by="email desc"`. Currently, sorting is supported for `update_time asc`, `update_time desc`, `email asc`, and `email desc`. If not specified, results will be returned based on `email asc` order. + * orderBy: 'placeholder-value', + * // Optional. The maximum number of UserInvitation resources to return. If unspecified, at most 100 resources will be returned. The maximum value is 200; values above 200 will be set to 200. + * pageSize: 'placeholder-value', + * // Optional. A page token, received from a previous `ListUserInvitations` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListBooks` must match the call that provided the page token. + * pageToken: 'placeholder-value', + * // Required. The customer ID of the Google Workspace or Cloud Identity account the UserInvitation resources are associated with. + * parent: 'customers/my-customer', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "nextPageToken": "my_nextPageToken", + * // "userInvitations": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Customers$Userinvitations$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Customers$Userinvitations$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Customers$Userinvitations$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Customers$Userinvitations$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Customers$Userinvitations$List, + callback: BodyResponseCallback + ): void; + list( + callback: BodyResponseCallback + ): void; + list( + paramsOrCallback?: + | Params$Resource$Customers$Userinvitations$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Customers$Userinvitations$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Customers$Userinvitations$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://cloudidentity.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+parent}/userinvitations').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Sends a UserInvitation to email. If the `UserInvitation` does not exist for this request and it is a valid request, the request creates a `UserInvitation`. **Note:** The `get` and `list` methods have a 48-hour delay where newly-created consumer accounts will not appear in the results. You can still send a `UserInvitation` to those accounts if you know the unmanaged email address and IsInvitableUser==True. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/cloudidentity.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const cloudidentity = google.cloudidentity('v1beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await cloudidentity.customers.userinvitations.send({ + * // Required. `UserInvitation` name in the format `customers/{customer\}/userinvitations/{user_email_address\}` + * name: 'customers/my-customer/userinvitations/my-userinvitation', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // {} + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. */ - nextPageToken?: string | null; + send( + params: Params$Resource$Customers$Userinvitations$Send, + options: StreamMethodOptions + ): GaxiosPromise; + send( + params?: Params$Resource$Customers$Userinvitations$Send, + options?: MethodOptions + ): GaxiosPromise; + send( + params: Params$Resource$Customers$Userinvitations$Send, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + send( + params: Params$Resource$Customers$Userinvitations$Send, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + send( + params: Params$Resource$Customers$Userinvitations$Send, + callback: BodyResponseCallback + ): void; + send(callback: BodyResponseCallback): void; + send( + paramsOrCallback?: + | Params$Resource$Customers$Userinvitations$Send + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Customers$Userinvitations$Send; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Customers$Userinvitations$Send; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://cloudidentity.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}:send').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } } - /** - * 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). - */ - export interface Schema$Status { - /** - * The status code, which should be an enum value of google.rpc.Code. - */ - code?: number | null; + + export interface Params$Resource$Customers$Userinvitations$Cancel + extends StandardParameters { /** - * A list of messages that carry the error details. There is a common set of message types for APIs to use. + * Required. `UserInvitation` name in the format `customers/{customer\}/userinvitations/{user_email_address\}` */ - details?: Array<{[key: string]: any}> | null; + name?: string; + /** - * 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. + * Request body metadata */ - message?: string | null; + requestBody?: Schema$CancelUserInvitationRequest; } - /** - * Message representing the role of a TransitiveMembership. - */ - export interface Schema$TransitiveMembershipRole { + export interface Params$Resource$Customers$Userinvitations$Get + extends StandardParameters { /** - * TransitiveMembershipRole in string format. Currently supported TransitiveMembershipRoles: `"MEMBER"`, `"OWNER"`, and `"MANAGER"`. + * Required. `UserInvitation` name in the format `customers/{customer\}/userinvitations/{user_email_address\}` */ - role?: string | null; + name?: string; } - /** - * The details of an update to a `MembershipRole`. - */ - export interface Schema$UpdateMembershipRolesParams { - /** - * The fully-qualified names of fields to update. May only contain the field `expiry_detail`. - */ - fieldMask?: string | null; + export interface Params$Resource$Customers$Userinvitations$Isinvitableuser + extends StandardParameters { /** - * The `MembershipRole`s to be updated. Only `MEMBER` `MembershipRoles` can currently be updated. May only contain a `MembershipRole` with `name` `MEMBER`. + * Required. `UserInvitation` name in the format `customers/{customer\}/userinvitations/{user_email_address\}` */ - membershipRole?: Schema$MembershipRole; + name?: string; } - /** - * The `UserInvitation` resource represents an email sent to an unmanaged user account (an email address that shares the domain of the Google Workspace customer but is not managed by it yet), inviting them to join the customer’s domain. If the user accepts the `UserInvitation`, the account will become a managed account. - */ - export interface Schema$UserInvitation { - /** - * Number of invitation emails sent to the user. - */ - mailsSentCount?: string | null; + export interface Params$Resource$Customers$Userinvitations$List + extends StandardParameters { /** - * Shall be of the form `customers/{customer\}/userinvitations/{user_email_address\}`. + * Optional. A query string for filtering `UserInvitation` results by their current state, in the format: `"state=='invited'"`. */ - name?: string | null; + filter?: string; /** - * State of the `UserInvitation`. + * Optional. The sort order of the list results. You can sort the results in descending order based on either email or last update timestamp but not both, using `order_by="email desc"`. Currently, sorting is supported for `update_time asc`, `update_time desc`, `email asc`, and `email desc`. If not specified, results will be returned based on `email asc` order. */ - state?: string | null; + orderBy?: string; /** - * Time when the `UserInvitation` was last updated. + * Optional. The maximum number of UserInvitation resources to return. If unspecified, at most 100 resources will be returned. The maximum value is 200; values above 200 will be set to 200. */ - updateTime?: string | null; - } - /** - * Request message for wiping all data on the device. - */ - export interface Schema$WipeDeviceRequest { + pageSize?: number; /** - * Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. + * Optional. A page token, received from a previous `ListUserInvitations` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListBooks` must match the call that provided the page token. */ - customer?: string | null; - } - /** - * Response message for wiping all data on the device. - */ - export interface Schema$WipeDeviceResponse { + pageToken?: string; /** - * Resultant Device object for the action. Note that asset tags will not be returned in the device object. + * Required. The customer ID of the Google Workspace or Cloud Identity account the UserInvitation resources are associated with. */ - device?: Schema$Device; + parent?: string; } - /** - * Request message for starting an account wipe on device. - */ - export interface Schema$WipeDeviceUserRequest { + export interface Params$Resource$Customers$Userinvitations$Send + extends StandardParameters { /** - * Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. + * Required. `UserInvitation` name in the format `customers/{customer\}/userinvitations/{user_email_address\}` */ - customer?: string | null; - } - /** - * Response message for wiping the user's account from the device. - */ - export interface Schema$WipeDeviceUserResponse { + name?: string; + /** - * Resultant DeviceUser object for the action. + * Request body metadata */ - deviceUser?: Schema$DeviceUser; + requestBody?: Schema$SendUserInvitationRequest; } export class Resource$Devices { @@ -1338,9 +2109,7 @@ export namespace cloudidentity_v1beta1 { * // Request body metadata * requestBody: { * // request body parameters - * // { - * // "customer": "my_customer" - * // } + * // {} * }, * }); * console.log(res.data); @@ -1478,7 +2247,6 @@ export namespace cloudidentity_v1beta1 { * requestBody: { * // request body parameters * // { - * // "customer": "my_customer", * // "device": {} * // } * }, @@ -1610,8 +2378,6 @@ export namespace cloudidentity_v1beta1 { * * // Do the magic * const res = await cloudidentity.devices.delete({ - * // Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. - * customer: 'placeholder-value', * // Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the Device in format: `devices/{device_id\}`, where device_id is the unique ID assigned to the Device. * name: 'devices/my-device', * }); @@ -1742,8 +2508,6 @@ export namespace cloudidentity_v1beta1 { * * // Do the magic * const res = await cloudidentity.devices.get({ - * // Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the Customer in format: `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. - * customer: 'placeholder-value', * // Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the Device in format: `devices/{device_id\}`, where device_id is the unique ID assigned to the Device. * name: 'devices/my-device', * }); @@ -1897,8 +2661,6 @@ export namespace cloudidentity_v1beta1 { * * // Do the magic * const res = await cloudidentity.devices.list({ - * // Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. - * customer: 'placeholder-value', * // Optional. Additional restrictions when fetching list of devices. For a list of search fields, refer to [Mobile device search fields](https://developers.google.com/admin-sdk/directory/v1/search-operators). Multiple search fields are separated by the space character. * filter: 'placeholder-value', * // Optional. Order specification for devices in the response. Only one of the following field names may be used to specify the order: `create_time`, `last_sync_time`, `model`, `os_version`, `device_type` and `serial_number`. `desc` may be specified optionally to specify results to be sorted in descending order. Default order is ascending. @@ -2043,9 +2805,7 @@ export namespace cloudidentity_v1beta1 { * // Request body metadata * requestBody: { * // request body parameters - * // { - * // "customer": "my_customer" - * // } + * // {} * }, * }); * console.log(res.data); @@ -2171,30 +2931,18 @@ export namespace cloudidentity_v1beta1 { requestBody?: Schema$CreateDeviceRequest; } export interface Params$Resource$Devices$Delete extends StandardParameters { - /** - * Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. - */ - customer?: string; /** * Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the Device in format: `devices/{device_id\}`, where device_id is the unique ID assigned to the Device. */ name?: string; } export interface Params$Resource$Devices$Get extends StandardParameters { - /** - * Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the Customer in format: `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. - */ - customer?: string; /** * Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the Device in format: `devices/{device_id\}`, where device_id is the unique ID assigned to the Device. */ name?: string; } export interface Params$Resource$Devices$List extends StandardParameters { - /** - * Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. - */ - customer?: string; /** * Optional. Additional restrictions when fetching list of devices. For a list of search fields, refer to [Mobile device search fields](https://developers.google.com/admin-sdk/directory/v1/search-operators). Multiple search fields are separated by the space character. */ @@ -2271,9 +3019,7 @@ export namespace cloudidentity_v1beta1 { * // Request body metadata * requestBody: { * // request body parameters - * // { - * // "customer": "my_customer" - * // } + * // {} * }, * }); * console.log(res.data); @@ -2413,9 +3159,7 @@ export namespace cloudidentity_v1beta1 { * // Request body metadata * requestBody: { * // request body parameters - * // { - * // "customer": "my_customer" - * // } + * // {} * }, * }); * console.log(res.data); @@ -2555,9 +3299,7 @@ export namespace cloudidentity_v1beta1 { * // Request body metadata * requestBody: { * // request body parameters - * // { - * // "customer": "my_customer" - * // } + * // {} * }, * }); * console.log(res.data); @@ -2691,8 +3433,6 @@ export namespace cloudidentity_v1beta1 { * * // Do the magic * const res = await cloudidentity.devices.deviceUsers.delete({ - * // Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. - * customer: 'placeholder-value', * // Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the Device in format: `devices/{device_id\}/deviceUsers/{device_user_id\}`, where device_id is the unique ID assigned to the Device, and device_user_id is the unique ID assigned to the User. * name: 'devices/my-device/deviceUsers/my-deviceUser', * }); @@ -2824,8 +3564,6 @@ export namespace cloudidentity_v1beta1 { * * // Do the magic * const res = await cloudidentity.devices.deviceUsers.get({ - * // Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. - * customer: 'placeholder-value', * // Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the Device in format: `devices/{device_id\}/deviceUsers/{device_user_id\}`, where device_id is the unique ID assigned to the Device, and device_user_id is the unique ID assigned to the User. * name: 'devices/my-device/deviceUsers/my-deviceUser', * }); @@ -2962,8 +3700,6 @@ export namespace cloudidentity_v1beta1 { * * // Do the magic * const res = await cloudidentity.devices.deviceUsers.list({ - * // Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. - * customer: 'placeholder-value', * // Optional. Additional restrictions when fetching list of devices. For a list of search fields, refer to [Mobile device search fields](https://developers.google.com/admin-sdk/directory/v1/search-operators). Multiple search fields are separated by the space character. * filter: 'placeholder-value', * // Optional. Order specification for devices in the response. @@ -3265,9 +4001,7 @@ export namespace cloudidentity_v1beta1 { * // Request body metadata * requestBody: { * // request body parameters - * // { - * // "customer": "my_customer" - * // } + * // {} * }, * }); * console.log(res.data); @@ -3413,10 +4147,6 @@ export namespace cloudidentity_v1beta1 { } export interface Params$Resource$Devices$Deviceusers$Delete extends StandardParameters { - /** - * Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. - */ - customer?: string; /** * Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the Device in format: `devices/{device_id\}/deviceUsers/{device_user_id\}`, where device_id is the unique ID assigned to the Device, and device_user_id is the unique ID assigned to the User. */ @@ -3424,10 +4154,6 @@ export namespace cloudidentity_v1beta1 { } export interface Params$Resource$Devices$Deviceusers$Get extends StandardParameters { - /** - * Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. - */ - customer?: string; /** * Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the Device in format: `devices/{device_id\}/deviceUsers/{device_user_id\}`, where device_id is the unique ID assigned to the Device, and device_user_id is the unique ID assigned to the User. */ @@ -3435,10 +4161,6 @@ export namespace cloudidentity_v1beta1 { } export interface Params$Resource$Devices$Deviceusers$List extends StandardParameters { - /** - * Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. - */ - customer?: string; /** * Optional. Additional restrictions when fetching list of devices. For a list of search fields, refer to [Mobile device search fields](https://developers.google.com/admin-sdk/directory/v1/search-operators). Multiple search fields are separated by the space character. */ @@ -3533,9 +4255,9 @@ export namespace cloudidentity_v1beta1 { * * // Do the magic * const res = await cloudidentity.devices.deviceUsers.clientStates.get({ - * // Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. + * // Optional. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. * customer: 'placeholder-value', - * // Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the ClientState in format: `devices/{device_id\}/deviceUsers/{device_user_id\}/clientStates/{partner_id\}`, where device_id is the unique ID assigned to the Device, device_user_id is the unique ID assigned to the User and partner_id identifies the partner storing the data. To get the client state for devices belonging to your own organization, the `partnerId` is in the format: `customerId-*anystring*`. Where the `customerId` is your organization's customer ID and `anystring` is any suffix. This suffix is used in setting up Custom Access Levels in Context-Aware Access. You may use `my_customer` instead of the customer ID for devices managed by your own organization. + * // Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the ClientState in format: `devices/{device_id\}/deviceUsers/{device_user_id\}/clientStates/{partner_id\}`, where `device_id` is the unique ID assigned to the Device, `device_user_id` is the unique ID assigned to the User and `partner_id` identifies the partner storing the data. To get the client state for devices belonging to your own organization, the `partnerId` is in the format: `customerId-*anystring*`. Where the `customerId` is your organization's customer ID and `anystring` is any suffix. This suffix is used in setting up Custom Access Levels in Context-Aware Access. You may use `my_customer` instead of the customer ID for devices managed by your own organization. You may specify `-` in place of the `{device_id\}`, so the ClientState resource name can be: `devices/-/deviceUsers/{device_user_resource_id\}/clientStates/{partner_id\}`. * name: * 'devices/my-device/deviceUsers/my-deviceUser/clientStates/my-clientState', * }); @@ -3674,7 +4396,7 @@ export namespace cloudidentity_v1beta1 { * * // Do the magic * const res = await cloudidentity.devices.deviceUsers.clientStates.patch({ - * // Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. + * // Optional. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. * customer: 'placeholder-value', * // Output only. [Resource name](https://cloud.google.com/apis/design/resource_names) of the ClientState in format: `devices/{device_id\}/deviceUsers/{device_user_id\}/clientState/{partner_id\}`, where partner_id corresponds to the partner storing the data. * name: @@ -3806,18 +4528,18 @@ export namespace cloudidentity_v1beta1 { export interface Params$Resource$Devices$Deviceusers$Clientstates$Get extends StandardParameters { /** - * Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. + * Optional. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. */ customer?: string; /** - * Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the ClientState in format: `devices/{device_id\}/deviceUsers/{device_user_id\}/clientStates/{partner_id\}`, where device_id is the unique ID assigned to the Device, device_user_id is the unique ID assigned to the User and partner_id identifies the partner storing the data. To get the client state for devices belonging to your own organization, the `partnerId` is in the format: `customerId-*anystring*`. Where the `customerId` is your organization's customer ID and `anystring` is any suffix. This suffix is used in setting up Custom Access Levels in Context-Aware Access. You may use `my_customer` instead of the customer ID for devices managed by your own organization. + * Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the ClientState in format: `devices/{device_id\}/deviceUsers/{device_user_id\}/clientStates/{partner_id\}`, where `device_id` is the unique ID assigned to the Device, `device_user_id` is the unique ID assigned to the User and `partner_id` identifies the partner storing the data. To get the client state for devices belonging to your own organization, the `partnerId` is in the format: `customerId-*anystring*`. Where the `customerId` is your organization's customer ID and `anystring` is any suffix. This suffix is used in setting up Custom Access Levels in Context-Aware Access. You may use `my_customer` instead of the customer ID for devices managed by your own organization. You may specify `-` in place of the `{device_id\}`, so the ClientState resource name can be: `devices/-/deviceUsers/{device_user_resource_id\}/clientStates/{partner_id\}`. */ name?: string; } export interface Params$Resource$Devices$Deviceusers$Clientstates$Patch extends StandardParameters { /** - * Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. + * Optional. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id\}`, where customer_id is the customer to whom the device belongs. */ customer?: string; /** diff --git a/src/apis/cloudkms/v1.ts b/src/apis/cloudkms/v1.ts index caef22456db..b66c751fa5d 100644 --- a/src/apis/cloudkms/v1.ts +++ b/src/apis/cloudkms/v1.ts @@ -998,13 +998,13 @@ export namespace cloudkms_v1 { * * // Do the magic * const res = await cloudkms.projects.locations.list({ - * // The standard list 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). * filter: 'placeholder-value', * // The resource that owns the locations collection, if applicable. * name: 'projects/my-project', - * // The standard list page size. + * // The maximum number of results to return. If not set, the service will select a default. * pageSize: 'placeholder-value', - * // The standard list page token. + * // A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. * pageToken: 'placeholder-value', * }); * console.log(res.data); @@ -1123,7 +1123,7 @@ export namespace cloudkms_v1 { export interface Params$Resource$Projects$Locations$List extends StandardParameters { /** - * The standard list 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). */ filter?: string; /** @@ -1131,11 +1131,11 @@ export namespace cloudkms_v1 { */ name?: string; /** - * The standard list page size. + * The maximum number of results to return. If not set, the service will select a default. */ pageSize?: number; /** - * The standard list page token. + * A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. */ pageToken?: string; } diff --git a/src/apis/cloudresourcemanager/v1.ts b/src/apis/cloudresourcemanager/v1.ts index 10bbfa02e96..a8b71a0eec3 100644 --- a/src/apis/cloudresourcemanager/v1.ts +++ b/src/apis/cloudresourcemanager/v1.ts @@ -286,6 +286,36 @@ export namespace cloudresourcemanager_v1 { */ version?: number | null; } + /** + * Metadata pertaining to the Folder creation process. + */ + export interface Schema$CreateFolderMetadata { + /** + * The display name of the folder. + */ + displayName?: string | null; + /** + * The resource name of the folder or organization we are creating the folder under. + */ + parent?: string | null; + } + /** + * A status object which is used as the `metadata` field for the Operation returned by CreateProject. It provides insight for when significant phases of Project creation have completed. + */ + export interface Schema$CreateProjectMetadata { + /** + * Creation time of the project creation workflow. + */ + createTime?: string | null; + /** + * True if the project can be retrieved using GetProject. No other operations on the project are guaranteed to work until the project creation is complete. + */ + gettable?: boolean | null; + /** + * True if the project creation process is complete. + */ + ready?: boolean | null; + } /** * Runtime operation information for creating a TagKey. */ @@ -294,6 +324,18 @@ export namespace cloudresourcemanager_v1 { * Runtime operation information for creating a TagValue. */ export interface Schema$CreateTagValueMetadata {} + /** + * A status object which is used as the `metadata` field for the Operation returned by DeleteFolder. + */ + export interface Schema$DeleteFolderMetadata {} + /** + * A status object which is used as the `metadata` field for the Operation returned by DeleteOrganization. + */ + export interface Schema$DeleteOrganizationMetadata {} + /** + * A status object which is used as the `metadata` field for the Operation returned by DeleteProject. + */ + export interface Schema$DeleteProjectMetadata {} /** * Runtime operation information for deleting a TagKey. */ @@ -551,6 +593,27 @@ export namespace cloudresourcemanager_v1 { */ projects?: Schema$Project[]; } + /** + * Metadata pertaining to the Folder move process. + */ + export interface Schema$MoveFolderMetadata { + /** + * The resource name of the folder or organization to move the folder to. + */ + destinationParent?: string | null; + /** + * The display name of the folder. + */ + displayName?: string | null; + /** + * The resource name of the folder's parent. + */ + sourceParent?: string | null; + } + /** + * A status object which is used as the `metadata` field for the Operation returned by MoveProject. + */ + export interface Schema$MoveProjectMetadata {} /** * This resource represents a long-running operation that is the result of a network API call. */ @@ -818,10 +881,30 @@ export namespace cloudresourcemanager_v1 { */ permissions?: string[] | null; } + /** + * A status object which is used as the `metadata` field for the Operation returned by UndeleteFolder. + */ + export interface Schema$UndeleteFolderMetadata {} + /** + * A status object which is used as the `metadata` field for the Operation returned by UndeleteOrganization. + */ + export interface Schema$UndeleteOrganizationMetadata {} + /** + * A status object which is used as the `metadata` field for the Operation returned by UndeleteProject. + */ + export interface Schema$UndeleteProjectMetadata {} /** * The request sent to the UndeleteProject method. */ export interface Schema$UndeleteProjectRequest {} + /** + * A status object which is used as the `metadata` field for the Operation returned by UpdateFolder. + */ + export interface Schema$UpdateFolderMetadata {} + /** + * A status object which is used as the `metadata` field for the Operation returned by UpdateProject. + */ + export interface Schema$UpdateProjectMetadata {} /** * Runtime operation information for updating a TagKey. */ diff --git a/src/apis/cloudresourcemanager/v1beta1.ts b/src/apis/cloudresourcemanager/v1beta1.ts index 1b234db1acd..e86f6c44513 100644 --- a/src/apis/cloudresourcemanager/v1beta1.ts +++ b/src/apis/cloudresourcemanager/v1beta1.ts @@ -221,6 +221,36 @@ export namespace cloudresourcemanager_v1beta1 { */ sourceParent?: string | null; } + /** + * Metadata pertaining to the Folder creation process. + */ + export interface Schema$CreateFolderMetadata { + /** + * The display name of the folder. + */ + displayName?: string | null; + /** + * The resource name of the folder or organization we are creating the folder under. + */ + parent?: string | null; + } + /** + * A status object which is used as the `metadata` field for the Operation returned by CreateProject. It provides insight for when significant phases of Project creation have completed. + */ + export interface Schema$CreateProjectMetadata { + /** + * Creation time of the project creation workflow. + */ + createTime?: string | null; + /** + * True if the project can be retrieved using GetProject. No other operations on the project are guaranteed to work until the project creation is complete. + */ + gettable?: boolean | null; + /** + * True if the project creation process is complete. + */ + ready?: boolean | null; + } /** * Runtime operation information for creating a TagKey. */ @@ -229,6 +259,18 @@ export namespace cloudresourcemanager_v1beta1 { * Runtime operation information for creating a TagValue. */ export interface Schema$CreateTagValueMetadata {} + /** + * A status object which is used as the `metadata` field for the Operation returned by DeleteFolder. + */ + export interface Schema$DeleteFolderMetadata {} + /** + * A status object which is used as the `metadata` field for the Operation returned by DeleteOrganization. + */ + export interface Schema$DeleteOrganizationMetadata {} + /** + * A status object which is used as the `metadata` field for the Operation returned by DeleteProject. + */ + export interface Schema$DeleteProjectMetadata {} /** * Runtime operation information for deleting a TagKey. */ @@ -349,6 +391,27 @@ export namespace cloudresourcemanager_v1beta1 { */ projects?: Schema$Project[]; } + /** + * Metadata pertaining to the Folder move process. + */ + export interface Schema$MoveFolderMetadata { + /** + * The resource name of the folder or organization to move the folder to. + */ + destinationParent?: string | null; + /** + * The display name of the folder. + */ + displayName?: string | null; + /** + * The resource name of the folder's parent. + */ + sourceParent?: string | null; + } + /** + * A status object which is used as the `metadata` field for the Operation returned by MoveProject. + */ + export interface Schema$MoveProjectMetadata {} /** * The root node in the resource hierarchy to which a particular entity's (e.g., company) resources belong. */ @@ -502,10 +565,30 @@ export namespace cloudresourcemanager_v1beta1 { */ permissions?: string[] | null; } + /** + * A status object which is used as the `metadata` field for the Operation returned by UndeleteFolder. + */ + export interface Schema$UndeleteFolderMetadata {} + /** + * A status object which is used as the `metadata` field for the Operation returned by UndeleteOrganization. + */ + export interface Schema$UndeleteOrganizationMetadata {} + /** + * A status object which is used as the `metadata` field for the Operation returned by UndeleteProject. + */ + export interface Schema$UndeleteProjectMetadata {} /** * The request sent to the UndeleteProject method. */ export interface Schema$UndeleteProjectRequest {} + /** + * A status object which is used as the `metadata` field for the Operation returned by UpdateFolder. + */ + export interface Schema$UpdateFolderMetadata {} + /** + * A status object which is used as the `metadata` field for the Operation returned by UpdateProject. + */ + export interface Schema$UpdateProjectMetadata {} /** * Runtime operation information for updating a TagKey. */ diff --git a/src/apis/cloudresourcemanager/v2.ts b/src/apis/cloudresourcemanager/v2.ts index c84d6a60970..e2632f0a8b7 100644 --- a/src/apis/cloudresourcemanager/v2.ts +++ b/src/apis/cloudresourcemanager/v2.ts @@ -212,6 +212,36 @@ export namespace cloudresourcemanager_v2 { */ sourceParent?: string | null; } + /** + * Metadata pertaining to the Folder creation process. + */ + export interface Schema$CreateFolderMetadata { + /** + * The display name of the folder. + */ + displayName?: string | null; + /** + * The resource name of the folder or organization we are creating the folder under. + */ + parent?: string | null; + } + /** + * A status object which is used as the `metadata` field for the Operation returned by CreateProject. It provides insight for when significant phases of Project creation have completed. + */ + export interface Schema$CreateProjectMetadata { + /** + * Creation time of the project creation workflow. + */ + createTime?: string | null; + /** + * True if the project can be retrieved using GetProject. No other operations on the project are guaranteed to work until the project creation is complete. + */ + gettable?: boolean | null; + /** + * True if the project creation process is complete. + */ + ready?: boolean | null; + } /** * Runtime operation information for creating a TagKey. */ @@ -220,6 +250,18 @@ export namespace cloudresourcemanager_v2 { * Runtime operation information for creating a TagValue. */ export interface Schema$CreateTagValueMetadata {} + /** + * A status object which is used as the `metadata` field for the Operation returned by DeleteFolder. + */ + export interface Schema$DeleteFolderMetadata {} + /** + * A status object which is used as the `metadata` field for the Operation returned by DeleteOrganization. + */ + export interface Schema$DeleteOrganizationMetadata {} + /** + * A status object which is used as the `metadata` field for the Operation returned by DeleteProject. + */ + export interface Schema$DeleteProjectMetadata {} /** * Runtime operation information for deleting a TagKey. */ @@ -335,6 +377,23 @@ export namespace cloudresourcemanager_v2 { */ nextPageToken?: string | null; } + /** + * Metadata pertaining to the Folder move process. + */ + export interface Schema$MoveFolderMetadata { + /** + * The resource name of the folder or organization to move the folder to. + */ + destinationParent?: string | null; + /** + * The display name of the folder. + */ + displayName?: string | null; + /** + * The resource name of the folder's parent. + */ + sourceParent?: string | null; + } /** * The MoveFolder request message. */ @@ -344,6 +403,10 @@ export namespace cloudresourcemanager_v2 { */ destinationParent?: string | null; } + /** + * A status object which is used as the `metadata` field for the Operation returned by MoveProject. + */ + export interface Schema$MoveProjectMetadata {} /** * This resource represents a long-running operation that is the result of a network API call. */ @@ -485,10 +548,30 @@ export namespace cloudresourcemanager_v2 { */ permissions?: string[] | null; } + /** + * A status object which is used as the `metadata` field for the Operation returned by UndeleteFolder. + */ + export interface Schema$UndeleteFolderMetadata {} /** * The UndeleteFolder request message. */ export interface Schema$UndeleteFolderRequest {} + /** + * A status object which is used as the `metadata` field for the Operation returned by UndeleteOrganization. + */ + export interface Schema$UndeleteOrganizationMetadata {} + /** + * A status object which is used as the `metadata` field for the Operation returned by UndeleteProject. + */ + export interface Schema$UndeleteProjectMetadata {} + /** + * A status object which is used as the `metadata` field for the Operation returned by UpdateFolder. + */ + export interface Schema$UpdateFolderMetadata {} + /** + * A status object which is used as the `metadata` field for the Operation returned by UpdateProject. + */ + export interface Schema$UpdateProjectMetadata {} /** * Runtime operation information for updating a TagKey. */ diff --git a/src/apis/cloudresourcemanager/v2beta1.ts b/src/apis/cloudresourcemanager/v2beta1.ts index 08956637409..57bfc220537 100644 --- a/src/apis/cloudresourcemanager/v2beta1.ts +++ b/src/apis/cloudresourcemanager/v2beta1.ts @@ -212,6 +212,36 @@ export namespace cloudresourcemanager_v2beta1 { */ sourceParent?: string | null; } + /** + * Metadata pertaining to the Folder creation process. + */ + export interface Schema$CreateFolderMetadata { + /** + * The display name of the folder. + */ + displayName?: string | null; + /** + * The resource name of the folder or organization we are creating the folder under. + */ + parent?: string | null; + } + /** + * A status object which is used as the `metadata` field for the Operation returned by CreateProject. It provides insight for when significant phases of Project creation have completed. + */ + export interface Schema$CreateProjectMetadata { + /** + * Creation time of the project creation workflow. + */ + createTime?: string | null; + /** + * True if the project can be retrieved using GetProject. No other operations on the project are guaranteed to work until the project creation is complete. + */ + gettable?: boolean | null; + /** + * True if the project creation process is complete. + */ + ready?: boolean | null; + } /** * Runtime operation information for creating a TagKey. */ @@ -220,6 +250,18 @@ export namespace cloudresourcemanager_v2beta1 { * Runtime operation information for creating a TagValue. */ export interface Schema$CreateTagValueMetadata {} + /** + * A status object which is used as the `metadata` field for the Operation returned by DeleteFolder. + */ + export interface Schema$DeleteFolderMetadata {} + /** + * A status object which is used as the `metadata` field for the Operation returned by DeleteOrganization. + */ + export interface Schema$DeleteOrganizationMetadata {} + /** + * A status object which is used as the `metadata` field for the Operation returned by DeleteProject. + */ + export interface Schema$DeleteProjectMetadata {} /** * Runtime operation information for deleting a TagKey. */ @@ -335,6 +377,23 @@ export namespace cloudresourcemanager_v2beta1 { */ nextPageToken?: string | null; } + /** + * Metadata pertaining to the Folder move process. + */ + export interface Schema$MoveFolderMetadata { + /** + * The resource name of the folder or organization to move the folder to. + */ + destinationParent?: string | null; + /** + * The display name of the folder. + */ + displayName?: string | null; + /** + * The resource name of the folder's parent. + */ + sourceParent?: string | null; + } /** * The MoveFolder request message. */ @@ -344,6 +403,10 @@ export namespace cloudresourcemanager_v2beta1 { */ destinationParent?: string | null; } + /** + * A status object which is used as the `metadata` field for the Operation returned by MoveProject. + */ + export interface Schema$MoveProjectMetadata {} /** * This resource represents a long-running operation that is the result of a network API call. */ @@ -485,10 +548,30 @@ export namespace cloudresourcemanager_v2beta1 { */ permissions?: string[] | null; } + /** + * A status object which is used as the `metadata` field for the Operation returned by UndeleteFolder. + */ + export interface Schema$UndeleteFolderMetadata {} /** * The UndeleteFolder request message. */ export interface Schema$UndeleteFolderRequest {} + /** + * A status object which is used as the `metadata` field for the Operation returned by UndeleteOrganization. + */ + export interface Schema$UndeleteOrganizationMetadata {} + /** + * A status object which is used as the `metadata` field for the Operation returned by UndeleteProject. + */ + export interface Schema$UndeleteProjectMetadata {} + /** + * A status object which is used as the `metadata` field for the Operation returned by UpdateFolder. + */ + export interface Schema$UpdateFolderMetadata {} + /** + * A status object which is used as the `metadata` field for the Operation returned by UpdateProject. + */ + export interface Schema$UpdateProjectMetadata {} /** * Runtime operation information for updating a TagKey. */ diff --git a/src/apis/cloudresourcemanager/v3.ts b/src/apis/cloudresourcemanager/v3.ts index 21655da2c65..dfc78c2debb 100644 --- a/src/apis/cloudresourcemanager/v3.ts +++ b/src/apis/cloudresourcemanager/v3.ts @@ -113,8 +113,11 @@ export namespace cloudresourcemanager_v3 { */ export class Cloudresourcemanager { context: APIRequestContext; + folders: Resource$Folders; liens: Resource$Liens; operations: Resource$Operations; + organizations: Resource$Organizations; + projects: Resource$Projects; tagBindings: Resource$Tagbindings; tagKeys: Resource$Tagkeys; tagValues: Resource$Tagvalues; @@ -125,8 +128,11 @@ export namespace cloudresourcemanager_v3 { google, }; + this.folders = new Resource$Folders(this.context); this.liens = new Resource$Liens(this.context); this.operations = new Resource$Operations(this.context); + this.organizations = new Resource$Organizations(this.context); + this.projects = new Resource$Projects(this.context); this.tagBindings = new Resource$Tagbindings(this.context); this.tagKeys = new Resource$Tagkeys(this.context); this.tagValues = new Resource$Tagvalues(this.context); @@ -218,6 +224,36 @@ export namespace cloudresourcemanager_v3 { */ sourceParent?: string | null; } + /** + * Metadata pertaining to the Folder creation process. + */ + export interface Schema$CreateFolderMetadata { + /** + * The display name of the folder. + */ + displayName?: string | null; + /** + * The resource name of the folder or organization we are creating the folder under. + */ + parent?: string | null; + } + /** + * A status object which is used as the `metadata` field for the Operation returned by CreateProject. It provides insight for when significant phases of Project creation have completed. + */ + export interface Schema$CreateProjectMetadata { + /** + * Creation time of the project creation workflow. + */ + createTime?: string | null; + /** + * True if the project can be retrieved using GetProject. No other operations on the project are guaranteed to work until the project creation is complete. + */ + gettable?: boolean | null; + /** + * True if the project creation process is complete. + */ + ready?: boolean | null; + } /** * Runtime operation information for creating a TagKey. */ @@ -226,6 +262,18 @@ export namespace cloudresourcemanager_v3 { * Runtime operation information for creating a TagValue. */ export interface Schema$CreateTagValueMetadata {} + /** + * A status object which is used as the `metadata` field for the Operation returned by DeleteFolder. + */ + export interface Schema$DeleteFolderMetadata {} + /** + * A status object which is used as the `metadata` field for the Operation returned by DeleteOrganization. + */ + export interface Schema$DeleteOrganizationMetadata {} + /** + * A status object which is used as the `metadata` field for the Operation returned by DeleteProject. + */ + export interface Schema$DeleteProjectMetadata {} /** * Runtime operation information for deleting a TagKey. */ @@ -259,6 +307,43 @@ export namespace cloudresourcemanager_v3 { */ title?: string | null; } + /** + * A Folder in an Organization's resource hierarchy, used to organize that Organization's resources. + */ + export interface Schema$Folder { + /** + * Output only. Timestamp when the Folder was created. + */ + createTime?: string | null; + /** + * Output only. Timestamp when the Folder was requested to be deleted. + */ + deleteTime?: string | null; + /** + * The folder's display name. A folder's display name must be unique amongst its siblings, e.g. no two folders with the same parent can share the same display name. The display name must start and end with a letter or digit, may contain letters, digits, spaces, hyphens and underscores and can be no longer than 30 characters. This is captured by the regular expression: `[\p{L\}\p{N\}]([\p{L\}\p{N\}_- ]{0,28\}[\p{L\}\p{N\}])?`. + */ + displayName?: string | null; + /** + * Output only. A checksum computed by the server based on the current value of the Folder resource. This may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. + */ + etag?: string | null; + /** + * Output only. The resource name of the Folder. Its format is `folders/{folder_id\}`, for example: "folders/1234". + */ + name?: string | null; + /** + * Required. The Folder's parent's resource name. Updates to the folder's parent must be performed via MoveFolder. + */ + parent?: string | null; + /** + * Output only. The lifecycle state of the folder. Updates to the state must be performed via DeleteFolder and UndeleteFolder. + */ + state?: string | null; + /** + * Output only. Timestamp when the Folder was last modified. + */ + updateTime?: string | null; + } /** * Metadata describing a long running folder operation */ @@ -336,6 +421,19 @@ export namespace cloudresourcemanager_v3 { */ restrictions?: string[] | null; } + /** + * The ListFolders response message. + */ + export interface Schema$ListFoldersResponse { + /** + * A possibly paginated list of Folders that are direct descendants of the specified parent resource. + */ + folders?: Schema$Folder[]; + /** + * A pagination token returned from a previous call to `ListFolders` that indicates from where listing should continue. + */ + nextPageToken?: string | null; + } /** * The response message for Liens.ListLiens. */ @@ -349,12 +447,25 @@ export namespace cloudresourcemanager_v3 { */ nextPageToken?: string | null; } + /** + * A page of the response received from the ListProjects method. A paginated response where more pages are available has `next_page_token` set. This token can be used in a subsequent request to retrieve the next request page. NOTE: A response may contain fewer elements than the request `page_size` and still have a `next_page_token`. + */ + export interface Schema$ListProjectsResponse { + /** + * Pagination token. If the result set is too large to fit in a single response, this token is returned. It encodes the position of the current result cursor. Feeding this value into a new list request with the `page_token` parameter gives the next page of the results. When `next_page_token` is not filled in, there is no next page and the list returned is the last page in the result set. Pagination tokens have a limited lifetime. + */ + nextPageToken?: string | null; + /** + * The list of Projects under the parent. This list can be paginated. + */ + projects?: Schema$Project[]; + } /** * The ListTagBindings response. */ export interface Schema$ListTagBindingsResponse { /** - * A pagination token returned from a previous call to `ListTagBindings` that indicates from where listing should continue. This is currently not used, but the server may at any point start supplying a valid token. + * A pagination token returned from a previous call to `ListTagBindings` that indicates from where listing should continue. */ nextPageToken?: string | null; /** @@ -367,7 +478,7 @@ export namespace cloudresourcemanager_v3 { */ export interface Schema$ListTagKeysResponse { /** - * A pagination token returned from a previous call to `ListTagKeys` that indicates from where listing should continue. This is currently not used, but the server may at any point start supplying a valid token. + * A pagination token returned from a previous call to `ListTagKeys` that indicates from where listing should continue. */ nextPageToken?: string | null; /** @@ -388,6 +499,45 @@ export namespace cloudresourcemanager_v3 { */ tagValues?: Schema$TagValue[]; } + /** + * Metadata pertaining to the Folder move process. + */ + export interface Schema$MoveFolderMetadata { + /** + * The resource name of the folder or organization to move the folder to. + */ + destinationParent?: string | null; + /** + * The display name of the folder. + */ + displayName?: string | null; + /** + * The resource name of the folder's parent. + */ + sourceParent?: string | null; + } + /** + * The MoveFolder request message. + */ + export interface Schema$MoveFolderRequest { + /** + * Required. The resource name of the Folder or Organization to reparent the folder under. Must be of the form `folders/{folder_id\}` or `organizations/{org_id\}`. + */ + destinationParent?: string | null; + } + /** + * A status object which is used as the `metadata` field for the Operation returned by MoveProject. + */ + export interface Schema$MoveProjectMetadata {} + /** + * The request sent to MoveProject method. + */ + export interface Schema$MoveProjectRequest { + /** + * Required. The new parent to move the Project under. + */ + destinationParent?: string | null; + } /** * This resource represents a long-running operation that is the result of a network API call. */ @@ -413,6 +563,43 @@ export namespace cloudresourcemanager_v3 { */ response?: {[key: string]: any} | null; } + /** + * The root node in the resource hierarchy to which a particular entity's (e.g., company) resources belong. + */ + export interface Schema$Organization { + /** + * Output only. Timestamp when the Organization was created. + */ + createTime?: string | null; + /** + * Output only. Timestamp when the Organization was requested for deletion. + */ + deleteTime?: string | null; + /** + * Immutable. The G Suite / Workspace customer id used in the Directory API. + */ + directoryCustomerId?: string | null; + /** + * Output only. A human-readable string that refers to the Organization in the GCP Console UI. This string is set by the server and cannot be changed. The string will be set to the primary domain (for example, "google.com") of the G Suite customer that owns the organization. + */ + displayName?: string | null; + /** + * Output only. A checksum computed by the server based on the current value of the Organization resource. This may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. + */ + etag?: string | null; + /** + * Output only. The resource name of the organization. This is the organization's relative path in the API. Its format is "organizations/[organization_id]". For example, "organizations/1234". + */ + name?: string | null; + /** + * Output only. The organization's current lifecycle state. + */ + state?: string | null; + /** + * Output only. Timestamp when the Organization was last modified. + */ + updateTime?: string | null; + } /** * An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] \}, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", \} \} ], "etag": "BwWWja0YfJA=", "version": 3 \} **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/). */ @@ -434,6 +621,51 @@ export namespace cloudresourcemanager_v3 { */ version?: number | null; } + /** + * A Project is a high-level Google Cloud Platform entity. It is a container for ACLs, APIs, App Engine Apps, VMs, and other Google Cloud Platform resources. + */ + export interface Schema$Project { + /** + * Output only. Creation time. + */ + createTime?: string | null; + /** + * Output only. The time at which this resource was requested for deletion. + */ + deleteTime?: string | null; + /** + * Optional. A user-assigned display name of the Project. When present it must be between 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, single-quote, double-quote, space, and exclamation point. Example: `My Project` + */ + displayName?: string | null; + /** + * Output only. A checksum computed by the server based on the current value of the Project resource. This may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. + */ + etag?: string | null; + /** + * Optional. The labels associated with this Project. Label keys must be between 1 and 63 characters long and must conform to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?. Label values must be between 0 and 63 characters long and must conform to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. No more than 256 labels can be associated with a given resource. Clients should store labels in a representation such as JSON that does not depend on specific characters being disallowed. Example: `"myBusinessDimension" : "businessValue"` + */ + labels?: {[key: string]: string} | null; + /** + * Output only. The unique resource name of the Project. It is an int64 generated number prefixed by "projects/". Example: `projects/415104041262` + */ + name?: string | null; + /** + * Optional. A reference to a parent Resource. eg., `organizations/123` or `folders/876`. + */ + parent?: string | null; + /** + * Immutable. The unique, user-assigned id of the Project. It must be 6 to 30 lowercase ASCII letters, digits, or hyphens. It must start with a letter. Trailing hyphens are prohibited. Example: `tokyo-rain-123` + */ + projectId?: string | null; + /** + * Output only. The Project lifecycle state. + */ + state?: string | null; + /** + * Output only. The most recent time this resource was modified. + */ + updateTime?: string | null; + } /** * A status object which is used as the `metadata` field for the Operation returned by CreateProject. It provides insight for when significant phases of Project creation have completed. */ @@ -451,6 +683,45 @@ export namespace cloudresourcemanager_v3 { */ ready?: boolean | null; } + /** + * The response message for searching folders. + */ + export interface Schema$SearchFoldersResponse { + /** + * A possibly paginated folder search results. the specified parent resource. + */ + folders?: Schema$Folder[]; + /** + * A pagination token returned from a previous call to `SearchFolders` that indicates from where searching should continue. + */ + nextPageToken?: string | null; + } + /** + * The response returned from the `SearchOrganizations` method. + */ + export interface Schema$SearchOrganizationsResponse { + /** + * A pagination token to be used to retrieve the next page of results. If the result is too large to fit within the page size specified in the request, this field will be set with a token that can be used to fetch the next page of results. If this field is empty, it indicates that this response contains the last page of results. + */ + nextPageToken?: string | null; + /** + * The list of Organizations that matched the search query, possibly paginated. + */ + organizations?: Schema$Organization[]; + } + /** + * A page of the response received from the SearchProjects method. A paginated response where more pages are available has `next_page_token` set. This token can be used in a subsequent request to retrieve the next request page. + */ + export interface Schema$SearchProjectsResponse { + /** + * Pagination token. If the result set is too large to fit in a single response, this token is returned. It encodes the position of the current result cursor. Feeding this value into a new list request with the `page_token` parameter gives the next page of the results. When `next_page_token` is not filled in, there is no next page and the list returned is the last page in the result set. Pagination tokens have a limited lifetime. + */ + nextPageToken?: string | null; + /** + * The list of Projects that matched the list filter query. This list can be paginated. + */ + projects?: Schema$Project[]; + } /** * Request message for `SetIamPolicy` method. */ @@ -590,6 +861,34 @@ export namespace cloudresourcemanager_v3 { */ permissions?: string[] | null; } + /** + * A status object which is used as the `metadata` field for the Operation returned by UndeleteFolder. + */ + export interface Schema$UndeleteFolderMetadata {} + /** + * The UndeleteFolder request message. + */ + export interface Schema$UndeleteFolderRequest {} + /** + * A status object which is used as the `metadata` field for the Operation returned by UndeleteOrganization. + */ + export interface Schema$UndeleteOrganizationMetadata {} + /** + * A status object which is used as the `metadata` field for the Operation returned by UndeleteProject. + */ + export interface Schema$UndeleteProjectMetadata {} + /** + * The request sent to the UndeleteProject method. + */ + export interface Schema$UndeleteProjectRequest {} + /** + * A status object which is used as the `metadata` field for the Operation returned by UpdateFolder. + */ + export interface Schema$UpdateFolderMetadata {} + /** + * A status object which is used as the `metadata` field for the Operation returned by UpdateProject. + */ + export interface Schema$UpdateProjectMetadata {} /** * Runtime operation information for updating a TagKey. */ @@ -599,14 +898,14 @@ export namespace cloudresourcemanager_v3 { */ export interface Schema$UpdateTagValueMetadata {} - export class Resource$Liens { + export class Resource$Folders { context: APIRequestContext; constructor(context: APIRequestContext) { this.context = context; } /** - * Create a Lien which applies to the resource denoted by the `parent` field. Callers of this method will require permission on the `parent` resource. For example, applying to `projects/1234` requires permission `resourcemanager.projects.updateLiens`. NOTE: Some resources may limit the number of Liens which may be applied. + * Creates a Folder in the resource hierarchy. Returns an Operation which can be used to track the progress of the folder creation workflow. Upon success the Operation.response field will be populated with the created Folder. In order to succeed, the addition of this new Folder must not violate the Folder naming, height or fanout constraints. + The Folder's display_name must be distinct from all other Folders that share its parent. + The addition of the Folder must not cause the active Folder hierarchy to exceed a height of 10. Note, the full active + deleted Folder hierarchy is allowed to reach a height of 20; this provides additional headroom when moving folders that contain deleted folders. + The addition of the Folder must not cause the total number of Folders under its parent to exceed 300. If the operation fails due to a folder constraint violation, some errors may be returned by the CreateFolder request, with status code FAILED_PRECONDITION and an error description. Other folder constraint violations will be communicated in the Operation, with the specific PreconditionFailure returned via the details list in the Operation.error field. The caller must have `resourcemanager.folders.create` permission on the identified parent. * @example * ```js * // Before running the sample: @@ -623,10 +922,7 @@ export namespace cloudresourcemanager_v3 { * async function main() { * const auth = new google.auth.GoogleAuth({ * // Scopes can be specified either as an array or as a single, space-delimited string. - * scopes: [ - * 'https://www.googleapis.com/auth/cloud-platform', - * 'https://www.googleapis.com/auth/cloud-platform.read-only', - * ], + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], * }); * * // Acquire an auth client, and bind it to all future calls @@ -634,17 +930,19 @@ export namespace cloudresourcemanager_v3 { * google.options({auth: authClient}); * * // Do the magic - * const res = await cloudresourcemanager.liens.create({ + * const res = await cloudresourcemanager.folders.create({ * // Request body metadata * requestBody: { * // request body parameters * // { * // "createTime": "my_createTime", + * // "deleteTime": "my_deleteTime", + * // "displayName": "my_displayName", + * // "etag": "my_etag", * // "name": "my_name", - * // "origin": "my_origin", * // "parent": "my_parent", - * // "reason": "my_reason", - * // "restrictions": [] + * // "state": "my_state", + * // "updateTime": "my_updateTime" * // } * }, * }); @@ -652,12 +950,11 @@ export namespace cloudresourcemanager_v3 { * * // Example response * // { - * // "createTime": "my_createTime", + * // "done": false, + * // "error": {}, + * // "metadata": {}, * // "name": "my_name", - * // "origin": "my_origin", - * // "parent": "my_parent", - * // "reason": "my_reason", - * // "restrictions": [] + * // "response": {} * // } * } * @@ -674,48 +971,48 @@ export namespace cloudresourcemanager_v3 { * @returns A promise if used with async/await, or void if used with a callback. */ create( - params: Params$Resource$Liens$Create, + params: Params$Resource$Folders$Create, options: StreamMethodOptions ): GaxiosPromise; create( - params?: Params$Resource$Liens$Create, + params?: Params$Resource$Folders$Create, options?: MethodOptions - ): GaxiosPromise; + ): GaxiosPromise; create( - params: Params$Resource$Liens$Create, + params: Params$Resource$Folders$Create, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; create( - params: Params$Resource$Liens$Create, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + params: Params$Resource$Folders$Create, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; create( - params: Params$Resource$Liens$Create, - callback: BodyResponseCallback + params: Params$Resource$Folders$Create, + callback: BodyResponseCallback ): void; - create(callback: BodyResponseCallback): void; + create(callback: BodyResponseCallback): void; create( paramsOrCallback?: - | Params$Resource$Liens$Create - | BodyResponseCallback + | Params$Resource$Folders$Create + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Liens$Create; + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Folders$Create; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Liens$Create; + params = {} as Params$Resource$Folders$Create; options = {}; } @@ -729,7 +1026,7 @@ export namespace cloudresourcemanager_v3 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v3/liens').replace(/([^:]\/)\/+/g, '$1'), + url: (rootUrl + '/v3/folders').replace(/([^:]\/)\/+/g, '$1'), method: 'POST', }, options @@ -740,17 +1037,17 @@ export namespace cloudresourcemanager_v3 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Delete a Lien by `name`. Callers of this method will require permission on the `parent` resource. For example, a Lien with a `parent` of `projects/1234` requires permission `resourcemanager.projects.updateLiens`. + * Requests deletion of a Folder. The Folder is moved into the DELETE_REQUESTED state immediately, and is deleted approximately 30 days later. This method may only be called on an empty Folder, where a Folder is empty if it doesn't contain any Folders or Projects in the ACTIVE state. If called on a folder in DELETE_REQUESTED state the result will be a no-op success. The caller must have `resourcemanager.folders.delete` permission on the identified folder. * @example * ```js * // Before running the sample: @@ -767,10 +1064,7 @@ export namespace cloudresourcemanager_v3 { * async function main() { * const auth = new google.auth.GoogleAuth({ * // Scopes can be specified either as an array or as a single, space-delimited string. - * scopes: [ - * 'https://www.googleapis.com/auth/cloud-platform', - * 'https://www.googleapis.com/auth/cloud-platform.read-only', - * ], + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], * }); * * // Acquire an auth client, and bind it to all future calls @@ -778,15 +1072,21 @@ export namespace cloudresourcemanager_v3 { * google.options({auth: authClient}); * * // Do the magic - * const res = await cloudresourcemanager.liens.delete({ - * // Required. The name/identifier of the Lien to delete. - * name: 'liens/.*', + * const res = await cloudresourcemanager.folders.delete({ + * // Required. The resource name of the Folder to be deleted. Must be of the form `folders/{folder_id\}`. + * name: 'folders/my-folder', * }); * console.log(res.data); * * // Example response - * // {} - * } + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } * * main().catch(e => { * console.error(e); @@ -801,48 +1101,48 @@ export namespace cloudresourcemanager_v3 { * @returns A promise if used with async/await, or void if used with a callback. */ delete( - params: Params$Resource$Liens$Delete, + params: Params$Resource$Folders$Delete, options: StreamMethodOptions ): GaxiosPromise; delete( - params?: Params$Resource$Liens$Delete, + params?: Params$Resource$Folders$Delete, options?: MethodOptions - ): GaxiosPromise; + ): GaxiosPromise; delete( - params: Params$Resource$Liens$Delete, + params: Params$Resource$Folders$Delete, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; delete( - params: Params$Resource$Liens$Delete, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + params: Params$Resource$Folders$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; delete( - params: Params$Resource$Liens$Delete, - callback: BodyResponseCallback + params: Params$Resource$Folders$Delete, + callback: BodyResponseCallback ): void; - delete(callback: BodyResponseCallback): void; + delete(callback: BodyResponseCallback): void; delete( paramsOrCallback?: - | Params$Resource$Liens$Delete - | BodyResponseCallback + | Params$Resource$Folders$Delete + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Liens$Delete; + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Folders$Delete; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Liens$Delete; + params = {} as Params$Resource$Folders$Delete; options = {}; } @@ -867,17 +1167,17 @@ export namespace cloudresourcemanager_v3 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Retrieve a Lien by `name`. Callers of this method will require permission on the `parent` resource. For example, a Lien with a `parent` of `projects/1234` requires permission `resourcemanager.projects.get` + * Retrieves a Folder identified by the supplied resource name. Valid Folder resource names have the format `folders/{folder_id\}` (for example, `folders/1234`). The caller must have `resourcemanager.folders.get` permission on the identified folder. * @example * ```js * // Before running the sample: @@ -905,20 +1205,22 @@ export namespace cloudresourcemanager_v3 { * google.options({auth: authClient}); * * // Do the magic - * const res = await cloudresourcemanager.liens.get({ - * // Required. The name/identifier of the Lien. - * name: 'liens/.*', + * const res = await cloudresourcemanager.folders.get({ + * // Required. The resource name of the Folder to retrieve. Must be of the form `folders/{folder_id\}`. + * name: 'folders/my-folder', * }); * console.log(res.data); * * // Example response * // { * // "createTime": "my_createTime", + * // "deleteTime": "my_deleteTime", + * // "displayName": "my_displayName", + * // "etag": "my_etag", * // "name": "my_name", - * // "origin": "my_origin", * // "parent": "my_parent", - * // "reason": "my_reason", - * // "restrictions": [] + * // "state": "my_state", + * // "updateTime": "my_updateTime" * // } * } * @@ -935,48 +1237,48 @@ export namespace cloudresourcemanager_v3 { * @returns A promise if used with async/await, or void if used with a callback. */ get( - params: Params$Resource$Liens$Get, + params: Params$Resource$Folders$Get, options: StreamMethodOptions ): GaxiosPromise; get( - params?: Params$Resource$Liens$Get, + params?: Params$Resource$Folders$Get, options?: MethodOptions - ): GaxiosPromise; + ): GaxiosPromise; get( - params: Params$Resource$Liens$Get, + params: Params$Resource$Folders$Get, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; get( - params: Params$Resource$Liens$Get, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + params: Params$Resource$Folders$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; get( - params: Params$Resource$Liens$Get, - callback: BodyResponseCallback + params: Params$Resource$Folders$Get, + callback: BodyResponseCallback ): void; - get(callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; get( paramsOrCallback?: - | Params$Resource$Liens$Get - | BodyResponseCallback + | Params$Resource$Folders$Get + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Liens$Get; + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Folders$Get; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Liens$Get; + params = {} as Params$Resource$Folders$Get; options = {}; } @@ -1001,17 +1303,17 @@ export namespace cloudresourcemanager_v3 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * List all Liens applied to the `parent` resource. Callers of this method will require permission on the `parent` resource. For example, a Lien with a `parent` of `projects/1234` requires permission `resourcemanager.projects.get`. + * Gets the access control policy for a Folder. The returned policy may be empty if no such policy or resource exists. The `resource` field should be the Folder's resource name, e.g. "folders/1234". The caller must have `resourcemanager.folders.getIamPolicy` permission on the identified folder. * @example * ```js * // Before running the sample: @@ -1039,20 +1341,26 @@ export namespace cloudresourcemanager_v3 { * google.options({auth: authClient}); * * // Do the magic - * const res = await cloudresourcemanager.liens.list({ - * // The maximum number of items to return. This is a suggestion for the server. - * pageSize: 'placeholder-value', - * // The `next_page_token` value returned from a previous List request, if any. - * pageToken: 'placeholder-value', - * // Required. The name of the resource to list all attached Liens. For example, `projects/1234`. (google.api.field_policy).resource_type annotation is not set since the parent depends on the meta api implementation. This field could be a project or other sub project resources. - * parent: 'placeholder-value', + * const res = await cloudresourcemanager.folders.getIamPolicy({ + * // REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. + * resource: 'folders/my-folder', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "options": {} + * // } + * }, * }); * console.log(res.data); * * // Example response * // { - * // "liens": [], - * // "nextPageToken": "my_nextPageToken" + * // "auditConfigs": [], + * // "bindings": [], + * // "etag": "my_etag", + * // "version": 0 * // } * } * @@ -1068,52 +1376,50 @@ export namespace cloudresourcemanager_v3 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - list( - params: Params$Resource$Liens$List, + getIamPolicy( + params: Params$Resource$Folders$Getiampolicy, options: StreamMethodOptions ): GaxiosPromise; - list( - params?: Params$Resource$Liens$List, + getIamPolicy( + params?: Params$Resource$Folders$Getiampolicy, options?: MethodOptions - ): GaxiosPromise; - list( - params: Params$Resource$Liens$List, + ): GaxiosPromise; + getIamPolicy( + params: Params$Resource$Folders$Getiampolicy, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Liens$List, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + getIamPolicy( + params: Params$Resource$Folders$Getiampolicy, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Liens$List, - callback: BodyResponseCallback + getIamPolicy( + params: Params$Resource$Folders$Getiampolicy, + callback: BodyResponseCallback ): void; - list(callback: BodyResponseCallback): void; - list( + getIamPolicy(callback: BodyResponseCallback): void; + getIamPolicy( paramsOrCallback?: - | Params$Resource$Liens$List - | BodyResponseCallback + | Params$Resource$Folders$Getiampolicy + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): - | void - | GaxiosPromise - | GaxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Liens$List; + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Folders$Getiampolicy; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Liens$List; + params = {} as Params$Resource$Folders$Getiampolicy; options = {}; } @@ -1127,68 +1433,31 @@ export namespace cloudresourcemanager_v3 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v3/liens').replace(/([^:]\/)\/+/g, '$1'), - method: 'GET', + url: (rootUrl + '/v3/{+resource}:getIamPolicy').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', }, options ), params, - requiredParams: [], - pathParams: [], + requiredParams: ['resource'], + pathParams: ['resource'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } - } - - export interface Params$Resource$Liens$Create extends StandardParameters { - /** - * Request body metadata - */ - requestBody?: Schema$Lien; - } - export interface Params$Resource$Liens$Delete extends StandardParameters { - /** - * Required. The name/identifier of the Lien to delete. - */ - name?: string; - } - export interface Params$Resource$Liens$Get extends StandardParameters { - /** - * Required. The name/identifier of the Lien. - */ - name?: string; - } - export interface Params$Resource$Liens$List extends StandardParameters { - /** - * The maximum number of items to return. This is a suggestion for the server. - */ - pageSize?: number; - /** - * The `next_page_token` value returned from a previous List request, if any. - */ - pageToken?: string; - /** - * Required. The name of the resource to list all attached Liens. For example, `projects/1234`. (google.api.field_policy).resource_type annotation is not set since the parent depends on the meta api implementation. This field could be a project or other sub project resources. - */ - parent?: string; - } - - export class Resource$Operations { - context: APIRequestContext; - constructor(context: APIRequestContext) { - this.context = context; - } /** - * 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. + * Lists the Folders that are direct descendants of supplied parent resource. List provides a strongly consistent view of the Folders underneath the specified parent resource. List returns Folders sorted based upon the (ascending) lexical ordering of their display_name. The caller must have `resourcemanager.folders.list` permission on the identified parent. * @example * ```js * // Before running the sample: @@ -1216,19 +1485,22 @@ export namespace cloudresourcemanager_v3 { * google.options({auth: authClient}); * * // Do the magic - * const res = await cloudresourcemanager.operations.get({ - * // The name of the operation resource. - * name: 'operations/.*', + * const res = await cloudresourcemanager.folders.list({ + * // Optional. The maximum number of Folders to return in the response. If unspecified, server picks an appropriate default. + * pageSize: 'placeholder-value', + * // Optional. A pagination token returned from a previous call to `ListFolders` that indicates where this listing should continue from. + * pageToken: 'placeholder-value', + * // Required. The resource name of the Organization or Folder whose Folders are being listed. Must be of the form `folders/{folder_id\}` or `organizations/{org_id\}`. Access to this method is controlled by checking the `resourcemanager.folders.list` permission on the `parent`. + * parent: 'placeholder-value', + * // Optional. Controls whether Folders in the DELETE_REQUESTED state should be returned. Defaults to false. + * showDeleted: 'placeholder-value', * }); * console.log(res.data); * * // Example response * // { - * // "done": false, - * // "error": {}, - * // "metadata": {}, - * // "name": "my_name", - * // "response": {} + * // "folders": [], + * // "nextPageToken": "my_nextPageToken" * // } * } * @@ -1244,49 +1516,52 @@ export namespace cloudresourcemanager_v3 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - get( - params: Params$Resource$Operations$Get, + list( + params: Params$Resource$Folders$List, options: StreamMethodOptions ): GaxiosPromise; - get( - params?: Params$Resource$Operations$Get, + list( + params?: Params$Resource$Folders$List, options?: MethodOptions - ): GaxiosPromise; - get( - params: Params$Resource$Operations$Get, + ): GaxiosPromise; + list( + params: Params$Resource$Folders$List, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - get( - params: Params$Resource$Operations$Get, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + list( + params: Params$Resource$Folders$List, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - get( - params: Params$Resource$Operations$Get, - callback: BodyResponseCallback + list( + params: Params$Resource$Folders$List, + callback: BodyResponseCallback ): void; - get(callback: BodyResponseCallback): void; - get( + list(callback: BodyResponseCallback): void; + list( paramsOrCallback?: - | Params$Resource$Operations$Get - | BodyResponseCallback + | Params$Resource$Folders$List + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Operations$Get; + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Folders$List; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Operations$Get; + params = {} as Params$Resource$Folders$List; options = {}; } @@ -1300,32 +1575,4195 @@ export namespace cloudresourcemanager_v3 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v3/{+name}').replace(/([^:]\/)\/+/g, '$1'), + url: (rootUrl + '/v3/folders').replace(/([^:]\/)\/+/g, '$1'), method: 'GET', }, options ), params, - requiredParams: ['name'], - pathParams: ['name'], + requiredParams: [], + pathParams: [], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } - } - export interface Params$Resource$Operations$Get extends StandardParameters { /** - * The name of the operation resource. - */ - name?: string; + * Moves a Folder under a new resource parent. Returns an Operation which can be used to track the progress of the folder move workflow. Upon success the Operation.response field will be populated with the moved Folder. Upon failure, a FolderOperationError categorizing the failure cause will be returned - if the failure occurs synchronously then the FolderOperationError will be returned via the Status.details field and if it occurs asynchronously then the FolderOperation will be returned via the Operation.error field. In addition, the Operation.metadata field will be populated with a FolderOperation message as an aid to stateless clients. Folder moves will be rejected if they violate either the naming, height or fanout constraints described in the CreateFolder documentation. The caller must have `resourcemanager.folders.move` permission on the folder's current and proposed new parent. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const cloudresourcemanager = google.cloudresourcemanager('v3'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await cloudresourcemanager.folders.move({ + * // Required. The resource name of the Folder to move. Must be of the form folders/{folder_id\} + * name: 'folders/my-folder', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "destinationParent": "my_destinationParent" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + move( + params: Params$Resource$Folders$Move, + options: StreamMethodOptions + ): GaxiosPromise; + move( + params?: Params$Resource$Folders$Move, + options?: MethodOptions + ): GaxiosPromise; + move( + params: Params$Resource$Folders$Move, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + move( + params: Params$Resource$Folders$Move, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + move( + params: Params$Resource$Folders$Move, + callback: BodyResponseCallback + ): void; + move(callback: BodyResponseCallback): void; + move( + paramsOrCallback?: + | Params$Resource$Folders$Move + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Folders$Move; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Folders$Move; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://cloudresourcemanager.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v3/{+name}:move').replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Updates a Folder, changing its display_name. Changes to the folder display_name will be rejected if they violate either the display_name formatting rules or naming constraints described in the CreateFolder documentation. The Folder's display_name must start and end with a letter or digit, may contain letters, digits, spaces, hyphens and underscores and can be between 3 and 30 characters. This is captured by the regular expression: `\p{L\}\p{N\}{1,28\}[\p{L\}\p{N\}]`. The caller must have `resourcemanager.folders.update` permission on the identified folder. If the update fails due to the unique name constraint then a PreconditionFailure explaining this violation will be returned in the Status.details field. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const cloudresourcemanager = google.cloudresourcemanager('v3'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await cloudresourcemanager.folders.patch({ + * // Output only. The resource name of the Folder. Its format is `folders/{folder_id\}`, for example: "folders/1234". + * name: 'folders/my-folder', + * // Required. Fields to be updated. Only the `display_name` can be updated. + * updateMask: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "createTime": "my_createTime", + * // "deleteTime": "my_deleteTime", + * // "displayName": "my_displayName", + * // "etag": "my_etag", + * // "name": "my_name", + * // "parent": "my_parent", + * // "state": "my_state", + * // "updateTime": "my_updateTime" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + patch( + params: Params$Resource$Folders$Patch, + options: StreamMethodOptions + ): GaxiosPromise; + patch( + params?: Params$Resource$Folders$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Folders$Patch, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Folders$Patch, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Folders$Patch, + callback: BodyResponseCallback + ): void; + patch(callback: BodyResponseCallback): void; + patch( + paramsOrCallback?: + | Params$Resource$Folders$Patch + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Folders$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Folders$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://cloudresourcemanager.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v3/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Search for folders that match specific filter criteria. Search provides an eventually consistent view of the folders a user has access to which meet the specified filter criteria. This will only return folders on which the caller has the permission `resourcemanager.folders.get`. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const cloudresourcemanager = google.cloudresourcemanager('v3'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/cloud-platform.read-only', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await cloudresourcemanager.folders.search({ + * // Optional. The maximum number of folders to return in the response. If unspecified, server picks an appropriate default. + * pageSize: 'placeholder-value', + * // Optional. A pagination token returned from a previous call to `SearchFolders` that indicates from where search should continue. + * pageToken: 'placeholder-value', + * // Optional. Search criteria used to select the Folders to return. If no search criteria is specified then all accessible folders will be returned. Query expressions can be used to restrict results based upon displayName, state and parent, where the operators `=` (`:`) `NOT`, `AND` and `OR` can be used along with the suffix wildcard symbol `*`. The displayName field in a query expression should use escaped quotes for values that include whitespace to prevent unexpected behavior. | Field | Description | |-------------------------|----------------------------------------| | displayName | Filters by displayName. | | parent | Filters by parent (e.g. folders/123). | | state, lifecycleState | Filters by state. | Some example queries are: * Query `displayName=Test*` returns Folder resources whose display name starts with "Test". * Query `state=ACTIVE` returns Folder resources with `state` set to `ACTIVE`. * Query `parent=folders/123` returns Folder resources that have `folders/123` as a parent resource. * Query `parent=folders/123 AND state=ACTIVE` returns active Folder resources that have `folders/123` as a parent resource. * Query `displayName=\\"Test String\\"` returns Folder resources with display names that include both "Test" and "String". + * query: 'placeholder-value', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "folders": [], + * // "nextPageToken": "my_nextPageToken" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + search( + params: Params$Resource$Folders$Search, + options: StreamMethodOptions + ): GaxiosPromise; + search( + params?: Params$Resource$Folders$Search, + options?: MethodOptions + ): GaxiosPromise; + search( + params: Params$Resource$Folders$Search, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + search( + params: Params$Resource$Folders$Search, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + search( + params: Params$Resource$Folders$Search, + callback: BodyResponseCallback + ): void; + search(callback: BodyResponseCallback): void; + search( + paramsOrCallback?: + | Params$Resource$Folders$Search + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Folders$Search; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Folders$Search; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://cloudresourcemanager.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v3/folders:search').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: [], + pathParams: [], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Sets the access control policy on a Folder, replacing any existing policy. The `resource` field should be the Folder's resource name, e.g. "folders/1234". The caller must have `resourcemanager.folders.setIamPolicy` permission on the identified folder. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const cloudresourcemanager = google.cloudresourcemanager('v3'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await cloudresourcemanager.folders.setIamPolicy({ + * // REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. + * resource: 'folders/my-folder', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "policy": {}, + * // "updateMask": "my_updateMask" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "auditConfigs": [], + * // "bindings": [], + * // "etag": "my_etag", + * // "version": 0 + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + setIamPolicy( + params: Params$Resource$Folders$Setiampolicy, + options: StreamMethodOptions + ): GaxiosPromise; + setIamPolicy( + params?: Params$Resource$Folders$Setiampolicy, + options?: MethodOptions + ): GaxiosPromise; + setIamPolicy( + params: Params$Resource$Folders$Setiampolicy, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + setIamPolicy( + params: Params$Resource$Folders$Setiampolicy, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + setIamPolicy( + params: Params$Resource$Folders$Setiampolicy, + callback: BodyResponseCallback + ): void; + setIamPolicy(callback: BodyResponseCallback): void; + setIamPolicy( + paramsOrCallback?: + | Params$Resource$Folders$Setiampolicy + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Folders$Setiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Folders$Setiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://cloudresourcemanager.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v3/{+resource}:setIamPolicy').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Returns permissions that a caller has on the specified Folder. The `resource` field should be the Folder's resource name, e.g. "folders/1234". There are no permissions required for making this API call. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const cloudresourcemanager = google.cloudresourcemanager('v3'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await cloudresourcemanager.folders.testIamPermissions({ + * // REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. + * resource: 'folders/my-folder', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "permissions": [] + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "permissions": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + testIamPermissions( + params: Params$Resource$Folders$Testiampermissions, + options: StreamMethodOptions + ): GaxiosPromise; + testIamPermissions( + params?: Params$Resource$Folders$Testiampermissions, + options?: MethodOptions + ): GaxiosPromise; + testIamPermissions( + params: Params$Resource$Folders$Testiampermissions, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + testIamPermissions( + params: Params$Resource$Folders$Testiampermissions, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + testIamPermissions( + params: Params$Resource$Folders$Testiampermissions, + callback: BodyResponseCallback + ): void; + testIamPermissions( + callback: BodyResponseCallback + ): void; + testIamPermissions( + paramsOrCallback?: + | Params$Resource$Folders$Testiampermissions + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Folders$Testiampermissions; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Folders$Testiampermissions; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://cloudresourcemanager.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v3/{+resource}:testIamPermissions').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Cancels the deletion request for a Folder. This method may be called on a Folder in any state. If Folder is in ACTIVE state the result will be a no-op success. In order to succeed, the Folder's parent must be in the ACTIVE state. In addition, reintroducing the folder into the tree must not violate folder naming, height and fanout constraints described in the CreateFolder documentation. The caller must have `resourcemanager.folders.undelete` permission on the identified folder. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const cloudresourcemanager = google.cloudresourcemanager('v3'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await cloudresourcemanager.folders.undelete({ + * // Required. The resource name of the Folder to undelete. Must be of the form `folders/{folder_id\}`. + * name: 'folders/my-folder', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // {} + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + undelete( + params: Params$Resource$Folders$Undelete, + options: StreamMethodOptions + ): GaxiosPromise; + undelete( + params?: Params$Resource$Folders$Undelete, + options?: MethodOptions + ): GaxiosPromise; + undelete( + params: Params$Resource$Folders$Undelete, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + undelete( + params: Params$Resource$Folders$Undelete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + undelete( + params: Params$Resource$Folders$Undelete, + callback: BodyResponseCallback + ): void; + undelete(callback: BodyResponseCallback): void; + undelete( + paramsOrCallback?: + | Params$Resource$Folders$Undelete + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Folders$Undelete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Folders$Undelete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://cloudresourcemanager.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v3/{+name}:undelete').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Folders$Create extends StandardParameters { + /** + * Request body metadata + */ + requestBody?: Schema$Folder; + } + export interface Params$Resource$Folders$Delete extends StandardParameters { + /** + * Required. The resource name of the Folder to be deleted. Must be of the form `folders/{folder_id\}`. + */ + name?: string; + } + export interface Params$Resource$Folders$Get extends StandardParameters { + /** + * Required. The resource name of the Folder to retrieve. Must be of the form `folders/{folder_id\}`. + */ + name?: string; + } + export interface Params$Resource$Folders$Getiampolicy + extends StandardParameters { + /** + * REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GetIamPolicyRequest; + } + export interface Params$Resource$Folders$List extends StandardParameters { + /** + * Optional. The maximum number of Folders to return in the response. If unspecified, server picks an appropriate default. + */ + pageSize?: number; + /** + * Optional. A pagination token returned from a previous call to `ListFolders` that indicates where this listing should continue from. + */ + pageToken?: string; + /** + * Required. The resource name of the Organization or Folder whose Folders are being listed. Must be of the form `folders/{folder_id\}` or `organizations/{org_id\}`. Access to this method is controlled by checking the `resourcemanager.folders.list` permission on the `parent`. + */ + parent?: string; + /** + * Optional. Controls whether Folders in the DELETE_REQUESTED state should be returned. Defaults to false. + */ + showDeleted?: boolean; + } + export interface Params$Resource$Folders$Move extends StandardParameters { + /** + * Required. The resource name of the Folder to move. Must be of the form folders/{folder_id\} + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$MoveFolderRequest; + } + export interface Params$Resource$Folders$Patch extends StandardParameters { + /** + * Output only. The resource name of the Folder. Its format is `folders/{folder_id\}`, for example: "folders/1234". + */ + name?: string; + /** + * Required. Fields to be updated. Only the `display_name` can be updated. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Folder; + } + export interface Params$Resource$Folders$Search extends StandardParameters { + /** + * Optional. The maximum number of folders to return in the response. If unspecified, server picks an appropriate default. + */ + pageSize?: number; + /** + * Optional. A pagination token returned from a previous call to `SearchFolders` that indicates from where search should continue. + */ + pageToken?: string; + /** + * Optional. Search criteria used to select the Folders to return. If no search criteria is specified then all accessible folders will be returned. Query expressions can be used to restrict results based upon displayName, state and parent, where the operators `=` (`:`) `NOT`, `AND` and `OR` can be used along with the suffix wildcard symbol `*`. The displayName field in a query expression should use escaped quotes for values that include whitespace to prevent unexpected behavior. | Field | Description | |-------------------------|----------------------------------------| | displayName | Filters by displayName. | | parent | Filters by parent (e.g. folders/123). | | state, lifecycleState | Filters by state. | Some example queries are: * Query `displayName=Test*` returns Folder resources whose display name starts with "Test". * Query `state=ACTIVE` returns Folder resources with `state` set to `ACTIVE`. * Query `parent=folders/123` returns Folder resources that have `folders/123` as a parent resource. * Query `parent=folders/123 AND state=ACTIVE` returns active Folder resources that have `folders/123` as a parent resource. * Query `displayName=\\"Test String\\"` returns Folder resources with display names that include both "Test" and "String". + */ + query?: string; + } + export interface Params$Resource$Folders$Setiampolicy + extends StandardParameters { + /** + * REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$SetIamPolicyRequest; + } + export interface Params$Resource$Folders$Testiampermissions + extends StandardParameters { + /** + * REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$TestIamPermissionsRequest; + } + export interface Params$Resource$Folders$Undelete extends StandardParameters { + /** + * Required. The resource name of the Folder to undelete. Must be of the form `folders/{folder_id\}`. + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$UndeleteFolderRequest; + } + + export class Resource$Liens { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Create a Lien which applies to the resource denoted by the `parent` field. Callers of this method will require permission on the `parent` resource. For example, applying to `projects/1234` requires permission `resourcemanager.projects.updateLiens`. NOTE: Some resources may limit the number of Liens which may be applied. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const cloudresourcemanager = google.cloudresourcemanager('v3'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/cloud-platform.read-only', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await cloudresourcemanager.liens.create({ + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "createTime": "my_createTime", + * // "name": "my_name", + * // "origin": "my_origin", + * // "parent": "my_parent", + * // "reason": "my_reason", + * // "restrictions": [] + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "createTime": "my_createTime", + * // "name": "my_name", + * // "origin": "my_origin", + * // "parent": "my_parent", + * // "reason": "my_reason", + * // "restrictions": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + create( + params: Params$Resource$Liens$Create, + options: StreamMethodOptions + ): GaxiosPromise; + create( + params?: Params$Resource$Liens$Create, + options?: MethodOptions + ): GaxiosPromise; + create( + params: Params$Resource$Liens$Create, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Liens$Create, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Liens$Create, + callback: BodyResponseCallback + ): void; + create(callback: BodyResponseCallback): void; + create( + paramsOrCallback?: + | Params$Resource$Liens$Create + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Liens$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Liens$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://cloudresourcemanager.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v3/liens').replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: [], + pathParams: [], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Delete a Lien by `name`. Callers of this method will require permission on the `parent` resource. For example, a Lien with a `parent` of `projects/1234` requires permission `resourcemanager.projects.updateLiens`. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const cloudresourcemanager = google.cloudresourcemanager('v3'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/cloud-platform.read-only', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await cloudresourcemanager.liens.delete({ + * // Required. The name/identifier of the Lien to delete. + * name: 'liens/.*', + * }); + * console.log(res.data); + * + * // Example response + * // {} + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + delete( + params: Params$Resource$Liens$Delete, + options: StreamMethodOptions + ): GaxiosPromise; + delete( + params?: Params$Resource$Liens$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Liens$Delete, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Liens$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Liens$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Liens$Delete + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Liens$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Liens$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://cloudresourcemanager.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v3/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Retrieve a Lien by `name`. Callers of this method will require permission on the `parent` resource. For example, a Lien with a `parent` of `projects/1234` requires permission `resourcemanager.projects.get` + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const cloudresourcemanager = google.cloudresourcemanager('v3'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/cloud-platform.read-only', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await cloudresourcemanager.liens.get({ + * // Required. The name/identifier of the Lien. + * name: 'liens/.*', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "createTime": "my_createTime", + * // "name": "my_name", + * // "origin": "my_origin", + * // "parent": "my_parent", + * // "reason": "my_reason", + * // "restrictions": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Liens$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Liens$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Liens$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Liens$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Liens$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Liens$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Liens$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Liens$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://cloudresourcemanager.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v3/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * List all Liens applied to the `parent` resource. Callers of this method will require permission on the `parent` resource. For example, a Lien with a `parent` of `projects/1234` requires permission `resourcemanager.projects.get`. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const cloudresourcemanager = google.cloudresourcemanager('v3'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/cloud-platform.read-only', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await cloudresourcemanager.liens.list({ + * // The maximum number of items to return. This is a suggestion for the server. + * pageSize: 'placeholder-value', + * // The `next_page_token` value returned from a previous List request, if any. + * pageToken: 'placeholder-value', + * // Required. The name of the resource to list all attached Liens. For example, `projects/1234`. (google.api.field_policy).resource_type annotation is not set since the parent depends on the meta api implementation. This field could be a project or other sub project resources. + * parent: 'placeholder-value', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "liens": [], + * // "nextPageToken": "my_nextPageToken" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Liens$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Liens$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Liens$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Liens$List, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Liens$List, + callback: BodyResponseCallback + ): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: + | Params$Resource$Liens$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Liens$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Liens$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://cloudresourcemanager.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v3/liens').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: [], + pathParams: [], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Liens$Create extends StandardParameters { + /** + * Request body metadata + */ + requestBody?: Schema$Lien; + } + export interface Params$Resource$Liens$Delete extends StandardParameters { + /** + * Required. The name/identifier of the Lien to delete. + */ + name?: string; + } + export interface Params$Resource$Liens$Get extends StandardParameters { + /** + * Required. The name/identifier of the Lien. + */ + name?: string; + } + export interface Params$Resource$Liens$List extends StandardParameters { + /** + * The maximum number of items to return. This is a suggestion for the server. + */ + pageSize?: number; + /** + * The `next_page_token` value returned from a previous List request, if any. + */ + pageToken?: string; + /** + * Required. The name of the resource to list all attached Liens. For example, `projects/1234`. (google.api.field_policy).resource_type annotation is not set since the parent depends on the meta api implementation. This field could be a project or other sub project resources. + */ + parent?: string; + } + + export class Resource$Operations { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * 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. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const cloudresourcemanager = google.cloudresourcemanager('v3'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/cloud-platform.read-only', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await cloudresourcemanager.operations.get({ + * // The name of the operation resource. + * name: 'operations/.*', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Operations$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Operations$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Operations$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Operations$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Operations$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Operations$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Operations$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Operations$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://cloudresourcemanager.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v3/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Operations$Get extends StandardParameters { + /** + * The name of the operation resource. + */ + name?: string; + } + + export class Resource$Organizations { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Fetches an Organization resource identified by the specified resource name. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const cloudresourcemanager = google.cloudresourcemanager('v3'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/cloud-platform.read-only', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await cloudresourcemanager.organizations.get({ + * // Required. The resource name of the Organization to fetch. This is the organization's relative path in the API, formatted as "organizations/[organizationId]". For example, "organizations/1234". + * name: 'organizations/my-organization', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "createTime": "my_createTime", + * // "deleteTime": "my_deleteTime", + * // "directoryCustomerId": "my_directoryCustomerId", + * // "displayName": "my_displayName", + * // "etag": "my_etag", + * // "name": "my_name", + * // "state": "my_state", + * // "updateTime": "my_updateTime" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Organizations$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Organizations$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Organizations$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Organizations$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Organizations$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Organizations$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Organizations$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Organizations$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://cloudresourcemanager.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v3/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Gets the access control policy for an Organization resource. May be empty if no such policy or resource exists. The `resource` field should be the organization's resource name, e.g. "organizations/123". Authorization requires the Google IAM permission `resourcemanager.organizations.getIamPolicy` on the specified organization + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const cloudresourcemanager = google.cloudresourcemanager('v3'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/cloud-platform.read-only', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await cloudresourcemanager.organizations.getIamPolicy({ + * // REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. + * resource: 'organizations/my-organization', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "options": {} + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "auditConfigs": [], + * // "bindings": [], + * // "etag": "my_etag", + * // "version": 0 + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + getIamPolicy( + params: Params$Resource$Organizations$Getiampolicy, + options: StreamMethodOptions + ): GaxiosPromise; + getIamPolicy( + params?: Params$Resource$Organizations$Getiampolicy, + options?: MethodOptions + ): GaxiosPromise; + getIamPolicy( + params: Params$Resource$Organizations$Getiampolicy, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getIamPolicy( + params: Params$Resource$Organizations$Getiampolicy, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getIamPolicy( + params: Params$Resource$Organizations$Getiampolicy, + callback: BodyResponseCallback + ): void; + getIamPolicy(callback: BodyResponseCallback): void; + getIamPolicy( + paramsOrCallback?: + | Params$Resource$Organizations$Getiampolicy + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Organizations$Getiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Organizations$Getiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://cloudresourcemanager.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v3/{+resource}:getIamPolicy').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Searches Organization resources that are visible to the user and satisfy the specified filter. This method returns Organizations in an unspecified order. New Organizations do not necessarily appear at the end of the results, and may take a small amount of time to appear. Search will only return organizations on which the user has the permission `resourcemanager.organizations.get` + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const cloudresourcemanager = google.cloudresourcemanager('v3'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/cloud-platform.read-only', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await cloudresourcemanager.organizations.search({ + * // Optional. The maximum number of Organizations to return in the response. If unspecified, server picks an appropriate default. + * pageSize: 'placeholder-value', + * // Optional. A pagination token returned from a previous call to `SearchOrganizations` that indicates from where listing should continue. + * pageToken: 'placeholder-value', + * // Optional. An optional query string used to filter the Organizations to return in the response. Query rules are case-insensitive. | Field | Description | |------------------|--------------------------------------------| | directoryCustomerId, owner.directoryCustomerId | Filters by directory customer id. | | domain | Filters by domain. | Organizations may be queried by `directoryCustomerId` or by `domain`, where the domain is a G Suite domain, for example: * Query `directorycustomerid:123456789` returns Organization resources with `owner.directory_customer_id` equal to `123456789`. * Query `domain:google.com` returns Organization resources corresponding to the domain `google.com`. + * query: 'placeholder-value', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "nextPageToken": "my_nextPageToken", + * // "organizations": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + search( + params: Params$Resource$Organizations$Search, + options: StreamMethodOptions + ): GaxiosPromise; + search( + params?: Params$Resource$Organizations$Search, + options?: MethodOptions + ): GaxiosPromise; + search( + params: Params$Resource$Organizations$Search, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + search( + params: Params$Resource$Organizations$Search, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + search( + params: Params$Resource$Organizations$Search, + callback: BodyResponseCallback + ): void; + search( + callback: BodyResponseCallback + ): void; + search( + paramsOrCallback?: + | Params$Resource$Organizations$Search + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Organizations$Search; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Organizations$Search; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://cloudresourcemanager.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v3/organizations:search').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: [], + pathParams: [], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Sets the access control policy on an Organization resource. Replaces any existing policy. The `resource` field should be the organization's resource name, e.g. "organizations/123". Authorization requires the Google IAM permission `resourcemanager.organizations.setIamPolicy` on the specified organization + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const cloudresourcemanager = google.cloudresourcemanager('v3'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await cloudresourcemanager.organizations.setIamPolicy({ + * // REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. + * resource: 'organizations/my-organization', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "policy": {}, + * // "updateMask": "my_updateMask" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "auditConfigs": [], + * // "bindings": [], + * // "etag": "my_etag", + * // "version": 0 + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + setIamPolicy( + params: Params$Resource$Organizations$Setiampolicy, + options: StreamMethodOptions + ): GaxiosPromise; + setIamPolicy( + params?: Params$Resource$Organizations$Setiampolicy, + options?: MethodOptions + ): GaxiosPromise; + setIamPolicy( + params: Params$Resource$Organizations$Setiampolicy, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + setIamPolicy( + params: Params$Resource$Organizations$Setiampolicy, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + setIamPolicy( + params: Params$Resource$Organizations$Setiampolicy, + callback: BodyResponseCallback + ): void; + setIamPolicy(callback: BodyResponseCallback): void; + setIamPolicy( + paramsOrCallback?: + | Params$Resource$Organizations$Setiampolicy + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Organizations$Setiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Organizations$Setiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://cloudresourcemanager.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v3/{+resource}:setIamPolicy').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Returns permissions that a caller has on the specified Organization. The `resource` field should be the organization's resource name, e.g. "organizations/123". There are no permissions required for making this API call. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const cloudresourcemanager = google.cloudresourcemanager('v3'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/cloud-platform.read-only', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await cloudresourcemanager.organizations.testIamPermissions({ + * // REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. + * resource: 'organizations/my-organization', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "permissions": [] + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "permissions": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + testIamPermissions( + params: Params$Resource$Organizations$Testiampermissions, + options: StreamMethodOptions + ): GaxiosPromise; + testIamPermissions( + params?: Params$Resource$Organizations$Testiampermissions, + options?: MethodOptions + ): GaxiosPromise; + testIamPermissions( + params: Params$Resource$Organizations$Testiampermissions, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + testIamPermissions( + params: Params$Resource$Organizations$Testiampermissions, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + testIamPermissions( + params: Params$Resource$Organizations$Testiampermissions, + callback: BodyResponseCallback + ): void; + testIamPermissions( + callback: BodyResponseCallback + ): void; + testIamPermissions( + paramsOrCallback?: + | Params$Resource$Organizations$Testiampermissions + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Organizations$Testiampermissions; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Organizations$Testiampermissions; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://cloudresourcemanager.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v3/{+resource}:testIamPermissions').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Organizations$Get + extends StandardParameters { + /** + * Required. The resource name of the Organization to fetch. This is the organization's relative path in the API, formatted as "organizations/[organizationId]". For example, "organizations/1234". + */ + name?: string; + } + export interface Params$Resource$Organizations$Getiampolicy + extends StandardParameters { + /** + * REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GetIamPolicyRequest; + } + export interface Params$Resource$Organizations$Search + extends StandardParameters { + /** + * Optional. The maximum number of Organizations to return in the response. If unspecified, server picks an appropriate default. + */ + pageSize?: number; + /** + * Optional. A pagination token returned from a previous call to `SearchOrganizations` that indicates from where listing should continue. + */ + pageToken?: string; + /** + * Optional. An optional query string used to filter the Organizations to return in the response. Query rules are case-insensitive. | Field | Description | |------------------|--------------------------------------------| | directoryCustomerId, owner.directoryCustomerId | Filters by directory customer id. | | domain | Filters by domain. | Organizations may be queried by `directoryCustomerId` or by `domain`, where the domain is a G Suite domain, for example: * Query `directorycustomerid:123456789` returns Organization resources with `owner.directory_customer_id` equal to `123456789`. * Query `domain:google.com` returns Organization resources corresponding to the domain `google.com`. + */ + query?: string; + } + export interface Params$Resource$Organizations$Setiampolicy + extends StandardParameters { + /** + * REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$SetIamPolicyRequest; + } + export interface Params$Resource$Organizations$Testiampermissions + extends StandardParameters { + /** + * REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$TestIamPermissionsRequest; + } + + export class Resource$Projects { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Request that a new Project be created. The result is an Operation which can be used to track the creation process. This process usually takes a few seconds, but can sometimes take much longer. The tracking Operation is automatically deleted after a few hours, so there is no need to call DeleteOperation. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const cloudresourcemanager = google.cloudresourcemanager('v3'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await cloudresourcemanager.projects.create({ + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "createTime": "my_createTime", + * // "deleteTime": "my_deleteTime", + * // "displayName": "my_displayName", + * // "etag": "my_etag", + * // "labels": {}, + * // "name": "my_name", + * // "parent": "my_parent", + * // "projectId": "my_projectId", + * // "state": "my_state", + * // "updateTime": "my_updateTime" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + create( + params: Params$Resource$Projects$Create, + options: StreamMethodOptions + ): GaxiosPromise; + create( + params?: Params$Resource$Projects$Create, + options?: MethodOptions + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Create, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Create, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Create, + callback: BodyResponseCallback + ): void; + create(callback: BodyResponseCallback): void; + create( + paramsOrCallback?: + | Params$Resource$Projects$Create + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Projects$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://cloudresourcemanager.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v3/projects').replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: [], + pathParams: [], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Marks the Project identified by the specified `name` (for example, `projects/415104041262`) for deletion. This method will only affect the Project if it has a lifecycle state of ACTIVE. This method changes the Project's lifecycle state from ACTIVE to DELETE_REQUESTED. The deletion starts at an unspecified time, at which point the Project is no longer accessible. Until the deletion completes, you can check the lifecycle state checked by retrieving the Project with GetProject, and the Project remains visible to ListProjects. However, you cannot update the project. After the deletion completes, the Project is not retrievable by the GetProject, ListProjects, and SearchProjects methods. This method behaves idempotently (eg., deleting a `DELETE_REQUESTED` project will not be an error, but also won't do anything). The caller must have delete permissions for this Project. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const cloudresourcemanager = google.cloudresourcemanager('v3'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await cloudresourcemanager.projects.delete({ + * // Required. The name of the Project (for example, `projects/415104041262`). + * name: 'projects/my-project', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + delete( + params: Params$Resource$Projects$Delete, + options: StreamMethodOptions + ): GaxiosPromise; + delete( + params?: Params$Resource$Projects$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Delete, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Projects$Delete + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Projects$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://cloudresourcemanager.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v3/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Retrieves the Project identified by the specified `name` (for example, `projects/415104041262`). The caller must have read permissions for this Project. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const cloudresourcemanager = google.cloudresourcemanager('v3'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/cloud-platform.read-only', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await cloudresourcemanager.projects.get({ + * // Required. The name of the project (for example, `projects/415104041262`). + * name: 'projects/my-project', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "createTime": "my_createTime", + * // "deleteTime": "my_deleteTime", + * // "displayName": "my_displayName", + * // "etag": "my_etag", + * // "labels": {}, + * // "name": "my_name", + * // "parent": "my_parent", + * // "projectId": "my_projectId", + * // "state": "my_state", + * // "updateTime": "my_updateTime" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Projects$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Projects$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Projects$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://cloudresourcemanager.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v3/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Returns the IAM access control policy for the specified Project. Permission is denied if the policy or the resource does not exist. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const cloudresourcemanager = google.cloudresourcemanager('v3'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/cloud-platform.read-only', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await cloudresourcemanager.projects.getIamPolicy({ + * // REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. + * resource: 'projects/my-project', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "options": {} + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "auditConfigs": [], + * // "bindings": [], + * // "etag": "my_etag", + * // "version": 0 + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + getIamPolicy( + params: Params$Resource$Projects$Getiampolicy, + options: StreamMethodOptions + ): GaxiosPromise; + getIamPolicy( + params?: Params$Resource$Projects$Getiampolicy, + options?: MethodOptions + ): GaxiosPromise; + getIamPolicy( + params: Params$Resource$Projects$Getiampolicy, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getIamPolicy( + params: Params$Resource$Projects$Getiampolicy, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getIamPolicy( + params: Params$Resource$Projects$Getiampolicy, + callback: BodyResponseCallback + ): void; + getIamPolicy(callback: BodyResponseCallback): void; + getIamPolicy( + paramsOrCallback?: + | Params$Resource$Projects$Getiampolicy + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Getiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Getiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://cloudresourcemanager.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v3/{+resource}:getIamPolicy').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Lists Projects that are direct children of the specified folder or organization resource. List provides a strongly consistent view of the Projects underneath the specified parent resource. List returns Projects sorted based upon the (ascending) lexical ordering of their `display_name`. The caller must have `resourcemanager.projects.list` permission on the identified parent. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const cloudresourcemanager = google.cloudresourcemanager('v3'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/cloud-platform.read-only', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await cloudresourcemanager.projects.list({ + * // Optional. The maximum number of Projects to return in the response. The server can return fewer Projects than requested. If unspecified, server picks an appropriate default. + * pageSize: 'placeholder-value', + * // Optional. A pagination token returned from a previous call to ListProjects that indicates from where listing should continue. + * pageToken: 'placeholder-value', + * // Required. The name of the parent resource to list projects under. For example, setting this field to 'folders/1234' would list all projects directly under that folder. + * parent: 'placeholder-value', + * // Optional. Indicate that Projects in the `DELETE_REQUESTED` state should also be returned. Normally only `ACTIVE` projects are returned. + * showDeleted: 'placeholder-value', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "nextPageToken": "my_nextPageToken", + * // "projects": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Projects$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Projects$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$List, + callback: BodyResponseCallback + ): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Projects$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://cloudresourcemanager.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v3/projects').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: [], + pathParams: [], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Move a Project under a new resource parent. Returns an operation which can be used to track the process of the Project move workflow. Upon success, the Operation.response field will be populated with the moved Project. The caller must have `resourcemanager.projects.update` permission on the Project and have `resourcemanager.projects.move` permission on the Project's current and proposed new parent. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const cloudresourcemanager = google.cloudresourcemanager('v3'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await cloudresourcemanager.projects.move({ + * // Required. The name of the project to move. + * name: 'projects/my-project', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "destinationParent": "my_destinationParent" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + move( + params: Params$Resource$Projects$Move, + options: StreamMethodOptions + ): GaxiosPromise; + move( + params?: Params$Resource$Projects$Move, + options?: MethodOptions + ): GaxiosPromise; + move( + params: Params$Resource$Projects$Move, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + move( + params: Params$Resource$Projects$Move, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + move( + params: Params$Resource$Projects$Move, + callback: BodyResponseCallback + ): void; + move(callback: BodyResponseCallback): void; + move( + paramsOrCallback?: + | Params$Resource$Projects$Move + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Projects$Move; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Move; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://cloudresourcemanager.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v3/{+name}:move').replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Updates the attributes of the Project identified by the specified `name` (for example, `projects/415104041262`). At present this is only useful for updating the display_name and labels. Deleting all labels requires an update mask for labels field. The caller must have modify permissions for this Project. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const cloudresourcemanager = google.cloudresourcemanager('v3'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await cloudresourcemanager.projects.patch({ + * // Output only. The unique resource name of the Project. It is an int64 generated number prefixed by "projects/". Example: `projects/415104041262` + * name: 'projects/my-project', + * // Optional. An update mask to selectively update fields. + * updateMask: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "createTime": "my_createTime", + * // "deleteTime": "my_deleteTime", + * // "displayName": "my_displayName", + * // "etag": "my_etag", + * // "labels": {}, + * // "name": "my_name", + * // "parent": "my_parent", + * // "projectId": "my_projectId", + * // "state": "my_state", + * // "updateTime": "my_updateTime" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + patch( + params: Params$Resource$Projects$Patch, + options: StreamMethodOptions + ): GaxiosPromise; + patch( + params?: Params$Resource$Projects$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Patch, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Patch, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Patch, + callback: BodyResponseCallback + ): void; + patch(callback: BodyResponseCallback): void; + patch( + paramsOrCallback?: + | Params$Resource$Projects$Patch + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Projects$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://cloudresourcemanager.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v3/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Search for Projects that the caller has the `resourcemanager.projects.get` permission on and satisfy the specified query. This method returns Projects in an unspecified order. This method is eventually consistent with project mutations; this means that a newly created project may not appear in the results or recent updates to an existing project may not be reflected in the results. To retrieve the latest state of a project, use the GetProject method. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const cloudresourcemanager = google.cloudresourcemanager('v3'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await cloudresourcemanager.projects.search({ + * // Optional. The maximum number of Projects to return in the response. The server can return fewer Projects than requested. If unspecified, server picks an appropriate default. + * pageSize: 'placeholder-value', + * // Optional. A pagination token returned from a previous call to ListProjects that indicates from where listing should continue. + * pageToken: 'placeholder-value', + * // Optional. A query string for searching for projects that the caller has `resourcemanager.projects.get` permission to. If multiple fields are included in the query, the it will return results that match any of the fields. Some eligible fields are: | Field | Description | |-------------------------|----------------------------------------------| | displayName, name | Filters by displayName. | | parent.type | Parent's type: `folder` or `organization`. | | parent.id | Parent's id number (e.g. 123) | | parent | Project's parent. (e.g. folders/123, organizations/x) Prefer parent field over parent.id and parent.type. | | id, projectId | Filters by projectId. | | state, lifecycleState | Filters by state. | | labels | Filters by label name or value. | | labels. (where *key* is the name of a label) | Filters by label name. | Search expressions are case insensitive. Some examples queries: | Query | Description | |------------------|-----------------------------------------------------| | name:how* | The project's name starts with "how". | | name:Howl | The project's name is `Howl` or `howl`. | | name:HOWL | Equivalent to above. | | NAME:howl | Equivalent to above. | | labels.color:* | The project has the label `color`. | | labels.color:red | The project's label `color` has the value `red`. | | labels.color:red labels.size:big | The project's label `color` has the value `red` and its label `size` has the value `big`. | If no query is specified, the call will return projects for which the user has the `resourcemanager.projects.get` permission. + * query: 'placeholder-value', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "nextPageToken": "my_nextPageToken", + * // "projects": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + search( + params: Params$Resource$Projects$Search, + options: StreamMethodOptions + ): GaxiosPromise; + search( + params?: Params$Resource$Projects$Search, + options?: MethodOptions + ): GaxiosPromise; + search( + params: Params$Resource$Projects$Search, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + search( + params: Params$Resource$Projects$Search, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + search( + params: Params$Resource$Projects$Search, + callback: BodyResponseCallback + ): void; + search(callback: BodyResponseCallback): void; + search( + paramsOrCallback?: + | Params$Resource$Projects$Search + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Projects$Search; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Search; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://cloudresourcemanager.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v3/projects:search').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: [], + pathParams: [], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Sets the IAM access control policy for the specified Project. CAUTION: This method will replace the existing policy, and cannot be used to append additional IAM settings. NOTE: Removing service accounts from policies or changing their roles can render services completely inoperable. It is important to understand how the service account is being used before removing or updating its roles. The following constraints apply when using `setIamPolicy()`: + Project does not support `allUsers` and `allAuthenticatedUsers` as `members` in a `Binding` of a `Policy`. + The owner role can be granted to a `user`, `serviceAccount`, or a group that is part of an organization. For example, group@myownpersonaldomain.com could be added as an owner to a project in the myownpersonaldomain.com organization, but not the examplepetstore.com organization. + Service accounts can be made owners of a project directly without any restrictions. However, to be added as an owner, a user must be invited via Cloud Platform console and must accept the invitation. + A user cannot be granted the owner role using `setIamPolicy()`. The user must be granted the owner role using the Cloud Platform Console and must explicitly accept the invitation. + Invitations to grant the owner role cannot be sent using `setIamPolicy()`; they must be sent only using the Cloud Platform Console. + Membership changes that leave the project without any owners that have accepted the Terms of Service (ToS) will be rejected. + If the project is not part of an organization, there must be at least one owner who has accepted the Terms of Service (ToS) agreement in the policy. Calling `setIamPolicy()` to remove the last ToS-accepted owner from the policy will fail. This restriction also applies to legacy projects that no longer have owners who have accepted the ToS. Edits to IAM policies will be rejected until the lack of a ToS-accepting owner is rectified. + Calling this method requires enabling the App Engine Admin API. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const cloudresourcemanager = google.cloudresourcemanager('v3'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await cloudresourcemanager.projects.setIamPolicy({ + * // REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. + * resource: 'projects/my-project', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "policy": {}, + * // "updateMask": "my_updateMask" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "auditConfigs": [], + * // "bindings": [], + * // "etag": "my_etag", + * // "version": 0 + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + setIamPolicy( + params: Params$Resource$Projects$Setiampolicy, + options: StreamMethodOptions + ): GaxiosPromise; + setIamPolicy( + params?: Params$Resource$Projects$Setiampolicy, + options?: MethodOptions + ): GaxiosPromise; + setIamPolicy( + params: Params$Resource$Projects$Setiampolicy, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + setIamPolicy( + params: Params$Resource$Projects$Setiampolicy, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + setIamPolicy( + params: Params$Resource$Projects$Setiampolicy, + callback: BodyResponseCallback + ): void; + setIamPolicy(callback: BodyResponseCallback): void; + setIamPolicy( + paramsOrCallback?: + | Params$Resource$Projects$Setiampolicy + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Setiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Setiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://cloudresourcemanager.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v3/{+resource}:setIamPolicy').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Returns permissions that a caller has on the specified Project. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const cloudresourcemanager = google.cloudresourcemanager('v3'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/cloud-platform.read-only', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await cloudresourcemanager.projects.testIamPermissions({ + * // REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. + * resource: 'projects/my-project', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "permissions": [] + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "permissions": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + testIamPermissions( + params: Params$Resource$Projects$Testiampermissions, + options: StreamMethodOptions + ): GaxiosPromise; + testIamPermissions( + params?: Params$Resource$Projects$Testiampermissions, + options?: MethodOptions + ): GaxiosPromise; + testIamPermissions( + params: Params$Resource$Projects$Testiampermissions, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + testIamPermissions( + params: Params$Resource$Projects$Testiampermissions, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + testIamPermissions( + params: Params$Resource$Projects$Testiampermissions, + callback: BodyResponseCallback + ): void; + testIamPermissions( + callback: BodyResponseCallback + ): void; + testIamPermissions( + paramsOrCallback?: + | Params$Resource$Projects$Testiampermissions + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Testiampermissions; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Testiampermissions; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://cloudresourcemanager.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v3/{+resource}:testIamPermissions').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Restores the Project identified by the specified `name` (for example, `projects/415104041262`). You can only use this method for a Project that has a lifecycle state of DELETE_REQUESTED. After deletion starts, the Project cannot be restored. The caller must have undelete permissions for this Project. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const cloudresourcemanager = google.cloudresourcemanager('v3'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await cloudresourcemanager.projects.undelete({ + * // Required. The name of the Project (for example, `projects/415104041262`). Required. + * name: 'projects/my-project', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // {} + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + undelete( + params: Params$Resource$Projects$Undelete, + options: StreamMethodOptions + ): GaxiosPromise; + undelete( + params?: Params$Resource$Projects$Undelete, + options?: MethodOptions + ): GaxiosPromise; + undelete( + params: Params$Resource$Projects$Undelete, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + undelete( + params: Params$Resource$Projects$Undelete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + undelete( + params: Params$Resource$Projects$Undelete, + callback: BodyResponseCallback + ): void; + undelete(callback: BodyResponseCallback): void; + undelete( + paramsOrCallback?: + | Params$Resource$Projects$Undelete + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Undelete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Undelete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://cloudresourcemanager.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v3/{+name}:undelete').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Create extends StandardParameters { + /** + * Request body metadata + */ + requestBody?: Schema$Project; + } + export interface Params$Resource$Projects$Delete extends StandardParameters { + /** + * Required. The name of the Project (for example, `projects/415104041262`). + */ + name?: string; + } + export interface Params$Resource$Projects$Get extends StandardParameters { + /** + * Required. The name of the project (for example, `projects/415104041262`). + */ + name?: string; + } + export interface Params$Resource$Projects$Getiampolicy + extends StandardParameters { + /** + * REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GetIamPolicyRequest; + } + export interface Params$Resource$Projects$List extends StandardParameters { + /** + * Optional. The maximum number of Projects to return in the response. The server can return fewer Projects than requested. If unspecified, server picks an appropriate default. + */ + pageSize?: number; + /** + * Optional. A pagination token returned from a previous call to ListProjects that indicates from where listing should continue. + */ + pageToken?: string; + /** + * Required. The name of the parent resource to list projects under. For example, setting this field to 'folders/1234' would list all projects directly under that folder. + */ + parent?: string; + /** + * Optional. Indicate that Projects in the `DELETE_REQUESTED` state should also be returned. Normally only `ACTIVE` projects are returned. + */ + showDeleted?: boolean; + } + export interface Params$Resource$Projects$Move extends StandardParameters { + /** + * Required. The name of the project to move. + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$MoveProjectRequest; + } + export interface Params$Resource$Projects$Patch extends StandardParameters { + /** + * Output only. The unique resource name of the Project. It is an int64 generated number prefixed by "projects/". Example: `projects/415104041262` + */ + name?: string; + /** + * Optional. An update mask to selectively update fields. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Project; + } + export interface Params$Resource$Projects$Search extends StandardParameters { + /** + * Optional. The maximum number of Projects to return in the response. The server can return fewer Projects than requested. If unspecified, server picks an appropriate default. + */ + pageSize?: number; + /** + * Optional. A pagination token returned from a previous call to ListProjects that indicates from where listing should continue. + */ + pageToken?: string; + /** + * Optional. A query string for searching for projects that the caller has `resourcemanager.projects.get` permission to. If multiple fields are included in the query, the it will return results that match any of the fields. Some eligible fields are: | Field | Description | |-------------------------|----------------------------------------------| | displayName, name | Filters by displayName. | | parent.type | Parent's type: `folder` or `organization`. | | parent.id | Parent's id number (e.g. 123) | | parent | Project's parent. (e.g. folders/123, organizations/x) Prefer parent field over parent.id and parent.type. | | id, projectId | Filters by projectId. | | state, lifecycleState | Filters by state. | | labels | Filters by label name or value. | | labels. (where *key* is the name of a label) | Filters by label name. | Search expressions are case insensitive. Some examples queries: | Query | Description | |------------------|-----------------------------------------------------| | name:how* | The project's name starts with "how". | | name:Howl | The project's name is `Howl` or `howl`. | | name:HOWL | Equivalent to above. | | NAME:howl | Equivalent to above. | | labels.color:* | The project has the label `color`. | | labels.color:red | The project's label `color` has the value `red`. | | labels.color:red labels.size:big | The project's label `color` has the value `red` and its label `size` has the value `big`. | If no query is specified, the call will return projects for which the user has the `resourcemanager.projects.get` permission. + */ + query?: string; + } + export interface Params$Resource$Projects$Setiampolicy + extends StandardParameters { + /** + * REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$SetIamPolicyRequest; + } + export interface Params$Resource$Projects$Testiampermissions + extends StandardParameters { + /** + * REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$TestIamPermissionsRequest; + } + export interface Params$Resource$Projects$Undelete + extends StandardParameters { + /** + * Required. The name of the Project (for example, `projects/415104041262`). Required. + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$UndeleteProjectRequest; } export class Resource$Tagbindings { @@ -1636,7 +6074,7 @@ export namespace cloudresourcemanager_v3 { * * // Do the magic * const res = await cloudresourcemanager.tagBindings.list({ - * // Optional. The maximum number of TagBindings to return in the response. This is currently not used by the server and will return the full page even if a size is specified. + * // Optional. The maximum number of TagBindings to return in the response. The server allows a maximum of 300 TagBindings to return. If unspecified, the server will use 100 as the default. * pageSize: 'placeholder-value', * // Optional. A pagination token returned from a previous call to `ListTagBindings` that indicates where this listing should continue from. * pageToken: 'placeholder-value', @@ -1767,7 +6205,7 @@ export namespace cloudresourcemanager_v3 { } export interface Params$Resource$Tagbindings$List extends StandardParameters { /** - * Optional. The maximum number of TagBindings to return in the response. This is currently not used by the server and will return the full page even if a size is specified. + * Optional. The maximum number of TagBindings to return in the response. The server allows a maximum of 300 TagBindings to return. If unspecified, the server will use 100 as the default. */ pageSize?: number; /** @@ -2375,9 +6813,9 @@ export namespace cloudresourcemanager_v3 { * * // Do the magic * const res = await cloudresourcemanager.tagKeys.list({ - * // Optional. The maximum number of TagKeys to return in the response. This is currently not used by the server and will return the full page even if a size is specified currently. + * // Optional. The maximum number of TagKeys to return in the response. The server allows a maximum of 300 TagKeys to return. If unspecified, the server will use 100 as the default. * pageSize: 'placeholder-value', - * // Optional. A pagination token returned from a previous call to `ListTagKey` that indicates where this listing should continue from. This is currently not used by the server. + * // Optional. A pagination token returned from a previous call to `ListTagKey` that indicates where this listing should continue from. * pageToken: 'placeholder-value', * // Required. The resource name of the new TagKey's parent. Must be of the form `folders/{folder_id\}` or `organizations/{org_id\}`. * parent: 'placeholder-value', @@ -2964,11 +7402,11 @@ export namespace cloudresourcemanager_v3 { } export interface Params$Resource$Tagkeys$List extends StandardParameters { /** - * Optional. The maximum number of TagKeys to return in the response. This is currently not used by the server and will return the full page even if a size is specified currently. + * Optional. The maximum number of TagKeys to return in the response. The server allows a maximum of 300 TagKeys to return. If unspecified, the server will use 100 as the default. */ pageSize?: number; /** - * Optional. A pagination token returned from a previous call to `ListTagKey` that indicates where this listing should continue from. This is currently not used by the server. + * Optional. A pagination token returned from a previous call to `ListTagKey` that indicates where this listing should continue from. */ pageToken?: string; /** @@ -3615,9 +8053,9 @@ export namespace cloudresourcemanager_v3 { * * // Do the magic * const res = await cloudresourcemanager.tagValues.list({ - * // Optional. The maximum number of TagValues to return in the response. This is currently not used by the server and will return the full page even if a size is specified currently. + * // Optional. The maximum number of TagValues to return in the response. The server allows a maximum of 300 TagValues to return. If unspecified, the server will use 100 as the default. * pageSize: 'placeholder-value', - * // Optional. A pagination token returned from a previous call to `ListTagValues` that indicates where this listing should continue from. This is currently not used by the server. + * // Optional. A pagination token returned from a previous call to `ListTagValues` that indicates where this listing should continue from. * pageToken: 'placeholder-value', * // Required. Resource name for TagKey, parent of the TagValues to be listed, in the format `tagKeys/123`. * parent: 'placeholder-value', @@ -4206,11 +8644,11 @@ export namespace cloudresourcemanager_v3 { } export interface Params$Resource$Tagvalues$List extends StandardParameters { /** - * Optional. The maximum number of TagValues to return in the response. This is currently not used by the server and will return the full page even if a size is specified currently. + * Optional. The maximum number of TagValues to return in the response. The server allows a maximum of 300 TagValues to return. If unspecified, the server will use 100 as the default. */ pageSize?: number; /** - * Optional. A pagination token returned from a previous call to `ListTagValues` that indicates where this listing should continue from. This is currently not used by the server. + * Optional. A pagination token returned from a previous call to `ListTagValues` that indicates where this listing should continue from. */ pageToken?: string; /** diff --git a/src/apis/compute/alpha.ts b/src/apis/compute/alpha.ts index 030a609e13a..97dca629b61 100644 --- a/src/apis/compute/alpha.ts +++ b/src/apis/compute/alpha.ts @@ -154,6 +154,7 @@ export namespace compute_alpha { regionInstances: Resource$Regioninstances; regionInstantSnapshots: Resource$Regioninstantsnapshots; regionNetworkEndpointGroups: Resource$Regionnetworkendpointgroups; + regionNetworkFirewallPolicies: Resource$Regionnetworkfirewallpolicies; regionNotificationEndpoints: Resource$Regionnotificationendpoints; regionOperations: Resource$Regionoperations; regions: Resource$Regions; @@ -288,6 +289,9 @@ export namespace compute_alpha { this.regionNetworkEndpointGroups = new Resource$Regionnetworkendpointgroups( this.context ); + this.regionNetworkFirewallPolicies = new Resource$Regionnetworkfirewallpolicies( + this.context + ); this.regionNotificationEndpoints = new Resource$Regionnotificationendpoints( this.context ); @@ -730,6 +734,10 @@ export namespace compute_alpha { * The number of threads per physical core. To disable simultaneous multithreading (SMT) set this to 1. If unset, the maximum number of threads supported per core by the underlying processor is assumed. */ threadsPerCore?: number | null; + /** + * The number of physical cores to expose to an instance. Multiply by the number of threads per core to compute the total number of virtual CPUs to expose to the instance. If unset, the number of cores is inferred from the instance's nominal CPU count and the underlying platform's SMT width. + */ + visibleCoreCount?: number | null; } /** * An alias IP range attached to an instance's network interface. @@ -1707,7 +1715,7 @@ export namespace compute_alpha { */ export interface Schema$BackendBucketCdnPolicyNegativeCachingPolicy { /** - * The HTTP status code to define a TTL against. Only HTTP status codes 300, 301, 308, 404, 405, 410, 421, 451 and 501 are can be specified as values, and you cannot specify a status code more than once. + * The HTTP status code to define a TTL against. Only HTTP status codes 300, 301, 302, 307, 308, 404, 405, 410, 421, 451 and 501 are can be specified as values, and you cannot specify a status code more than once. */ code?: number | null; /** @@ -2072,7 +2080,7 @@ export namespace compute_alpha { */ export interface Schema$BackendServiceCdnPolicyNegativeCachingPolicy { /** - * The HTTP status code to define a TTL against. Only HTTP status codes 300, 301, 308, 404, 405, 410, 421, 451 and 501 are can be specified as values, and you cannot specify a status code more than once. + * The HTTP status code to define a TTL against. Only HTTP status codes 300, 301, 302, 307, 308, 404, 405, 410, 421, 451 and 501 are can be specified as values, and you cannot specify a status code more than once. */ code?: number | null; /** @@ -3883,7 +3891,7 @@ export namespace compute_alpha { */ description?: string | null; /** - * User-provided name of the Organization firewall plicy. The name should be unique in the organization in which the firewall policy is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. + * Depreacted, please use short name instead. User-provided name of the Organization firewall plicy. The name should be unique in the organization in which the firewall policy is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. */ displayName?: string | null; /** @@ -3908,6 +3916,10 @@ export namespace compute_alpha { * [Output Only] The parent of the firewall policy. */ parent?: string | null; + /** + * [Output Only] URL of the region where the regional firewall policy resides. This field is not applicable to global firewall policies. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body. + */ + region?: string | null; /** * A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a firewall policy, a default rule with action "allow" will be added. */ @@ -3924,6 +3936,10 @@ export namespace compute_alpha { * [Output Only] Server-defined URL for this resource with the resource id. */ selfLinkWithId?: string | null; + /** + * User-provided name of the Organization firewall plicy. The name should be unique in the organization in which the firewall policy is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. + */ + shortName?: string | null; } export interface Schema$FirewallPolicyAssociation { /** @@ -3931,7 +3947,7 @@ export namespace compute_alpha { */ attachmentTarget?: string | null; /** - * [Output Only] The display name of the firewall policy of the association. + * [Output Only] Deprecated, please use short name instead. The display name of the firewall policy of the association. */ displayName?: string | null; /** @@ -3942,6 +3958,10 @@ export namespace compute_alpha { * The name for an association. */ name?: string | null; + /** + * [Output Only] The short name of the firewall policy of the association. + */ + shortName?: string | null; } export interface Schema$FirewallPolicyList { /** @@ -4920,6 +4940,14 @@ export namespace compute_alpha { * Metadata defined as annotations for network endpoint. */ annotations?: {[key: string]: string} | null; + /** + * URL of the forwarding rule associated with the health status of the instance. + */ + forwardingRule?: string | null; + /** + * A forwarding rule IP address assigned to this instance. + */ + forwardingRuleIp?: string | null; /** * Health state of the instance. */ @@ -5014,6 +5042,10 @@ export namespace compute_alpha { * The string to match anywhere in the first 1024 bytes of the response body. If left empty (the default value), the status code determines health. The response data can only be ASCII. */ response?: string | null; + /** + * Weight report mode. used for weighted Load Balancing. + */ + weightReportMode?: string | null; } /** * Specification for how requests are aborted as part of fault injection. @@ -5203,6 +5235,10 @@ export namespace compute_alpha { * The string to match anywhere in the first 1024 bytes of the response body. If left empty (the default value), the status code determines health. The response data can only be ASCII. */ response?: string | null; + /** + * Weight report mode. used for weighted Load Balancing. + */ + weightReportMode?: string | null; } /** * Represents a legacy HTTP Health Check resource. @@ -5579,6 +5615,10 @@ export namespace compute_alpha { * The string to match anywhere in the first 1024 bytes of the response body. If left empty (the default value), the status code determines health. The response data can only be ASCII. */ response?: string | null; + /** + * Weight report mode. used for weighted Load Balancing. + */ + weightReportMode?: string | null; } /** * Represents a legacy HTTPS Health Check resource. @@ -6469,6 +6509,10 @@ export namespace compute_alpha { * [Output Only] The URL of the Instance Group resource. */ instanceGroup?: string | null; + /** + * Instance lifecycle policy for this Instance Group Manager. + */ + instanceLifecyclePolicy?: Schema$InstanceGroupManagerInstanceLifecyclePolicy; /** * The URL of the instance template that is specified for this managed instance group. The group uses this template to create all new instances in the managed instance group. The templates for existing instances in the group do not change unless you run recreateInstances, run applyUpdatesToInstances, or set the group's updatePolicy.type to PROACTIVE. */ @@ -6517,6 +6561,18 @@ export namespace compute_alpha { * The target number of running instances for this managed instance group. You can reduce this number by using the instanceGroupManager deleteInstances or abandonInstances methods. Resizing the group also changes this number. */ targetSize?: number | null; + /** + * The target number of stopped instances for this managed instance group. This number changes when you: + * - Stop instance using the stopInstances method or start instances using the startInstances method. + * - Manually change the targetStoppedSize using the update method. + */ + targetStoppedSize?: number | null; + /** + * The target number of suspended instances for this managed instance group. This number changes when you: + * - Suspend instance using the suspendInstances method or resume instances using the resumeInstances method. + * - Manually change the targetSuspendedSize using the update method. + */ + targetSuspendedSize?: number | null; /** * The update policy for this managed instance group. */ @@ -6567,6 +6623,22 @@ export namespace compute_alpha { * [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted. */ restarting?: number | null; + /** + * [Output Only] The number of instances in the managed instance group that are scheduled to be resumed or are currently being resumed. + */ + resuming?: number | null; + /** + * [Output Only] The number of instances in the managed instance group that are scheduled to be started or are currently being started. + */ + starting?: number | null; + /** + * [Output Only] The number of instances in the managed instance group that are scheduled to be stopped or are currently being stopped. + */ + stopping?: number | null; + /** + * [Output Only] The number of instances in the managed instance group that are scheduled to be suspended or are currently being suspended. + */ + suspending?: number | null; /** * [Output Only] The number of instances in the managed instance group that are being verified. See the managedInstances[].currentAction property in the listManagedInstances method documentation. */ @@ -6622,6 +6694,22 @@ export namespace compute_alpha { */ maxUnavailable?: Schema$FixedOrPercent; } + export interface Schema$InstanceGroupManagerInstanceLifecyclePolicy { + /** + * The configuration for metadata based readiness signal sent by the instance during initialization when stopping / suspending an instance. The Instance Group Manager will wait for a signal that indicates successful initialization before stopping / suspending an instance. + * + * If a successful readiness signal is not sent before timeout, the corresponding instance will not be stopped / suspended. Instead, an error will be visible in the lastAttempt.errors field of the managed instance in the listmanagedinstances method. + * + * If metadataBasedReadinessSignal.timeoutSec is unset, the Instance Group Manager will directly proceed to suspend / stop instances, skipping initialization on them. + */ + metadataBasedReadinessSignal?: Schema$InstanceGroupManagerInstanceLifecyclePolicyMetadataBasedReadinessSignal; + } + export interface Schema$InstanceGroupManagerInstanceLifecyclePolicyMetadataBasedReadinessSignal { + /** + * The number of seconds to wait for a readiness signal during initialization before timing out. + */ + timeoutSec?: number | null; + } /** * [Output Only] A list of managed instance groups. */ @@ -6787,6 +6875,12 @@ export namespace compute_alpha { */ targetSize?: number | null; } + export interface Schema$InstanceGroupManagersResumeInstancesRequest { + /** + * The URLs of one or more instances to resume. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME]. + */ + instances?: string[] | null; + } export interface Schema$InstanceGroupManagersScopedList { /** * [Output Only] The list of managed instance groups that are contained in the specified project and zone. @@ -6820,6 +6914,32 @@ export namespace compute_alpha { */ targetPools?: string[] | null; } + export interface Schema$InstanceGroupManagersStartInstancesRequest { + /** + * The URLs of one or more instances to start. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME]. + */ + instances?: string[] | null; + } + export interface Schema$InstanceGroupManagersStopInstancesRequest { + /** + * If this flag is set to true, the Instance Group Manager will proceed to stop the instances, skipping initialization on them. + */ + forceStop?: boolean | null; + /** + * The URLs of one or more instances to stop. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME]. + */ + instances?: string[] | null; + } + export interface Schema$InstanceGroupManagersSuspendInstancesRequest { + /** + * If this flag is set to true, the Instance Group Manager will proceed to suspend the instances, skipping initialization on them. + */ + forceSuspend?: boolean | null; + /** + * The URLs of one or more instances to suspend. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME]. + */ + instances?: string[] | null; + } export interface Schema$InstanceGroupManagerStatus { /** * [Output Only] The URL of the Autoscaler that targets this instance group manager. @@ -7241,7 +7361,7 @@ export namespace compute_alpha { } export interface Schema$InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy { /** - * [Output Only] The display name of the firewall policy. + * [Output Only] Deprecated, please use short name instead. The display name of the firewall policy. */ displayName?: string | null; /** @@ -7252,6 +7372,10 @@ export namespace compute_alpha { * The rules that apply to the network. */ rules?: Schema$FirewallPolicyRule[]; + /** + * [Output Only] The short name of the firewall policy. + */ + shortName?: string | null; /** * [Output Only] The type of the firewall policy. */ @@ -9311,6 +9435,10 @@ export namespace compute_alpha { * Type of network endpoints in this network endpoint group. Can be one of GCE_VM_IP_PORT, NON_GCP_PRIVATE_IP_PORT, INTERNET_FQDN_PORT, INTERNET_IP_PORT, or SERVERLESS. */ networkEndpointType?: string | null; + /** + * The target service url used to set up private service connection to a Google API. An example value is: "asia-northeast3-cloudkms.googleapis.com" + */ + pscTargetService?: string | null; /** * [Output Only] The URL of the region where the network endpoint group is located. */ @@ -9867,7 +9995,7 @@ export namespace compute_alpha { } export interface Schema$NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy { /** - * [Output Only] The display name of the firewall policy. + * [Output Only] Deprecated, please use short name instead. The display name of the firewall policy. */ displayName?: string | null; /** @@ -9878,6 +10006,10 @@ export namespace compute_alpha { * The rules that apply to the network. */ rules?: Schema$FirewallPolicyRule[]; + /** + * [Output Only] The short name of the firewall policy. + */ + shortName?: string | null; /** * [Output Only] The type of the firewall policy. */ @@ -12261,6 +12393,12 @@ export namespace compute_alpha { */ targetSize?: number | null; } + export interface Schema$RegionInstanceGroupManagersResumeInstancesRequest { + /** + * The URLs of one or more instances to resume. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME]. + */ + instances?: string[] | null; + } export interface Schema$RegionInstanceGroupManagersSetAutoHealingRequest { autoHealingPolicies?: Schema$InstanceGroupManagerAutoHealingPolicy[]; } @@ -12280,6 +12418,32 @@ export namespace compute_alpha { */ instanceTemplate?: string | null; } + export interface Schema$RegionInstanceGroupManagersStartInstancesRequest { + /** + * The URLs of one or more instances to start. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME]. + */ + instances?: string[] | null; + } + export interface Schema$RegionInstanceGroupManagersStopInstancesRequest { + /** + * If this flag is set to true, the Instance Group Manager will proceed to stop the instances, skipping initialization on them. + */ + forceStop?: boolean | null; + /** + * The URLs of one or more instances to stop. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME]. + */ + instances?: string[] | null; + } + export interface Schema$RegionInstanceGroupManagersSuspendInstancesRequest { + /** + * If this flag is set to true, the Instance Group Manager will proceed to suspend the instances, skipping initialization on them. + */ + forceSuspend?: boolean | null; + /** + * The URLs of one or more instances to suspend. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME]. + */ + instances?: string[] | null; + } /** * RegionInstanceGroupManagers.updatePerInstanceConfigs */ @@ -13007,6 +13171,10 @@ export namespace compute_alpha { * A route defines a path from VM instances in the VPC network to a specific destination. This destination can be inside or outside the VPC network. For more information, read the Routes overview. (== resource_for {$api_version\}.routes ==) */ export interface Schema$Route { + /** + * Whether this route can conflict with existing subnetworks. Setting this to true allows this route to conflict with subnetworks that have already been configured on the corresponding network. + */ + allowConflictingSubnetworks?: boolean | null; /** * [Output Only] Creation timestamp in RFC3339 text format. */ @@ -13264,7 +13432,7 @@ export namespace compute_alpha { * Not currently available publicly. * Hold time is three times the interval at which keepalive messages are sent, and the hold time is the maximum number of seconds allowed to elapse between successive keepalive messages that BGP receives from a peer. * BGP will use the smaller of either the local hold time value or the peer's hold time value as the hold time for the BGP connection between the two peers. - * If set, this value must be between 1 and 120. The default is 20. + * If set, this value must be between 20 and 60. The default is 20. */ keepaliveInterval?: number | null; } @@ -13272,8 +13440,7 @@ export namespace compute_alpha { /** * User-specified list of prefix groups to advertise in custom mode, which can take one of the following options: * - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets. - * - ALL_VPC_SUBNETS: Advertises the router's own VPC subnets. - * - ALL_PEER_VPC_SUBNETS: Advertises peer subnets of the router's VPC network. Note that this field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the "bgp" message). These groups are advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups. + * - ALL_VPC_SUBNETS: Advertises the router's own VPC subnets. Note that this field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the "bgp" message). These groups are advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups. */ advertisedGroups?: string[] | null; /** @@ -13636,6 +13803,10 @@ export namespace compute_alpha { * IP address of the remote BGP interface. */ peerIpAddress?: string | null; + /** + * [Output only] URI of the VM instance that is used as third-party router appliances such as Next Gen Firewalls, Virtual Routers, or Router Appliances. The VM instance is the peer side of the BGP session. + */ + routerApplianceInstance?: string | null; /** * BGP state as specified in RFC1771. */ @@ -13843,7 +14014,7 @@ export namespace compute_alpha { state?: string | null; } /** - * Sets the scheduling options for an Instance. NextID: 17 + * Sets the scheduling options for an Instance. NextID: 20 */ export interface Schema$Scheduling { /** @@ -14113,6 +14284,10 @@ export namespace compute_alpha { * This field may only be specified when the versioned_expr is set to FIREWALL. */ enableLogging?: boolean | null; + /** + * Optional, additional actions that are performed on headers. + */ + headerAction?: Schema$SecurityPolicyRuleHttpHeaderAction; /** * [Output only] Type of the resource. Always compute#securityPolicyRule for security policy rules */ @@ -14156,6 +14331,22 @@ export namespace compute_alpha { */ targetServiceAccounts?: string[] | null; } + export interface Schema$SecurityPolicyRuleHttpHeaderAction { + /** + * The list of request headers to add or overwrite if they?re already present. + */ + requestHeadersToAdds?: Schema$SecurityPolicyRuleHttpHeaderActionHttpHeaderOption[]; + } + export interface Schema$SecurityPolicyRuleHttpHeaderActionHttpHeaderOption { + /** + * The name of the header to set. + */ + headerName?: string | null; + /** + * The value to set the named header to. + */ + headerValue?: string | null; + } /** * Represents a match condition that incoming traffic is evaluated against. Exactly one field must be specified. */ @@ -14227,17 +14418,13 @@ export namespace compute_alpha { } export interface Schema$SecurityPolicyRuleRateLimitOptions { /** - * Can only be specified if the action for the rule is "rate_based_ban". If specified, the key will be banned for the configured 'ban_duration' when the number of requests that exceed the 'rate_limit_threshold' also exceed this 'ban_threshold'. + * Can only be specified if the action for the rule is "rate_based_ban". If specified, determines the time (in seconds) the traffic will continue to be banned by the rate limit after the rate falls below the threshold. */ banDurationSec?: number | null; /** - * Can only be specified if the action for the rule is "rate_based_ban". If specified, the key will be banned for the configured 'ban_duration' when the number of requests that exceed the 'rate_limit_threshold' also exceed this 'ban_threshold'. + * Can only be specified if the action for the rule is "rate_based_ban". If specified, the key will be banned for the configured 'ban_duration_sec' when the number of requests that exceed the 'rate_limit_threshold' also exceed this 'ban_threshold'. */ banThreshold?: Schema$SecurityPolicyRuleRateLimitOptionsThreshold; - /** - * Can only be specified if the action for the rule is "rate_based_ban" If specified, determines the time (in seconds) the traffic will continue to be blocked by the rate limit after the rate falls below the threshold. The default value is 0 seconds. [Deprecated] This field is deprecated. - */ - blockDuration?: number | null; /** * Action to take when requests are under the given threshold. When requests are throttled, this is also the action for all requests which are not dropped. Valid options are "allow", "fairshare", and "drop_overload". */ @@ -14254,10 +14441,6 @@ export namespace compute_alpha { * Threshold at which to begin ratelimiting. */ rateLimitThreshold?: Schema$SecurityPolicyRuleRateLimitOptionsThreshold; - /** - * Rate in requests per second at which to begin ratelimiting. [Deprecated] This field is deprecated. - */ - thresholdRps?: number | null; } export interface Schema$SecurityPolicyRuleRateLimitOptionsThreshold { /** @@ -14367,7 +14550,7 @@ export namespace compute_alpha { /** * Represents a ServiceAttachment resource. * - * A service attachment represents a service that a producer has exposed. It encapsulates the load balancer which fronts the service runs and a list of NAT IP ranges that the producers uses to represent the consumers connecting to the service. next tag = 16 + * A service attachment represents a service that a producer has exposed. It encapsulates the load balancer which fronts the service runs and a list of NAT IP ranges that the producers uses to represent the consumers connecting to the service. next tag = 17 */ export interface Schema$ServiceAttachment { /** @@ -30915,7 +31098,8 @@ export namespace compute_alpha { * // "attachmentTarget": "my_attachmentTarget", * // "displayName": "my_displayName", * // "firewallPolicyId": "my_firewallPolicyId", - * // "name": "my_name" + * // "name": "my_name", + * // "shortName": "my_shortName" * // } * }, * }); @@ -31601,10 +31785,12 @@ export namespace compute_alpha { * // "kind": "my_kind", * // "name": "my_name", * // "parent": "my_parent", + * // "region": "my_region", * // "ruleTupleCount": 0, * // "rules": [], * // "selfLink": "my_selfLink", - * // "selfLinkWithId": "my_selfLinkWithId" + * // "selfLinkWithId": "my_selfLinkWithId", + * // "shortName": "my_shortName" * // } * } * @@ -31742,7 +31928,8 @@ export namespace compute_alpha { * // "attachmentTarget": "my_attachmentTarget", * // "displayName": "my_displayName", * // "firewallPolicyId": "my_firewallPolicyId", - * // "name": "my_name" + * // "name": "my_name", + * // "shortName": "my_shortName" * // } * } * @@ -32186,10 +32373,12 @@ export namespace compute_alpha { * // "kind": "my_kind", * // "name": "my_name", * // "parent": "my_parent", + * // "region": "my_region", * // "ruleTupleCount": 0, * // "rules": [], * // "selfLink": "my_selfLink", - * // "selfLinkWithId": "my_selfLinkWithId" + * // "selfLinkWithId": "my_selfLinkWithId", + * // "shortName": "my_shortName" * // } * }, * }); @@ -32834,10 +33023,12 @@ export namespace compute_alpha { * // "kind": "my_kind", * // "name": "my_name", * // "parent": "my_parent", + * // "region": "my_region", * // "ruleTupleCount": 0, * // "rules": [], * // "selfLink": "my_selfLink", - * // "selfLinkWithId": "my_selfLinkWithId" + * // "selfLinkWithId": "my_selfLinkWithId", + * // "shortName": "my_shortName" * // } * }, * }); @@ -40694,6 +40885,7 @@ export namespace compute_alpha { * // "name": "my_name", * // "network": "my_network", * // "networkEndpointType": "my_networkEndpointType", + * // "pscTargetService": "my_pscTargetService", * // "region": "my_region", * // "selfLink": "my_selfLink", * // "selfLinkWithId": "my_selfLinkWithId", @@ -40858,6 +41050,7 @@ export namespace compute_alpha { * // "name": "my_name", * // "network": "my_network", * // "networkEndpointType": "my_networkEndpointType", + * // "pscTargetService": "my_pscTargetService", * // "region": "my_region", * // "selfLink": "my_selfLink", * // "selfLinkWithId": "my_selfLinkWithId", @@ -51685,6 +51878,7 @@ export namespace compute_alpha { * // "fingerprint": "my_fingerprint", * // "id": "my_id", * // "instanceGroup": "my_instanceGroup", + * // "instanceLifecyclePolicy": {}, * // "instanceTemplate": "my_instanceTemplate", * // "kind": "my_kind", * // "name": "my_name", @@ -51697,6 +51891,8 @@ export namespace compute_alpha { * // "status": {}, * // "targetPools": [], * // "targetSize": 0, + * // "targetStoppedSize": 0, + * // "targetSuspendedSize": 0, * // "updatePolicy": {}, * // "versions": [], * // "zone": "my_zone" @@ -51857,6 +52053,7 @@ export namespace compute_alpha { * // "fingerprint": "my_fingerprint", * // "id": "my_id", * // "instanceGroup": "my_instanceGroup", + * // "instanceLifecyclePolicy": {}, * // "instanceTemplate": "my_instanceTemplate", * // "kind": "my_kind", * // "name": "my_name", @@ -51869,6 +52066,8 @@ export namespace compute_alpha { * // "status": {}, * // "targetPools": [], * // "targetSize": 0, + * // "targetStoppedSize": 0, + * // "targetSuspendedSize": 0, * // "updatePolicy": {}, * // "versions": [], * // "zone": "my_zone" @@ -52728,6 +52927,7 @@ export namespace compute_alpha { * // "fingerprint": "my_fingerprint", * // "id": "my_id", * // "instanceGroup": "my_instanceGroup", + * // "instanceLifecyclePolicy": {}, * // "instanceTemplate": "my_instanceTemplate", * // "kind": "my_kind", * // "name": "my_name", @@ -52740,6 +52940,8 @@ export namespace compute_alpha { * // "status": {}, * // "targetPools": [], * // "targetSize": 0, + * // "targetStoppedSize": 0, + * // "targetSuspendedSize": 0, * // "updatePolicy": {}, * // "versions": [], * // "zone": "my_zone" @@ -53587,6 +53789,188 @@ export namespace compute_alpha { } } + /** + * Flags the specified instances in the managed instance group to be resumed. This method increases the targetSize and decreases the targetSuspendedSize of the managed instance group by the number of instances that you resume. The resumeInstances operation is marked DONE if the resumeInstances request is successful. The underlying actions take additional time. You must separately verify the status of the RESUMING action with the listmanagedinstances method. + * + * In this request, you can only specify instances that are suspended. For example, if an instance was previously suspended using the suspendInstances method, it can be resumed using the resumeInstances method. + * + * If a health check is attached to the managed instance group, the specified instances will be verified as healthy after they are resumed. + * + * You can specify a maximum of 1000 instances with this method per request. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('alpha'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.instanceGroupManagers.resumeInstances({ + * // The name of the managed instance group. + * instanceGroupManager: 'placeholder-value', + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // 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. + * // + * // 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: 'placeholder-value', + * // The name of the zone where the managed instance group is located. + * zone: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "instances": [] + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "clientOperationId": "my_clientOperationId", + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "endTime": "my_endTime", + * // "error": {}, + * // "httpErrorMessage": "my_httpErrorMessage", + * // "httpErrorStatusCode": 0, + * // "id": "my_id", + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "metadata": {}, + * // "name": "my_name", + * // "operationGroupId": "my_operationGroupId", + * // "operationType": "my_operationType", + * // "progress": 0, + * // "region": "my_region", + * // "selfLink": "my_selfLink", + * // "selfLinkWithId": "my_selfLinkWithId", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "statusMessage": "my_statusMessage", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "user": "my_user", + * // "warnings": [], + * // "zone": "my_zone" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + resumeInstances( + params: Params$Resource$Instancegroupmanagers$Resumeinstances, + options: StreamMethodOptions + ): GaxiosPromise; + resumeInstances( + params?: Params$Resource$Instancegroupmanagers$Resumeinstances, + options?: MethodOptions + ): GaxiosPromise; + resumeInstances( + params: Params$Resource$Instancegroupmanagers$Resumeinstances, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + resumeInstances( + params: Params$Resource$Instancegroupmanagers$Resumeinstances, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + resumeInstances( + params: Params$Resource$Instancegroupmanagers$Resumeinstances, + callback: BodyResponseCallback + ): void; + resumeInstances(callback: BodyResponseCallback): void; + resumeInstances( + paramsOrCallback?: + | Params$Resource$Instancegroupmanagers$Resumeinstances + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Instancegroupmanagers$Resumeinstances; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Instancegroupmanagers$Resumeinstances; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/alpha/projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resumeInstances' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'zone', 'instanceGroupManager'], + pathParams: ['instanceGroupManager', 'project', 'zone'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + /** * Motifies the autohealing policy for the instances in this managed instance group. [Deprecated] This method is deprecated. Use instanceGroupManagers.patch instead. * @example @@ -54118,6 +54502,558 @@ export namespace compute_alpha { } } + /** + * Flags the specified instances in the managed instance group to be started. This method increases the targetSize and decreases the targetStoppedSize of the managed instance group by the number of instances that you start. The startInstances operation is marked DONE if the startInstances request is successful. The underlying actions take additional time. You must separately verify the status of the STARTING action with the listmanagedinstances method. + * + * In this request, you can only specify instances that are stopped. For example, if an instance was previously stopped using the stopInstances method, it can be started using the startInstances method. + * + * If a health check is attached to the managed instance group, the specified instances will be verified as healthy after they are started. + * + * You can specify a maximum of 1000 instances with this method per request. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('alpha'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.instanceGroupManagers.startInstances({ + * // The name of the managed instance group. + * instanceGroupManager: 'placeholder-value', + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // 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. + * // + * // 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: 'placeholder-value', + * // The name of the zone where the managed instance group is located. + * zone: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "instances": [] + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "clientOperationId": "my_clientOperationId", + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "endTime": "my_endTime", + * // "error": {}, + * // "httpErrorMessage": "my_httpErrorMessage", + * // "httpErrorStatusCode": 0, + * // "id": "my_id", + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "metadata": {}, + * // "name": "my_name", + * // "operationGroupId": "my_operationGroupId", + * // "operationType": "my_operationType", + * // "progress": 0, + * // "region": "my_region", + * // "selfLink": "my_selfLink", + * // "selfLinkWithId": "my_selfLinkWithId", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "statusMessage": "my_statusMessage", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "user": "my_user", + * // "warnings": [], + * // "zone": "my_zone" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + startInstances( + params: Params$Resource$Instancegroupmanagers$Startinstances, + options: StreamMethodOptions + ): GaxiosPromise; + startInstances( + params?: Params$Resource$Instancegroupmanagers$Startinstances, + options?: MethodOptions + ): GaxiosPromise; + startInstances( + params: Params$Resource$Instancegroupmanagers$Startinstances, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + startInstances( + params: Params$Resource$Instancegroupmanagers$Startinstances, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + startInstances( + params: Params$Resource$Instancegroupmanagers$Startinstances, + callback: BodyResponseCallback + ): void; + startInstances(callback: BodyResponseCallback): void; + startInstances( + paramsOrCallback?: + | Params$Resource$Instancegroupmanagers$Startinstances + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Instancegroupmanagers$Startinstances; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Instancegroupmanagers$Startinstances; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/alpha/projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/startInstances' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'zone', 'instanceGroupManager'], + pathParams: ['instanceGroupManager', 'project', 'zone'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Flags the specified instances in the managed instance group to be immediately stopped. You can only specify instances that are running in this request. This method reduces the targetSize and increases the targetStoppedSize of the managed instance group by the number of instances that you stop. The stopInstances operation is marked DONE if the stopInstances request is successful. The underlying actions take additional time. You must separately verify the status of the STOPPING action with the listmanagedinstances method. + * + * If the instanceLifecyclePolicy.metadataBasedReadinessSignal field is set on the Instance Group Manager, each instance will be initialized before it is stopped, to give user programs time to perform necessary tasks. To initialize an instance, the Instance Group Manager sets the metadata key google-compute-initialization-intent to value INITIALIZE_AND_STOP on the instance, and waits for the user program to signal it is ready. This is done by setting the guest attribute path google-compute/initialization-state to value INITIALIZED. If the instance does not signal successful initialization (does not set the guest attribute to INITIALIZED) before timeout, the initialization is considered failed and the instance is not stopped. + * + * If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is suspended. + * + * Stopped instances can be started using the startInstances method. + * + * You can specify a maximum of 1000 instances with this method per request. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('alpha'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.instanceGroupManagers.stopInstances({ + * // The name of the managed instance group. + * instanceGroupManager: 'placeholder-value', + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // 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. + * // + * // 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: 'placeholder-value', + * // The name of the zone where the managed instance group is located. + * zone: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "forceStop": false, + * // "instances": [] + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "clientOperationId": "my_clientOperationId", + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "endTime": "my_endTime", + * // "error": {}, + * // "httpErrorMessage": "my_httpErrorMessage", + * // "httpErrorStatusCode": 0, + * // "id": "my_id", + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "metadata": {}, + * // "name": "my_name", + * // "operationGroupId": "my_operationGroupId", + * // "operationType": "my_operationType", + * // "progress": 0, + * // "region": "my_region", + * // "selfLink": "my_selfLink", + * // "selfLinkWithId": "my_selfLinkWithId", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "statusMessage": "my_statusMessage", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "user": "my_user", + * // "warnings": [], + * // "zone": "my_zone" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + stopInstances( + params: Params$Resource$Instancegroupmanagers$Stopinstances, + options: StreamMethodOptions + ): GaxiosPromise; + stopInstances( + params?: Params$Resource$Instancegroupmanagers$Stopinstances, + options?: MethodOptions + ): GaxiosPromise; + stopInstances( + params: Params$Resource$Instancegroupmanagers$Stopinstances, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + stopInstances( + params: Params$Resource$Instancegroupmanagers$Stopinstances, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + stopInstances( + params: Params$Resource$Instancegroupmanagers$Stopinstances, + callback: BodyResponseCallback + ): void; + stopInstances(callback: BodyResponseCallback): void; + stopInstances( + paramsOrCallback?: + | Params$Resource$Instancegroupmanagers$Stopinstances + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Instancegroupmanagers$Stopinstances; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Instancegroupmanagers$Stopinstances; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/alpha/projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/stopInstances' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'zone', 'instanceGroupManager'], + pathParams: ['instanceGroupManager', 'project', 'zone'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Flags the specified instances in the managed instance group to be immediately suspended. You can only specify instances that are running in this request. This method reduces the targetSize and increases the targetSuspendedSize of the managed instance group by the number of instances that you suspend. The suspendInstances operation is marked DONE if the suspendInstances request is successful. The underlying actions take additional time. You must separately verify the status of the SUSPENDING action with the listmanagedinstances method. + * + * If the instanceLifecyclePolicy.metadataBasedReadinessSignal field is set on the Instance Group Manager, each instance will be initialized before it is suspended, to give user programs time to perform necessary tasks. To initialize an instance, the Instance Group Manager sets the metadata key google-compute-initialization-intent to value INITIALIZE_AND_SUSPEND on the instance, and waits for the user program to signal it is ready. This is done by setting the guest attribute path google-compute/initialization-state to value INITIALIZED. If the instance does not signal successful initialization (does not set the guest attribute to INITIALIZED) before timeout, the initialization is considered failed and the instance is not suspended. + * + * If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is suspended. + * + * Suspended instances can be resumed using the resumeInstances method. + * + * You can specify a maximum of 1000 instances with this method per request. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('alpha'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.instanceGroupManagers.suspendInstances({ + * // The name of the managed instance group. + * instanceGroupManager: 'placeholder-value', + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // 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. + * // + * // 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: 'placeholder-value', + * // The name of the zone where the managed instance group is located. + * zone: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "forceSuspend": false, + * // "instances": [] + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "clientOperationId": "my_clientOperationId", + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "endTime": "my_endTime", + * // "error": {}, + * // "httpErrorMessage": "my_httpErrorMessage", + * // "httpErrorStatusCode": 0, + * // "id": "my_id", + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "metadata": {}, + * // "name": "my_name", + * // "operationGroupId": "my_operationGroupId", + * // "operationType": "my_operationType", + * // "progress": 0, + * // "region": "my_region", + * // "selfLink": "my_selfLink", + * // "selfLinkWithId": "my_selfLinkWithId", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "statusMessage": "my_statusMessage", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "user": "my_user", + * // "warnings": [], + * // "zone": "my_zone" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + suspendInstances( + params: Params$Resource$Instancegroupmanagers$Suspendinstances, + options: StreamMethodOptions + ): GaxiosPromise; + suspendInstances( + params?: Params$Resource$Instancegroupmanagers$Suspendinstances, + options?: MethodOptions + ): GaxiosPromise; + suspendInstances( + params: Params$Resource$Instancegroupmanagers$Suspendinstances, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + suspendInstances( + params: Params$Resource$Instancegroupmanagers$Suspendinstances, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + suspendInstances( + params: Params$Resource$Instancegroupmanagers$Suspendinstances, + callback: BodyResponseCallback + ): void; + suspendInstances(callback: BodyResponseCallback): void; + suspendInstances( + paramsOrCallback?: + | Params$Resource$Instancegroupmanagers$Suspendinstances + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Instancegroupmanagers$Suspendinstances; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Instancegroupmanagers$Suspendinstances; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/alpha/projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/suspendInstances' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'zone', 'instanceGroupManager'], + pathParams: ['instanceGroupManager', 'project', 'zone'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + /** * Returns permissions that a caller has on the specified resource. * @example @@ -54329,6 +55265,7 @@ export namespace compute_alpha { * // "fingerprint": "my_fingerprint", * // "id": "my_id", * // "instanceGroup": "my_instanceGroup", + * // "instanceLifecyclePolicy": {}, * // "instanceTemplate": "my_instanceTemplate", * // "kind": "my_kind", * // "name": "my_name", @@ -54341,6 +55278,8 @@ export namespace compute_alpha { * // "status": {}, * // "targetPools": [], * // "targetSize": 0, + * // "targetStoppedSize": 0, + * // "targetSuspendedSize": 0, * // "updatePolicy": {}, * // "versions": [], * // "zone": "my_zone" @@ -55192,6 +56131,34 @@ export namespace compute_alpha { */ requestBody?: Schema$InstanceGroupManagersResizeAdvancedRequest; } + export interface Params$Resource$Instancegroupmanagers$Resumeinstances + extends StandardParameters { + /** + * The name of the managed instance group. + */ + instanceGroupManager?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + /** + * The name of the zone where the managed instance group is located. + */ + zone?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$InstanceGroupManagersResumeInstancesRequest; + } export interface Params$Resource$Instancegroupmanagers$Setautohealingpolicies extends StandardParameters { /** @@ -55276,6 +56243,90 @@ export namespace compute_alpha { */ requestBody?: Schema$InstanceGroupManagersSetTargetPoolsRequest; } + export interface Params$Resource$Instancegroupmanagers$Startinstances + extends StandardParameters { + /** + * The name of the managed instance group. + */ + instanceGroupManager?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + /** + * The name of the zone where the managed instance group is located. + */ + zone?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$InstanceGroupManagersStartInstancesRequest; + } + export interface Params$Resource$Instancegroupmanagers$Stopinstances + extends StandardParameters { + /** + * The name of the managed instance group. + */ + instanceGroupManager?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + /** + * The name of the zone where the managed instance group is located. + */ + zone?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$InstanceGroupManagersStopInstancesRequest; + } + export interface Params$Resource$Instancegroupmanagers$Suspendinstances + extends StandardParameters { + /** + * The name of the managed instance group. + */ + instanceGroupManager?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + /** + * The name of the zone where the managed instance group is located. + */ + zone?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$InstanceGroupManagersSuspendInstancesRequest; + } export interface Params$Resource$Instancegroupmanagers$Testiampermissions extends StandardParameters { /** @@ -61099,6 +62150,136 @@ export namespace compute_alpha { } } + /** + * TODO(b/180520210): Add IAM permission for this API. Sends diagnostic interrupt to the instance. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('alpha'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.instances.sendDiagnosticInterrupt({ + * // Name of the instance scoping this request. + * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // The name of the zone for this request. + * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * }); + * console.log(res.data); + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + sendDiagnosticInterrupt( + params: Params$Resource$Instances$Senddiagnosticinterrupt, + options: StreamMethodOptions + ): GaxiosPromise; + sendDiagnosticInterrupt( + params?: Params$Resource$Instances$Senddiagnosticinterrupt, + options?: MethodOptions + ): GaxiosPromise; + sendDiagnosticInterrupt( + params: Params$Resource$Instances$Senddiagnosticinterrupt, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + sendDiagnosticInterrupt( + params: Params$Resource$Instances$Senddiagnosticinterrupt, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + sendDiagnosticInterrupt( + params: Params$Resource$Instances$Senddiagnosticinterrupt, + callback: BodyResponseCallback + ): void; + sendDiagnosticInterrupt(callback: BodyResponseCallback): void; + sendDiagnosticInterrupt( + paramsOrCallback?: + | Params$Resource$Instances$Senddiagnosticinterrupt + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: BodyResponseCallback | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Instances$Senddiagnosticinterrupt; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Instances$Senddiagnosticinterrupt; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/alpha/projects/{project}/zones/{zone}/instances/{instance}/sendDiagnosticInterrupt' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'zone', 'instance'], + pathParams: ['instance', 'project', 'zone'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + /** * Sets deletion protection on the instance. * @example @@ -66295,6 +67476,21 @@ export namespace compute_alpha { */ requestBody?: Schema$InstancesResumeRequest; } + export interface Params$Resource$Instances$Senddiagnosticinterrupt + extends StandardParameters { + /** + * Name of the instance scoping this request. + */ + instance?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * The name of the zone for this request. + */ + zone?: string; + } export interface Params$Resource$Instances$Setdeletionprotection extends StandardParameters { /** @@ -77092,6 +78288,7 @@ export namespace compute_alpha { * // "name": "my_name", * // "network": "my_network", * // "networkEndpointType": "my_networkEndpointType", + * // "pscTargetService": "my_pscTargetService", * // "region": "my_region", * // "selfLink": "my_selfLink", * // "selfLinkWithId": "my_selfLinkWithId", @@ -77258,6 +78455,7 @@ export namespace compute_alpha { * // "name": "my_name", * // "network": "my_network", * // "networkEndpointType": "my_networkEndpointType", + * // "pscTargetService": "my_pscTargetService", * // "region": "my_region", * // "selfLink": "my_selfLink", * // "selfLinkWithId": "my_selfLinkWithId", @@ -78221,7 +79419,8 @@ export namespace compute_alpha { * // "attachmentTarget": "my_attachmentTarget", * // "displayName": "my_displayName", * // "firewallPolicyId": "my_firewallPolicyId", - * // "name": "my_name" + * // "name": "my_name", + * // "shortName": "my_shortName" * // } * }, * }); @@ -78919,10 +80118,12 @@ export namespace compute_alpha { * // "kind": "my_kind", * // "name": "my_name", * // "parent": "my_parent", + * // "region": "my_region", * // "ruleTupleCount": 0, * // "rules": [], * // "selfLink": "my_selfLink", - * // "selfLinkWithId": "my_selfLinkWithId" + * // "selfLinkWithId": "my_selfLinkWithId", + * // "shortName": "my_shortName" * // } * } * @@ -79063,7 +80264,8 @@ export namespace compute_alpha { * // "attachmentTarget": "my_attachmentTarget", * // "displayName": "my_displayName", * // "firewallPolicyId": "my_firewallPolicyId", - * // "name": "my_name" + * // "name": "my_name", + * // "shortName": "my_shortName" * // } * } * @@ -79514,10 +80716,12 @@ export namespace compute_alpha { * // "kind": "my_kind", * // "name": "my_name", * // "parent": "my_parent", + * // "region": "my_region", * // "ruleTupleCount": 0, * // "rules": [], * // "selfLink": "my_selfLink", - * // "selfLinkWithId": "my_selfLinkWithId" + * // "selfLinkWithId": "my_selfLinkWithId", + * // "shortName": "my_shortName" * // } * }, * }); @@ -79861,10 +81065,12 @@ export namespace compute_alpha { * // "kind": "my_kind", * // "name": "my_name", * // "parent": "my_parent", + * // "region": "my_region", * // "ruleTupleCount": 0, * // "rules": [], * // "selfLink": "my_selfLink", - * // "selfLinkWithId": "my_selfLinkWithId" + * // "selfLinkWithId": "my_selfLinkWithId", + * // "shortName": "my_shortName" * // } * }, * }); @@ -88745,6 +89951,7 @@ export namespace compute_alpha { * // "description": "my_description", * // "direction": "my_direction", * // "enableLogging": false, + * // "headerAction": {}, * // "kind": "my_kind", * // "match": {}, * // "preview": false, @@ -89549,6 +90756,7 @@ export namespace compute_alpha { * // "description": "my_description", * // "direction": "my_direction", * // "enableLogging": false, + * // "headerAction": {}, * // "kind": "my_kind", * // "match": {}, * // "preview": false, @@ -90546,6 +91754,7 @@ export namespace compute_alpha { * // "description": "my_description", * // "direction": "my_direction", * // "enableLogging": false, + * // "headerAction": {}, * // "kind": "my_kind", * // "match": {}, * // "preview": false, @@ -109918,6 +111127,7 @@ export namespace compute_alpha { * // "fingerprint": "my_fingerprint", * // "id": "my_id", * // "instanceGroup": "my_instanceGroup", + * // "instanceLifecyclePolicy": {}, * // "instanceTemplate": "my_instanceTemplate", * // "kind": "my_kind", * // "name": "my_name", @@ -109930,6 +111140,8 @@ export namespace compute_alpha { * // "status": {}, * // "targetPools": [], * // "targetSize": 0, + * // "targetStoppedSize": 0, + * // "targetSuspendedSize": 0, * // "updatePolicy": {}, * // "versions": [], * // "zone": "my_zone" @@ -110090,6 +111302,7 @@ export namespace compute_alpha { * // "fingerprint": "my_fingerprint", * // "id": "my_id", * // "instanceGroup": "my_instanceGroup", + * // "instanceLifecyclePolicy": {}, * // "instanceTemplate": "my_instanceTemplate", * // "kind": "my_kind", * // "name": "my_name", @@ -110102,6 +111315,8 @@ export namespace compute_alpha { * // "status": {}, * // "targetPools": [], * // "targetSize": 0, + * // "targetStoppedSize": 0, + * // "targetSuspendedSize": 0, * // "updatePolicy": {}, * // "versions": [], * // "zone": "my_zone" @@ -110965,6 +112180,7 @@ export namespace compute_alpha { * // "fingerprint": "my_fingerprint", * // "id": "my_id", * // "instanceGroup": "my_instanceGroup", + * // "instanceLifecyclePolicy": {}, * // "instanceTemplate": "my_instanceTemplate", * // "kind": "my_kind", * // "name": "my_name", @@ -110977,6 +112193,8 @@ export namespace compute_alpha { * // "status": {}, * // "targetPools": [], * // "targetSize": 0, + * // "targetStoppedSize": 0, + * // "targetSuspendedSize": 0, * // "updatePolicy": {}, * // "versions": [], * // "zone": "my_zone" @@ -111825,7 +113043,13 @@ export namespace compute_alpha { } /** - * Modifies the autohealing policy for the instances in this managed instance group. [Deprecated] This method is deprecated. Use regionInstanceGroupManagers.patch instead. + * Flags the specified instances in the managed instance group to be resumed. This method increases the targetSize and decreases the targetSuspendedSize of the managed instance group by the number of instances that you resume. The resumeInstances operation is marked DONE if the resumeInstances request is successful. The underlying actions take additional time. You must separately verify the status of the RESUMING action with the listmanagedinstances method. + * + * In this request, you can only specify instances that are suspended. For example, if an instance was previously suspended using the suspendInstances method, it can be resumed using the resumeInstances method. + * + * If a health check is attached to the managed instance group, the specified instances will be verified as healthy after they are resumed. + * + * You can specify a maximum of 1000 instances with this method per request. * @example * ```js * // Before running the sample: @@ -111853,7 +113077,7 @@ export namespace compute_alpha { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.regionInstanceGroupManagers.setAutoHealingPolicies({ + * const res = await compute.regionInstanceGroupManagers.resumeInstances({ * // Name of the managed instance group. * instanceGroupManager: 'placeholder-value', * // Project ID for this request. @@ -111872,7 +113096,7 @@ export namespace compute_alpha { * requestBody: { * // request body parameters * // { - * // "autoHealingPolicies": [] + * // "instances": [] * // } * }, * }); @@ -111921,34 +113145,32 @@ export namespace compute_alpha { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - setAutoHealingPolicies( - params: Params$Resource$Regioninstancegroupmanagers$Setautohealingpolicies, + resumeInstances( + params: Params$Resource$Regioninstancegroupmanagers$Resumeinstances, options: StreamMethodOptions ): GaxiosPromise; - setAutoHealingPolicies( - params?: Params$Resource$Regioninstancegroupmanagers$Setautohealingpolicies, + resumeInstances( + params?: Params$Resource$Regioninstancegroupmanagers$Resumeinstances, options?: MethodOptions ): GaxiosPromise; - setAutoHealingPolicies( - params: Params$Resource$Regioninstancegroupmanagers$Setautohealingpolicies, + resumeInstances( + params: Params$Resource$Regioninstancegroupmanagers$Resumeinstances, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - setAutoHealingPolicies( - params: Params$Resource$Regioninstancegroupmanagers$Setautohealingpolicies, + resumeInstances( + params: Params$Resource$Regioninstancegroupmanagers$Resumeinstances, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - setAutoHealingPolicies( - params: Params$Resource$Regioninstancegroupmanagers$Setautohealingpolicies, - callback: BodyResponseCallback - ): void; - setAutoHealingPolicies( + resumeInstances( + params: Params$Resource$Regioninstancegroupmanagers$Resumeinstances, callback: BodyResponseCallback ): void; - setAutoHealingPolicies( + resumeInstances(callback: BodyResponseCallback): void; + resumeInstances( paramsOrCallback?: - | Params$Resource$Regioninstancegroupmanagers$Setautohealingpolicies + | Params$Resource$Regioninstancegroupmanagers$Resumeinstances | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -111961,12 +113183,12 @@ export namespace compute_alpha { | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Regioninstancegroupmanagers$Setautohealingpolicies; + {}) as Params$Resource$Regioninstancegroupmanagers$Resumeinstances; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Regioninstancegroupmanagers$Setautohealingpolicies; + params = {} as Params$Resource$Regioninstancegroupmanagers$Resumeinstances; options = {}; } @@ -111981,7 +113203,7 @@ export namespace compute_alpha { { url: ( rootUrl + - '/compute/alpha/projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setAutoHealingPolicies' + '/compute/alpha/projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resumeInstances' ).replace(/([^:]\/)\/+/g, '$1'), method: 'POST', }, @@ -112003,7 +113225,7 @@ export namespace compute_alpha { } /** - * Sets the instance template to use when creating new instances or recreating instances in this group. Existing instances are not affected. + * Modifies the autohealing policy for the instances in this managed instance group. [Deprecated] This method is deprecated. Use regionInstanceGroupManagers.patch instead. * @example * ```js * // Before running the sample: @@ -112031,8 +113253,8 @@ export namespace compute_alpha { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.regionInstanceGroupManagers.setInstanceTemplate({ - * // The name of the managed instance group. + * const res = await compute.regionInstanceGroupManagers.setAutoHealingPolicies({ + * // Name of the managed instance group. * instanceGroupManager: 'placeholder-value', * // Project ID for this request. * project: @@ -112050,7 +113272,7 @@ export namespace compute_alpha { * requestBody: { * // request body parameters * // { - * // "instanceTemplate": "my_instanceTemplate" + * // "autoHealingPolicies": [] * // } * }, * }); @@ -112099,32 +113321,34 @@ export namespace compute_alpha { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - setInstanceTemplate( - params: Params$Resource$Regioninstancegroupmanagers$Setinstancetemplate, + setAutoHealingPolicies( + params: Params$Resource$Regioninstancegroupmanagers$Setautohealingpolicies, options: StreamMethodOptions ): GaxiosPromise; - setInstanceTemplate( - params?: Params$Resource$Regioninstancegroupmanagers$Setinstancetemplate, + setAutoHealingPolicies( + params?: Params$Resource$Regioninstancegroupmanagers$Setautohealingpolicies, options?: MethodOptions ): GaxiosPromise; - setInstanceTemplate( - params: Params$Resource$Regioninstancegroupmanagers$Setinstancetemplate, + setAutoHealingPolicies( + params: Params$Resource$Regioninstancegroupmanagers$Setautohealingpolicies, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - setInstanceTemplate( - params: Params$Resource$Regioninstancegroupmanagers$Setinstancetemplate, + setAutoHealingPolicies( + params: Params$Resource$Regioninstancegroupmanagers$Setautohealingpolicies, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - setInstanceTemplate( - params: Params$Resource$Regioninstancegroupmanagers$Setinstancetemplate, + setAutoHealingPolicies( + params: Params$Resource$Regioninstancegroupmanagers$Setautohealingpolicies, callback: BodyResponseCallback ): void; - setInstanceTemplate(callback: BodyResponseCallback): void; - setInstanceTemplate( + setAutoHealingPolicies( + callback: BodyResponseCallback + ): void; + setAutoHealingPolicies( paramsOrCallback?: - | Params$Resource$Regioninstancegroupmanagers$Setinstancetemplate + | Params$Resource$Regioninstancegroupmanagers$Setautohealingpolicies | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -112137,12 +113361,12 @@ export namespace compute_alpha { | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Regioninstancegroupmanagers$Setinstancetemplate; + {}) as Params$Resource$Regioninstancegroupmanagers$Setautohealingpolicies; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Regioninstancegroupmanagers$Setinstancetemplate; + params = {} as Params$Resource$Regioninstancegroupmanagers$Setautohealingpolicies; options = {}; } @@ -112157,7 +113381,7 @@ export namespace compute_alpha { { url: ( rootUrl + - '/compute/alpha/projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate' + '/compute/alpha/projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setAutoHealingPolicies' ).replace(/([^:]\/)\/+/g, '$1'), method: 'POST', }, @@ -112179,7 +113403,7 @@ export namespace compute_alpha { } /** - * Modifies the target pools to which all new instances in this group are assigned. Existing instances in the group are not affected. + * Sets the instance template to use when creating new instances or recreating instances in this group. Existing instances are not affected. * @example * ```js * // Before running the sample: @@ -112207,8 +113431,8 @@ export namespace compute_alpha { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.regionInstanceGroupManagers.setTargetPools({ - * // Name of the managed instance group. + * const res = await compute.regionInstanceGroupManagers.setInstanceTemplate({ + * // The name of the managed instance group. * instanceGroupManager: 'placeholder-value', * // Project ID for this request. * project: @@ -112226,8 +113450,7 @@ export namespace compute_alpha { * requestBody: { * // request body parameters * // { - * // "fingerprint": "my_fingerprint", - * // "targetPools": [] + * // "instanceTemplate": "my_instanceTemplate" * // } * }, * }); @@ -112276,32 +113499,32 @@ export namespace compute_alpha { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - setTargetPools( - params: Params$Resource$Regioninstancegroupmanagers$Settargetpools, + setInstanceTemplate( + params: Params$Resource$Regioninstancegroupmanagers$Setinstancetemplate, options: StreamMethodOptions ): GaxiosPromise; - setTargetPools( - params?: Params$Resource$Regioninstancegroupmanagers$Settargetpools, + setInstanceTemplate( + params?: Params$Resource$Regioninstancegroupmanagers$Setinstancetemplate, options?: MethodOptions ): GaxiosPromise; - setTargetPools( - params: Params$Resource$Regioninstancegroupmanagers$Settargetpools, + setInstanceTemplate( + params: Params$Resource$Regioninstancegroupmanagers$Setinstancetemplate, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - setTargetPools( - params: Params$Resource$Regioninstancegroupmanagers$Settargetpools, + setInstanceTemplate( + params: Params$Resource$Regioninstancegroupmanagers$Setinstancetemplate, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - setTargetPools( - params: Params$Resource$Regioninstancegroupmanagers$Settargetpools, + setInstanceTemplate( + params: Params$Resource$Regioninstancegroupmanagers$Setinstancetemplate, callback: BodyResponseCallback ): void; - setTargetPools(callback: BodyResponseCallback): void; - setTargetPools( + setInstanceTemplate(callback: BodyResponseCallback): void; + setInstanceTemplate( paramsOrCallback?: - | Params$Resource$Regioninstancegroupmanagers$Settargetpools + | Params$Resource$Regioninstancegroupmanagers$Setinstancetemplate | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -112314,12 +113537,12 @@ export namespace compute_alpha { | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Regioninstancegroupmanagers$Settargetpools; + {}) as Params$Resource$Regioninstancegroupmanagers$Setinstancetemplate; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Regioninstancegroupmanagers$Settargetpools; + params = {} as Params$Resource$Regioninstancegroupmanagers$Setinstancetemplate; options = {}; } @@ -112334,7 +113557,7 @@ export namespace compute_alpha { { url: ( rootUrl + - '/compute/alpha/projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setTargetPools' + '/compute/alpha/projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate' ).replace(/([^:]\/)\/+/g, '$1'), method: 'POST', }, @@ -112356,7 +113579,7 @@ export namespace compute_alpha { } /** - * Returns permissions that a caller has on the specified resource. + * Modifies the target pools to which all new instances in this group are assigned. Existing instances in the group are not affected. * @example * ```js * // Before running the sample: @@ -112376,7 +113599,6 @@ export namespace compute_alpha { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', - * 'https://www.googleapis.com/auth/compute.readonly', * ], * }); * @@ -112385,20 +113607,27 @@ export namespace compute_alpha { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.regionInstanceGroupManagers.testIamPermissions({ + * const res = await compute.regionInstanceGroupManagers.setTargetPools({ + * // Name of the managed instance group. + * instanceGroupManager: 'placeholder-value', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // The name of the region for this request. - * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', - * // Name or id of the resource for this request. - * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * // Name of the region scoping this request. + * region: 'placeholder-value', + * // 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. + * // + * // 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: 'placeholder-value', * * // Request body metadata * requestBody: { * // request body parameters * // { - * // "permissions": [] + * // "fingerprint": "my_fingerprint", + * // "targetPools": [] * // } * }, * }); @@ -112406,7 +113635,32 @@ export namespace compute_alpha { * * // Example response * // { - * // "permissions": [] + * // "clientOperationId": "my_clientOperationId", + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "endTime": "my_endTime", + * // "error": {}, + * // "httpErrorMessage": "my_httpErrorMessage", + * // "httpErrorStatusCode": 0, + * // "id": "my_id", + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "metadata": {}, + * // "name": "my_name", + * // "operationGroupId": "my_operationGroupId", + * // "operationType": "my_operationType", + * // "progress": 0, + * // "region": "my_region", + * // "selfLink": "my_selfLink", + * // "selfLinkWithId": "my_selfLinkWithId", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "statusMessage": "my_statusMessage", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "user": "my_user", + * // "warnings": [], + * // "zone": "my_zone" * // } * } * @@ -112422,57 +113676,50 @@ export namespace compute_alpha { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - testIamPermissions( - params: Params$Resource$Regioninstancegroupmanagers$Testiampermissions, + setTargetPools( + params: Params$Resource$Regioninstancegroupmanagers$Settargetpools, options: StreamMethodOptions ): GaxiosPromise; - testIamPermissions( - params?: Params$Resource$Regioninstancegroupmanagers$Testiampermissions, + setTargetPools( + params?: Params$Resource$Regioninstancegroupmanagers$Settargetpools, options?: MethodOptions - ): GaxiosPromise; - testIamPermissions( - params: Params$Resource$Regioninstancegroupmanagers$Testiampermissions, + ): GaxiosPromise; + setTargetPools( + params: Params$Resource$Regioninstancegroupmanagers$Settargetpools, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - testIamPermissions( - params: Params$Resource$Regioninstancegroupmanagers$Testiampermissions, - options: - | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - testIamPermissions( - params: Params$Resource$Regioninstancegroupmanagers$Testiampermissions, - callback: BodyResponseCallback + setTargetPools( + params: Params$Resource$Regioninstancegroupmanagers$Settargetpools, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - testIamPermissions( - callback: BodyResponseCallback + setTargetPools( + params: Params$Resource$Regioninstancegroupmanagers$Settargetpools, + callback: BodyResponseCallback ): void; - testIamPermissions( + setTargetPools(callback: BodyResponseCallback): void; + setTargetPools( paramsOrCallback?: - | Params$Resource$Regioninstancegroupmanagers$Testiampermissions - | BodyResponseCallback + | Params$Resource$Regioninstancegroupmanagers$Settargetpools + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): - | void - | GaxiosPromise - | GaxiosPromise { + ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Regioninstancegroupmanagers$Testiampermissions; + {}) as Params$Resource$Regioninstancegroupmanagers$Settargetpools; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Regioninstancegroupmanagers$Testiampermissions; + params = {} as Params$Resource$Regioninstancegroupmanagers$Settargetpools; options = {}; } @@ -112487,29 +113734,35 @@ export namespace compute_alpha { { url: ( rootUrl + - '/compute/alpha/projects/{project}/regions/{region}/instanceGroupManagers/{resource}/testIamPermissions' + '/compute/alpha/projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setTargetPools' ).replace(/([^:]\/)\/+/g, '$1'), method: 'POST', }, options ), params, - requiredParams: ['project', 'region', 'resource'], - pathParams: ['project', 'region', 'resource'], + requiredParams: ['project', 'region', 'instanceGroupManager'], + pathParams: ['instanceGroupManager', 'project', 'region'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is updated even if the instances in the group have not yet been updated. You must separately verify the status of the individual instances with the listmanagedinstances method. + * Flags the specified instances in the managed instance group to be started. This method increases the targetSize and decreases the targetStoppedSize of the managed instance group by the number of instances that you start. The startInstances operation is marked DONE if the startInstances request is successful. The underlying actions take additional time. You must separately verify the status of the STARTING action with the listmanagedinstances method. + * + * In this request, you can only specify instances that are stopped. For example, if an instance was previously stopped using the stopInstances method, it can be started using the startInstances method. + * + * If a health check is attached to the managed instance group, the specified instances will be verified as healthy after they are started. + * + * You can specify a maximum of 1000 instances with this method per request. * @example * ```js * // Before running the sample: @@ -112537,8 +113790,8 @@ export namespace compute_alpha { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.regionInstanceGroupManagers.update({ - * // The name of the instance group manager. + * const res = await compute.regionInstanceGroupManagers.startInstances({ + * // Name of the managed instance group. * instanceGroupManager: 'placeholder-value', * // Project ID for this request. * project: @@ -112556,31 +113809,7 @@ export namespace compute_alpha { * requestBody: { * // request body parameters * // { - * // "autoHealingPolicies": [], - * // "baseInstanceName": "my_baseInstanceName", - * // "creationTimestamp": "my_creationTimestamp", - * // "currentActions": {}, - * // "description": "my_description", - * // "distributionPolicy": {}, - * // "failoverAction": "my_failoverAction", - * // "fingerprint": "my_fingerprint", - * // "id": "my_id", - * // "instanceGroup": "my_instanceGroup", - * // "instanceTemplate": "my_instanceTemplate", - * // "kind": "my_kind", - * // "name": "my_name", - * // "namedPorts": [], - * // "region": "my_region", - * // "selfLink": "my_selfLink", - * // "selfLinkWithId": "my_selfLinkWithId", - * // "serviceAccount": "my_serviceAccount", - * // "statefulPolicy": {}, - * // "status": {}, - * // "targetPools": [], - * // "targetSize": 0, - * // "updatePolicy": {}, - * // "versions": [], - * // "zone": "my_zone" + * // "instances": [] * // } * }, * }); @@ -112629,32 +113858,32 @@ export namespace compute_alpha { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - update( - params: Params$Resource$Regioninstancegroupmanagers$Update, + startInstances( + params: Params$Resource$Regioninstancegroupmanagers$Startinstances, options: StreamMethodOptions ): GaxiosPromise; - update( - params?: Params$Resource$Regioninstancegroupmanagers$Update, + startInstances( + params?: Params$Resource$Regioninstancegroupmanagers$Startinstances, options?: MethodOptions ): GaxiosPromise; - update( - params: Params$Resource$Regioninstancegroupmanagers$Update, + startInstances( + params: Params$Resource$Regioninstancegroupmanagers$Startinstances, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - update( - params: Params$Resource$Regioninstancegroupmanagers$Update, + startInstances( + params: Params$Resource$Regioninstancegroupmanagers$Startinstances, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - update( - params: Params$Resource$Regioninstancegroupmanagers$Update, + startInstances( + params: Params$Resource$Regioninstancegroupmanagers$Startinstances, callback: BodyResponseCallback ): void; - update(callback: BodyResponseCallback): void; - update( + startInstances(callback: BodyResponseCallback): void; + startInstances( paramsOrCallback?: - | Params$Resource$Regioninstancegroupmanagers$Update + | Params$Resource$Regioninstancegroupmanagers$Startinstances | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -112667,12 +113896,12 @@ export namespace compute_alpha { | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Regioninstancegroupmanagers$Update; + {}) as Params$Resource$Regioninstancegroupmanagers$Startinstances; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Regioninstancegroupmanagers$Update; + params = {} as Params$Resource$Regioninstancegroupmanagers$Startinstances; options = {}; } @@ -112687,9 +113916,9 @@ export namespace compute_alpha { { url: ( rootUrl + - '/compute/alpha/projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}' + '/compute/alpha/projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/startInstances' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'PUT', + method: 'POST', }, options ), @@ -112709,7 +113938,15 @@ export namespace compute_alpha { } /** - * Inserts or updates per-instance configs for the managed instance group. perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch. + * Flags the specified instances in the managed instance group to be immediately stopped. You can only specify instances that are running in this request. This method reduces the targetSize and increases the targetStoppedSize of the managed instance group by the number of instances that you stop. The stopInstances operation is marked DONE if the stopInstances request is successful. The underlying actions take additional time. You must separately verify the status of the STOPPING action with the listmanagedinstances method. + * + * If the instanceLifecyclePolicy.metadataBasedReadinessSignal field is set on the Instance Group Manager, each instance will be initialized before it is stopped, to give user programs time to perform necessary tasks. To initialize an instance, the Instance Group Manager sets the metadata key google-compute-initialization-intent to value INITIALIZE_AND_STOP on the instance, and waits for the user program to signal it is ready. This is done by setting the guest attribute path google-compute/initialization-state to value INITIALIZED. If the instance does not signal successful initialization (does not set the guest attribute to INITIALIZED) before timeout, the initialization is considered failed and the instance is not stopped. + * + * If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is suspended. + * + * Stopped instances can be started using the startInstances method. + * + * You can specify a maximum of 1000 instances with this method per request. * @example * ```js * // Before running the sample: @@ -112737,31 +113974,749 @@ export namespace compute_alpha { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.regionInstanceGroupManagers.updatePerInstanceConfigs( - * { - * // The name of the managed instance group. It should conform to RFC1035. - * instanceGroupManager: 'placeholder-value', - * // Project ID for this request. - * project: - * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // Name of the region scoping this request, should conform to RFC1035. - * region: 'placeholder-value', - * // 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. - * // - * // 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: 'placeholder-value', + * const res = await compute.regionInstanceGroupManagers.stopInstances({ + * // The name of the managed instance group. + * instanceGroupManager: 'placeholder-value', + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // Name of the region scoping this request. + * region: 'placeholder-value', + * // 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. + * // + * // 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: 'placeholder-value', * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "perInstanceConfigs": [] - * // } - * }, - * } - * ); + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "forceStop": false, + * // "instances": [] + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "clientOperationId": "my_clientOperationId", + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "endTime": "my_endTime", + * // "error": {}, + * // "httpErrorMessage": "my_httpErrorMessage", + * // "httpErrorStatusCode": 0, + * // "id": "my_id", + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "metadata": {}, + * // "name": "my_name", + * // "operationGroupId": "my_operationGroupId", + * // "operationType": "my_operationType", + * // "progress": 0, + * // "region": "my_region", + * // "selfLink": "my_selfLink", + * // "selfLinkWithId": "my_selfLinkWithId", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "statusMessage": "my_statusMessage", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "user": "my_user", + * // "warnings": [], + * // "zone": "my_zone" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + stopInstances( + params: Params$Resource$Regioninstancegroupmanagers$Stopinstances, + options: StreamMethodOptions + ): GaxiosPromise; + stopInstances( + params?: Params$Resource$Regioninstancegroupmanagers$Stopinstances, + options?: MethodOptions + ): GaxiosPromise; + stopInstances( + params: Params$Resource$Regioninstancegroupmanagers$Stopinstances, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + stopInstances( + params: Params$Resource$Regioninstancegroupmanagers$Stopinstances, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + stopInstances( + params: Params$Resource$Regioninstancegroupmanagers$Stopinstances, + callback: BodyResponseCallback + ): void; + stopInstances(callback: BodyResponseCallback): void; + stopInstances( + paramsOrCallback?: + | Params$Resource$Regioninstancegroupmanagers$Stopinstances + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Regioninstancegroupmanagers$Stopinstances; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Regioninstancegroupmanagers$Stopinstances; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/alpha/projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/stopInstances' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'region', 'instanceGroupManager'], + pathParams: ['instanceGroupManager', 'project', 'region'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Flags the specified instances in the managed instance group to be immediately suspended. You can only specify instances that are running in this request. This method reduces the targetSize and increases the targetSuspendedSize of the managed instance group by the number of instances that you suspend. The suspendInstances operation is marked DONE if the suspendInstances request is successful. The underlying actions take additional time. You must separately verify the status of the SUSPENDING action with the listmanagedinstances method. + * + * If the instanceLifecyclePolicy.metadataBasedReadinessSignal field is set on the Instance Group Manager, each instance will be initialized before it is suspended, to give user programs time to perform necessary tasks. To initialize an instance, the Instance Group Manager sets the metadata key google-compute-initialization-intent to value INITIALIZE_AND_SUSPEND on the instance, and waits for the user program to signal it is ready. This is done by setting the guest attribute path google-compute/initialization-state to value INITIALIZED. If the instance does not signal successful initialization (does not set the guest attribute to INITIALIZED) before timeout, the initialization is considered failed and the instance is not suspended. + * + * If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is suspended. + * + * Suspended instances can be resumed using the resumeInstances method. + * + * You can specify a maximum of 1000 instances with this method per request. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('alpha'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.regionInstanceGroupManagers.suspendInstances({ + * // Name of the managed instance group. + * instanceGroupManager: 'placeholder-value', + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // Name of the region scoping this request. + * region: 'placeholder-value', + * // 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. + * // + * // 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: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "forceSuspend": false, + * // "instances": [] + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "clientOperationId": "my_clientOperationId", + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "endTime": "my_endTime", + * // "error": {}, + * // "httpErrorMessage": "my_httpErrorMessage", + * // "httpErrorStatusCode": 0, + * // "id": "my_id", + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "metadata": {}, + * // "name": "my_name", + * // "operationGroupId": "my_operationGroupId", + * // "operationType": "my_operationType", + * // "progress": 0, + * // "region": "my_region", + * // "selfLink": "my_selfLink", + * // "selfLinkWithId": "my_selfLinkWithId", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "statusMessage": "my_statusMessage", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "user": "my_user", + * // "warnings": [], + * // "zone": "my_zone" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + suspendInstances( + params: Params$Resource$Regioninstancegroupmanagers$Suspendinstances, + options: StreamMethodOptions + ): GaxiosPromise; + suspendInstances( + params?: Params$Resource$Regioninstancegroupmanagers$Suspendinstances, + options?: MethodOptions + ): GaxiosPromise; + suspendInstances( + params: Params$Resource$Regioninstancegroupmanagers$Suspendinstances, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + suspendInstances( + params: Params$Resource$Regioninstancegroupmanagers$Suspendinstances, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + suspendInstances( + params: Params$Resource$Regioninstancegroupmanagers$Suspendinstances, + callback: BodyResponseCallback + ): void; + suspendInstances(callback: BodyResponseCallback): void; + suspendInstances( + paramsOrCallback?: + | Params$Resource$Regioninstancegroupmanagers$Suspendinstances + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Regioninstancegroupmanagers$Suspendinstances; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Regioninstancegroupmanagers$Suspendinstances; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/alpha/projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/suspendInstances' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'region', 'instanceGroupManager'], + pathParams: ['instanceGroupManager', 'project', 'region'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Returns permissions that a caller has on the specified resource. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('alpha'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.regionInstanceGroupManagers.testIamPermissions({ + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // The name of the region for this request. + * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * // Name or id of the resource for this request. + * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "permissions": [] + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "permissions": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + testIamPermissions( + params: Params$Resource$Regioninstancegroupmanagers$Testiampermissions, + options: StreamMethodOptions + ): GaxiosPromise; + testIamPermissions( + params?: Params$Resource$Regioninstancegroupmanagers$Testiampermissions, + options?: MethodOptions + ): GaxiosPromise; + testIamPermissions( + params: Params$Resource$Regioninstancegroupmanagers$Testiampermissions, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + testIamPermissions( + params: Params$Resource$Regioninstancegroupmanagers$Testiampermissions, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + testIamPermissions( + params: Params$Resource$Regioninstancegroupmanagers$Testiampermissions, + callback: BodyResponseCallback + ): void; + testIamPermissions( + callback: BodyResponseCallback + ): void; + testIamPermissions( + paramsOrCallback?: + | Params$Resource$Regioninstancegroupmanagers$Testiampermissions + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Regioninstancegroupmanagers$Testiampermissions; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Regioninstancegroupmanagers$Testiampermissions; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/alpha/projects/{project}/regions/{region}/instanceGroupManagers/{resource}/testIamPermissions' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'region', 'resource'], + pathParams: ['project', 'region', 'resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is updated even if the instances in the group have not yet been updated. You must separately verify the status of the individual instances with the listmanagedinstances method. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('alpha'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.regionInstanceGroupManagers.update({ + * // The name of the instance group manager. + * instanceGroupManager: 'placeholder-value', + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // Name of the region scoping this request. + * region: 'placeholder-value', + * // 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. + * // + * // 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: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "autoHealingPolicies": [], + * // "baseInstanceName": "my_baseInstanceName", + * // "creationTimestamp": "my_creationTimestamp", + * // "currentActions": {}, + * // "description": "my_description", + * // "distributionPolicy": {}, + * // "failoverAction": "my_failoverAction", + * // "fingerprint": "my_fingerprint", + * // "id": "my_id", + * // "instanceGroup": "my_instanceGroup", + * // "instanceLifecyclePolicy": {}, + * // "instanceTemplate": "my_instanceTemplate", + * // "kind": "my_kind", + * // "name": "my_name", + * // "namedPorts": [], + * // "region": "my_region", + * // "selfLink": "my_selfLink", + * // "selfLinkWithId": "my_selfLinkWithId", + * // "serviceAccount": "my_serviceAccount", + * // "statefulPolicy": {}, + * // "status": {}, + * // "targetPools": [], + * // "targetSize": 0, + * // "targetStoppedSize": 0, + * // "targetSuspendedSize": 0, + * // "updatePolicy": {}, + * // "versions": [], + * // "zone": "my_zone" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "clientOperationId": "my_clientOperationId", + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "endTime": "my_endTime", + * // "error": {}, + * // "httpErrorMessage": "my_httpErrorMessage", + * // "httpErrorStatusCode": 0, + * // "id": "my_id", + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "metadata": {}, + * // "name": "my_name", + * // "operationGroupId": "my_operationGroupId", + * // "operationType": "my_operationType", + * // "progress": 0, + * // "region": "my_region", + * // "selfLink": "my_selfLink", + * // "selfLinkWithId": "my_selfLinkWithId", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "statusMessage": "my_statusMessage", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "user": "my_user", + * // "warnings": [], + * // "zone": "my_zone" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + update( + params: Params$Resource$Regioninstancegroupmanagers$Update, + options: StreamMethodOptions + ): GaxiosPromise; + update( + params?: Params$Resource$Regioninstancegroupmanagers$Update, + options?: MethodOptions + ): GaxiosPromise; + update( + params: Params$Resource$Regioninstancegroupmanagers$Update, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + update( + params: Params$Resource$Regioninstancegroupmanagers$Update, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + update( + params: Params$Resource$Regioninstancegroupmanagers$Update, + callback: BodyResponseCallback + ): void; + update(callback: BodyResponseCallback): void; + update( + paramsOrCallback?: + | Params$Resource$Regioninstancegroupmanagers$Update + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Regioninstancegroupmanagers$Update; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Regioninstancegroupmanagers$Update; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/alpha/projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'PUT', + }, + options + ), + params, + requiredParams: ['project', 'region', 'instanceGroupManager'], + pathParams: ['instanceGroupManager', 'project', 'region'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Inserts or updates per-instance configs for the managed instance group. perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('alpha'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.regionInstanceGroupManagers.updatePerInstanceConfigs( + * { + * // The name of the managed instance group. It should conform to RFC1035. + * instanceGroupManager: 'placeholder-value', + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // Name of the region scoping this request, should conform to RFC1035. + * region: 'placeholder-value', + * // 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. + * // + * // 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: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "perInstanceConfigs": [] + * // } + * }, + * } + * ); * console.log(res.data); * * // Example response @@ -113390,6 +115345,34 @@ export namespace compute_alpha { */ requestBody?: Schema$RegionInstanceGroupManagersResizeAdvancedRequest; } + export interface Params$Resource$Regioninstancegroupmanagers$Resumeinstances + extends StandardParameters { + /** + * Name of the managed instance group. + */ + instanceGroupManager?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * Name of the region scoping this request. + */ + region?: string; + /** + * 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. + * + * 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; + + /** + * Request body metadata + */ + requestBody?: Schema$RegionInstanceGroupManagersResumeInstancesRequest; + } export interface Params$Resource$Regioninstancegroupmanagers$Setautohealingpolicies extends StandardParameters { /** @@ -113474,6 +115457,90 @@ export namespace compute_alpha { */ requestBody?: Schema$RegionInstanceGroupManagersSetTargetPoolsRequest; } + export interface Params$Resource$Regioninstancegroupmanagers$Startinstances + extends StandardParameters { + /** + * Name of the managed instance group. + */ + instanceGroupManager?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * Name of the region scoping this request. + */ + region?: string; + /** + * 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. + * + * 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; + + /** + * Request body metadata + */ + requestBody?: Schema$RegionInstanceGroupManagersStartInstancesRequest; + } + export interface Params$Resource$Regioninstancegroupmanagers$Stopinstances + extends StandardParameters { + /** + * The name of the managed instance group. + */ + instanceGroupManager?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * Name of the region scoping this request. + */ + region?: string; + /** + * 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. + * + * 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; + + /** + * Request body metadata + */ + requestBody?: Schema$RegionInstanceGroupManagersStopInstancesRequest; + } + export interface Params$Resource$Regioninstancegroupmanagers$Suspendinstances + extends StandardParameters { + /** + * Name of the managed instance group. + */ + instanceGroupManager?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * Name of the region scoping this request. + */ + region?: string; + /** + * 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. + * + * 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; + + /** + * Request body metadata + */ + requestBody?: Schema$RegionInstanceGroupManagersSuspendInstancesRequest; + } export interface Params$Resource$Regioninstancegroupmanagers$Testiampermissions extends StandardParameters { /** @@ -116692,6 +118759,7 @@ export namespace compute_alpha { * // "name": "my_name", * // "network": "my_network", * // "networkEndpointType": "my_networkEndpointType", + * // "pscTargetService": "my_pscTargetService", * // "region": "my_region", * // "selfLink": "my_selfLink", * // "selfLinkWithId": "my_selfLinkWithId", @@ -116858,6 +118926,7 @@ export namespace compute_alpha { * // "name": "my_name", * // "network": "my_network", * // "networkEndpointType": "my_networkEndpointType", + * // "pscTargetService": "my_pscTargetService", * // "region": "my_region", * // "selfLink": "my_selfLink", * // "selfLinkWithId": "my_selfLinkWithId", @@ -117023,43 +119092,2839 @@ export namespace compute_alpha { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.regionNetworkEndpointGroups.list({ - * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. - * // - * // 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) ``` - * filter: 'placeholder-value', - * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) - * maxResults: 'placeholder-value', - * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. - * // - * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. - * // - * // Currently, only sorting by `name` or `creationTimestamp desc` is supported. - * orderBy: 'placeholder-value', - * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. - * pageToken: 'placeholder-value', + * const res = await compute.regionNetworkEndpointGroups.list({ + * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. + * // + * // 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) ``` + * filter: 'placeholder-value', + * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * maxResults: 'placeholder-value', + * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * // + * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. + * // + * // Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * orderBy: 'placeholder-value', + * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * pageToken: 'placeholder-value', + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // The name of the region where the network endpoint group is located. It should comply with RFC1035. + * region: 'placeholder-value', + * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + * returnPartialSuccess: 'placeholder-value', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "id": "my_id", + * // "items": [], + * // "kind": "my_kind", + * // "nextPageToken": "my_nextPageToken", + * // "selfLink": "my_selfLink", + * // "warning": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Regionnetworkendpointgroups$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Regionnetworkendpointgroups$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Regionnetworkendpointgroups$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Regionnetworkendpointgroups$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Regionnetworkendpointgroups$List, + callback: BodyResponseCallback + ): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: + | Params$Resource$Regionnetworkendpointgroups$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Regionnetworkendpointgroups$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Regionnetworkendpointgroups$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/alpha/projects/{project}/regions/{region}/networkEndpointGroups' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['project', 'region'], + pathParams: ['project', 'region'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Regionnetworkendpointgroups$Delete + extends StandardParameters { + /** + * The name of the network endpoint group to delete. It should comply with RFC1035. + */ + networkEndpointGroup?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * The name of the region where the network endpoint group is located. It should comply with RFC1035. + */ + region?: string; + /** + * 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. + * + * 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; + } + export interface Params$Resource$Regionnetworkendpointgroups$Get + extends StandardParameters { + /** + * The name of the network endpoint group. It should comply with RFC1035. + */ + networkEndpointGroup?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * The name of the region where the network endpoint group is located. It should comply with RFC1035. + */ + region?: string; + } + export interface Params$Resource$Regionnetworkendpointgroups$Insert + extends StandardParameters { + /** + * Project ID for this request. + */ + project?: string; + /** + * The name of the region where you want to create the network endpoint group. It should comply with RFC1035. + */ + region?: string; + /** + * 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. + * + * 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; + + /** + * Request body metadata + */ + requestBody?: Schema$NetworkEndpointGroup; + } + export interface Params$Resource$Regionnetworkendpointgroups$List + extends StandardParameters { + /** + * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. + * + * 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) ``` + */ + filter?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + */ + maxResults?: number; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. + * + * Currently, only sorting by `name` or `creationTimestamp desc` is supported. + */ + orderBy?: string; + /** + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + */ + pageToken?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * The name of the region where the network endpoint group is located. It should comply with RFC1035. + */ + region?: string; + /** + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + */ + returnPartialSuccess?: boolean; + } + + export class Resource$Regionnetworkfirewallpolicies { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Inserts an association for the specified network firewall policy. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('alpha'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.regionNetworkFirewallPolicies.addAssociation({ + * // Name of the firewall policy to update. + * firewallPolicy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // Name of the region scoping this request. + * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * // Indicates whether or not to replace it if an association already exists. This is false by default, in which case an error will be returned if an association already exists. + * replaceExistingAssociation: 'placeholder-value', + * // 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. + * // + * // 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: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "attachmentTarget": "my_attachmentTarget", + * // "displayName": "my_displayName", + * // "firewallPolicyId": "my_firewallPolicyId", + * // "name": "my_name", + * // "shortName": "my_shortName" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "clientOperationId": "my_clientOperationId", + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "endTime": "my_endTime", + * // "error": {}, + * // "httpErrorMessage": "my_httpErrorMessage", + * // "httpErrorStatusCode": 0, + * // "id": "my_id", + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "metadata": {}, + * // "name": "my_name", + * // "operationGroupId": "my_operationGroupId", + * // "operationType": "my_operationType", + * // "progress": 0, + * // "region": "my_region", + * // "selfLink": "my_selfLink", + * // "selfLinkWithId": "my_selfLinkWithId", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "statusMessage": "my_statusMessage", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "user": "my_user", + * // "warnings": [], + * // "zone": "my_zone" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + addAssociation( + params: Params$Resource$Regionnetworkfirewallpolicies$Addassociation, + options: StreamMethodOptions + ): GaxiosPromise; + addAssociation( + params?: Params$Resource$Regionnetworkfirewallpolicies$Addassociation, + options?: MethodOptions + ): GaxiosPromise; + addAssociation( + params: Params$Resource$Regionnetworkfirewallpolicies$Addassociation, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + addAssociation( + params: Params$Resource$Regionnetworkfirewallpolicies$Addassociation, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + addAssociation( + params: Params$Resource$Regionnetworkfirewallpolicies$Addassociation, + callback: BodyResponseCallback + ): void; + addAssociation(callback: BodyResponseCallback): void; + addAssociation( + paramsOrCallback?: + | Params$Resource$Regionnetworkfirewallpolicies$Addassociation + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Regionnetworkfirewallpolicies$Addassociation; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Regionnetworkfirewallpolicies$Addassociation; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/alpha/projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/addAssociation' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'region', 'firewallPolicy'], + pathParams: ['firewallPolicy', 'project', 'region'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Inserts a rule into a network firewall policy. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('alpha'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.regionNetworkFirewallPolicies.addRule({ + * // Name of the firewall policy to update. + * firewallPolicy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // Name of the region scoping this request. + * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * // 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. + * // + * // 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: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "action": "my_action", + * // "description": "my_description", + * // "direction": "my_direction", + * // "disabled": false, + * // "enableLogging": false, + * // "kind": "my_kind", + * // "match": {}, + * // "priority": 0, + * // "ruleTupleCount": 0, + * // "targetResources": [], + * // "targetSecureLabels": [], + * // "targetSecureTags": [], + * // "targetServiceAccounts": [] + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "clientOperationId": "my_clientOperationId", + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "endTime": "my_endTime", + * // "error": {}, + * // "httpErrorMessage": "my_httpErrorMessage", + * // "httpErrorStatusCode": 0, + * // "id": "my_id", + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "metadata": {}, + * // "name": "my_name", + * // "operationGroupId": "my_operationGroupId", + * // "operationType": "my_operationType", + * // "progress": 0, + * // "region": "my_region", + * // "selfLink": "my_selfLink", + * // "selfLinkWithId": "my_selfLinkWithId", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "statusMessage": "my_statusMessage", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "user": "my_user", + * // "warnings": [], + * // "zone": "my_zone" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + addRule( + params: Params$Resource$Regionnetworkfirewallpolicies$Addrule, + options: StreamMethodOptions + ): GaxiosPromise; + addRule( + params?: Params$Resource$Regionnetworkfirewallpolicies$Addrule, + options?: MethodOptions + ): GaxiosPromise; + addRule( + params: Params$Resource$Regionnetworkfirewallpolicies$Addrule, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + addRule( + params: Params$Resource$Regionnetworkfirewallpolicies$Addrule, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + addRule( + params: Params$Resource$Regionnetworkfirewallpolicies$Addrule, + callback: BodyResponseCallback + ): void; + addRule(callback: BodyResponseCallback): void; + addRule( + paramsOrCallback?: + | Params$Resource$Regionnetworkfirewallpolicies$Addrule + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Regionnetworkfirewallpolicies$Addrule; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Regionnetworkfirewallpolicies$Addrule; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/alpha/projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/addRule' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'region', 'firewallPolicy'], + pathParams: ['firewallPolicy', 'project', 'region'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Copies rules to the specified network firewall policy. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('alpha'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.regionNetworkFirewallPolicies.cloneRules({ + * // Name of the firewall policy to update. + * firewallPolicy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // Name of the region scoping this request. + * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * // 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. + * // + * // 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: 'placeholder-value', + * // The firewall policy from which to copy rules. + * sourceFirewallPolicy: 'placeholder-value', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "clientOperationId": "my_clientOperationId", + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "endTime": "my_endTime", + * // "error": {}, + * // "httpErrorMessage": "my_httpErrorMessage", + * // "httpErrorStatusCode": 0, + * // "id": "my_id", + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "metadata": {}, + * // "name": "my_name", + * // "operationGroupId": "my_operationGroupId", + * // "operationType": "my_operationType", + * // "progress": 0, + * // "region": "my_region", + * // "selfLink": "my_selfLink", + * // "selfLinkWithId": "my_selfLinkWithId", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "statusMessage": "my_statusMessage", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "user": "my_user", + * // "warnings": [], + * // "zone": "my_zone" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + cloneRules( + params: Params$Resource$Regionnetworkfirewallpolicies$Clonerules, + options: StreamMethodOptions + ): GaxiosPromise; + cloneRules( + params?: Params$Resource$Regionnetworkfirewallpolicies$Clonerules, + options?: MethodOptions + ): GaxiosPromise; + cloneRules( + params: Params$Resource$Regionnetworkfirewallpolicies$Clonerules, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + cloneRules( + params: Params$Resource$Regionnetworkfirewallpolicies$Clonerules, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + cloneRules( + params: Params$Resource$Regionnetworkfirewallpolicies$Clonerules, + callback: BodyResponseCallback + ): void; + cloneRules(callback: BodyResponseCallback): void; + cloneRules( + paramsOrCallback?: + | Params$Resource$Regionnetworkfirewallpolicies$Clonerules + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Regionnetworkfirewallpolicies$Clonerules; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Regionnetworkfirewallpolicies$Clonerules; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/alpha/projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/cloneRules' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'region', 'firewallPolicy'], + pathParams: ['firewallPolicy', 'project', 'region'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Deletes the specified network firewall policy. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('alpha'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.regionNetworkFirewallPolicies.delete({ + * // Name of the firewall policy to delete. + * firewallPolicy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // Name of the region scoping this request. + * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * // 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. + * // + * // 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: 'placeholder-value', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "clientOperationId": "my_clientOperationId", + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "endTime": "my_endTime", + * // "error": {}, + * // "httpErrorMessage": "my_httpErrorMessage", + * // "httpErrorStatusCode": 0, + * // "id": "my_id", + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "metadata": {}, + * // "name": "my_name", + * // "operationGroupId": "my_operationGroupId", + * // "operationType": "my_operationType", + * // "progress": 0, + * // "region": "my_region", + * // "selfLink": "my_selfLink", + * // "selfLinkWithId": "my_selfLinkWithId", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "statusMessage": "my_statusMessage", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "user": "my_user", + * // "warnings": [], + * // "zone": "my_zone" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + delete( + params: Params$Resource$Regionnetworkfirewallpolicies$Delete, + options: StreamMethodOptions + ): GaxiosPromise; + delete( + params?: Params$Resource$Regionnetworkfirewallpolicies$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Regionnetworkfirewallpolicies$Delete, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Regionnetworkfirewallpolicies$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Regionnetworkfirewallpolicies$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Regionnetworkfirewallpolicies$Delete + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Regionnetworkfirewallpolicies$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Regionnetworkfirewallpolicies$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/alpha/projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['project', 'region', 'firewallPolicy'], + pathParams: ['firewallPolicy', 'project', 'region'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Returns the specified network firewall policy. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('alpha'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.regionNetworkFirewallPolicies.get({ + * // Name of the firewall policy to get. + * firewallPolicy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // Name of the region scoping this request. + * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "associations": [], + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "displayName": "my_displayName", + * // "fingerprint": "my_fingerprint", + * // "id": "my_id", + * // "kind": "my_kind", + * // "name": "my_name", + * // "parent": "my_parent", + * // "region": "my_region", + * // "ruleTupleCount": 0, + * // "rules": [], + * // "selfLink": "my_selfLink", + * // "selfLinkWithId": "my_selfLinkWithId", + * // "shortName": "my_shortName" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Regionnetworkfirewallpolicies$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Regionnetworkfirewallpolicies$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Regionnetworkfirewallpolicies$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Regionnetworkfirewallpolicies$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Regionnetworkfirewallpolicies$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Regionnetworkfirewallpolicies$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Regionnetworkfirewallpolicies$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Regionnetworkfirewallpolicies$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/alpha/projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['project', 'region', 'firewallPolicy'], + pathParams: ['firewallPolicy', 'project', 'region'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Gets an association with the specified name. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('alpha'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.regionNetworkFirewallPolicies.getAssociation({ + * // Name of the firewall policy to which the queried association belongs. + * firewallPolicy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * // The name of the association to get from the firewall policy. + * name: 'placeholder-value', + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // Name of the region scoping this request. + * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "attachmentTarget": "my_attachmentTarget", + * // "displayName": "my_displayName", + * // "firewallPolicyId": "my_firewallPolicyId", + * // "name": "my_name", + * // "shortName": "my_shortName" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + getAssociation( + params: Params$Resource$Regionnetworkfirewallpolicies$Getassociation, + options: StreamMethodOptions + ): GaxiosPromise; + getAssociation( + params?: Params$Resource$Regionnetworkfirewallpolicies$Getassociation, + options?: MethodOptions + ): GaxiosPromise; + getAssociation( + params: Params$Resource$Regionnetworkfirewallpolicies$Getassociation, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getAssociation( + params: Params$Resource$Regionnetworkfirewallpolicies$Getassociation, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getAssociation( + params: Params$Resource$Regionnetworkfirewallpolicies$Getassociation, + callback: BodyResponseCallback + ): void; + getAssociation( + callback: BodyResponseCallback + ): void; + getAssociation( + paramsOrCallback?: + | Params$Resource$Regionnetworkfirewallpolicies$Getassociation + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Regionnetworkfirewallpolicies$Getassociation; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Regionnetworkfirewallpolicies$Getassociation; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/alpha/projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/getAssociation' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['project', 'region', 'firewallPolicy'], + pathParams: ['firewallPolicy', 'project', 'region'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Gets the access control policy for a resource. May be empty if no such policy or resource exists. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('alpha'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.regionNetworkFirewallPolicies.getIamPolicy({ + * // Requested IAM Policy version. + * optionsRequestedPolicyVersion: 'placeholder-value', + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // The name of the region for this request. + * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * // Name or id of the resource for this request. + * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "auditConfigs": [], + * // "bindings": [], + * // "etag": "my_etag", + * // "iamOwned": false, + * // "rules": [], + * // "version": 0 + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + getIamPolicy( + params: Params$Resource$Regionnetworkfirewallpolicies$Getiampolicy, + options: StreamMethodOptions + ): GaxiosPromise; + getIamPolicy( + params?: Params$Resource$Regionnetworkfirewallpolicies$Getiampolicy, + options?: MethodOptions + ): GaxiosPromise; + getIamPolicy( + params: Params$Resource$Regionnetworkfirewallpolicies$Getiampolicy, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getIamPolicy( + params: Params$Resource$Regionnetworkfirewallpolicies$Getiampolicy, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getIamPolicy( + params: Params$Resource$Regionnetworkfirewallpolicies$Getiampolicy, + callback: BodyResponseCallback + ): void; + getIamPolicy(callback: BodyResponseCallback): void; + getIamPolicy( + paramsOrCallback?: + | Params$Resource$Regionnetworkfirewallpolicies$Getiampolicy + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Regionnetworkfirewallpolicies$Getiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Regionnetworkfirewallpolicies$Getiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/alpha/projects/{project}/regions/{region}/firewallPolicies/{resource}/getIamPolicy' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['project', 'region', 'resource'], + pathParams: ['project', 'region', 'resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Gets a rule of the specified priority. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('alpha'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.regionNetworkFirewallPolicies.getRule({ + * // Name of the firewall policy to which the queried rule belongs. + * firewallPolicy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * // The priority of the rule to get from the firewall policy. + * priority: 'placeholder-value', + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // Name of the region scoping this request. + * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "action": "my_action", + * // "description": "my_description", + * // "direction": "my_direction", + * // "disabled": false, + * // "enableLogging": false, + * // "kind": "my_kind", + * // "match": {}, + * // "priority": 0, + * // "ruleTupleCount": 0, + * // "targetResources": [], + * // "targetSecureLabels": [], + * // "targetSecureTags": [], + * // "targetServiceAccounts": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + getRule( + params: Params$Resource$Regionnetworkfirewallpolicies$Getrule, + options: StreamMethodOptions + ): GaxiosPromise; + getRule( + params?: Params$Resource$Regionnetworkfirewallpolicies$Getrule, + options?: MethodOptions + ): GaxiosPromise; + getRule( + params: Params$Resource$Regionnetworkfirewallpolicies$Getrule, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getRule( + params: Params$Resource$Regionnetworkfirewallpolicies$Getrule, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getRule( + params: Params$Resource$Regionnetworkfirewallpolicies$Getrule, + callback: BodyResponseCallback + ): void; + getRule(callback: BodyResponseCallback): void; + getRule( + paramsOrCallback?: + | Params$Resource$Regionnetworkfirewallpolicies$Getrule + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Regionnetworkfirewallpolicies$Getrule; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Regionnetworkfirewallpolicies$Getrule; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/alpha/projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/getRule' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['project', 'region', 'firewallPolicy'], + pathParams: ['firewallPolicy', 'project', 'region'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Creates a new network firewall policy in the specified project and region. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('alpha'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.regionNetworkFirewallPolicies.insert({ + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // Name of the region scoping this request. + * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * // 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. + * // + * // 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: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "associations": [], + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "displayName": "my_displayName", + * // "fingerprint": "my_fingerprint", + * // "id": "my_id", + * // "kind": "my_kind", + * // "name": "my_name", + * // "parent": "my_parent", + * // "region": "my_region", + * // "ruleTupleCount": 0, + * // "rules": [], + * // "selfLink": "my_selfLink", + * // "selfLinkWithId": "my_selfLinkWithId", + * // "shortName": "my_shortName" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "clientOperationId": "my_clientOperationId", + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "endTime": "my_endTime", + * // "error": {}, + * // "httpErrorMessage": "my_httpErrorMessage", + * // "httpErrorStatusCode": 0, + * // "id": "my_id", + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "metadata": {}, + * // "name": "my_name", + * // "operationGroupId": "my_operationGroupId", + * // "operationType": "my_operationType", + * // "progress": 0, + * // "region": "my_region", + * // "selfLink": "my_selfLink", + * // "selfLinkWithId": "my_selfLinkWithId", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "statusMessage": "my_statusMessage", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "user": "my_user", + * // "warnings": [], + * // "zone": "my_zone" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + insert( + params: Params$Resource$Regionnetworkfirewallpolicies$Insert, + options: StreamMethodOptions + ): GaxiosPromise; + insert( + params?: Params$Resource$Regionnetworkfirewallpolicies$Insert, + options?: MethodOptions + ): GaxiosPromise; + insert( + params: Params$Resource$Regionnetworkfirewallpolicies$Insert, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + insert( + params: Params$Resource$Regionnetworkfirewallpolicies$Insert, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + insert( + params: Params$Resource$Regionnetworkfirewallpolicies$Insert, + callback: BodyResponseCallback + ): void; + insert(callback: BodyResponseCallback): void; + insert( + paramsOrCallback?: + | Params$Resource$Regionnetworkfirewallpolicies$Insert + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Regionnetworkfirewallpolicies$Insert; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Regionnetworkfirewallpolicies$Insert; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/alpha/projects/{project}/regions/{region}/firewallPolicies' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'region'], + pathParams: ['project', 'region'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Lists all the network firewall policies that have been configured for the specified project in the given region. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('alpha'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.regionNetworkFirewallPolicies.list({ + * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. + * // + * // 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) ``` + * filter: 'placeholder-value', + * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * maxResults: 'placeholder-value', + * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * // + * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. + * // + * // Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * orderBy: 'placeholder-value', + * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * pageToken: 'placeholder-value', + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // Name of the region scoping this request. + * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + * returnPartialSuccess: 'placeholder-value', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "id": "my_id", + * // "items": [], + * // "kind": "my_kind", + * // "nextPageToken": "my_nextPageToken", + * // "warning": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Regionnetworkfirewallpolicies$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Regionnetworkfirewallpolicies$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Regionnetworkfirewallpolicies$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Regionnetworkfirewallpolicies$List, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Regionnetworkfirewallpolicies$List, + callback: BodyResponseCallback + ): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: + | Params$Resource$Regionnetworkfirewallpolicies$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Regionnetworkfirewallpolicies$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Regionnetworkfirewallpolicies$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/alpha/projects/{project}/regions/{region}/firewallPolicies' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['project', 'region'], + pathParams: ['project', 'region'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Patches the specified network firewall policy. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('alpha'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.regionNetworkFirewallPolicies.patch({ + * // Name of the firewall policy to update. + * firewallPolicy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // Name of the region scoping this request. + * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * // 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. + * // + * // 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: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "associations": [], + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "displayName": "my_displayName", + * // "fingerprint": "my_fingerprint", + * // "id": "my_id", + * // "kind": "my_kind", + * // "name": "my_name", + * // "parent": "my_parent", + * // "region": "my_region", + * // "ruleTupleCount": 0, + * // "rules": [], + * // "selfLink": "my_selfLink", + * // "selfLinkWithId": "my_selfLinkWithId", + * // "shortName": "my_shortName" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "clientOperationId": "my_clientOperationId", + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "endTime": "my_endTime", + * // "error": {}, + * // "httpErrorMessage": "my_httpErrorMessage", + * // "httpErrorStatusCode": 0, + * // "id": "my_id", + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "metadata": {}, + * // "name": "my_name", + * // "operationGroupId": "my_operationGroupId", + * // "operationType": "my_operationType", + * // "progress": 0, + * // "region": "my_region", + * // "selfLink": "my_selfLink", + * // "selfLinkWithId": "my_selfLinkWithId", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "statusMessage": "my_statusMessage", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "user": "my_user", + * // "warnings": [], + * // "zone": "my_zone" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + patch( + params: Params$Resource$Regionnetworkfirewallpolicies$Patch, + options: StreamMethodOptions + ): GaxiosPromise; + patch( + params?: Params$Resource$Regionnetworkfirewallpolicies$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Regionnetworkfirewallpolicies$Patch, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Regionnetworkfirewallpolicies$Patch, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Regionnetworkfirewallpolicies$Patch, + callback: BodyResponseCallback + ): void; + patch(callback: BodyResponseCallback): void; + patch( + paramsOrCallback?: + | Params$Resource$Regionnetworkfirewallpolicies$Patch + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Regionnetworkfirewallpolicies$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Regionnetworkfirewallpolicies$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/alpha/projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', + }, + options + ), + params, + requiredParams: ['project', 'region', 'firewallPolicy'], + pathParams: ['firewallPolicy', 'project', 'region'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Patches a rule of the specified priority. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('alpha'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.regionNetworkFirewallPolicies.patchRule({ + * // Name of the firewall policy to update. + * firewallPolicy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * // The priority of the rule to patch. + * priority: 'placeholder-value', + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // Name of the region scoping this request. + * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * // 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. + * // + * // 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: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "action": "my_action", + * // "description": "my_description", + * // "direction": "my_direction", + * // "disabled": false, + * // "enableLogging": false, + * // "kind": "my_kind", + * // "match": {}, + * // "priority": 0, + * // "ruleTupleCount": 0, + * // "targetResources": [], + * // "targetSecureLabels": [], + * // "targetSecureTags": [], + * // "targetServiceAccounts": [] + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "clientOperationId": "my_clientOperationId", + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "endTime": "my_endTime", + * // "error": {}, + * // "httpErrorMessage": "my_httpErrorMessage", + * // "httpErrorStatusCode": 0, + * // "id": "my_id", + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "metadata": {}, + * // "name": "my_name", + * // "operationGroupId": "my_operationGroupId", + * // "operationType": "my_operationType", + * // "progress": 0, + * // "region": "my_region", + * // "selfLink": "my_selfLink", + * // "selfLinkWithId": "my_selfLinkWithId", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "statusMessage": "my_statusMessage", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "user": "my_user", + * // "warnings": [], + * // "zone": "my_zone" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + patchRule( + params: Params$Resource$Regionnetworkfirewallpolicies$Patchrule, + options: StreamMethodOptions + ): GaxiosPromise; + patchRule( + params?: Params$Resource$Regionnetworkfirewallpolicies$Patchrule, + options?: MethodOptions + ): GaxiosPromise; + patchRule( + params: Params$Resource$Regionnetworkfirewallpolicies$Patchrule, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patchRule( + params: Params$Resource$Regionnetworkfirewallpolicies$Patchrule, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patchRule( + params: Params$Resource$Regionnetworkfirewallpolicies$Patchrule, + callback: BodyResponseCallback + ): void; + patchRule(callback: BodyResponseCallback): void; + patchRule( + paramsOrCallback?: + | Params$Resource$Regionnetworkfirewallpolicies$Patchrule + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Regionnetworkfirewallpolicies$Patchrule; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Regionnetworkfirewallpolicies$Patchrule; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/alpha/projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/patchRule' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'region', 'firewallPolicy'], + pathParams: ['firewallPolicy', 'project', 'region'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Removes an association for the specified network firewall policy. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('alpha'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.regionNetworkFirewallPolicies.removeAssociation({ + * // Name of the firewall policy to update. + * firewallPolicy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * // Name for the association that will be removed. + * name: 'placeholder-value', + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // Name of the region scoping this request. + * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * // 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. + * // + * // 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: 'placeholder-value', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "clientOperationId": "my_clientOperationId", + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "endTime": "my_endTime", + * // "error": {}, + * // "httpErrorMessage": "my_httpErrorMessage", + * // "httpErrorStatusCode": 0, + * // "id": "my_id", + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "metadata": {}, + * // "name": "my_name", + * // "operationGroupId": "my_operationGroupId", + * // "operationType": "my_operationType", + * // "progress": 0, + * // "region": "my_region", + * // "selfLink": "my_selfLink", + * // "selfLinkWithId": "my_selfLinkWithId", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "statusMessage": "my_statusMessage", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "user": "my_user", + * // "warnings": [], + * // "zone": "my_zone" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + removeAssociation( + params: Params$Resource$Regionnetworkfirewallpolicies$Removeassociation, + options: StreamMethodOptions + ): GaxiosPromise; + removeAssociation( + params?: Params$Resource$Regionnetworkfirewallpolicies$Removeassociation, + options?: MethodOptions + ): GaxiosPromise; + removeAssociation( + params: Params$Resource$Regionnetworkfirewallpolicies$Removeassociation, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + removeAssociation( + params: Params$Resource$Regionnetworkfirewallpolicies$Removeassociation, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + removeAssociation( + params: Params$Resource$Regionnetworkfirewallpolicies$Removeassociation, + callback: BodyResponseCallback + ): void; + removeAssociation(callback: BodyResponseCallback): void; + removeAssociation( + paramsOrCallback?: + | Params$Resource$Regionnetworkfirewallpolicies$Removeassociation + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Regionnetworkfirewallpolicies$Removeassociation; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Regionnetworkfirewallpolicies$Removeassociation; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/alpha/projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/removeAssociation' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'region', 'firewallPolicy'], + pathParams: ['firewallPolicy', 'project', 'region'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Deletes a rule of the specified priority. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('alpha'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.regionNetworkFirewallPolicies.removeRule({ + * // Name of the firewall policy to update. + * firewallPolicy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * // The priority of the rule to remove from the firewall policy. + * priority: 'placeholder-value', + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // Name of the region scoping this request. + * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * // 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. + * // + * // 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: 'placeholder-value', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "clientOperationId": "my_clientOperationId", + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "endTime": "my_endTime", + * // "error": {}, + * // "httpErrorMessage": "my_httpErrorMessage", + * // "httpErrorStatusCode": 0, + * // "id": "my_id", + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "metadata": {}, + * // "name": "my_name", + * // "operationGroupId": "my_operationGroupId", + * // "operationType": "my_operationType", + * // "progress": 0, + * // "region": "my_region", + * // "selfLink": "my_selfLink", + * // "selfLinkWithId": "my_selfLinkWithId", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "statusMessage": "my_statusMessage", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "user": "my_user", + * // "warnings": [], + * // "zone": "my_zone" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + removeRule( + params: Params$Resource$Regionnetworkfirewallpolicies$Removerule, + options: StreamMethodOptions + ): GaxiosPromise; + removeRule( + params?: Params$Resource$Regionnetworkfirewallpolicies$Removerule, + options?: MethodOptions + ): GaxiosPromise; + removeRule( + params: Params$Resource$Regionnetworkfirewallpolicies$Removerule, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + removeRule( + params: Params$Resource$Regionnetworkfirewallpolicies$Removerule, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + removeRule( + params: Params$Resource$Regionnetworkfirewallpolicies$Removerule, + callback: BodyResponseCallback + ): void; + removeRule(callback: BodyResponseCallback): void; + removeRule( + paramsOrCallback?: + | Params$Resource$Regionnetworkfirewallpolicies$Removerule + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Regionnetworkfirewallpolicies$Removerule; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Regionnetworkfirewallpolicies$Removerule; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/alpha/projects/{project}/regions/{region}/firewallPolicies/{firewallPolicy}/removeRule' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'region', 'firewallPolicy'], + pathParams: ['firewallPolicy', 'project', 'region'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Sets the access control policy on the specified resource. Replaces any existing policy. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('alpha'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.regionNetworkFirewallPolicies.setIamPolicy({ + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // The name of the region for this request. + * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * // Name or id of the resource for this request. + * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "bindings": [], + * // "etag": "my_etag", + * // "policy": {} + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "auditConfigs": [], + * // "bindings": [], + * // "etag": "my_etag", + * // "iamOwned": false, + * // "rules": [], + * // "version": 0 + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + setIamPolicy( + params: Params$Resource$Regionnetworkfirewallpolicies$Setiampolicy, + options: StreamMethodOptions + ): GaxiosPromise; + setIamPolicy( + params?: Params$Resource$Regionnetworkfirewallpolicies$Setiampolicy, + options?: MethodOptions + ): GaxiosPromise; + setIamPolicy( + params: Params$Resource$Regionnetworkfirewallpolicies$Setiampolicy, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + setIamPolicy( + params: Params$Resource$Regionnetworkfirewallpolicies$Setiampolicy, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + setIamPolicy( + params: Params$Resource$Regionnetworkfirewallpolicies$Setiampolicy, + callback: BodyResponseCallback + ): void; + setIamPolicy(callback: BodyResponseCallback): void; + setIamPolicy( + paramsOrCallback?: + | Params$Resource$Regionnetworkfirewallpolicies$Setiampolicy + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Regionnetworkfirewallpolicies$Setiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Regionnetworkfirewallpolicies$Setiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/alpha/projects/{project}/regions/{region}/firewallPolicies/{resource}/setIamPolicy' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'region', 'resource'], + pathParams: ['project', 'region', 'resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Returns permissions that a caller has on the specified resource. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('alpha'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.regionNetworkFirewallPolicies.testIamPermissions({ * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // The name of the region where the network endpoint group is located. It should comply with RFC1035. - * region: 'placeholder-value', - * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. - * returnPartialSuccess: 'placeholder-value', + * // The name of the region for this request. + * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * // Name or id of the resource for this request. + * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "permissions": [] + * // } + * }, * }); * console.log(res.data); * * // Example response * // { - * // "id": "my_id", - * // "items": [], - * // "kind": "my_kind", - * // "nextPageToken": "my_nextPageToken", - * // "selfLink": "my_selfLink", - * // "warning": {} + * // "permissions": [] * // } * } * @@ -117075,55 +121940,57 @@ export namespace compute_alpha { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - list( - params: Params$Resource$Regionnetworkendpointgroups$List, + testIamPermissions( + params: Params$Resource$Regionnetworkfirewallpolicies$Testiampermissions, options: StreamMethodOptions ): GaxiosPromise; - list( - params?: Params$Resource$Regionnetworkendpointgroups$List, + testIamPermissions( + params?: Params$Resource$Regionnetworkfirewallpolicies$Testiampermissions, options?: MethodOptions - ): GaxiosPromise; - list( - params: Params$Resource$Regionnetworkendpointgroups$List, + ): GaxiosPromise; + testIamPermissions( + params: Params$Resource$Regionnetworkfirewallpolicies$Testiampermissions, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Regionnetworkendpointgroups$List, + testIamPermissions( + params: Params$Resource$Regionnetworkfirewallpolicies$Testiampermissions, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Regionnetworkendpointgroups$List, - callback: BodyResponseCallback + testIamPermissions( + params: Params$Resource$Regionnetworkfirewallpolicies$Testiampermissions, + callback: BodyResponseCallback ): void; - list(callback: BodyResponseCallback): void; - list( + testIamPermissions( + callback: BodyResponseCallback + ): void; + testIamPermissions( paramsOrCallback?: - | Params$Resource$Regionnetworkendpointgroups$List - | BodyResponseCallback + | Params$Resource$Regionnetworkfirewallpolicies$Testiampermissions + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Regionnetworkendpointgroups$List; + {}) as Params$Resource$Regionnetworkfirewallpolicies$Testiampermissions; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Regionnetworkendpointgroups$List; + params = {} as Params$Resource$Regionnetworkfirewallpolicies$Testiampermissions; options = {}; } @@ -117138,42 +122005,46 @@ export namespace compute_alpha { { url: ( rootUrl + - '/compute/alpha/projects/{project}/regions/{region}/networkEndpointGroups' + '/compute/alpha/projects/{project}/regions/{region}/firewallPolicies/{resource}/testIamPermissions' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'GET', + method: 'POST', }, options ), params, - requiredParams: ['project', 'region'], - pathParams: ['project', 'region'], + requiredParams: ['project', 'region', 'resource'], + pathParams: ['project', 'region', 'resource'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } } - export interface Params$Resource$Regionnetworkendpointgroups$Delete + export interface Params$Resource$Regionnetworkfirewallpolicies$Addassociation extends StandardParameters { /** - * The name of the network endpoint group to delete. It should comply with RFC1035. + * Name of the firewall policy to update. */ - networkEndpointGroup?: string; + firewallPolicy?: string; /** * Project ID for this request. */ project?: string; /** - * The name of the region where the network endpoint group is located. It should comply with RFC1035. + * Name of the region scoping this request. */ region?: string; + /** + * Indicates whether or not to replace it if an association already exists. This is false by default, in which case an error will be returned if an association already exists. + */ + replaceExistingAssociation?: boolean; /** * 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. * @@ -117182,30 +122053,170 @@ export namespace compute_alpha { * The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). */ requestId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$FirewallPolicyAssociation; } - export interface Params$Resource$Regionnetworkendpointgroups$Get + export interface Params$Resource$Regionnetworkfirewallpolicies$Addrule extends StandardParameters { /** - * The name of the network endpoint group. It should comply with RFC1035. + * Name of the firewall policy to update. */ - networkEndpointGroup?: string; + firewallPolicy?: string; /** * Project ID for this request. */ project?: string; /** - * The name of the region where the network endpoint group is located. It should comply with RFC1035. + * Name of the region scoping this request. */ region?: string; + /** + * 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. + * + * 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; + + /** + * Request body metadata + */ + requestBody?: Schema$FirewallPolicyRule; } - export interface Params$Resource$Regionnetworkendpointgroups$Insert + export interface Params$Resource$Regionnetworkfirewallpolicies$Clonerules extends StandardParameters { + /** + * Name of the firewall policy to update. + */ + firewallPolicy?: string; /** * Project ID for this request. */ project?: string; /** - * The name of the region where you want to create the network endpoint group. It should comply with RFC1035. + * Name of the region scoping this request. + */ + region?: string; + /** + * 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. + * + * 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; + /** + * The firewall policy from which to copy rules. + */ + sourceFirewallPolicy?: string; + } + export interface Params$Resource$Regionnetworkfirewallpolicies$Delete + extends StandardParameters { + /** + * Name of the firewall policy to delete. + */ + firewallPolicy?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * Name of the region scoping this request. + */ + region?: string; + /** + * 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. + * + * 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; + } + export interface Params$Resource$Regionnetworkfirewallpolicies$Get + extends StandardParameters { + /** + * Name of the firewall policy to get. + */ + firewallPolicy?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * Name of the region scoping this request. + */ + region?: string; + } + export interface Params$Resource$Regionnetworkfirewallpolicies$Getassociation + extends StandardParameters { + /** + * Name of the firewall policy to which the queried association belongs. + */ + firewallPolicy?: string; + /** + * The name of the association to get from the firewall policy. + */ + name?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * Name of the region scoping this request. + */ + region?: string; + } + export interface Params$Resource$Regionnetworkfirewallpolicies$Getiampolicy + extends StandardParameters { + /** + * Requested IAM Policy version. + */ + optionsRequestedPolicyVersion?: number; + /** + * Project ID for this request. + */ + project?: string; + /** + * The name of the region for this request. + */ + region?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + } + export interface Params$Resource$Regionnetworkfirewallpolicies$Getrule + extends StandardParameters { + /** + * Name of the firewall policy to which the queried rule belongs. + */ + firewallPolicy?: string; + /** + * The priority of the rule to get from the firewall policy. + */ + priority?: number; + /** + * Project ID for this request. + */ + project?: string; + /** + * Name of the region scoping this request. + */ + region?: string; + } + export interface Params$Resource$Regionnetworkfirewallpolicies$Insert + extends StandardParameters { + /** + * Project ID for this request. + */ + project?: string; + /** + * Name of the region scoping this request. */ region?: string; /** @@ -117220,9 +122231,9 @@ export namespace compute_alpha { /** * Request body metadata */ - requestBody?: Schema$NetworkEndpointGroup; + requestBody?: Schema$FirewallPolicy; } - export interface Params$Resource$Regionnetworkendpointgroups$List + export interface Params$Resource$Regionnetworkfirewallpolicies$List extends StandardParameters { /** * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `\>`, or `<`. @@ -117255,7 +122266,7 @@ export namespace compute_alpha { */ project?: string; /** - * The name of the region where the network endpoint group is located. It should comply with RFC1035. + * Name of the region scoping this request. */ region?: string; /** @@ -117263,6 +122274,160 @@ export namespace compute_alpha { */ returnPartialSuccess?: boolean; } + export interface Params$Resource$Regionnetworkfirewallpolicies$Patch + extends StandardParameters { + /** + * Name of the firewall policy to update. + */ + firewallPolicy?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * Name of the region scoping this request. + */ + region?: string; + /** + * 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. + * + * 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; + + /** + * Request body metadata + */ + requestBody?: Schema$FirewallPolicy; + } + export interface Params$Resource$Regionnetworkfirewallpolicies$Patchrule + extends StandardParameters { + /** + * Name of the firewall policy to update. + */ + firewallPolicy?: string; + /** + * The priority of the rule to patch. + */ + priority?: number; + /** + * Project ID for this request. + */ + project?: string; + /** + * Name of the region scoping this request. + */ + region?: string; + /** + * 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. + * + * 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; + + /** + * Request body metadata + */ + requestBody?: Schema$FirewallPolicyRule; + } + export interface Params$Resource$Regionnetworkfirewallpolicies$Removeassociation + extends StandardParameters { + /** + * Name of the firewall policy to update. + */ + firewallPolicy?: string; + /** + * Name for the association that will be removed. + */ + name?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * Name of the region scoping this request. + */ + region?: string; + /** + * 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. + * + * 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; + } + export interface Params$Resource$Regionnetworkfirewallpolicies$Removerule + extends StandardParameters { + /** + * Name of the firewall policy to update. + */ + firewallPolicy?: string; + /** + * The priority of the rule to remove from the firewall policy. + */ + priority?: number; + /** + * Project ID for this request. + */ + project?: string; + /** + * Name of the region scoping this request. + */ + region?: string; + /** + * 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. + * + * 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; + } + export interface Params$Resource$Regionnetworkfirewallpolicies$Setiampolicy + extends StandardParameters { + /** + * Project ID for this request. + */ + project?: string; + /** + * The name of the region for this request. + */ + region?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$RegionSetPolicyRequest; + } + export interface Params$Resource$Regionnetworkfirewallpolicies$Testiampermissions + extends StandardParameters { + /** + * Project ID for this request. + */ + project?: string; + /** + * The name of the region for this request. + */ + region?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$TestPermissionsRequest; + } export class Resource$Regionnotificationendpoints { context: APIRequestContext; @@ -130273,6 +135438,7 @@ export namespace compute_alpha { * * // Example response * // { + * // "allowConflictingSubnetworks": false, * // "creationTimestamp": "my_creationTimestamp", * // "description": "my_description", * // "destRange": "my_destRange", @@ -130430,6 +135596,7 @@ export namespace compute_alpha { * requestBody: { * // request body parameters * // { + * // "allowConflictingSubnetworks": false, * // "creationTimestamp": "my_creationTimestamp", * // "description": "my_description", * // "destRange": "my_destRange", @@ -131036,6 +136203,7 @@ export namespace compute_alpha { * // "description": "my_description", * // "direction": "my_direction", * // "enableLogging": false, + * // "headerAction": {}, * // "kind": "my_kind", * // "match": {}, * // "preview": false, @@ -131539,6 +136707,7 @@ export namespace compute_alpha { * // "description": "my_description", * // "direction": "my_direction", * // "enableLogging": false, + * // "headerAction": {}, * // "kind": "my_kind", * // "match": {}, * // "preview": false, @@ -132399,6 +137568,7 @@ export namespace compute_alpha { * // "description": "my_description", * // "direction": "my_direction", * // "enableLogging": false, + * // "headerAction": {}, * // "kind": "my_kind", * // "match": {}, * // "preview": false, diff --git a/src/apis/compute/beta.ts b/src/apis/compute/beta.ts index a7352f0e470..91fd0dcc8f0 100644 --- a/src/apis/compute/beta.ts +++ b/src/apis/compute/beta.ts @@ -1526,7 +1526,7 @@ export namespace compute_beta { */ export interface Schema$BackendBucketCdnPolicyNegativeCachingPolicy { /** - * The HTTP status code to define a TTL against. Only HTTP status codes 300, 301, 308, 404, 405, 410, 421, 451 and 501 are can be specified as values, and you cannot specify a status code more than once. + * The HTTP status code to define a TTL against. Only HTTP status codes 300, 301, 302, 307, 308, 404, 405, 410, 421, 451 and 501 are can be specified as values, and you cannot specify a status code more than once. */ code?: number | null; /** @@ -1691,6 +1691,12 @@ export namespace compute_beta { * This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver. */ logConfig?: Schema$BackendServiceLogConfig; + /** + * Specifies the default maximum duration (timeout) for streams to this service. Duration is computed from the beginning of the stream until the response has been completely processed, including all retries. A stream that does not complete in this duration is closed. + * If not specified, there will be no timeout limit, i.e. the maximum duration is infinite. + * This field is only allowed when the loadBalancingScheme of the backend service is INTERNAL_SELF_MANAGED. + */ + maxStreamDuration?: Schema$Duration; /** * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. */ @@ -1877,7 +1883,7 @@ export namespace compute_beta { */ export interface Schema$BackendServiceCdnPolicyNegativeCachingPolicy { /** - * The HTTP status code to define a TTL against. Only HTTP status codes 300, 301, 308, 404, 405, 410, 421, 451 and 501 are can be specified as values, and you cannot specify a status code more than once. + * The HTTP status code to define a TTL against. Only HTTP status codes 300, 301, 302, 307, 308, 404, 405, 410, 421, 451 and 501 are can be specified as values, and you cannot specify a status code more than once. */ code?: number | null; /** @@ -3550,7 +3556,7 @@ export namespace compute_beta { */ description?: string | null; /** - * User-provided name of the Organization firewall plicy. The name should be unique in the organization in which the firewall policy is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. + * Depreacted, please use short name instead. User-provided name of the Organization firewall plicy. The name should be unique in the organization in which the firewall policy is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. */ displayName?: string | null; /** @@ -3591,6 +3597,10 @@ export namespace compute_beta { * [Output Only] Server-defined URL for this resource with the resource id. */ selfLinkWithId?: string | null; + /** + * User-provided name of the Organization firewall plicy. The name should be unique in the organization in which the firewall policy is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. + */ + shortName?: string | null; } export interface Schema$FirewallPolicyAssociation { /** @@ -3598,7 +3608,7 @@ export namespace compute_beta { */ attachmentTarget?: string | null; /** - * [Output Only] The display name of the firewall policy of the association. + * [Output Only] Deprecated, please use short name instead. The display name of the firewall policy of the association. */ displayName?: string | null; /** @@ -3609,6 +3619,10 @@ export namespace compute_beta { * The name for an association. */ name?: string | null; + /** + * [Output Only] The short name of the firewall policy of the association. + */ + shortName?: string | null; } export interface Schema$FirewallPolicyList { /** @@ -4966,6 +4980,12 @@ export namespace compute_beta { * Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true. */ faultInjectionPolicy?: Schema$HttpFaultInjection; + /** + * Specifies the maximum duration (timeout) for streams on the selected route. Unlike the timeout field where the timeout duration starts from the time the request has been fully processed (i.e. end-of-stream), the duration in this field is computed from the beginning of the stream until the response has been completely processed, including all retries. A stream that does not complete in this duration is closed. + * If not specified, will use the largest maxStreamDuration among all backend services associated with the route. + * This field is only allowed if the Url map is used with backend services with loadBalancingScheme set to INTERNAL_SELF_MANAGED. + */ + maxStreamDuration?: Schema$Duration; /** * Specifies the policy on how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. * Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true. @@ -6604,7 +6624,7 @@ export namespace compute_beta { } export interface Schema$InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy { /** - * [Output Only] The display name of the firewall policy. + * [Output Only] Deprecated, please use short name instead. The display name of the firewall policy. */ displayName?: string | null; /** @@ -6615,6 +6635,10 @@ export namespace compute_beta { * The rules that apply to the network. */ rules?: Schema$FirewallPolicyRule[]; + /** + * [Output Only] The short name of the firewall policy. + */ + shortName?: string | null; /** * [Output Only] The type of the firewall policy. */ @@ -7001,6 +7025,12 @@ export namespace compute_beta { * - AVAILABILITY_DOMAIN_2 For improved reliability, customers should configure a pair of attachments, one per availability domain. The selected availability domain will be provided to the Partner via the pairing key, so that the provisioned circuit will lie in the specified domain. If not specified, the value will default to AVAILABILITY_DOMAIN_ANY. */ edgeAvailabilityDomain?: string | null; + /** + * Indicates the user-supplied encryption option of this interconnect attachment: + * - NONE is the default value, which means that the attachment carries unencrypted traffic. VMs can send traffic to, or receive traffic from, this type of attachment. + * - IPSEC indicates that the attachment carries only traffic encrypted by an IPsec device such as an HA VPN gateway. VMs cannot directly send traffic to, or receive traffic from, such an attachment. To use IPsec-encrypted Cloud Interconnect, create the attachment using this option. + */ + encryption?: string | null; /** * [Output Only] Google reference ID, to be used when raising support tickets with Google or otherwise to debug backend connectivity issues. [Deprecated] This field is not used. */ @@ -7013,6 +7043,10 @@ export namespace compute_beta { * URL of the underlying Interconnect object that this attachment's traffic will traverse through. */ interconnect?: string | null; + /** + * URL of addresses that have been reserved for the interconnect attachment, Used only for interconnect attachment that has the encryption option as IPSEC. The addresses must be RFC 1918 IP address ranges. When creating HA VPN gateway over the interconnect attachment, if the attachment is configured to use an RFC 1918 IP address, then the VPN gateway?s IP address will be allocated from the IP address range specified here. For example, if the HA VPN gateway?s interface 0 is paired to this interconnect attachment, then an RFC 1918 IP address for the VPN gateway interface 0 will be allocated from the IP address specified for this interconnect attachment. If this field is not specified for interconnect attachment that has encryption option as IPSEC, later on when creating HA VPN gateway on this interconnect attachment, the HA VPN gateway's IP address will be allocated from regional external IP address pool. + */ + ipsecInternalAddresses?: string[] | null; /** * [Output Only] Type of the resource. Always compute#interconnectAttachment for interconnect attachments. */ @@ -8743,7 +8777,7 @@ export namespace compute_beta { } export interface Schema$NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy { /** - * [Output Only] The display name of the firewall policy. + * [Output Only] Deprecated, please use short name instead. The display name of the firewall policy. */ displayName?: string | null; /** @@ -8754,6 +8788,10 @@ export namespace compute_beta { * The rules that apply to the network. */ rules?: Schema$FirewallPolicyRule[]; + /** + * [Output Only] The short name of the firewall policy. + */ + shortName?: string | null; /** * [Output Only] The type of the firewall policy. */ @@ -11656,6 +11694,10 @@ export namespace compute_beta { * An optional description of this resource. Provide this property when you create the resource. */ description?: string | null; + /** + * Field to indicate if a router is dedicated to use with encrypted Interconnect Attachment (IPsec-encrypted Cloud Interconnect feature). + */ + encryptedInterconnectRouter?: boolean | null; /** * [Output Only] The unique identifier for the resource. This identifier is defined by the server. */ @@ -11761,7 +11803,7 @@ export namespace compute_beta { * Not currently available publicly. * Hold time is three times the interval at which keepalive messages are sent, and the hold time is the maximum number of seconds allowed to elapse between successive keepalive messages that BGP receives from a peer. * BGP will use the smaller of either the local hold time value or the peer's hold time value as the hold time for the BGP connection between the two peers. - * If set, this value must be between 1 and 120. The default is 20. + * If set, this value must be between 20 and 60. The default is 20. */ keepaliveInterval?: number | null; } @@ -11769,8 +11811,7 @@ export namespace compute_beta { /** * User-specified list of prefix groups to advertise in custom mode, which can take one of the following options: * - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets. - * - ALL_VPC_SUBNETS: Advertises the router's own VPC subnets. - * - ALL_PEER_VPC_SUBNETS: Advertises peer subnets of the router's VPC network. Note that this field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the "bgp" message). These groups are advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups. + * - ALL_VPC_SUBNETS: Advertises the router's own VPC subnets. Note that this field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the "bgp" message). These groups are advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups. */ advertisedGroups?: string[] | null; /** @@ -11822,6 +11863,10 @@ export namespace compute_beta { * IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported. */ peerIpAddress?: string | null; + /** + * URI of the VM instance that is used as third-party router appliances such as Next Gen Firewalls, Virtual Routers, or Router Appliances. The VM instance must be located in zones contained in the same region as this Cloud Router. The VM instance is the peer side of the BGP session. + */ + routerApplianceInstance?: string | null; } export interface Schema$RouterBgpPeerBfd { /** @@ -11875,6 +11920,18 @@ export namespace compute_beta { * Name of this interface entry. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. */ name?: string | null; + /** + * The regional private internal IP address that is used to establish BGP sessions to a VM instance acting as a third-party Router Appliance, such as a Next Gen Firewall, a Virtual Router, or an SD-WAN VM. + */ + privateIpAddress?: string | null; + /** + * Name of the interface that will be redundant with the current interface you are creating. The redundantInterface must belong to the same Cloud Router as the interface here. To establish the BGP session to a Router Appliance VM, you must create two BGP peers. The two BGP peers must be attached to two separate interfaces that are redundant with each other. The redundant_interface must be 1-63 characters long, and comply with RFC1035. Specifically, the redundant_interface must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. + */ + redundantInterface?: string | null; + /** + * The URL of the subnetwork resource that this interface belongs to, which must be in the same region as the Cloud Router. When you establish a BGP session to a VM instance using this interface, the VM instance must belong to the same subnetwork as the subnetwork specified here. + */ + subnetwork?: string | null; } /** * Contains a list of Router resources. @@ -12063,6 +12120,10 @@ export namespace compute_beta { * IP address of the remote BGP interface. */ peerIpAddress?: string | null; + /** + * [Output only] URI of the VM instance that is used as third-party router appliances such as Next Gen Firewalls, Virtual Routers, or Router Appliances. The VM instance is the peer side of the BGP session. + */ + routerApplianceInstance?: string | null; /** * BGP state as specified in RFC1771. */ @@ -12241,7 +12302,7 @@ export namespace compute_beta { state?: string | null; } /** - * Sets the scheduling options for an Instance. NextID: 17 + * Sets the scheduling options for an Instance. NextID: 20 */ export interface Schema$Scheduling { /** @@ -12625,7 +12686,7 @@ export namespace compute_beta { /** * Represents a ServiceAttachment resource. * - * A service attachment represents a service that a producer has exposed. It encapsulates the load balancer which fronts the service runs and a list of NAT IP ranges that the producers uses to represent the consumers connecting to the service. next tag = 16 + * A service attachment represents a service that a producer has exposed. It encapsulates the load balancer which fronts the service runs and a list of NAT IP ranges that the producers uses to represent the consumers connecting to the service. next tag = 17 */ export interface Schema$ServiceAttachment { /** @@ -15488,6 +15549,10 @@ export namespace compute_beta { * The numeric ID of this VPN gateway interface. */ id?: number | null; + /** + * URL of the interconnect attachment resource. When the value of this field is present, the VPN Gateway will be used for IPsec-encrypted Cloud Interconnect; all Egress or Ingress traffic for this VPN Gateway interface will go through the specified interconnect attachment resource. + */ + interconnectAttachment?: string | null; /** * [Output Only] The external IP address for this VPN gateway interface. */ @@ -20073,185 +20138,7 @@ export namespace compute_beta { } /** - * Creates a BackendBucket resource in the specified project using the data included in the request. - * @example - * ```js - * // Before running the sample: - * // - Enable the API at: - * // https://console.developers.google.com/apis/api/compute.googleapis.com - * // - Login into gcloud by running: - * // `$ gcloud auth application-default login` - * // - Install the npm module by running: - * // `$ npm install googleapis` - * - * const {google} = require('googleapis'); - * const compute = google.compute('beta'); - * - * async function main() { - * const auth = new google.auth.GoogleAuth({ - * // Scopes can be specified either as an array or as a single, space-delimited string. - * scopes: [ - * 'https://www.googleapis.com/auth/cloud-platform', - * 'https://www.googleapis.com/auth/compute', - * ], - * }); - * - * // Acquire an auth client, and bind it to all future calls - * const authClient = await auth.getClient(); - * google.options({auth: authClient}); - * - * // Do the magic - * const res = await compute.backendBuckets.insert({ - * // Project ID for this request. - * project: - * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // 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. - * // - * // 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: 'placeholder-value', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "bucketName": "my_bucketName", - * // "cdnPolicy": {}, - * // "creationTimestamp": "my_creationTimestamp", - * // "customResponseHeaders": [], - * // "description": "my_description", - * // "enableCdn": false, - * // "id": "my_id", - * // "kind": "my_kind", - * // "name": "my_name", - * // "selfLink": "my_selfLink" - * // } - * }, - * }); - * console.log(res.data); - * - * // Example response - * // { - * // "clientOperationId": "my_clientOperationId", - * // "creationTimestamp": "my_creationTimestamp", - * // "description": "my_description", - * // "endTime": "my_endTime", - * // "error": {}, - * // "httpErrorMessage": "my_httpErrorMessage", - * // "httpErrorStatusCode": 0, - * // "id": "my_id", - * // "insertTime": "my_insertTime", - * // "kind": "my_kind", - * // "name": "my_name", - * // "operationGroupId": "my_operationGroupId", - * // "operationType": "my_operationType", - * // "progress": 0, - * // "region": "my_region", - * // "selfLink": "my_selfLink", - * // "startTime": "my_startTime", - * // "status": "my_status", - * // "statusMessage": "my_statusMessage", - * // "targetId": "my_targetId", - * // "targetLink": "my_targetLink", - * // "user": "my_user", - * // "warnings": [], - * // "zone": "my_zone" - * // } - * } - * - * main().catch(e => { - * console.error(e); - * throw e; - * }); - * - * ``` - * - * @param params - Parameters for request - * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. - * @param callback - Optional callback that handles the response. - * @returns A promise if used with async/await, or void if used with a callback. - */ - insert( - params: Params$Resource$Backendbuckets$Insert, - options: StreamMethodOptions - ): GaxiosPromise; - insert( - params?: Params$Resource$Backendbuckets$Insert, - options?: MethodOptions - ): GaxiosPromise; - insert( - params: Params$Resource$Backendbuckets$Insert, - options: StreamMethodOptions | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - insert( - params: Params$Resource$Backendbuckets$Insert, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - insert( - params: Params$Resource$Backendbuckets$Insert, - callback: BodyResponseCallback - ): void; - insert(callback: BodyResponseCallback): void; - insert( - paramsOrCallback?: - | Params$Resource$Backendbuckets$Insert - | BodyResponseCallback - | BodyResponseCallback, - optionsOrCallback?: - | MethodOptions - | StreamMethodOptions - | BodyResponseCallback - | BodyResponseCallback, - callback?: - | BodyResponseCallback - | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { - let params = (paramsOrCallback || - {}) as Params$Resource$Backendbuckets$Insert; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Backendbuckets$Insert; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: ( - rootUrl + '/compute/beta/projects/{project}/global/backendBuckets' - ).replace(/([^:]\/)\/+/g, '$1'), - method: 'POST', - }, - options - ), - params, - requiredParams: ['project'], - pathParams: ['project'], - context: this.context, - }; - if (callback) { - createAPIRequest( - parameters, - callback as BodyResponseCallback - ); - } else { - return createAPIRequest(parameters); - } - } - - /** - * Retrieves the list of BackendBucket resources available to the specified project. + * Gets the access control policy for a resource. May be empty if no such policy or resource exists. * @example * ```js * // Before running the sample: @@ -20280,41 +20167,25 @@ export namespace compute_beta { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.backendBuckets.list({ - * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. - * // - * // 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) ``` - * filter: 'placeholder-value', - * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) - * maxResults: 'placeholder-value', - * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. - * // - * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. - * // - * // Currently, only sorting by `name` or `creationTimestamp desc` is supported. - * orderBy: 'placeholder-value', - * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. - * pageToken: 'placeholder-value', + * const res = await compute.backendBuckets.getIamPolicy({ + * // Requested IAM Policy version. + * optionsRequestedPolicyVersion: 'placeholder-value', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. - * returnPartialSuccess: 'placeholder-value', + * // Name or id of the resource for this request. + * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * }); * console.log(res.data); * * // Example response * // { - * // "id": "my_id", - * // "items": [], - * // "kind": "my_kind", - * // "nextPageToken": "my_nextPageToken", - * // "selfLink": "my_selfLink", - * // "warning": {} + * // "auditConfigs": [], + * // "bindings": [], + * // "etag": "my_etag", + * // "iamOwned": false, + * // "rules": [], + * // "version": 0 * // } * } * @@ -20330,53 +20201,50 @@ export namespace compute_beta { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - list( - params: Params$Resource$Backendbuckets$List, + getIamPolicy( + params: Params$Resource$Backendbuckets$Getiampolicy, options: StreamMethodOptions ): GaxiosPromise; - list( - params?: Params$Resource$Backendbuckets$List, + getIamPolicy( + params?: Params$Resource$Backendbuckets$Getiampolicy, options?: MethodOptions - ): GaxiosPromise; - list( - params: Params$Resource$Backendbuckets$List, + ): GaxiosPromise; + getIamPolicy( + params: Params$Resource$Backendbuckets$Getiampolicy, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Backendbuckets$List, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + getIamPolicy( + params: Params$Resource$Backendbuckets$Getiampolicy, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Backendbuckets$List, - callback: BodyResponseCallback + getIamPolicy( + params: Params$Resource$Backendbuckets$Getiampolicy, + callback: BodyResponseCallback ): void; - list(callback: BodyResponseCallback): void; - list( + getIamPolicy(callback: BodyResponseCallback): void; + getIamPolicy( paramsOrCallback?: - | Params$Resource$Backendbuckets$List - | BodyResponseCallback + | Params$Resource$Backendbuckets$Getiampolicy + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): - | void - | GaxiosPromise - | GaxiosPromise { + ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Backendbuckets$List; + {}) as Params$Resource$Backendbuckets$Getiampolicy; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Backendbuckets$List; + params = {} as Params$Resource$Backendbuckets$Getiampolicy; options = {}; } @@ -20390,29 +20258,369 @@ export namespace compute_beta { options: Object.assign( { url: ( - rootUrl + '/compute/beta/projects/{project}/global/backendBuckets' + rootUrl + + '/compute/beta/projects/{project}/global/backendBuckets/{resource}/getIamPolicy' ).replace(/([^:]\/)\/+/g, '$1'), method: 'GET', }, options ), params, - requiredParams: ['project'], - pathParams: ['project'], + requiredParams: ['project', 'resource'], + pathParams: ['project', 'resource'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Updates the specified BackendBucket resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. + * Creates a BackendBucket resource in the specified project using the data included in the request. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('beta'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.backendBuckets.insert({ + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // 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. + * // + * // 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: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "bucketName": "my_bucketName", + * // "cdnPolicy": {}, + * // "creationTimestamp": "my_creationTimestamp", + * // "customResponseHeaders": [], + * // "description": "my_description", + * // "enableCdn": false, + * // "id": "my_id", + * // "kind": "my_kind", + * // "name": "my_name", + * // "selfLink": "my_selfLink" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "clientOperationId": "my_clientOperationId", + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "endTime": "my_endTime", + * // "error": {}, + * // "httpErrorMessage": "my_httpErrorMessage", + * // "httpErrorStatusCode": 0, + * // "id": "my_id", + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "name": "my_name", + * // "operationGroupId": "my_operationGroupId", + * // "operationType": "my_operationType", + * // "progress": 0, + * // "region": "my_region", + * // "selfLink": "my_selfLink", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "statusMessage": "my_statusMessage", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "user": "my_user", + * // "warnings": [], + * // "zone": "my_zone" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + insert( + params: Params$Resource$Backendbuckets$Insert, + options: StreamMethodOptions + ): GaxiosPromise; + insert( + params?: Params$Resource$Backendbuckets$Insert, + options?: MethodOptions + ): GaxiosPromise; + insert( + params: Params$Resource$Backendbuckets$Insert, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + insert( + params: Params$Resource$Backendbuckets$Insert, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + insert( + params: Params$Resource$Backendbuckets$Insert, + callback: BodyResponseCallback + ): void; + insert(callback: BodyResponseCallback): void; + insert( + paramsOrCallback?: + | Params$Resource$Backendbuckets$Insert + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Backendbuckets$Insert; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Backendbuckets$Insert; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + '/compute/beta/projects/{project}/global/backendBuckets' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project'], + pathParams: ['project'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Retrieves the list of BackendBucket resources available to the specified project. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('beta'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.backendBuckets.list({ + * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. + * // + * // 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) ``` + * filter: 'placeholder-value', + * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * maxResults: 'placeholder-value', + * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * // + * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. + * // + * // Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * orderBy: 'placeholder-value', + * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * pageToken: 'placeholder-value', + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + * returnPartialSuccess: 'placeholder-value', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "id": "my_id", + * // "items": [], + * // "kind": "my_kind", + * // "nextPageToken": "my_nextPageToken", + * // "selfLink": "my_selfLink", + * // "warning": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Backendbuckets$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Backendbuckets$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Backendbuckets$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Backendbuckets$List, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Backendbuckets$List, + callback: BodyResponseCallback + ): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: + | Params$Resource$Backendbuckets$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Backendbuckets$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Backendbuckets$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + '/compute/beta/projects/{project}/global/backendBuckets' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['project'], + pathParams: ['project'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Updates the specified BackendBucket resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. * @example * ```js * // Before running the sample: @@ -20592,6 +20800,307 @@ export namespace compute_beta { } } + /** + * Sets the access control policy on the specified resource. Replaces any existing policy. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('beta'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.backendBuckets.setIamPolicy({ + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // Name or id of the resource for this request. + * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "bindings": [], + * // "etag": "my_etag", + * // "policy": {} + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "auditConfigs": [], + * // "bindings": [], + * // "etag": "my_etag", + * // "iamOwned": false, + * // "rules": [], + * // "version": 0 + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + setIamPolicy( + params: Params$Resource$Backendbuckets$Setiampolicy, + options: StreamMethodOptions + ): GaxiosPromise; + setIamPolicy( + params?: Params$Resource$Backendbuckets$Setiampolicy, + options?: MethodOptions + ): GaxiosPromise; + setIamPolicy( + params: Params$Resource$Backendbuckets$Setiampolicy, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + setIamPolicy( + params: Params$Resource$Backendbuckets$Setiampolicy, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + setIamPolicy( + params: Params$Resource$Backendbuckets$Setiampolicy, + callback: BodyResponseCallback + ): void; + setIamPolicy(callback: BodyResponseCallback): void; + setIamPolicy( + paramsOrCallback?: + | Params$Resource$Backendbuckets$Setiampolicy + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Backendbuckets$Setiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Backendbuckets$Setiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/beta/projects/{project}/global/backendBuckets/{resource}/setIamPolicy' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'resource'], + pathParams: ['project', 'resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Returns permissions that a caller has on the specified resource. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('beta'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.backendBuckets.testIamPermissions({ + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // Name or id of the resource for this request. + * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "permissions": [] + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "permissions": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + testIamPermissions( + params: Params$Resource$Backendbuckets$Testiampermissions, + options: StreamMethodOptions + ): GaxiosPromise; + testIamPermissions( + params?: Params$Resource$Backendbuckets$Testiampermissions, + options?: MethodOptions + ): GaxiosPromise; + testIamPermissions( + params: Params$Resource$Backendbuckets$Testiampermissions, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + testIamPermissions( + params: Params$Resource$Backendbuckets$Testiampermissions, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + testIamPermissions( + params: Params$Resource$Backendbuckets$Testiampermissions, + callback: BodyResponseCallback + ): void; + testIamPermissions( + callback: BodyResponseCallback + ): void; + testIamPermissions( + paramsOrCallback?: + | Params$Resource$Backendbuckets$Testiampermissions + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Backendbuckets$Testiampermissions; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Backendbuckets$Testiampermissions; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/beta/projects/{project}/global/backendBuckets/{resource}/testIamPermissions' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'resource'], + pathParams: ['project', 'resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + /** * Updates the specified BackendBucket resource with the data included in the request. * @example @@ -20851,6 +21360,21 @@ export namespace compute_beta { */ project?: string; } + export interface Params$Resource$Backendbuckets$Getiampolicy + extends StandardParameters { + /** + * Requested IAM Policy version. + */ + optionsRequestedPolicyVersion?: number; + /** + * Project ID for this request. + */ + project?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + } export interface Params$Resource$Backendbuckets$Insert extends StandardParameters { /** @@ -20932,6 +21456,38 @@ export namespace compute_beta { */ requestBody?: Schema$BackendBucket; } + export interface Params$Resource$Backendbuckets$Setiampolicy + extends StandardParameters { + /** + * Project ID for this request. + */ + project?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GlobalSetPolicyRequest; + } + export interface Params$Resource$Backendbuckets$Testiampermissions + extends StandardParameters { + /** + * Project ID for this request. + */ + project?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$TestPermissionsRequest; + } export interface Params$Resource$Backendbuckets$Update extends StandardParameters { /** @@ -21699,6 +22255,7 @@ export namespace compute_beta { * // "loadBalancingScheme": "my_loadBalancingScheme", * // "localityLbPolicy": "my_localityLbPolicy", * // "logConfig": {}, + * // "maxStreamDuration": {}, * // "name": "my_name", * // "network": "my_network", * // "outlierDetection": {}, @@ -22028,6 +22585,7 @@ export namespace compute_beta { * // "loadBalancingScheme": "my_loadBalancingScheme", * // "localityLbPolicy": "my_localityLbPolicy", * // "logConfig": {}, + * // "maxStreamDuration": {}, * // "name": "my_name", * // "network": "my_network", * // "outlierDetection": {}, @@ -22395,6 +22953,7 @@ export namespace compute_beta { * // "loadBalancingScheme": "my_loadBalancingScheme", * // "localityLbPolicy": "my_localityLbPolicy", * // "logConfig": {}, + * // "maxStreamDuration": {}, * // "name": "my_name", * // "network": "my_network", * // "outlierDetection": {}, @@ -22923,6 +23482,7 @@ export namespace compute_beta { * // "loadBalancingScheme": "my_loadBalancingScheme", * // "localityLbPolicy": "my_localityLbPolicy", * // "logConfig": {}, + * // "maxStreamDuration": {}, * // "name": "my_name", * // "network": "my_network", * // "outlierDetection": {}, @@ -27652,7 +28212,8 @@ export namespace compute_beta { * // "attachmentTarget": "my_attachmentTarget", * // "displayName": "my_displayName", * // "firewallPolicyId": "my_firewallPolicyId", - * // "name": "my_name" + * // "name": "my_name", + * // "shortName": "my_shortName" * // } * }, * }); @@ -28332,7 +28893,8 @@ export namespace compute_beta { * // "ruleTupleCount": 0, * // "rules": [], * // "selfLink": "my_selfLink", - * // "selfLinkWithId": "my_selfLinkWithId" + * // "selfLinkWithId": "my_selfLinkWithId", + * // "shortName": "my_shortName" * // } * } * @@ -28470,7 +29032,8 @@ export namespace compute_beta { * // "attachmentTarget": "my_attachmentTarget", * // "displayName": "my_displayName", * // "firewallPolicyId": "my_firewallPolicyId", - * // "name": "my_name" + * // "name": "my_name", + * // "shortName": "my_shortName" * // } * } * @@ -28916,7 +29479,8 @@ export namespace compute_beta { * // "ruleTupleCount": 0, * // "rules": [], * // "selfLink": "my_selfLink", - * // "selfLinkWithId": "my_selfLinkWithId" + * // "selfLinkWithId": "my_selfLinkWithId", + * // "shortName": "my_shortName" * // } * }, * }); @@ -29560,7 +30124,8 @@ export namespace compute_beta { * // "ruleTupleCount": 0, * // "rules": [], * // "selfLink": "my_selfLink", - * // "selfLinkWithId": "my_selfLinkWithId" + * // "selfLinkWithId": "my_selfLinkWithId", + * // "shortName": "my_shortName" * // } * }, * }); @@ -64720,9 +65285,11 @@ export namespace compute_beta { * // "dataplaneVersion": 0, * // "description": "my_description", * // "edgeAvailabilityDomain": "my_edgeAvailabilityDomain", + * // "encryption": "my_encryption", * // "googleReferenceId": "my_googleReferenceId", * // "id": "my_id", * // "interconnect": "my_interconnect", + * // "ipsecInternalAddresses": [], * // "kind": "my_kind", * // "labelFingerprint": "my_labelFingerprint", * // "labels": {}, @@ -64895,9 +65462,11 @@ export namespace compute_beta { * // "dataplaneVersion": 0, * // "description": "my_description", * // "edgeAvailabilityDomain": "my_edgeAvailabilityDomain", + * // "encryption": "my_encryption", * // "googleReferenceId": "my_googleReferenceId", * // "id": "my_id", * // "interconnect": "my_interconnect", + * // "ipsecInternalAddresses": [], * // "kind": "my_kind", * // "labelFingerprint": "my_labelFingerprint", * // "labels": {}, @@ -65265,9 +65834,11 @@ export namespace compute_beta { * // "dataplaneVersion": 0, * // "description": "my_description", * // "edgeAvailabilityDomain": "my_edgeAvailabilityDomain", + * // "encryption": "my_encryption", * // "googleReferenceId": "my_googleReferenceId", * // "id": "my_id", * // "interconnect": "my_interconnect", + * // "ipsecInternalAddresses": [], * // "kind": "my_kind", * // "labelFingerprint": "my_labelFingerprint", * // "labels": {}, @@ -67979,6 +68550,157 @@ export namespace compute_beta { return createAPIRequest(parameters); } } + + /** + * Returns permissions that a caller has on the specified resource. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('beta'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.licenseCodes.testIamPermissions({ + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // Name or id of the resource for this request. + * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "permissions": [] + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "permissions": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + testIamPermissions( + params: Params$Resource$Licensecodes$Testiampermissions, + options: StreamMethodOptions + ): GaxiosPromise; + testIamPermissions( + params?: Params$Resource$Licensecodes$Testiampermissions, + options?: MethodOptions + ): GaxiosPromise; + testIamPermissions( + params: Params$Resource$Licensecodes$Testiampermissions, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + testIamPermissions( + params: Params$Resource$Licensecodes$Testiampermissions, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + testIamPermissions( + params: Params$Resource$Licensecodes$Testiampermissions, + callback: BodyResponseCallback + ): void; + testIamPermissions( + callback: BodyResponseCallback + ): void; + testIamPermissions( + paramsOrCallback?: + | Params$Resource$Licensecodes$Testiampermissions + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Licensecodes$Testiampermissions; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Licensecodes$Testiampermissions; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/beta/projects/{project}/global/licenseCodes/{resource}/testIamPermissions' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'resource'], + pathParams: ['project', 'resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } } export interface Params$Resource$Licensecodes$Get extends StandardParameters { @@ -67991,6 +68713,22 @@ export namespace compute_beta { */ project?: string; } + export interface Params$Resource$Licensecodes$Testiampermissions + extends StandardParameters { + /** + * Project ID for this request. + */ + project?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$TestPermissionsRequest; + } export class Resource$Licenses { context: APIRequestContext; @@ -68938,6 +69676,157 @@ export namespace compute_beta { return createAPIRequest(parameters); } } + + /** + * Returns permissions that a caller has on the specified resource. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('beta'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.licenses.testIamPermissions({ + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // Name or id of the resource for this request. + * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "permissions": [] + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "permissions": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + testIamPermissions( + params: Params$Resource$Licenses$Testiampermissions, + options: StreamMethodOptions + ): GaxiosPromise; + testIamPermissions( + params?: Params$Resource$Licenses$Testiampermissions, + options?: MethodOptions + ): GaxiosPromise; + testIamPermissions( + params: Params$Resource$Licenses$Testiampermissions, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + testIamPermissions( + params: Params$Resource$Licenses$Testiampermissions, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + testIamPermissions( + params: Params$Resource$Licenses$Testiampermissions, + callback: BodyResponseCallback + ): void; + testIamPermissions( + callback: BodyResponseCallback + ): void; + testIamPermissions( + paramsOrCallback?: + | Params$Resource$Licenses$Testiampermissions + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Licenses$Testiampermissions; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Licenses$Testiampermissions; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/beta/projects/{project}/global/licenses/{resource}/testIamPermissions' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'resource'], + pathParams: ['project', 'resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } } export interface Params$Resource$Licenses$Delete extends StandardParameters { @@ -69054,6 +69943,22 @@ export namespace compute_beta { */ requestBody?: Schema$GlobalSetPolicyRequest; } + export interface Params$Resource$Licenses$Testiampermissions + extends StandardParameters { + /** + * Project ID for this request. + */ + project?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$TestPermissionsRequest; + } export class Resource$Machineimages { context: APIRequestContext; @@ -89891,6 +90796,7 @@ export namespace compute_beta { * // "loadBalancingScheme": "my_loadBalancingScheme", * // "localityLbPolicy": "my_localityLbPolicy", * // "logConfig": {}, + * // "maxStreamDuration": {}, * // "name": "my_name", * // "network": "my_network", * // "outlierDetection": {}, @@ -90220,6 +91126,7 @@ export namespace compute_beta { * // "loadBalancingScheme": "my_loadBalancingScheme", * // "localityLbPolicy": "my_localityLbPolicy", * // "logConfig": {}, + * // "maxStreamDuration": {}, * // "name": "my_name", * // "network": "my_network", * // "outlierDetection": {}, @@ -90591,6 +91498,7 @@ export namespace compute_beta { * // "loadBalancingScheme": "my_loadBalancingScheme", * // "localityLbPolicy": "my_localityLbPolicy", * // "logConfig": {}, + * // "maxStreamDuration": {}, * // "name": "my_name", * // "network": "my_network", * // "outlierDetection": {}, @@ -90951,6 +91859,7 @@ export namespace compute_beta { * // "loadBalancingScheme": "my_loadBalancingScheme", * // "localityLbPolicy": "my_localityLbPolicy", * // "logConfig": {}, + * // "maxStreamDuration": {}, * // "name": "my_name", * // "network": "my_network", * // "outlierDetection": {}, @@ -91837,43 +92746,189 @@ export namespace compute_beta { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.regionCommitments.list({ - * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. - * // - * // 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) ``` - * filter: 'placeholder-value', - * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) - * maxResults: 'placeholder-value', - * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. - * // - * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. - * // - * // Currently, only sorting by `name` or `creationTimestamp desc` is supported. - * orderBy: 'placeholder-value', - * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. - * pageToken: 'placeholder-value', + * const res = await compute.regionCommitments.list({ + * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. + * // + * // 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) ``` + * filter: 'placeholder-value', + * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * maxResults: 'placeholder-value', + * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * // + * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. + * // + * // Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * orderBy: 'placeholder-value', + * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * pageToken: 'placeholder-value', + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // Name of the region for this request. + * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + * returnPartialSuccess: 'placeholder-value', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "id": "my_id", + * // "items": [], + * // "kind": "my_kind", + * // "nextPageToken": "my_nextPageToken", + * // "selfLink": "my_selfLink", + * // "warning": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Regioncommitments$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Regioncommitments$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Regioncommitments$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Regioncommitments$List, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Regioncommitments$List, + callback: BodyResponseCallback + ): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: + | Params$Resource$Regioncommitments$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Regioncommitments$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Regioncommitments$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/beta/projects/{project}/regions/{region}/commitments' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['project', 'region'], + pathParams: ['project', 'region'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Returns permissions that a caller has on the specified resource. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('beta'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.regionCommitments.testIamPermissions({ * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // Name of the region for this request. + * // The name of the region for this request. * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', - * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. - * returnPartialSuccess: 'placeholder-value', + * // Name or id of the resource for this request. + * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "permissions": [] + * // } + * }, * }); * console.log(res.data); * * // Example response * // { - * // "id": "my_id", - * // "items": [], - * // "kind": "my_kind", - * // "nextPageToken": "my_nextPageToken", - * // "selfLink": "my_selfLink", - * // "warning": {} + * // "permissions": [] * // } * } * @@ -91889,50 +92944,57 @@ export namespace compute_beta { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - list( - params: Params$Resource$Regioncommitments$List, + testIamPermissions( + params: Params$Resource$Regioncommitments$Testiampermissions, options: StreamMethodOptions ): GaxiosPromise; - list( - params?: Params$Resource$Regioncommitments$List, + testIamPermissions( + params?: Params$Resource$Regioncommitments$Testiampermissions, options?: MethodOptions - ): GaxiosPromise; - list( - params: Params$Resource$Regioncommitments$List, + ): GaxiosPromise; + testIamPermissions( + params: Params$Resource$Regioncommitments$Testiampermissions, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Regioncommitments$List, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + testIamPermissions( + params: Params$Resource$Regioncommitments$Testiampermissions, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Regioncommitments$List, - callback: BodyResponseCallback + testIamPermissions( + params: Params$Resource$Regioncommitments$Testiampermissions, + callback: BodyResponseCallback ): void; - list(callback: BodyResponseCallback): void; - list( + testIamPermissions( + callback: BodyResponseCallback + ): void; + testIamPermissions( paramsOrCallback?: - | Params$Resource$Regioncommitments$List - | BodyResponseCallback + | Params$Resource$Regioncommitments$Testiampermissions + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { + ): + | void + | GaxiosPromise + | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Regioncommitments$List; + {}) as Params$Resource$Regioncommitments$Testiampermissions; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Regioncommitments$List; + params = {} as Params$Resource$Regioncommitments$Testiampermissions; options = {}; } @@ -91947,24 +93009,24 @@ export namespace compute_beta { { url: ( rootUrl + - '/compute/beta/projects/{project}/regions/{region}/commitments' + '/compute/beta/projects/{project}/regions/{region}/commitments/{resource}/testIamPermissions' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'GET', + method: 'POST', }, options ), params, - requiredParams: ['project', 'region'], - pathParams: ['project', 'region'], + requiredParams: ['project', 'region', 'resource'], + pathParams: ['project', 'region', 'resource'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } @@ -92264,6 +93326,26 @@ export namespace compute_beta { */ returnPartialSuccess?: boolean; } + export interface Params$Resource$Regioncommitments$Testiampermissions + extends StandardParameters { + /** + * Project ID for this request. + */ + project?: string; + /** + * The name of the region for this request. + */ + region?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$TestPermissionsRequest; + } export interface Params$Resource$Regioncommitments$Updatereservations extends StandardParameters { /** @@ -95914,6 +96996,159 @@ export namespace compute_beta { } } + /** + * Returns permissions that a caller has on the specified resource. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('beta'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.regionHealthChecks.testIamPermissions({ + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // The name of the region for this request. + * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * // Name or id of the resource for this request. + * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "permissions": [] + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "permissions": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + testIamPermissions( + params: Params$Resource$Regionhealthchecks$Testiampermissions, + options: StreamMethodOptions + ): GaxiosPromise; + testIamPermissions( + params?: Params$Resource$Regionhealthchecks$Testiampermissions, + options?: MethodOptions + ): GaxiosPromise; + testIamPermissions( + params: Params$Resource$Regionhealthchecks$Testiampermissions, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + testIamPermissions( + params: Params$Resource$Regionhealthchecks$Testiampermissions, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + testIamPermissions( + params: Params$Resource$Regionhealthchecks$Testiampermissions, + callback: BodyResponseCallback + ): void; + testIamPermissions( + callback: BodyResponseCallback + ): void; + testIamPermissions( + paramsOrCallback?: + | Params$Resource$Regionhealthchecks$Testiampermissions + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Regionhealthchecks$Testiampermissions; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Regionhealthchecks$Testiampermissions; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/beta/projects/{project}/regions/{region}/healthChecks/{resource}/testIamPermissions' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'region', 'resource'], + pathParams: ['project', 'region', 'resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + /** * Updates a HealthCheck resource in the specified project using the data included in the request. * @example @@ -96238,6 +97473,26 @@ export namespace compute_beta { */ requestBody?: Schema$HealthCheck; } + export interface Params$Resource$Regionhealthchecks$Testiampermissions + extends StandardParameters { + /** + * Project ID for this request. + */ + project?: string; + /** + * The name of the region for this request. + */ + region?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$TestPermissionsRequest; + } export interface Params$Resource$Regionhealthchecks$Update extends StandardParameters { /** @@ -97127,6 +98382,159 @@ export namespace compute_beta { return createAPIRequest(parameters); } } + + /** + * Returns permissions that a caller has on the specified resource. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('beta'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.regionHealthCheckServices.testIamPermissions({ + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // The name of the region for this request. + * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * // Name or id of the resource for this request. + * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "permissions": [] + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "permissions": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + testIamPermissions( + params: Params$Resource$Regionhealthcheckservices$Testiampermissions, + options: StreamMethodOptions + ): GaxiosPromise; + testIamPermissions( + params?: Params$Resource$Regionhealthcheckservices$Testiampermissions, + options?: MethodOptions + ): GaxiosPromise; + testIamPermissions( + params: Params$Resource$Regionhealthcheckservices$Testiampermissions, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + testIamPermissions( + params: Params$Resource$Regionhealthcheckservices$Testiampermissions, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + testIamPermissions( + params: Params$Resource$Regionhealthcheckservices$Testiampermissions, + callback: BodyResponseCallback + ): void; + testIamPermissions( + callback: BodyResponseCallback + ): void; + testIamPermissions( + paramsOrCallback?: + | Params$Resource$Regionhealthcheckservices$Testiampermissions + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Regionhealthcheckservices$Testiampermissions; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Regionhealthcheckservices$Testiampermissions; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/beta/projects/{project}/regions/{region}/healthCheckServices/{resource}/testIamPermissions' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'region', 'resource'], + pathParams: ['project', 'region', 'resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } } export interface Params$Resource$Regionhealthcheckservices$Delete @@ -97260,6 +98668,26 @@ export namespace compute_beta { */ requestBody?: Schema$HealthCheckService; } + export interface Params$Resource$Regionhealthcheckservices$Testiampermissions + extends StandardParameters { + /** + * Project ID for this request. + */ + project?: string; + /** + * The name of the region for this request. + */ + region?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$TestPermissionsRequest; + } export class Resource$Regioninstancegroupmanagers { context: APIRequestContext; @@ -104281,43 +105709,194 @@ export namespace compute_beta { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.regionNotificationEndpoints.list({ - * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. - * // - * // 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) ``` - * filter: 'placeholder-value', - * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) - * maxResults: 'placeholder-value', - * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. - * // - * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. - * // - * // Currently, only sorting by `name` or `creationTimestamp desc` is supported. - * orderBy: 'placeholder-value', - * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. - * pageToken: 'placeholder-value', + * const res = await compute.regionNotificationEndpoints.list({ + * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. + * // + * // 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) ``` + * filter: 'placeholder-value', + * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * maxResults: 'placeholder-value', + * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * // + * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. + * // + * // Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * orderBy: 'placeholder-value', + * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * pageToken: 'placeholder-value', + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // Name of the region scoping this request. + * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + * returnPartialSuccess: 'placeholder-value', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "id": "my_id", + * // "items": [], + * // "kind": "my_kind", + * // "nextPageToken": "my_nextPageToken", + * // "selfLink": "my_selfLink", + * // "warning": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Regionnotificationendpoints$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Regionnotificationendpoints$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Regionnotificationendpoints$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Regionnotificationendpoints$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Regionnotificationendpoints$List, + callback: BodyResponseCallback + ): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: + | Params$Resource$Regionnotificationendpoints$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Regionnotificationendpoints$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Regionnotificationendpoints$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/beta/projects/{project}/regions/{region}/notificationEndpoints' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['project', 'region'], + pathParams: ['project', 'region'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Returns permissions that a caller has on the specified resource. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('beta'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.regionNotificationEndpoints.testIamPermissions({ * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // Name of the region scoping this request. + * // The name of the region for this request. * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', - * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. - * returnPartialSuccess: 'placeholder-value', + * // Name or id of the resource for this request. + * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "permissions": [] + * // } + * }, * }); * console.log(res.data); * * // Example response * // { - * // "id": "my_id", - * // "items": [], - * // "kind": "my_kind", - * // "nextPageToken": "my_nextPageToken", - * // "selfLink": "my_selfLink", - * // "warning": {} + * // "permissions": [] * // } * } * @@ -104333,55 +105912,57 @@ export namespace compute_beta { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - list( - params: Params$Resource$Regionnotificationendpoints$List, + testIamPermissions( + params: Params$Resource$Regionnotificationendpoints$Testiampermissions, options: StreamMethodOptions ): GaxiosPromise; - list( - params?: Params$Resource$Regionnotificationendpoints$List, + testIamPermissions( + params?: Params$Resource$Regionnotificationendpoints$Testiampermissions, options?: MethodOptions - ): GaxiosPromise; - list( - params: Params$Resource$Regionnotificationendpoints$List, + ): GaxiosPromise; + testIamPermissions( + params: Params$Resource$Regionnotificationendpoints$Testiampermissions, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Regionnotificationendpoints$List, + testIamPermissions( + params: Params$Resource$Regionnotificationendpoints$Testiampermissions, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Regionnotificationendpoints$List, - callback: BodyResponseCallback + testIamPermissions( + params: Params$Resource$Regionnotificationendpoints$Testiampermissions, + callback: BodyResponseCallback ): void; - list(callback: BodyResponseCallback): void; - list( + testIamPermissions( + callback: BodyResponseCallback + ): void; + testIamPermissions( paramsOrCallback?: - | Params$Resource$Regionnotificationendpoints$List - | BodyResponseCallback + | Params$Resource$Regionnotificationendpoints$Testiampermissions + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Regionnotificationendpoints$List; + {}) as Params$Resource$Regionnotificationendpoints$Testiampermissions; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Regionnotificationendpoints$List; + params = {} as Params$Resource$Regionnotificationendpoints$Testiampermissions; options = {}; } @@ -104396,24 +105977,24 @@ export namespace compute_beta { { url: ( rootUrl + - '/compute/beta/projects/{project}/regions/{region}/notificationEndpoints' + '/compute/beta/projects/{project}/regions/{region}/notificationEndpoints/{resource}/testIamPermissions' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'GET', + method: 'POST', }, options ), params, - requiredParams: ['project', 'region'], - pathParams: ['project', 'region'], + requiredParams: ['project', 'region', 'resource'], + pathParams: ['project', 'region', 'resource'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } } @@ -104521,6 +106102,26 @@ export namespace compute_beta { */ returnPartialSuccess?: boolean; } + export interface Params$Resource$Regionnotificationendpoints$Testiampermissions + extends StandardParameters { + /** + * Project ID for this request. + */ + project?: string; + /** + * The name of the region for this request. + */ + region?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$TestPermissionsRequest; + } export class Resource$Regionoperations { context: APIRequestContext; @@ -106260,6 +107861,159 @@ export namespace compute_beta { return createAPIRequest(parameters); } } + + /** + * Returns permissions that a caller has on the specified resource and region. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('beta'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.regionSslCertificates.testIamPermissions({ + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // The name of the region for this request. + * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * // Name or id of the resource for this request. + * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "permissions": [] + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "permissions": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + testIamPermissions( + params: Params$Resource$Regionsslcertificates$Testiampermissions, + options: StreamMethodOptions + ): GaxiosPromise; + testIamPermissions( + params?: Params$Resource$Regionsslcertificates$Testiampermissions, + options?: MethodOptions + ): GaxiosPromise; + testIamPermissions( + params: Params$Resource$Regionsslcertificates$Testiampermissions, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + testIamPermissions( + params: Params$Resource$Regionsslcertificates$Testiampermissions, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + testIamPermissions( + params: Params$Resource$Regionsslcertificates$Testiampermissions, + callback: BodyResponseCallback + ): void; + testIamPermissions( + callback: BodyResponseCallback + ): void; + testIamPermissions( + paramsOrCallback?: + | Params$Resource$Regionsslcertificates$Testiampermissions + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Regionsslcertificates$Testiampermissions; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Regionsslcertificates$Testiampermissions; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/beta/projects/{project}/regions/{region}/sslCertificates/{resource}/testIamPermissions' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'region', 'resource'], + pathParams: ['project', 'region', 'resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } } export interface Params$Resource$Regionsslcertificates$Delete @@ -106365,6 +108119,26 @@ export namespace compute_beta { */ returnPartialSuccess?: boolean; } + export interface Params$Resource$Regionsslcertificates$Testiampermissions + extends StandardParameters { + /** + * Project ID for this request. + */ + project?: string; + /** + * The name of the region for this request. + */ + region?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$TestPermissionsRequest; + } export class Resource$Regiontargethttpproxies { context: APIRequestContext; @@ -107205,6 +108979,159 @@ export namespace compute_beta { return createAPIRequest(parameters); } } + + /** + * Returns permissions that a caller has on the specified resource. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('beta'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.regionTargetHttpProxies.testIamPermissions({ + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // The name of the region for this request. + * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * // Name or id of the resource for this request. + * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "permissions": [] + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "permissions": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + testIamPermissions( + params: Params$Resource$Regiontargethttpproxies$Testiampermissions, + options: StreamMethodOptions + ): GaxiosPromise; + testIamPermissions( + params?: Params$Resource$Regiontargethttpproxies$Testiampermissions, + options?: MethodOptions + ): GaxiosPromise; + testIamPermissions( + params: Params$Resource$Regiontargethttpproxies$Testiampermissions, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + testIamPermissions( + params: Params$Resource$Regiontargethttpproxies$Testiampermissions, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + testIamPermissions( + params: Params$Resource$Regiontargethttpproxies$Testiampermissions, + callback: BodyResponseCallback + ): void; + testIamPermissions( + callback: BodyResponseCallback + ): void; + testIamPermissions( + paramsOrCallback?: + | Params$Resource$Regiontargethttpproxies$Testiampermissions + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Regiontargethttpproxies$Testiampermissions; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Regiontargethttpproxies$Testiampermissions; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/beta/projects/{project}/regions/{region}/targetHttpProxies/{resource}/testIamPermissions' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'region', 'resource'], + pathParams: ['project', 'region', 'resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } } export interface Params$Resource$Regiontargethttpproxies$Delete @@ -107338,6 +109265,26 @@ export namespace compute_beta { */ requestBody?: Schema$UrlMapReference; } + export interface Params$Resource$Regiontargethttpproxies$Testiampermissions + extends StandardParameters { + /** + * Project ID for this request. + */ + project?: string; + /** + * The name of the region for this request. + */ + region?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$TestPermissionsRequest; + } export class Resource$Regiontargethttpsproxies { context: APIRequestContext; @@ -108196,7 +110143,181 @@ export namespace compute_beta { } /** - * Changes the URL map for TargetHttpsProxy. + * Changes the URL map for TargetHttpsProxy. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('beta'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.regionTargetHttpsProxies.setUrlMap({ + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // Name of the region scoping this request. + * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * // 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. + * // + * // 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: 'placeholder-value', + * // Name of the TargetHttpsProxy to set a URL map for. + * targetHttpsProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "urlMap": "my_urlMap" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "clientOperationId": "my_clientOperationId", + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "endTime": "my_endTime", + * // "error": {}, + * // "httpErrorMessage": "my_httpErrorMessage", + * // "httpErrorStatusCode": 0, + * // "id": "my_id", + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "name": "my_name", + * // "operationGroupId": "my_operationGroupId", + * // "operationType": "my_operationType", + * // "progress": 0, + * // "region": "my_region", + * // "selfLink": "my_selfLink", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "statusMessage": "my_statusMessage", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "user": "my_user", + * // "warnings": [], + * // "zone": "my_zone" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + setUrlMap( + params: Params$Resource$Regiontargethttpsproxies$Seturlmap, + options: StreamMethodOptions + ): GaxiosPromise; + setUrlMap( + params?: Params$Resource$Regiontargethttpsproxies$Seturlmap, + options?: MethodOptions + ): GaxiosPromise; + setUrlMap( + params: Params$Resource$Regiontargethttpsproxies$Seturlmap, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + setUrlMap( + params: Params$Resource$Regiontargethttpsproxies$Seturlmap, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + setUrlMap( + params: Params$Resource$Regiontargethttpsproxies$Seturlmap, + callback: BodyResponseCallback + ): void; + setUrlMap(callback: BodyResponseCallback): void; + setUrlMap( + paramsOrCallback?: + | Params$Resource$Regiontargethttpsproxies$Seturlmap + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Regiontargethttpsproxies$Seturlmap; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Regiontargethttpsproxies$Seturlmap; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/beta/projects/{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}/setUrlMap' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'region', 'targetHttpsProxy'], + pathParams: ['project', 'region', 'targetHttpsProxy'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Returns permissions that a caller has on the specified resource. * @example * ```js * // Before running the sample: @@ -108216,6 +110337,7 @@ export namespace compute_beta { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', * ], * }); * @@ -108224,26 +110346,20 @@ export namespace compute_beta { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.regionTargetHttpsProxies.setUrlMap({ + * const res = await compute.regionTargetHttpsProxies.testIamPermissions({ * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // Name of the region scoping this request. + * // The name of the region for this request. * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', - * // 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. - * // - * // 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: 'placeholder-value', - * // Name of the TargetHttpsProxy to set a URL map for. - * targetHttpsProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * // Name or id of the resource for this request. + * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * * // Request body metadata * requestBody: { * // request body parameters * // { - * // "urlMap": "my_urlMap" + * // "permissions": [] * // } * }, * }); @@ -108251,30 +110367,7 @@ export namespace compute_beta { * * // Example response * // { - * // "clientOperationId": "my_clientOperationId", - * // "creationTimestamp": "my_creationTimestamp", - * // "description": "my_description", - * // "endTime": "my_endTime", - * // "error": {}, - * // "httpErrorMessage": "my_httpErrorMessage", - * // "httpErrorStatusCode": 0, - * // "id": "my_id", - * // "insertTime": "my_insertTime", - * // "kind": "my_kind", - * // "name": "my_name", - * // "operationGroupId": "my_operationGroupId", - * // "operationType": "my_operationType", - * // "progress": 0, - * // "region": "my_region", - * // "selfLink": "my_selfLink", - * // "startTime": "my_startTime", - * // "status": "my_status", - * // "statusMessage": "my_statusMessage", - * // "targetId": "my_targetId", - * // "targetLink": "my_targetLink", - * // "user": "my_user", - * // "warnings": [], - * // "zone": "my_zone" + * // "permissions": [] * // } * } * @@ -108290,50 +110383,57 @@ export namespace compute_beta { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - setUrlMap( - params: Params$Resource$Regiontargethttpsproxies$Seturlmap, + testIamPermissions( + params: Params$Resource$Regiontargethttpsproxies$Testiampermissions, options: StreamMethodOptions ): GaxiosPromise; - setUrlMap( - params?: Params$Resource$Regiontargethttpsproxies$Seturlmap, + testIamPermissions( + params?: Params$Resource$Regiontargethttpsproxies$Testiampermissions, options?: MethodOptions - ): GaxiosPromise; - setUrlMap( - params: Params$Resource$Regiontargethttpsproxies$Seturlmap, + ): GaxiosPromise; + testIamPermissions( + params: Params$Resource$Regiontargethttpsproxies$Testiampermissions, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - setUrlMap( - params: Params$Resource$Regiontargethttpsproxies$Seturlmap, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + testIamPermissions( + params: Params$Resource$Regiontargethttpsproxies$Testiampermissions, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - setUrlMap( - params: Params$Resource$Regiontargethttpsproxies$Seturlmap, - callback: BodyResponseCallback + testIamPermissions( + params: Params$Resource$Regiontargethttpsproxies$Testiampermissions, + callback: BodyResponseCallback ): void; - setUrlMap(callback: BodyResponseCallback): void; - setUrlMap( + testIamPermissions( + callback: BodyResponseCallback + ): void; + testIamPermissions( paramsOrCallback?: - | Params$Resource$Regiontargethttpsproxies$Seturlmap - | BodyResponseCallback + | Params$Resource$Regiontargethttpsproxies$Testiampermissions + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { + ): + | void + | GaxiosPromise + | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Regiontargethttpsproxies$Seturlmap; + {}) as Params$Resource$Regiontargethttpsproxies$Testiampermissions; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Regiontargethttpsproxies$Seturlmap; + params = {} as Params$Resource$Regiontargethttpsproxies$Testiampermissions; options = {}; } @@ -108348,24 +110448,24 @@ export namespace compute_beta { { url: ( rootUrl + - '/compute/beta/projects/{project}/regions/{region}/targetHttpsProxies/{targetHttpsProxy}/setUrlMap' + '/compute/beta/projects/{project}/regions/{region}/targetHttpsProxies/{resource}/testIamPermissions' ).replace(/([^:]\/)\/+/g, '$1'), method: 'POST', }, options ), params, - requiredParams: ['project', 'region', 'targetHttpsProxy'], - pathParams: ['project', 'region', 'targetHttpsProxy'], + requiredParams: ['project', 'region', 'resource'], + pathParams: ['project', 'region', 'resource'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } } @@ -108529,6 +110629,26 @@ export namespace compute_beta { */ requestBody?: Schema$UrlMapReference; } + export interface Params$Resource$Regiontargethttpsproxies$Testiampermissions + extends StandardParameters { + /** + * Project ID for this request. + */ + project?: string; + /** + * The name of the region for this request. + */ + region?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$TestPermissionsRequest; + } export class Resource$Regionurlmaps { context: APIRequestContext; @@ -109550,6 +111670,159 @@ export namespace compute_beta { } } + /** + * Returns permissions that a caller has on the specified resource. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('beta'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.regionUrlMaps.testIamPermissions({ + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // The name of the region for this request. + * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * // Name or id of the resource for this request. + * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "permissions": [] + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "permissions": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + testIamPermissions( + params: Params$Resource$Regionurlmaps$Testiampermissions, + options: StreamMethodOptions + ): GaxiosPromise; + testIamPermissions( + params?: Params$Resource$Regionurlmaps$Testiampermissions, + options?: MethodOptions + ): GaxiosPromise; + testIamPermissions( + params: Params$Resource$Regionurlmaps$Testiampermissions, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + testIamPermissions( + params: Params$Resource$Regionurlmaps$Testiampermissions, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + testIamPermissions( + params: Params$Resource$Regionurlmaps$Testiampermissions, + callback: BodyResponseCallback + ): void; + testIamPermissions( + callback: BodyResponseCallback + ): void; + testIamPermissions( + paramsOrCallback?: + | Params$Resource$Regionurlmaps$Testiampermissions + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Regionurlmaps$Testiampermissions; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Regionurlmaps$Testiampermissions; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/beta/projects/{project}/regions/{region}/urlMaps/{resource}/testIamPermissions' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'region', 'resource'], + pathParams: ['project', 'region', 'resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + /** * Updates the specified UrlMap resource with the data included in the request. * @example @@ -110030,6 +112303,26 @@ export namespace compute_beta { */ requestBody?: Schema$UrlMap; } + export interface Params$Resource$Regionurlmaps$Testiampermissions + extends StandardParameters { + /** + * Project ID for this request. + */ + project?: string; + /** + * The name of the region for this request. + */ + region?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$TestPermissionsRequest; + } export interface Params$Resource$Regionurlmaps$Update extends StandardParameters { /** @@ -113646,6 +115939,7 @@ export namespace compute_beta { * // "bgpPeers": [], * // "creationTimestamp": "my_creationTimestamp", * // "description": "my_description", + * // "encryptedInterconnectRouter": false, * // "id": "my_id", * // "interfaces": [], * // "kind": "my_kind", @@ -114115,6 +116409,7 @@ export namespace compute_beta { * // "bgpPeers": [], * // "creationTimestamp": "my_creationTimestamp", * // "description": "my_description", + * // "encryptedInterconnectRouter": false, * // "id": "my_id", * // "interfaces": [], * // "kind": "my_kind", @@ -114459,6 +116754,7 @@ export namespace compute_beta { * // "bgpPeers": [], * // "creationTimestamp": "my_creationTimestamp", * // "description": "my_description", + * // "encryptedInterconnectRouter": false, * // "id": "my_id", * // "interfaces": [], * // "kind": "my_kind", @@ -114638,6 +116934,7 @@ export namespace compute_beta { * // "bgpPeers": [], * // "creationTimestamp": "my_creationTimestamp", * // "description": "my_description", + * // "encryptedInterconnectRouter": false, * // "id": "my_id", * // "interfaces": [], * // "kind": "my_kind", @@ -114959,6 +117256,7 @@ export namespace compute_beta { * // "bgpPeers": [], * // "creationTimestamp": "my_creationTimestamp", * // "description": "my_description", + * // "encryptedInterconnectRouter": false, * // "id": "my_id", * // "interfaces": [], * // "kind": "my_kind", @@ -119071,6 +121369,151 @@ export namespace compute_beta { } } + /** + * Gets the access control policy for a resource. May be empty if no such policy or resource exists. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('beta'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.serviceAttachments.getIamPolicy({ + * // Requested IAM Policy version. + * optionsRequestedPolicyVersion: 'placeholder-value', + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // The name of the region for this request. + * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * // Name or id of the resource for this request. + * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "auditConfigs": [], + * // "bindings": [], + * // "etag": "my_etag", + * // "iamOwned": false, + * // "rules": [], + * // "version": 0 + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + getIamPolicy( + params: Params$Resource$Serviceattachments$Getiampolicy, + options: StreamMethodOptions + ): GaxiosPromise; + getIamPolicy( + params?: Params$Resource$Serviceattachments$Getiampolicy, + options?: MethodOptions + ): GaxiosPromise; + getIamPolicy( + params: Params$Resource$Serviceattachments$Getiampolicy, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getIamPolicy( + params: Params$Resource$Serviceattachments$Getiampolicy, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getIamPolicy( + params: Params$Resource$Serviceattachments$Getiampolicy, + callback: BodyResponseCallback + ): void; + getIamPolicy(callback: BodyResponseCallback): void; + getIamPolicy( + paramsOrCallback?: + | Params$Resource$Serviceattachments$Getiampolicy + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Serviceattachments$Getiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Serviceattachments$Getiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/beta/projects/{project}/regions/{region}/serviceAttachments/{resource}/getIamPolicy' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['project', 'region', 'resource'], + pathParams: ['project', 'region', 'resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + /** * Creates a ServiceAttachment in the specified project in the given scope using the parameters that are included in the request. * @example @@ -119419,6 +121862,311 @@ export namespace compute_beta { return createAPIRequest(parameters); } } + + /** + * Sets the access control policy on the specified resource. Replaces any existing policy. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('beta'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.serviceAttachments.setIamPolicy({ + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // The name of the region for this request. + * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * // Name or id of the resource for this request. + * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "bindings": [], + * // "etag": "my_etag", + * // "policy": {} + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "auditConfigs": [], + * // "bindings": [], + * // "etag": "my_etag", + * // "iamOwned": false, + * // "rules": [], + * // "version": 0 + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + setIamPolicy( + params: Params$Resource$Serviceattachments$Setiampolicy, + options: StreamMethodOptions + ): GaxiosPromise; + setIamPolicy( + params?: Params$Resource$Serviceattachments$Setiampolicy, + options?: MethodOptions + ): GaxiosPromise; + setIamPolicy( + params: Params$Resource$Serviceattachments$Setiampolicy, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + setIamPolicy( + params: Params$Resource$Serviceattachments$Setiampolicy, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + setIamPolicy( + params: Params$Resource$Serviceattachments$Setiampolicy, + callback: BodyResponseCallback + ): void; + setIamPolicy(callback: BodyResponseCallback): void; + setIamPolicy( + paramsOrCallback?: + | Params$Resource$Serviceattachments$Setiampolicy + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Serviceattachments$Setiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Serviceattachments$Setiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/beta/projects/{project}/regions/{region}/serviceAttachments/{resource}/setIamPolicy' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'region', 'resource'], + pathParams: ['project', 'region', 'resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Returns permissions that a caller has on the specified resource. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('beta'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.serviceAttachments.testIamPermissions({ + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // The name of the region for this request. + * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * // Name or id of the resource for this request. + * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "permissions": [] + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "permissions": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + testIamPermissions( + params: Params$Resource$Serviceattachments$Testiampermissions, + options: StreamMethodOptions + ): GaxiosPromise; + testIamPermissions( + params?: Params$Resource$Serviceattachments$Testiampermissions, + options?: MethodOptions + ): GaxiosPromise; + testIamPermissions( + params: Params$Resource$Serviceattachments$Testiampermissions, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + testIamPermissions( + params: Params$Resource$Serviceattachments$Testiampermissions, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + testIamPermissions( + params: Params$Resource$Serviceattachments$Testiampermissions, + callback: BodyResponseCallback + ): void; + testIamPermissions( + callback: BodyResponseCallback + ): void; + testIamPermissions( + paramsOrCallback?: + | Params$Resource$Serviceattachments$Testiampermissions + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Serviceattachments$Testiampermissions; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Serviceattachments$Testiampermissions; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/beta/projects/{project}/regions/{region}/serviceAttachments/{resource}/testIamPermissions' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'region', 'resource'], + pathParams: ['project', 'region', 'resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } } export interface Params$Resource$Serviceattachments$Aggregatedlist @@ -119500,6 +122248,25 @@ export namespace compute_beta { */ serviceAttachment?: string; } + export interface Params$Resource$Serviceattachments$Getiampolicy + extends StandardParameters { + /** + * Requested IAM Policy version. + */ + optionsRequestedPolicyVersion?: number; + /** + * Project ID for this request. + */ + project?: string; + /** + * The name of the region for this request. + */ + region?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + } export interface Params$Resource$Serviceattachments$Insert extends StandardParameters { /** @@ -119565,6 +122332,46 @@ export namespace compute_beta { */ returnPartialSuccess?: boolean; } + export interface Params$Resource$Serviceattachments$Setiampolicy + extends StandardParameters { + /** + * Project ID for this request. + */ + project?: string; + /** + * The name of the region for this request. + */ + region?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$RegionSetPolicyRequest; + } + export interface Params$Resource$Serviceattachments$Testiampermissions + extends StandardParameters { + /** + * Project ID for this request. + */ + project?: string; + /** + * The name of the region for this request. + */ + region?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$TestPermissionsRequest; + } export class Resource$Snapshots { context: APIRequestContext; @@ -126628,6 +129435,157 @@ export namespace compute_beta { return createAPIRequest(parameters); } } + + /** + * Returns permissions that a caller has on the specified resource. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('beta'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.targetGrpcProxies.testIamPermissions({ + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // Name or id of the resource for this request. + * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "permissions": [] + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "permissions": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + testIamPermissions( + params: Params$Resource$Targetgrpcproxies$Testiampermissions, + options: StreamMethodOptions + ): GaxiosPromise; + testIamPermissions( + params?: Params$Resource$Targetgrpcproxies$Testiampermissions, + options?: MethodOptions + ): GaxiosPromise; + testIamPermissions( + params: Params$Resource$Targetgrpcproxies$Testiampermissions, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + testIamPermissions( + params: Params$Resource$Targetgrpcproxies$Testiampermissions, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + testIamPermissions( + params: Params$Resource$Targetgrpcproxies$Testiampermissions, + callback: BodyResponseCallback + ): void; + testIamPermissions( + callback: BodyResponseCallback + ): void; + testIamPermissions( + paramsOrCallback?: + | Params$Resource$Targetgrpcproxies$Testiampermissions + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Targetgrpcproxies$Testiampermissions; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Targetgrpcproxies$Testiampermissions; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/beta/projects/{project}/global/targetGrpcProxies/{resource}/testIamPermissions' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'resource'], + pathParams: ['project', 'resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } } export interface Params$Resource$Targetgrpcproxies$Delete @@ -126741,6 +129699,22 @@ export namespace compute_beta { */ requestBody?: Schema$TargetGrpcProxy; } + export interface Params$Resource$Targetgrpcproxies$Testiampermissions + extends StandardParameters { + /** + * Project ID for this request. + */ + project?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$TestPermissionsRequest; + } export class Resource$Targethttpproxies { context: APIRequestContext; @@ -136425,7 +139399,179 @@ export namespace compute_beta { } /** - * Changes the ProxyHeaderType for TargetTcpProxy. + * Changes the ProxyHeaderType for TargetTcpProxy. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('beta'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.targetTcpProxies.setProxyHeader({ + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // 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. + * // + * // 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: 'placeholder-value', + * // Name of the TargetTcpProxy resource whose ProxyHeader is to be set. + * targetTcpProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "proxyHeader": "my_proxyHeader" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "clientOperationId": "my_clientOperationId", + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "endTime": "my_endTime", + * // "error": {}, + * // "httpErrorMessage": "my_httpErrorMessage", + * // "httpErrorStatusCode": 0, + * // "id": "my_id", + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "name": "my_name", + * // "operationGroupId": "my_operationGroupId", + * // "operationType": "my_operationType", + * // "progress": 0, + * // "region": "my_region", + * // "selfLink": "my_selfLink", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "statusMessage": "my_statusMessage", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "user": "my_user", + * // "warnings": [], + * // "zone": "my_zone" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + setProxyHeader( + params: Params$Resource$Targettcpproxies$Setproxyheader, + options: StreamMethodOptions + ): GaxiosPromise; + setProxyHeader( + params?: Params$Resource$Targettcpproxies$Setproxyheader, + options?: MethodOptions + ): GaxiosPromise; + setProxyHeader( + params: Params$Resource$Targettcpproxies$Setproxyheader, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + setProxyHeader( + params: Params$Resource$Targettcpproxies$Setproxyheader, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + setProxyHeader( + params: Params$Resource$Targettcpproxies$Setproxyheader, + callback: BodyResponseCallback + ): void; + setProxyHeader(callback: BodyResponseCallback): void; + setProxyHeader( + paramsOrCallback?: + | Params$Resource$Targettcpproxies$Setproxyheader + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Targettcpproxies$Setproxyheader; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Targettcpproxies$Setproxyheader; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/beta/projects/{project}/global/targetTcpProxies/{targetTcpProxy}/setProxyHeader' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'targetTcpProxy'], + pathParams: ['project', 'targetTcpProxy'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Returns permissions that a caller has on the specified resource. * @example * ```js * // Before running the sample: @@ -136445,6 +139591,7 @@ export namespace compute_beta { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', * ], * }); * @@ -136453,24 +139600,18 @@ export namespace compute_beta { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.targetTcpProxies.setProxyHeader({ + * const res = await compute.targetTcpProxies.testIamPermissions({ * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // 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. - * // - * // 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: 'placeholder-value', - * // Name of the TargetTcpProxy resource whose ProxyHeader is to be set. - * targetTcpProxy: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * // Name or id of the resource for this request. + * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * * // Request body metadata * requestBody: { * // request body parameters * // { - * // "proxyHeader": "my_proxyHeader" + * // "permissions": [] * // } * }, * }); @@ -136478,30 +139619,7 @@ export namespace compute_beta { * * // Example response * // { - * // "clientOperationId": "my_clientOperationId", - * // "creationTimestamp": "my_creationTimestamp", - * // "description": "my_description", - * // "endTime": "my_endTime", - * // "error": {}, - * // "httpErrorMessage": "my_httpErrorMessage", - * // "httpErrorStatusCode": 0, - * // "id": "my_id", - * // "insertTime": "my_insertTime", - * // "kind": "my_kind", - * // "name": "my_name", - * // "operationGroupId": "my_operationGroupId", - * // "operationType": "my_operationType", - * // "progress": 0, - * // "region": "my_region", - * // "selfLink": "my_selfLink", - * // "startTime": "my_startTime", - * // "status": "my_status", - * // "statusMessage": "my_statusMessage", - * // "targetId": "my_targetId", - * // "targetLink": "my_targetLink", - * // "user": "my_user", - * // "warnings": [], - * // "zone": "my_zone" + * // "permissions": [] * // } * } * @@ -136517,50 +139635,57 @@ export namespace compute_beta { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - setProxyHeader( - params: Params$Resource$Targettcpproxies$Setproxyheader, + testIamPermissions( + params: Params$Resource$Targettcpproxies$Testiampermissions, options: StreamMethodOptions ): GaxiosPromise; - setProxyHeader( - params?: Params$Resource$Targettcpproxies$Setproxyheader, + testIamPermissions( + params?: Params$Resource$Targettcpproxies$Testiampermissions, options?: MethodOptions - ): GaxiosPromise; - setProxyHeader( - params: Params$Resource$Targettcpproxies$Setproxyheader, + ): GaxiosPromise; + testIamPermissions( + params: Params$Resource$Targettcpproxies$Testiampermissions, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - setProxyHeader( - params: Params$Resource$Targettcpproxies$Setproxyheader, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + testIamPermissions( + params: Params$Resource$Targettcpproxies$Testiampermissions, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - setProxyHeader( - params: Params$Resource$Targettcpproxies$Setproxyheader, - callback: BodyResponseCallback + testIamPermissions( + params: Params$Resource$Targettcpproxies$Testiampermissions, + callback: BodyResponseCallback ): void; - setProxyHeader(callback: BodyResponseCallback): void; - setProxyHeader( + testIamPermissions( + callback: BodyResponseCallback + ): void; + testIamPermissions( paramsOrCallback?: - | Params$Resource$Targettcpproxies$Setproxyheader - | BodyResponseCallback + | Params$Resource$Targettcpproxies$Testiampermissions + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { + ): + | void + | GaxiosPromise + | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Targettcpproxies$Setproxyheader; + {}) as Params$Resource$Targettcpproxies$Testiampermissions; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Targettcpproxies$Setproxyheader; + params = {} as Params$Resource$Targettcpproxies$Testiampermissions; options = {}; } @@ -136575,24 +139700,24 @@ export namespace compute_beta { { url: ( rootUrl + - '/compute/beta/projects/{project}/global/targetTcpProxies/{targetTcpProxy}/setProxyHeader' + '/compute/beta/projects/{project}/global/targetTcpProxies/{resource}/testIamPermissions' ).replace(/([^:]\/)\/+/g, '$1'), method: 'POST', }, options ), params, - requiredParams: ['project', 'targetTcpProxy'], - pathParams: ['project', 'targetTcpProxy'], + requiredParams: ['project', 'resource'], + pathParams: ['project', 'resource'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } } @@ -136732,6 +139857,22 @@ export namespace compute_beta { */ requestBody?: Schema$TargetTcpProxiesSetProxyHeaderRequest; } + export interface Params$Resource$Targettcpproxies$Testiampermissions + extends StandardParameters { + /** + * Project ID for this request. + */ + project?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$TestPermissionsRequest; + } export class Resource$Targetvpngateways { context: APIRequestContext; @@ -141146,6 +144287,159 @@ export namespace compute_beta { return createAPIRequest(parameters); } } + + /** + * Returns permissions that a caller has on the specified resource. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('beta'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.vpnGateways.testIamPermissions({ + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // The name of the region for this request. + * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * // Name or id of the resource for this request. + * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "permissions": [] + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "permissions": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + testIamPermissions( + params: Params$Resource$Vpngateways$Testiampermissions, + options: StreamMethodOptions + ): GaxiosPromise; + testIamPermissions( + params?: Params$Resource$Vpngateways$Testiampermissions, + options?: MethodOptions + ): GaxiosPromise; + testIamPermissions( + params: Params$Resource$Vpngateways$Testiampermissions, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + testIamPermissions( + params: Params$Resource$Vpngateways$Testiampermissions, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + testIamPermissions( + params: Params$Resource$Vpngateways$Testiampermissions, + callback: BodyResponseCallback + ): void; + testIamPermissions( + callback: BodyResponseCallback + ): void; + testIamPermissions( + paramsOrCallback?: + | Params$Resource$Vpngateways$Testiampermissions + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Vpngateways$Testiampermissions; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Vpngateways$Testiampermissions; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/beta/projects/{project}/regions/{region}/vpnGateways/{resource}/testIamPermissions' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'region', 'resource'], + pathParams: ['project', 'region', 'resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } } export interface Params$Resource$Vpngateways$Aggregatedlist @@ -141333,6 +144627,26 @@ export namespace compute_beta { */ requestBody?: Schema$RegionSetLabelsRequest; } + export interface Params$Resource$Vpngateways$Testiampermissions + extends StandardParameters { + /** + * Project ID for this request. + */ + project?: string; + /** + * The name of the region for this request. + */ + region?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$TestPermissionsRequest; + } export class Resource$Vpntunnels { context: APIRequestContext; diff --git a/src/apis/compute/v1.ts b/src/apis/compute/v1.ts index 02c1fdd133f..43d50ba8ac3 100644 --- a/src/apis/compute/v1.ts +++ b/src/apis/compute/v1.ts @@ -113,6 +113,7 @@ export namespace compute_v1 { globalNetworkEndpointGroups: Resource$Globalnetworkendpointgroups; globalOperations: Resource$Globaloperations; globalOrganizationOperations: Resource$Globalorganizationoperations; + globalPublicDelegatedPrefixes: Resource$Globalpublicdelegatedprefixes; healthChecks: Resource$Healthchecks; httpHealthChecks: Resource$Httphealthchecks; httpsHealthChecks: Resource$Httpshealthchecks; @@ -134,6 +135,8 @@ export namespace compute_v1 { nodeTypes: Resource$Nodetypes; packetMirrorings: Resource$Packetmirrorings; projects: Resource$Projects; + publicAdvertisedPrefixes: Resource$Publicadvertisedprefixes; + publicDelegatedPrefixes: Resource$Publicdelegatedprefixes; regionAutoscalers: Resource$Regionautoscalers; regionBackendServices: Resource$Regionbackendservices; regionCommitments: Resource$Regioncommitments; @@ -203,6 +206,9 @@ export namespace compute_v1 { this.globalOrganizationOperations = new Resource$Globalorganizationoperations( this.context ); + this.globalPublicDelegatedPrefixes = new Resource$Globalpublicdelegatedprefixes( + this.context + ); this.healthChecks = new Resource$Healthchecks(this.context); this.httpHealthChecks = new Resource$Httphealthchecks(this.context); this.httpsHealthChecks = new Resource$Httpshealthchecks(this.context); @@ -232,6 +238,12 @@ export namespace compute_v1 { this.nodeTypes = new Resource$Nodetypes(this.context); this.packetMirrorings = new Resource$Packetmirrorings(this.context); this.projects = new Resource$Projects(this.context); + this.publicAdvertisedPrefixes = new Resource$Publicadvertisedprefixes( + this.context + ); + this.publicDelegatedPrefixes = new Resource$Publicdelegatedprefixes( + this.context + ); this.regionAutoscalers = new Resource$Regionautoscalers(this.context); this.regionBackendServices = new Resource$Regionbackendservices( this.context @@ -982,6 +994,12 @@ export namespace compute_v1 { * [Output Only] URL of the region where the instance group resides (for autoscalers living in regional scope). */ region?: string | null; + /** + * [Output Only] Status information of existing scaling schedules. + */ + scalingScheduleStatus?: { + [key: string]: Schema$ScalingScheduleStatus; + } | null; /** * [Output Only] Server-defined URL for the resource. */ @@ -1149,6 +1167,12 @@ export namespace compute_v1 { */ mode?: string | null; scaleInControl?: Schema$AutoscalingPolicyScaleInControl; + /** + * Scaling schedules defined for an autoscaler. Multiple schedules can be set on an autoscaler, and they can overlap. During overlapping periods the greatest min_required_replicas of all scaling schedules is applied. Up to 128 scaling schedules are allowed. + */ + scalingSchedules?: { + [key: string]: Schema$AutoscalingPolicyScalingSchedule; + } | null; } /** * CPU utilization policy. @@ -1229,6 +1253,35 @@ export namespace compute_v1 { */ timeWindowSec?: number | null; } + /** + * Scaling based on user-defined schedule. The message describes a single scaling schedule. A scaling schedule changes the minimum number of VM instances an autoscaler can recommend, which can trigger scaling out. + */ + export interface Schema$AutoscalingPolicyScalingSchedule { + /** + * A description of a scaling schedule. + */ + description?: string | null; + /** + * A boolean value that specifies whether a scaling schedule can influence autoscaler recommendations. If set to true, then a scaling schedule has no effect. This field is optional, and its value is false by default. + */ + disabled?: boolean | null; + /** + * The duration of time intervals, in seconds, for which this scaling schedule is to run. The minimum allowed value is 300. This field is required. + */ + durationSec?: number | null; + /** + * The minimum number of VM instances that the autoscaler will recommend in time intervals starting according to schedule. This field is required. + */ + minRequiredReplicas?: number | null; + /** + * The start timestamps of time intervals when this scaling schedule is to provide a scaling signal. This field uses the extended cron format (with an optional year field). The expression can describe a single timestamp if the optional year is set, in which case the scaling schedule runs once. The schedule is interpreted with respect to time_zone. This field is required. Note: These timestamps only describe when autoscaler starts providing the scaling signal. The VMs need additional time to become serving. + */ + schedule?: string | null; + /** + * The time zone to use when interpreting the schedule. The value of this field must be a time zone name from the tz database: http://en.wikipedia.org/wiki/Tz_database. This field is assigned a default value of ?UTC? if left empty. + */ + timeZone?: string | null; + } /** * Message containing information of one individual backend. */ @@ -1360,6 +1413,10 @@ export namespace compute_v1 { * Message containing Cloud CDN configuration for a backend bucket. */ export interface Schema$BackendBucketCdnPolicy { + /** + * Bypass the cache when the specified request headers are matched - e.g. Pragma or Authorization headers. Up to 5 headers can be specified. The cache is bypassed for all cdnPolicy.cacheMode settings. + */ + bypassCacheOnRequestHeaders?: Schema$BackendBucketCdnPolicyBypassCacheOnRequestHeader[]; /** * Specifies the cache setting for all responses from this backend. The possible values are: * @@ -1382,6 +1439,18 @@ export namespace compute_v1 { * Specifies the maximum allowed TTL for cached content served by this origin. Cache directives that attempt to set a max-age or s-maxage higher than this, or an Expires header more than maxTTL seconds in the future will be capped at the value of maxTTL, as if it were the value of an s-maxage Cache-Control directive. Headers sent to the client will not be modified. Setting a TTL of "0" means "always revalidate". The maximum allowed value is 31,622,400s (1 year), noting that infrequently accessed objects may be evicted from the cache before the defined TTL. */ maxTtl?: number | null; + /** + * Negative caching allows per-status code TTLs to be set, in order to apply fine-grained caching for common errors or redirects. This can reduce the load on your origin and improve end-user experience by reducing response latency. When the cache mode is set to CACHE_ALL_STATIC or USE_ORIGIN_HEADERS, negative caching applies to responses with the specified response code that lack any Cache-Control, Expires, or Pragma: no-cache directives. When the cache mode is set to FORCE_CACHE_ALL, negative caching applies to all responses with the specified response code, and override any caching headers. By default, Cloud CDN will apply the following default TTLs to these status codes: HTTP 300 (Multiple Choice), 301, 308 (Permanent Redirects): 10m HTTP 404 (Not Found), 410 (Gone), 451 (Unavailable For Legal Reasons): 120s HTTP 405 (Method Not Found), 421 (Misdirected Request), 501 (Not Implemented): 60s. These defaults can be overridden in negative_caching_policy. + */ + negativeCaching?: boolean | null; + /** + * Sets a cache TTL for the specified HTTP status code. negative_caching must be enabled to configure negative_caching_policy. Omitting the policy and leaving negative_caching enabled will use Cloud CDN's default cache TTLs. Note that when specifying an explicit negative_caching_policy, you should take care to specify a cache TTL for all response codes that you wish to cache. Cloud CDN will not apply any default negative caching when a policy exists. + */ + negativeCachingPolicy?: Schema$BackendBucketCdnPolicyNegativeCachingPolicy[]; + /** + * Serve existing content from the cache (if available) when revalidating content with the origin, or when an error is encountered when refreshing the cache. This setting defines the default "max-stale" duration for any cached responses that do not specify a max-stale directive. Stale responses that exceed the TTL configured here will not be served. The default limit (max-stale) is 86400s (1 day), which will allow stale content to be served up to this limit beyond the max-age (or s-max-age) of a cached response. The maximum allowed value is 604800 (1 week). Set this to zero (0) to disable serve-while-stale. + */ + serveWhileStale?: number | null; /** * Maximum number of seconds the response to a signed URL request will be considered fresh. After this time period, the response will be revalidated before being served. Defaults to 1hr (3600s). When serving responses to signed URL requests, Cloud CDN will internally behave as though all responses from this backend had a "Cache-Control: public, max-age=[TTL]" header, regardless of any existing Cache-Control header. The actual headers served in responses will not be altered. */ @@ -1391,6 +1460,28 @@ export namespace compute_v1 { */ signedUrlKeyNames?: string[] | null; } + /** + * Bypass the cache when the specified request headers are present, e.g. Pragma or Authorization headers. Values are case insensitive. The presence of such a header overrides the cache_mode setting. + */ + export interface Schema$BackendBucketCdnPolicyBypassCacheOnRequestHeader { + /** + * The header field name to match on when bypassing cache. Values are case-insensitive. + */ + headerName?: string | null; + } + /** + * Specify CDN TTLs for response error codes. + */ + export interface Schema$BackendBucketCdnPolicyNegativeCachingPolicy { + /** + * The HTTP status code to define a TTL against. Only HTTP status codes 300, 301, 302, 307, 308, 404, 405, 410, 421, 451 and 501 are can be specified as values, and you cannot specify a status code more than once. + */ + code?: number | null; + /** + * The TTL (in seconds) for which to cache responses with the corresponding status code. The maximum allowed value is 1800s (30 minutes), noting that infrequently accessed objects may be evicted from the cache before the defined TTL. + */ + ttl?: number | null; + } /** * Contains a list of BackendBucket resources. */ @@ -1547,6 +1638,12 @@ export namespace compute_v1 { * This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver. */ logConfig?: Schema$BackendServiceLogConfig; + /** + * Specifies the default maximum duration (timeout) for streams to this service. Duration is computed from the beginning of the stream until the response has been completely processed, including all retries. A stream that does not complete in this duration is closed. + * If not specified, there will be no timeout limit, i.e. the maximum duration is infinite. + * This field is only allowed when the loadBalancingScheme of the backend service is INTERNAL_SELF_MANAGED. + */ + maxStreamDuration?: Schema$Duration; /** * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. */ @@ -1663,6 +1760,10 @@ export namespace compute_v1 { * Message containing Cloud CDN configuration for a backend service. */ export interface Schema$BackendServiceCdnPolicy { + /** + * Bypass the cache when the specified request headers are matched - e.g. Pragma or Authorization headers. Up to 5 headers can be specified. The cache is bypassed for all cdnPolicy.cacheMode settings. + */ + bypassCacheOnRequestHeaders?: Schema$BackendServiceCdnPolicyBypassCacheOnRequestHeader[]; /** * The CacheKeyPolicy for this CdnPolicy. */ @@ -1689,6 +1790,18 @@ export namespace compute_v1 { * Specifies the maximum allowed TTL for cached content served by this origin. Cache directives that attempt to set a max-age or s-maxage higher than this, or an Expires header more than maxTTL seconds in the future will be capped at the value of maxTTL, as if it were the value of an s-maxage Cache-Control directive. Headers sent to the client will not be modified. Setting a TTL of "0" means "always revalidate". The maximum allowed value is 31,622,400s (1 year), noting that infrequently accessed objects may be evicted from the cache before the defined TTL. */ maxTtl?: number | null; + /** + * Negative caching allows per-status code TTLs to be set, in order to apply fine-grained caching for common errors or redirects. This can reduce the load on your origin and improve end-user experience by reducing response latency. When the cache mode is set to CACHE_ALL_STATIC or USE_ORIGIN_HEADERS, negative caching applies to responses with the specified response code that lack any Cache-Control, Expires, or Pragma: no-cache directives. When the cache mode is set to FORCE_CACHE_ALL, negative caching applies to all responses with the specified response code, and override any caching headers. By default, Cloud CDN will apply the following default TTLs to these status codes: HTTP 300 (Multiple Choice), 301, 308 (Permanent Redirects): 10m HTTP 404 (Not Found), 410 (Gone), 451 (Unavailable For Legal Reasons): 120s HTTP 405 (Method Not Found), 421 (Misdirected Request), 501 (Not Implemented): 60s. These defaults can be overridden in negative_caching_policy. + */ + negativeCaching?: boolean | null; + /** + * Sets a cache TTL for the specified HTTP status code. negative_caching must be enabled to configure negative_caching_policy. Omitting the policy and leaving negative_caching enabled will use Cloud CDN's default cache TTLs. Note that when specifying an explicit negative_caching_policy, you should take care to specify a cache TTL for all response codes that you wish to cache. Cloud CDN will not apply any default negative caching when a policy exists. + */ + negativeCachingPolicy?: Schema$BackendServiceCdnPolicyNegativeCachingPolicy[]; + /** + * Serve existing content from the cache (if available) when revalidating content with the origin, or when an error is encountered when refreshing the cache. This setting defines the default "max-stale" duration for any cached responses that do not specify a max-stale directive. Stale responses that exceed the TTL configured here will not be served. The default limit (max-stale) is 86400s (1 day), which will allow stale content to be served up to this limit beyond the max-age (or s-max-age) of a cached response. The maximum allowed value is 604800 (1 week). Set this to zero (0) to disable serve-while-stale. + */ + serveWhileStale?: number | null; /** * Maximum number of seconds the response to a signed URL request will be considered fresh. After this time period, the response will be revalidated before being served. Defaults to 1hr (3600s). When serving responses to signed URL requests, Cloud CDN will internally behave as though all responses from this backend had a "Cache-Control: public, max-age=[TTL]" header, regardless of any existing Cache-Control header. The actual headers served in responses will not be altered. */ @@ -1698,6 +1811,28 @@ export namespace compute_v1 { */ signedUrlKeyNames?: string[] | null; } + /** + * Bypass the cache when the specified request headers are present, e.g. Pragma or Authorization headers. Values are case insensitive. The presence of such a header overrides the cache_mode setting. + */ + export interface Schema$BackendServiceCdnPolicyBypassCacheOnRequestHeader { + /** + * The header field name to match on when bypassing cache. Values are case-insensitive. + */ + headerName?: string | null; + } + /** + * Specify CDN TTLs for response error codes. + */ + export interface Schema$BackendServiceCdnPolicyNegativeCachingPolicy { + /** + * The HTTP status code to define a TTL against. Only HTTP status codes 300, 301, 302, 307, 308, 404, 405, 410, 421, 451 and 501 are can be specified as values, and you cannot specify a status code more than once. + */ + code?: number | null; + /** + * The TTL (in seconds) for which to cache responses with the corresponding status code. The maximum allowed value is 1800s (30 minutes), noting that infrequently accessed objects may be evicted from the cache before the defined TTL. + */ + ttl?: number | null; + } /** * Applicable only to Failover for Internal TCP/UDP Load Balancing and Network Load Balancing. On failover or failback, this field indicates whether connection draining will be honored. GCP has a fixed connection draining timeout of 10 minutes. A setting of true terminates existing TCP connections to the active pool during failover and failback, immediately draining traffic. A setting of false allows existing TCP connections to persist, even on VMs no longer in the active pool, for up to the duration of the connection draining timeout (10 minutes). */ @@ -3160,7 +3295,7 @@ export namespace compute_v1 { */ description?: string | null; /** - * User-provided name of the Organization firewall plicy. The name should be unique in the organization in which the firewall policy is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. + * Depreacted, please use short name instead. User-provided name of the Organization firewall plicy. The name should be unique in the organization in which the firewall policy is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. */ displayName?: string | null; /** @@ -3201,6 +3336,10 @@ export namespace compute_v1 { * [Output Only] Server-defined URL for this resource with the resource id. */ selfLinkWithId?: string | null; + /** + * User-provided name of the Organization firewall plicy. The name should be unique in the organization in which the firewall policy is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. + */ + shortName?: string | null; } export interface Schema$FirewallPolicyAssociation { /** @@ -3208,7 +3347,7 @@ export namespace compute_v1 { */ attachmentTarget?: string | null; /** - * [Output Only] The display name of the firewall policy of the association. + * [Output Only] Deprecated, please use short name instead. The display name of the firewall policy of the association. */ displayName?: string | null; /** @@ -3219,6 +3358,10 @@ export namespace compute_v1 { * The name for an association. */ name?: string | null; + /** + * [Output Only] The short name of the firewall policy of the association. + */ + shortName?: string | null; } export interface Schema$FirewallPolicyList { /** @@ -4551,6 +4694,12 @@ export namespace compute_v1 { * Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true. */ faultInjectionPolicy?: Schema$HttpFaultInjection; + /** + * Specifies the maximum duration (timeout) for streams on the selected route. Unlike the timeout field where the timeout duration starts from the time the request has been fully processed (i.e. end-of-stream), the duration in this field is computed from the beginning of the stream until the response has been completely processed, including all retries. A stream that does not complete in this duration is closed. + * If not specified, will use the largest maxStreamDuration among all backend services associated with the route. + * This field is only allowed if the Url map is used with backend services with loadBalancingScheme set to INTERNAL_SELF_MANAGED. + */ + maxStreamDuration?: Schema$Duration; /** * Specifies the policy on how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. * Not supported when the URL map is bound to target gRPC proxy that has validateForProxyless field set to true. @@ -6109,7 +6258,7 @@ export namespace compute_v1 { } export interface Schema$InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy { /** - * [Output Only] The display name of the firewall policy. + * [Output Only] Deprecated, please use short name instead. The display name of the firewall policy. */ displayName?: string | null; /** @@ -6120,6 +6269,10 @@ export namespace compute_v1 { * The rules that apply to the network. */ rules?: Schema$FirewallPolicyRule[]; + /** + * [Output Only] The short name of the firewall policy. + */ + shortName?: string | null; /** * [Output Only] The type of the firewall policy. */ @@ -6457,6 +6610,12 @@ export namespace compute_v1 { * - AVAILABILITY_DOMAIN_2 For improved reliability, customers should configure a pair of attachments, one per availability domain. The selected availability domain will be provided to the Partner via the pairing key, so that the provisioned circuit will lie in the specified domain. If not specified, the value will default to AVAILABILITY_DOMAIN_ANY. */ edgeAvailabilityDomain?: string | null; + /** + * Indicates the user-supplied encryption option of this interconnect attachment: + * - NONE is the default value, which means that the attachment carries unencrypted traffic. VMs can send traffic to, or receive traffic from, this type of attachment. + * - IPSEC indicates that the attachment carries only traffic encrypted by an IPsec device such as an HA VPN gateway. VMs cannot directly send traffic to, or receive traffic from, such an attachment. To use IPsec-encrypted Cloud Interconnect, create the attachment using this option. + */ + encryption?: string | null; /** * [Output Only] Google reference ID, to be used when raising support tickets with Google or otherwise to debug backend connectivity issues. [Deprecated] This field is not used. */ @@ -6469,6 +6628,10 @@ export namespace compute_v1 { * URL of the underlying Interconnect object that this attachment's traffic will traverse through. */ interconnect?: string | null; + /** + * URL of addresses that have been reserved for the interconnect attachment, Used only for interconnect attachment that has the encryption option as IPSEC. The addresses must be RFC 1918 IP address ranges. When creating HA VPN gateway over the interconnect attachment, if the attachment is configured to use an RFC 1918 IP address, then the VPN gateway?s IP address will be allocated from the IP address range specified here. For example, if the HA VPN gateway?s interface 0 is paired to this interconnect attachment, then an RFC 1918 IP address for the VPN gateway interface 0 will be allocated from the IP address specified for this interconnect attachment. If this field is not specified for interconnect attachment that has encryption option as IPSEC, later on when creating HA VPN gateway on this interconnect attachment, the HA VPN gateway's IP address will be allocated from regional external IP address pool. + */ + ipsecInternalAddresses?: string[] | null; /** * [Output Only] Type of the resource. Always compute#interconnectAttachment for interconnect attachments. */ @@ -8050,7 +8213,7 @@ export namespace compute_v1 { } export interface Schema$NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy { /** - * [Output Only] The display name of the firewall policy. + * [Output Only] Deprecated, please use short name instead. The display name of the firewall policy. */ displayName?: string | null; /** @@ -8061,6 +8224,10 @@ export namespace compute_v1 { * The rules that apply to the network. */ rules?: Schema$FirewallPolicyRule[]; + /** + * [Output Only] The short name of the firewall policy. + */ + shortName?: string | null; /** * [Output Only] The type of the firewall policy. */ @@ -9472,6 +9639,286 @@ export namespace compute_v1 { */ networkTier?: string | null; } + /** + * A public advertised prefix represents an aggregated IP prefix or netblock which customers bring to cloud. The IP prefix is a single unit of route advertisement and is announced globally to the internet. + */ + export interface Schema$PublicAdvertisedPrefix { + /** + * [Output Only] Creation timestamp in RFC3339 text format. + */ + creationTimestamp?: string | null; + /** + * An optional description of this resource. Provide this property when you create the resource. + */ + description?: string | null; + /** + * The IPv4 address to be used for reverse DNS verification. + */ + dnsVerificationIp?: string | null; + /** + * Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a new PublicAdvertisedPrefix. An up-to-date fingerprint must be provided in order to update the PublicAdvertisedPrefix, otherwise the request will fail with error 412 conditionNotMet. + * + * To see the latest fingerprint, make a get() request to retrieve a PublicAdvertisedPrefix. + */ + fingerprint?: string | null; + /** + * [Output Only] The unique identifier for the resource type. The server generates this identifier. + */ + id?: string | null; + /** + * The IPv4 address range, in CIDR format, represented by this public advertised prefix. + */ + ipCidrRange?: string | null; + /** + * [Output Only] Type of the resource. Always compute#publicAdvertisedPrefix for public advertised prefixes. + */ + kind?: string | null; + /** + * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. + */ + name?: string | null; + /** + * [Output Only] The list of public delegated prefixes that exist for this public advertised prefix. + */ + publicDelegatedPrefixs?: Schema$PublicAdvertisedPrefixPublicDelegatedPrefix[]; + /** + * [Output Only] Server-defined URL for the resource. + */ + selfLink?: string | null; + /** + * [Output Only] The shared secret to be used for reverse DNS verification. + */ + sharedSecret?: string | null; + /** + * The status of the public advertised prefix. + */ + status?: string | null; + } + export interface Schema$PublicAdvertisedPrefixList { + /** + * [Output Only] Unique identifier for the resource; defined by the server. + */ + id?: string | null; + /** + * A list of PublicAdvertisedPrefix resources. + */ + items?: Schema$PublicAdvertisedPrefix[]; + /** + * [Output Only] Type of the resource. Always compute#publicAdvertisedPrefix for public advertised prefixes. + */ + kind?: string | null; + /** + * [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. + */ + nextPageToken?: string | null; + /** + * [Output Only] Server-defined URL for this resource. + */ + selfLink?: string | null; + /** + * [Output Only] Informational warning message. + */ + warning?: { + code?: string; + data?: Array<{key?: string; value?: string}>; + message?: string; + } | null; + } + /** + * Represents a CIDR range which can be used to assign addresses. + */ + export interface Schema$PublicAdvertisedPrefixPublicDelegatedPrefix { + /** + * The IP address range of the public delegated prefix + */ + ipRange?: string | null; + /** + * The name of the public delegated prefix + */ + name?: string | null; + /** + * The project number of the public delegated prefix + */ + project?: string | null; + /** + * The region of the public delegated prefix if it is regional. If absent, the prefix is global. + */ + region?: string | null; + /** + * The status of the public delegated prefix. Possible values are: INITIALIZING: The public delegated prefix is being initialized and addresses cannot be created yet. ANNOUNCED: The public delegated prefix is active. + */ + status?: string | null; + } + /** + * A PublicDelegatedPrefix resource represents an IP block within a PublicAdvertisedPrefix that is configured within a single cloud scope (global or region). IPs in the block can be allocated to resources within that scope. Public delegated prefixes may be further broken up into smaller IP blocks in the same scope as the parent block. + */ + export interface Schema$PublicDelegatedPrefix { + /** + * [Output Only] Creation timestamp in RFC3339 text format. + */ + creationTimestamp?: string | null; + /** + * An optional description of this resource. Provide this property when you create the resource. + */ + description?: string | null; + /** + * Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a new PublicDelegatedPrefix. An up-to-date fingerprint must be provided in order to update the PublicDelegatedPrefix, otherwise the request will fail with error 412 conditionNotMet. + * + * To see the latest fingerprint, make a get() request to retrieve a PublicDelegatedPrefix. + */ + fingerprint?: string | null; + /** + * [Output Only] The unique identifier for the resource type. The server generates this identifier. + */ + id?: string | null; + /** + * The IPv4 address range, in CIDR format, represented by this public delegated prefix. + */ + ipCidrRange?: string | null; + /** + * If true, the prefix will be live migrated. + */ + isLiveMigration?: boolean | null; + /** + * [Output Only] Type of the resource. Always compute#publicDelegatedPrefix for public delegated prefixes. + */ + kind?: string | null; + /** + * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. + */ + name?: string | null; + /** + * The URL of parent prefix. Either PublicAdvertisedPrefix or PublicDelegatedPrefix. + */ + parentPrefix?: string | null; + /** + * The list of sub public delegated prefixes that exist for this public delegated prefix. + */ + publicDelegatedSubPrefixs?: Schema$PublicDelegatedPrefixPublicDelegatedSubPrefix[]; + /** + * [Output Only] URL of the region where the public delegated prefix resides. This field applies only to the region resource. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body. + */ + region?: string | null; + /** + * [Output Only] Server-defined URL for the resource. + */ + selfLink?: string | null; + /** + * [Output Only] The status of the public delegated prefix. + */ + status?: string | null; + } + export interface Schema$PublicDelegatedPrefixAggregatedList { + /** + * [Output Only] Unique identifier for the resource; defined by the server. + */ + id?: string | null; + /** + * A list of PublicDelegatedPrefixesScopedList resources. + */ + items?: {[key: string]: Schema$PublicDelegatedPrefixesScopedList} | null; + /** + * [Output Only] Type of the resource. Always compute#publicDelegatedPrefixAggregatedList for aggregated lists of public delegated prefixes. + */ + kind?: string | null; + /** + * [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. + */ + nextPageToken?: string | null; + /** + * [Output Only] Server-defined URL for this resource. + */ + selfLink?: string | null; + /** + * [Output Only] Unreachable resources. + */ + unreachables?: string[] | null; + /** + * [Output Only] Informational warning message. + */ + warning?: { + code?: string; + data?: Array<{key?: string; value?: string}>; + message?: string; + } | null; + } + export interface Schema$PublicDelegatedPrefixesScopedList { + /** + * [Output Only] A list of PublicDelegatedPrefixes contained in this scope. + */ + publicDelegatedPrefixes?: Schema$PublicDelegatedPrefix[]; + /** + * [Output Only] Informational warning which replaces the list of public delegated prefixes when the list is empty. + */ + warning?: { + code?: string; + data?: Array<{key?: string; value?: string}>; + message?: string; + } | null; + } + export interface Schema$PublicDelegatedPrefixList { + /** + * [Output Only] Unique identifier for the resource; defined by the server. + */ + id?: string | null; + /** + * A list of PublicDelegatedPrefix resources. + */ + items?: Schema$PublicDelegatedPrefix[]; + /** + * [Output Only] Type of the resource. Always compute#publicDelegatedPrefixList for public delegated prefixes. + */ + kind?: string | null; + /** + * [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. + */ + nextPageToken?: string | null; + /** + * [Output Only] Server-defined URL for this resource. + */ + selfLink?: string | null; + /** + * [Output Only] Informational warning message. + */ + warning?: { + code?: string; + data?: Array<{key?: string; value?: string}>; + message?: string; + } | null; + } + /** + * Represents a sub PublicDelegatedPrefix. + */ + export interface Schema$PublicDelegatedPrefixPublicDelegatedSubPrefix { + /** + * Name of the project scoping this PublicDelegatedSubPrefix. + */ + delegateeProject?: string | null; + /** + * An optional description of this resource. Provide this property when you create the resource. + */ + description?: string | null; + /** + * The IPv4 address range, in CIDR format, represented by this sub public delegated prefix. + */ + ipCidrRange?: string | null; + /** + * Whether the sub prefix is delegated to create Address resources in the delegatee project. + */ + isAddress?: boolean | null; + /** + * The name of the sub public delegated prefix. + */ + name?: string | null; + /** + * [Output Only] The region of the sub public delegated prefix if it is regional. If absent, the sub prefix is global. + */ + region?: string | null; + /** + * [Output Only] The status of the sub public delegated prefix. + */ + status?: string | null; + } /** * A quotas entry. */ @@ -10618,6 +11065,10 @@ export namespace compute_v1 { * An optional description of this resource. Provide this property when you create the resource. */ description?: string | null; + /** + * Field to indicate if a router is dedicated to use with encrypted Interconnect Attachment (IPsec-encrypted Cloud Interconnect feature). + */ + encryptedInterconnectRouter?: boolean | null; /** * [Output Only] The unique identifier for the resource. This identifier is defined by the server. */ @@ -10723,8 +11174,7 @@ export namespace compute_v1 { /** * User-specified list of prefix groups to advertise in custom mode, which can take one of the following options: * - ALL_SUBNETS: Advertises all available subnets, including peer VPC subnets. - * - ALL_VPC_SUBNETS: Advertises the router's own VPC subnets. - * - ALL_PEER_VPC_SUBNETS: Advertises peer subnets of the router's VPC network. Note that this field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the "bgp" message). These groups are advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups. + * - ALL_VPC_SUBNETS: Advertises the router's own VPC subnets. Note that this field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the "bgp" message). These groups are advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups. */ advertisedGroups?: string[] | null; /** @@ -11070,8 +11520,22 @@ export namespace compute_v1 { */ permissions?: string[] | null; } + export interface Schema$ScalingScheduleStatus { + /** + * [Output Only] The last time the scaling schedule became active. Note: this is a timestamp when a schedule actually became active, not when it was planned to do so. The timestamp is in RFC3339 text format. + */ + lastStartTime?: string | null; + /** + * [Output Only] The next time the scaling schedule is to become active. Note: this is a timestamp when a schedule is planned to run, but the actual time might be slightly different. The timestamp is in RFC3339 text format. + */ + nextStartTime?: string | null; + /** + * [Output Only] The current state of a scaling schedule. + */ + state?: string | null; + } /** - * Sets the scheduling options for an Instance. NextID: 17 + * Sets the scheduling options for an Instance. NextID: 20 */ export interface Schema$Scheduling { /** @@ -13849,6 +14313,10 @@ export namespace compute_v1 { * The numeric ID of this VPN gateway interface. */ id?: number | null; + /** + * URL of the interconnect attachment resource. When the value of this field is present, the VPN Gateway will be used for IPsec-encrypted Cloud Interconnect; all Egress or Ingress traffic for this VPN Gateway interface will go through the specified interconnect attachment resource. + */ + interconnectAttachment?: string | null; /** * [Output Only] The external IP address for this VPN gateway interface. */ @@ -16197,6 +16665,7 @@ export namespace compute_v1 { * // "name": "my_name", * // "recommendedSize": 0, * // "region": "my_region", + * // "scalingScheduleStatus": {}, * // "selfLink": "my_selfLink", * // "status": "my_status", * // "statusDetails": [], @@ -16349,6 +16818,7 @@ export namespace compute_v1 { * // "name": "my_name", * // "recommendedSize": 0, * // "region": "my_region", + * // "scalingScheduleStatus": {}, * // "selfLink": "my_selfLink", * // "status": "my_status", * // "statusDetails": [], @@ -16695,6 +17165,7 @@ export namespace compute_v1 { * // "name": "my_name", * // "recommendedSize": 0, * // "region": "my_region", + * // "scalingScheduleStatus": {}, * // "selfLink": "my_selfLink", * // "status": "my_status", * // "statusDetails": [], @@ -16881,6 +17352,7 @@ export namespace compute_v1 { * // "name": "my_name", * // "recommendedSize": 0, * // "region": "my_region", + * // "scalingScheduleStatus": {}, * // "selfLink": "my_selfLink", * // "status": "my_status", * // "statusDetails": [], @@ -19491,6 +19963,7 @@ export namespace compute_v1 { * // "loadBalancingScheme": "my_loadBalancingScheme", * // "localityLbPolicy": "my_localityLbPolicy", * // "logConfig": {}, + * // "maxStreamDuration": {}, * // "name": "my_name", * // "network": "my_network", * // "outlierDetection": {}, @@ -19818,6 +20291,7 @@ export namespace compute_v1 { * // "loadBalancingScheme": "my_loadBalancingScheme", * // "localityLbPolicy": "my_localityLbPolicy", * // "logConfig": {}, + * // "maxStreamDuration": {}, * // "name": "my_name", * // "network": "my_network", * // "outlierDetection": {}, @@ -20181,6 +20655,7 @@ export namespace compute_v1 { * // "loadBalancingScheme": "my_loadBalancingScheme", * // "localityLbPolicy": "my_localityLbPolicy", * // "logConfig": {}, + * // "maxStreamDuration": {}, * // "name": "my_name", * // "network": "my_network", * // "outlierDetection": {}, @@ -20556,6 +21031,7 @@ export namespace compute_v1 { * // "loadBalancingScheme": "my_loadBalancingScheme", * // "localityLbPolicy": "my_localityLbPolicy", * // "logConfig": {}, + * // "maxStreamDuration": {}, * // "name": "my_name", * // "network": "my_network", * // "outlierDetection": {}, @@ -25258,7 +25734,8 @@ export namespace compute_v1 { * // "attachmentTarget": "my_attachmentTarget", * // "displayName": "my_displayName", * // "firewallPolicyId": "my_firewallPolicyId", - * // "name": "my_name" + * // "name": "my_name", + * // "shortName": "my_shortName" * // } * }, * }); @@ -25938,7 +26415,8 @@ export namespace compute_v1 { * // "ruleTupleCount": 0, * // "rules": [], * // "selfLink": "my_selfLink", - * // "selfLinkWithId": "my_selfLinkWithId" + * // "selfLinkWithId": "my_selfLinkWithId", + * // "shortName": "my_shortName" * // } * } * @@ -26076,7 +26554,8 @@ export namespace compute_v1 { * // "attachmentTarget": "my_attachmentTarget", * // "displayName": "my_displayName", * // "firewallPolicyId": "my_firewallPolicyId", - * // "name": "my_name" + * // "name": "my_name", + * // "shortName": "my_shortName" * // } * } * @@ -26522,7 +27001,8 @@ export namespace compute_v1 { * // "ruleTupleCount": 0, * // "rules": [], * // "selfLink": "my_selfLink", - * // "selfLinkWithId": "my_selfLinkWithId" + * // "selfLinkWithId": "my_selfLinkWithId", + * // "shortName": "my_shortName" * // } * }, * }); @@ -27166,7 +27646,8 @@ export namespace compute_v1 { * // "ruleTupleCount": 0, * // "rules": [], * // "selfLink": "my_selfLink", - * // "selfLinkWithId": "my_selfLinkWithId" + * // "selfLinkWithId": "my_selfLinkWithId", + * // "shortName": "my_shortName" * // } * }, * }); @@ -36145,14 +36626,14 @@ export namespace compute_v1 { returnPartialSuccess?: boolean; } - export class Resource$Healthchecks { + export class Resource$Globalpublicdelegatedprefixes { context: APIRequestContext; constructor(context: APIRequestContext) { this.context = context; } /** - * Retrieves the list of all HealthCheck resources, regional and global, available to the specified project. + * Deletes the specified global PublicDelegatedPrefix. * @example * ```js * // Before running the sample: @@ -36172,7 +36653,6 @@ export namespace compute_v1 { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', - * 'https://www.googleapis.com/auth/compute.readonly', * ], * }); * @@ -36181,44 +36661,195 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.healthChecks.aggregatedList({ - * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. - * // - * // 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) ``` - * filter: 'placeholder-value', - * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. - * includeAllScopes: 'placeholder-value', - * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) - * maxResults: 'placeholder-value', - * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * const res = await compute.globalPublicDelegatedPrefixes.delete({ + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // Name of the PublicDelegatedPrefix resource to delete. + * publicDelegatedPrefix: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * // 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. * // - * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. + * // 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. * // - * // Currently, only sorting by `name` or `creationTimestamp desc` is supported. - * orderBy: 'placeholder-value', - * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. - * pageToken: 'placeholder-value', - * // Name of the project scoping this request. + * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + * requestId: 'placeholder-value', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "clientOperationId": "my_clientOperationId", + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "endTime": "my_endTime", + * // "error": {}, + * // "httpErrorMessage": "my_httpErrorMessage", + * // "httpErrorStatusCode": 0, + * // "id": "my_id", + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "name": "my_name", + * // "operationGroupId": "my_operationGroupId", + * // "operationType": "my_operationType", + * // "progress": 0, + * // "region": "my_region", + * // "selfLink": "my_selfLink", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "statusMessage": "my_statusMessage", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "user": "my_user", + * // "warnings": [], + * // "zone": "my_zone" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + delete( + params: Params$Resource$Globalpublicdelegatedprefixes$Delete, + options: StreamMethodOptions + ): GaxiosPromise; + delete( + params?: Params$Resource$Globalpublicdelegatedprefixes$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Globalpublicdelegatedprefixes$Delete, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Globalpublicdelegatedprefixes$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Globalpublicdelegatedprefixes$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Globalpublicdelegatedprefixes$Delete + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Globalpublicdelegatedprefixes$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Globalpublicdelegatedprefixes$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/v1/projects/{project}/global/publicDelegatedPrefixes/{publicDelegatedPrefix}' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['project', 'publicDelegatedPrefix'], + pathParams: ['project', 'publicDelegatedPrefix'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Returns the specified global PublicDelegatedPrefix resource. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.globalPublicDelegatedPrefixes.get({ + * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. - * returnPartialSuccess: 'placeholder-value', + * // Name of the PublicDelegatedPrefix resource to return. + * publicDelegatedPrefix: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * }); * console.log(res.data); * * // Example response * // { + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "fingerprint": "my_fingerprint", * // "id": "my_id", - * // "items": {}, + * // "ipCidrRange": "my_ipCidrRange", + * // "isLiveMigration": false, * // "kind": "my_kind", - * // "nextPageToken": "my_nextPageToken", + * // "name": "my_name", + * // "parentPrefix": "my_parentPrefix", + * // "publicDelegatedSubPrefixs": [], + * // "region": "my_region", * // "selfLink": "my_selfLink", - * // "unreachables": [], - * // "warning": {} + * // "status": "my_status" * // } * } * @@ -36234,57 +36865,55 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - aggregatedList( - params: Params$Resource$Healthchecks$Aggregatedlist, + get( + params: Params$Resource$Globalpublicdelegatedprefixes$Get, options: StreamMethodOptions ): GaxiosPromise; - aggregatedList( - params?: Params$Resource$Healthchecks$Aggregatedlist, + get( + params?: Params$Resource$Globalpublicdelegatedprefixes$Get, options?: MethodOptions - ): GaxiosPromise; - aggregatedList( - params: Params$Resource$Healthchecks$Aggregatedlist, + ): GaxiosPromise; + get( + params: Params$Resource$Globalpublicdelegatedprefixes$Get, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - aggregatedList( - params: Params$Resource$Healthchecks$Aggregatedlist, + get( + params: Params$Resource$Globalpublicdelegatedprefixes$Get, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - aggregatedList( - params: Params$Resource$Healthchecks$Aggregatedlist, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - aggregatedList( - callback: BodyResponseCallback + get( + params: Params$Resource$Globalpublicdelegatedprefixes$Get, + callback: BodyResponseCallback ): void; - aggregatedList( + get(callback: BodyResponseCallback): void; + get( paramsOrCallback?: - | Params$Resource$Healthchecks$Aggregatedlist - | BodyResponseCallback + | Params$Resource$Globalpublicdelegatedprefixes$Get + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Healthchecks$Aggregatedlist; + {}) as Params$Resource$Globalpublicdelegatedprefixes$Get; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Healthchecks$Aggregatedlist; + params = {} as Params$Resource$Globalpublicdelegatedprefixes$Get; options = {}; } @@ -36298,29 +36927,30 @@ export namespace compute_v1 { options: Object.assign( { url: ( - rootUrl + '/compute/v1/projects/{project}/aggregated/healthChecks' + rootUrl + + '/compute/v1/projects/{project}/global/publicDelegatedPrefixes/{publicDelegatedPrefix}' ).replace(/([^:]\/)\/+/g, '$1'), method: 'GET', }, options ), params, - requiredParams: ['project'], - pathParams: ['project'], + requiredParams: ['project', 'publicDelegatedPrefix'], + pathParams: ['project', 'publicDelegatedPrefix'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Deletes the specified HealthCheck resource. + * Creates a global PublicDelegatedPrefix in the specified project using the parameters that are included in the request. * @example * ```js * // Before running the sample: @@ -36348,9 +36978,7 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.healthChecks.delete({ - * // Name of the HealthCheck resource to delete. - * healthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * const res = await compute.globalPublicDelegatedPrefixes.insert({ * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', @@ -36360,6 +36988,26 @@ export namespace compute_v1 { * // * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). * requestId: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "fingerprint": "my_fingerprint", + * // "id": "my_id", + * // "ipCidrRange": "my_ipCidrRange", + * // "isLiveMigration": false, + * // "kind": "my_kind", + * // "name": "my_name", + * // "parentPrefix": "my_parentPrefix", + * // "publicDelegatedSubPrefixs": [], + * // "region": "my_region", + * // "selfLink": "my_selfLink", + * // "status": "my_status" + * // } + * }, * }); * console.log(res.data); * @@ -36404,32 +37052,32 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - delete( - params: Params$Resource$Healthchecks$Delete, + insert( + params: Params$Resource$Globalpublicdelegatedprefixes$Insert, options: StreamMethodOptions ): GaxiosPromise; - delete( - params?: Params$Resource$Healthchecks$Delete, + insert( + params?: Params$Resource$Globalpublicdelegatedprefixes$Insert, options?: MethodOptions ): GaxiosPromise; - delete( - params: Params$Resource$Healthchecks$Delete, + insert( + params: Params$Resource$Globalpublicdelegatedprefixes$Insert, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - delete( - params: Params$Resource$Healthchecks$Delete, + insert( + params: Params$Resource$Globalpublicdelegatedprefixes$Insert, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - delete( - params: Params$Resource$Healthchecks$Delete, + insert( + params: Params$Resource$Globalpublicdelegatedprefixes$Insert, callback: BodyResponseCallback ): void; - delete(callback: BodyResponseCallback): void; - delete( + insert(callback: BodyResponseCallback): void; + insert( paramsOrCallback?: - | Params$Resource$Healthchecks$Delete + | Params$Resource$Globalpublicdelegatedprefixes$Insert | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -36442,12 +37090,12 @@ export namespace compute_v1 { | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Healthchecks$Delete; + {}) as Params$Resource$Globalpublicdelegatedprefixes$Insert; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Healthchecks$Delete; + params = {} as Params$Resource$Globalpublicdelegatedprefixes$Insert; options = {}; } @@ -36462,15 +37110,15 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/global/healthChecks/{healthCheck}' + '/compute/v1/projects/{project}/global/publicDelegatedPrefixes' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'DELETE', + method: 'POST', }, options ), params, - requiredParams: ['project', 'healthCheck'], - pathParams: ['healthCheck', 'project'], + requiredParams: ['project'], + pathParams: ['project'], context: this.context, }; if (callback) { @@ -36484,7 +37132,7 @@ export namespace compute_v1 { } /** - * Returns the specified HealthCheck resource. Gets a list of available health checks by making a list() request. + * Lists the global PublicDelegatedPrefixes for a project. * @example * ```js * // Before running the sample: @@ -36513,36 +37161,41 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.healthChecks.get({ - * // Name of the HealthCheck resource to return. - * healthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * const res = await compute.globalPublicDelegatedPrefixes.list({ + * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. + * // + * // 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) ``` + * filter: 'placeholder-value', + * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * maxResults: 'placeholder-value', + * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * // + * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. + * // + * // Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * orderBy: 'placeholder-value', + * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * pageToken: 'placeholder-value', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + * returnPartialSuccess: 'placeholder-value', * }); * console.log(res.data); * * // Example response * // { - * // "checkIntervalSec": 0, - * // "creationTimestamp": "my_creationTimestamp", - * // "description": "my_description", - * // "grpcHealthCheck": {}, - * // "healthyThreshold": 0, - * // "http2HealthCheck": {}, - * // "httpHealthCheck": {}, - * // "httpsHealthCheck": {}, * // "id": "my_id", + * // "items": [], * // "kind": "my_kind", - * // "logConfig": {}, - * // "name": "my_name", - * // "region": "my_region", + * // "nextPageToken": "my_nextPageToken", * // "selfLink": "my_selfLink", - * // "sslHealthCheck": {}, - * // "tcpHealthCheck": {}, - * // "timeoutSec": 0, - * // "type": "my_type", - * // "unhealthyThreshold": 0 + * // "warning": {} * // } * } * @@ -36558,49 +37211,57 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - get( - params: Params$Resource$Healthchecks$Get, + list( + params: Params$Resource$Globalpublicdelegatedprefixes$List, options: StreamMethodOptions ): GaxiosPromise; - get( - params?: Params$Resource$Healthchecks$Get, + list( + params?: Params$Resource$Globalpublicdelegatedprefixes$List, options?: MethodOptions - ): GaxiosPromise; - get( - params: Params$Resource$Healthchecks$Get, + ): GaxiosPromise; + list( + params: Params$Resource$Globalpublicdelegatedprefixes$List, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - get( - params: Params$Resource$Healthchecks$Get, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + list( + params: Params$Resource$Globalpublicdelegatedprefixes$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - get( - params: Params$Resource$Healthchecks$Get, - callback: BodyResponseCallback + list( + params: Params$Resource$Globalpublicdelegatedprefixes$List, + callback: BodyResponseCallback ): void; - get(callback: BodyResponseCallback): void; - get( + list( + callback: BodyResponseCallback + ): void; + list( paramsOrCallback?: - | Params$Resource$Healthchecks$Get - | BodyResponseCallback + | Params$Resource$Globalpublicdelegatedprefixes$List + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Healthchecks$Get; + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Globalpublicdelegatedprefixes$List; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Healthchecks$Get; + params = {} as Params$Resource$Globalpublicdelegatedprefixes$List; options = {}; } @@ -36615,29 +37276,29 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/global/healthChecks/{healthCheck}' + '/compute/v1/projects/{project}/global/publicDelegatedPrefixes' ).replace(/([^:]\/)\/+/g, '$1'), method: 'GET', }, options ), params, - requiredParams: ['project', 'healthCheck'], - pathParams: ['healthCheck', 'project'], + requiredParams: ['project'], + pathParams: ['project'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Creates a HealthCheck resource in the specified project using the data included in the request. + * Patches the specified global PublicDelegatedPrefix resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules. * @example * ```js * // Before running the sample: @@ -36665,10 +37326,12 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.healthChecks.insert({ + * const res = await compute.globalPublicDelegatedPrefixes.patch({ * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // Name of the PublicDelegatedPrefix resource to patch. + * publicDelegatedPrefix: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * // 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. * // * // 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. @@ -36680,25 +37343,19 @@ export namespace compute_v1 { * requestBody: { * // request body parameters * // { - * // "checkIntervalSec": 0, * // "creationTimestamp": "my_creationTimestamp", * // "description": "my_description", - * // "grpcHealthCheck": {}, - * // "healthyThreshold": 0, - * // "http2HealthCheck": {}, - * // "httpHealthCheck": {}, - * // "httpsHealthCheck": {}, + * // "fingerprint": "my_fingerprint", * // "id": "my_id", + * // "ipCidrRange": "my_ipCidrRange", + * // "isLiveMigration": false, * // "kind": "my_kind", - * // "logConfig": {}, * // "name": "my_name", + * // "parentPrefix": "my_parentPrefix", + * // "publicDelegatedSubPrefixs": [], * // "region": "my_region", * // "selfLink": "my_selfLink", - * // "sslHealthCheck": {}, - * // "tcpHealthCheck": {}, - * // "timeoutSec": 0, - * // "type": "my_type", - * // "unhealthyThreshold": 0 + * // "status": "my_status" * // } * }, * }); @@ -36745,32 +37402,32 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - insert( - params: Params$Resource$Healthchecks$Insert, + patch( + params: Params$Resource$Globalpublicdelegatedprefixes$Patch, options: StreamMethodOptions ): GaxiosPromise; - insert( - params?: Params$Resource$Healthchecks$Insert, + patch( + params?: Params$Resource$Globalpublicdelegatedprefixes$Patch, options?: MethodOptions ): GaxiosPromise; - insert( - params: Params$Resource$Healthchecks$Insert, + patch( + params: Params$Resource$Globalpublicdelegatedprefixes$Patch, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - insert( - params: Params$Resource$Healthchecks$Insert, + patch( + params: Params$Resource$Globalpublicdelegatedprefixes$Patch, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - insert( - params: Params$Resource$Healthchecks$Insert, + patch( + params: Params$Resource$Globalpublicdelegatedprefixes$Patch, callback: BodyResponseCallback ): void; - insert(callback: BodyResponseCallback): void; - insert( + patch(callback: BodyResponseCallback): void; + patch( paramsOrCallback?: - | Params$Resource$Healthchecks$Insert + | Params$Resource$Globalpublicdelegatedprefixes$Patch | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -36783,12 +37440,12 @@ export namespace compute_v1 { | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Healthchecks$Insert; + {}) as Params$Resource$Globalpublicdelegatedprefixes$Patch; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Healthchecks$Insert; + params = {} as Params$Resource$Globalpublicdelegatedprefixes$Patch; options = {}; } @@ -36802,15 +37459,16 @@ export namespace compute_v1 { options: Object.assign( { url: ( - rootUrl + '/compute/v1/projects/{project}/global/healthChecks' + rootUrl + + '/compute/v1/projects/{project}/global/publicDelegatedPrefixes/{publicDelegatedPrefix}' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'POST', + method: 'PATCH', }, options ), params, - requiredParams: ['project'], - pathParams: ['project'], + requiredParams: ['project', 'publicDelegatedPrefix'], + pathParams: ['project', 'publicDelegatedPrefix'], context: this.context, }; if (callback) { @@ -36822,9 +37480,128 @@ export namespace compute_v1 { return createAPIRequest(parameters); } } + } + export interface Params$Resource$Globalpublicdelegatedprefixes$Delete + extends StandardParameters { /** - * Retrieves the list of HealthCheck resources available to the specified project. + * Project ID for this request. + */ + project?: string; + /** + * Name of the PublicDelegatedPrefix resource to delete. + */ + publicDelegatedPrefix?: string; + /** + * 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. + * + * 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; + } + export interface Params$Resource$Globalpublicdelegatedprefixes$Get + extends StandardParameters { + /** + * Project ID for this request. + */ + project?: string; + /** + * Name of the PublicDelegatedPrefix resource to return. + */ + publicDelegatedPrefix?: string; + } + export interface Params$Resource$Globalpublicdelegatedprefixes$Insert + extends StandardParameters { + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + + /** + * Request body metadata + */ + requestBody?: Schema$PublicDelegatedPrefix; + } + export interface Params$Resource$Globalpublicdelegatedprefixes$List + extends StandardParameters { + /** + * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. + * + * 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) ``` + */ + filter?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + */ + maxResults?: number; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. + * + * Currently, only sorting by `name` or `creationTimestamp desc` is supported. + */ + orderBy?: string; + /** + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + */ + pageToken?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + */ + returnPartialSuccess?: boolean; + } + export interface Params$Resource$Globalpublicdelegatedprefixes$Patch + extends StandardParameters { + /** + * Project ID for this request. + */ + project?: string; + /** + * Name of the PublicDelegatedPrefix resource to patch. + */ + publicDelegatedPrefix?: string; + /** + * 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. + * + * 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; + + /** + * Request body metadata + */ + requestBody?: Schema$PublicDelegatedPrefix; + } + + export class Resource$Healthchecks { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Retrieves the list of all HealthCheck resources, regional and global, available to the specified project. * @example * ```js * // Before running the sample: @@ -36853,7 +37630,7 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.healthChecks.list({ + * const res = await compute.healthChecks.aggregatedList({ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. @@ -36862,6 +37639,8 @@ export namespace compute_v1 { * // * // 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) ``` * filter: 'placeholder-value', + * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. + * includeAllScopes: 'placeholder-value', * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) * maxResults: 'placeholder-value', * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. @@ -36872,7 +37651,7 @@ export namespace compute_v1 { * orderBy: 'placeholder-value', * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. * pageToken: 'placeholder-value', - * // Project ID for this request. + * // Name of the project scoping this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. @@ -36883,10 +37662,11 @@ export namespace compute_v1 { * // Example response * // { * // "id": "my_id", - * // "items": [], + * // "items": {}, * // "kind": "my_kind", * // "nextPageToken": "my_nextPageToken", * // "selfLink": "my_selfLink", + * // "unreachables": [], * // "warning": {} * // } * } @@ -36903,50 +37683,57 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - list( - params: Params$Resource$Healthchecks$List, + aggregatedList( + params: Params$Resource$Healthchecks$Aggregatedlist, options: StreamMethodOptions ): GaxiosPromise; - list( - params?: Params$Resource$Healthchecks$List, + aggregatedList( + params?: Params$Resource$Healthchecks$Aggregatedlist, options?: MethodOptions - ): GaxiosPromise; - list( - params: Params$Resource$Healthchecks$List, + ): GaxiosPromise; + aggregatedList( + params: Params$Resource$Healthchecks$Aggregatedlist, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Healthchecks$List, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + aggregatedList( + params: Params$Resource$Healthchecks$Aggregatedlist, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Healthchecks$List, - callback: BodyResponseCallback + aggregatedList( + params: Params$Resource$Healthchecks$Aggregatedlist, + callback: BodyResponseCallback ): void; - list(callback: BodyResponseCallback): void; - list( + aggregatedList( + callback: BodyResponseCallback + ): void; + aggregatedList( paramsOrCallback?: - | Params$Resource$Healthchecks$List - | BodyResponseCallback + | Params$Resource$Healthchecks$Aggregatedlist + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { + ): + | void + | GaxiosPromise + | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Healthchecks$List; + {}) as Params$Resource$Healthchecks$Aggregatedlist; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Healthchecks$List; + params = {} as Params$Resource$Healthchecks$Aggregatedlist; options = {}; } @@ -36960,7 +37747,7 @@ export namespace compute_v1 { options: Object.assign( { url: ( - rootUrl + '/compute/v1/projects/{project}/global/healthChecks' + rootUrl + '/compute/v1/projects/{project}/aggregated/healthChecks' ).replace(/([^:]\/)\/+/g, '$1'), method: 'GET', }, @@ -36972,17 +37759,17 @@ export namespace compute_v1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Updates a HealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. + * Deletes the specified HealthCheck resource. * @example * ```js * // Before running the sample: @@ -37010,8 +37797,8 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.healthChecks.patch({ - * // Name of the HealthCheck resource to patch. + * const res = await compute.healthChecks.delete({ + * // Name of the HealthCheck resource to delete. * healthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * // Project ID for this request. * project: @@ -37022,32 +37809,6 @@ export namespace compute_v1 { * // * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). * requestId: 'placeholder-value', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "checkIntervalSec": 0, - * // "creationTimestamp": "my_creationTimestamp", - * // "description": "my_description", - * // "grpcHealthCheck": {}, - * // "healthyThreshold": 0, - * // "http2HealthCheck": {}, - * // "httpHealthCheck": {}, - * // "httpsHealthCheck": {}, - * // "id": "my_id", - * // "kind": "my_kind", - * // "logConfig": {}, - * // "name": "my_name", - * // "region": "my_region", - * // "selfLink": "my_selfLink", - * // "sslHealthCheck": {}, - * // "tcpHealthCheck": {}, - * // "timeoutSec": 0, - * // "type": "my_type", - * // "unhealthyThreshold": 0 - * // } - * }, * }); * console.log(res.data); * @@ -37092,32 +37853,32 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - patch( - params: Params$Resource$Healthchecks$Patch, + delete( + params: Params$Resource$Healthchecks$Delete, options: StreamMethodOptions ): GaxiosPromise; - patch( - params?: Params$Resource$Healthchecks$Patch, + delete( + params?: Params$Resource$Healthchecks$Delete, options?: MethodOptions ): GaxiosPromise; - patch( - params: Params$Resource$Healthchecks$Patch, + delete( + params: Params$Resource$Healthchecks$Delete, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - patch( - params: Params$Resource$Healthchecks$Patch, + delete( + params: Params$Resource$Healthchecks$Delete, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - patch( - params: Params$Resource$Healthchecks$Patch, + delete( + params: Params$Resource$Healthchecks$Delete, callback: BodyResponseCallback ): void; - patch(callback: BodyResponseCallback): void; - patch( + delete(callback: BodyResponseCallback): void; + delete( paramsOrCallback?: - | Params$Resource$Healthchecks$Patch + | Params$Resource$Healthchecks$Delete | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -37130,12 +37891,12 @@ export namespace compute_v1 { | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Healthchecks$Patch; + {}) as Params$Resource$Healthchecks$Delete; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Healthchecks$Patch; + params = {} as Params$Resource$Healthchecks$Delete; options = {}; } @@ -37152,7 +37913,7 @@ export namespace compute_v1 { rootUrl + '/compute/v1/projects/{project}/global/healthChecks/{healthCheck}' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'PATCH', + method: 'DELETE', }, options ), @@ -37172,7 +37933,7 @@ export namespace compute_v1 { } /** - * Updates a HealthCheck resource in the specified project using the data included in the request. + * Returns the specified HealthCheck resource. Gets a list of available health checks by making a list() request. * @example * ```js * // Before running the sample: @@ -37192,6 +37953,7 @@ export namespace compute_v1 { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', * ], * }); * @@ -37200,73 +37962,36 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.healthChecks.update({ - * // Name of the HealthCheck resource to update. + * const res = await compute.healthChecks.get({ + * // Name of the HealthCheck resource to return. * healthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // 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. - * // - * // 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: 'placeholder-value', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "checkIntervalSec": 0, - * // "creationTimestamp": "my_creationTimestamp", - * // "description": "my_description", - * // "grpcHealthCheck": {}, - * // "healthyThreshold": 0, - * // "http2HealthCheck": {}, - * // "httpHealthCheck": {}, - * // "httpsHealthCheck": {}, - * // "id": "my_id", - * // "kind": "my_kind", - * // "logConfig": {}, - * // "name": "my_name", - * // "region": "my_region", - * // "selfLink": "my_selfLink", - * // "sslHealthCheck": {}, - * // "tcpHealthCheck": {}, - * // "timeoutSec": 0, - * // "type": "my_type", - * // "unhealthyThreshold": 0 - * // } - * }, * }); * console.log(res.data); * * // Example response * // { - * // "clientOperationId": "my_clientOperationId", + * // "checkIntervalSec": 0, * // "creationTimestamp": "my_creationTimestamp", * // "description": "my_description", - * // "endTime": "my_endTime", - * // "error": {}, - * // "httpErrorMessage": "my_httpErrorMessage", - * // "httpErrorStatusCode": 0, + * // "grpcHealthCheck": {}, + * // "healthyThreshold": 0, + * // "http2HealthCheck": {}, + * // "httpHealthCheck": {}, + * // "httpsHealthCheck": {}, * // "id": "my_id", - * // "insertTime": "my_insertTime", * // "kind": "my_kind", + * // "logConfig": {}, * // "name": "my_name", - * // "operationGroupId": "my_operationGroupId", - * // "operationType": "my_operationType", - * // "progress": 0, * // "region": "my_region", * // "selfLink": "my_selfLink", - * // "startTime": "my_startTime", - * // "status": "my_status", - * // "statusMessage": "my_statusMessage", - * // "targetId": "my_targetId", - * // "targetLink": "my_targetLink", - * // "user": "my_user", - * // "warnings": [], - * // "zone": "my_zone" + * // "sslHealthCheck": {}, + * // "tcpHealthCheck": {}, + * // "timeoutSec": 0, + * // "type": "my_type", + * // "unhealthyThreshold": 0 * // } * } * @@ -37282,50 +38007,49 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - update( - params: Params$Resource$Healthchecks$Update, + get( + params: Params$Resource$Healthchecks$Get, options: StreamMethodOptions ): GaxiosPromise; - update( - params?: Params$Resource$Healthchecks$Update, + get( + params?: Params$Resource$Healthchecks$Get, options?: MethodOptions - ): GaxiosPromise; - update( - params: Params$Resource$Healthchecks$Update, + ): GaxiosPromise; + get( + params: Params$Resource$Healthchecks$Get, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - update( - params: Params$Resource$Healthchecks$Update, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + get( + params: Params$Resource$Healthchecks$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - update( - params: Params$Resource$Healthchecks$Update, - callback: BodyResponseCallback + get( + params: Params$Resource$Healthchecks$Get, + callback: BodyResponseCallback ): void; - update(callback: BodyResponseCallback): void; - update( + get(callback: BodyResponseCallback): void; + get( paramsOrCallback?: - | Params$Resource$Healthchecks$Update - | BodyResponseCallback + | Params$Resource$Healthchecks$Get + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { - let params = (paramsOrCallback || - {}) as Params$Resource$Healthchecks$Update; + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Healthchecks$Get; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Healthchecks$Update; + params = {} as Params$Resource$Healthchecks$Get; options = {}; } @@ -37342,7 +38066,7 @@ export namespace compute_v1 { rootUrl + '/compute/v1/projects/{project}/global/healthChecks/{healthCheck}' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'PUT', + method: 'GET', }, options ), @@ -37352,200 +38076,17 @@ export namespace compute_v1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } - } - - export interface Params$Resource$Healthchecks$Aggregatedlist - extends StandardParameters { - /** - * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. - * - * 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) ``` - */ - filter?: string; - /** - * Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. - */ - includeAllScopes?: boolean; - /** - * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) - */ - maxResults?: number; - /** - * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. - * - * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. - * - * Currently, only sorting by `name` or `creationTimestamp desc` is supported. - */ - orderBy?: string; - /** - * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. - */ - pageToken?: string; - /** - * Name of the project scoping this request. - */ - project?: string; - /** - * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. - */ - returnPartialSuccess?: boolean; - } - export interface Params$Resource$Healthchecks$Delete - extends StandardParameters { - /** - * Name of the HealthCheck resource to delete. - */ - healthCheck?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * 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. - * - * 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; - } - export interface Params$Resource$Healthchecks$Get extends StandardParameters { - /** - * Name of the HealthCheck resource to return. - */ - healthCheck?: string; - /** - * Project ID for this request. - */ - project?: string; - } - export interface Params$Resource$Healthchecks$Insert - extends StandardParameters { - /** - * Project ID for this request. - */ - project?: string; - /** - * 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. - * - * 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; - - /** - * Request body metadata - */ - requestBody?: Schema$HealthCheck; - } - export interface Params$Resource$Healthchecks$List - extends StandardParameters { - /** - * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. - * - * 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) ``` - */ - filter?: string; - /** - * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) - */ - maxResults?: number; - /** - * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. - * - * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. - * - * Currently, only sorting by `name` or `creationTimestamp desc` is supported. - */ - orderBy?: string; - /** - * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. - */ - pageToken?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. - */ - returnPartialSuccess?: boolean; - } - export interface Params$Resource$Healthchecks$Patch - extends StandardParameters { - /** - * Name of the HealthCheck resource to patch. - */ - healthCheck?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * 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. - * - * 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; - - /** - * Request body metadata - */ - requestBody?: Schema$HealthCheck; - } - export interface Params$Resource$Healthchecks$Update - extends StandardParameters { - /** - * Name of the HealthCheck resource to update. - */ - healthCheck?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * 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. - * - * 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; - - /** - * Request body metadata - */ - requestBody?: Schema$HealthCheck; - } - - export class Resource$Httphealthchecks { - context: APIRequestContext; - constructor(context: APIRequestContext) { - this.context = context; - } /** - * Deletes the specified HttpHealthCheck resource. + * Creates a HealthCheck resource in the specified project using the data included in the request. * @example * ```js * // Before running the sample: @@ -37573,9 +38114,7 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.httpHealthChecks.delete({ - * // Name of the HttpHealthCheck resource to delete. - * httpHealthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * const res = await compute.healthChecks.insert({ * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', @@ -37585,6 +38124,32 @@ export namespace compute_v1 { * // * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). * requestId: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "checkIntervalSec": 0, + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "grpcHealthCheck": {}, + * // "healthyThreshold": 0, + * // "http2HealthCheck": {}, + * // "httpHealthCheck": {}, + * // "httpsHealthCheck": {}, + * // "id": "my_id", + * // "kind": "my_kind", + * // "logConfig": {}, + * // "name": "my_name", + * // "region": "my_region", + * // "selfLink": "my_selfLink", + * // "sslHealthCheck": {}, + * // "tcpHealthCheck": {}, + * // "timeoutSec": 0, + * // "type": "my_type", + * // "unhealthyThreshold": 0 + * // } + * }, * }); * console.log(res.data); * @@ -37629,32 +38194,32 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - delete( - params: Params$Resource$Httphealthchecks$Delete, + insert( + params: Params$Resource$Healthchecks$Insert, options: StreamMethodOptions ): GaxiosPromise; - delete( - params?: Params$Resource$Httphealthchecks$Delete, + insert( + params?: Params$Resource$Healthchecks$Insert, options?: MethodOptions ): GaxiosPromise; - delete( - params: Params$Resource$Httphealthchecks$Delete, + insert( + params: Params$Resource$Healthchecks$Insert, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - delete( - params: Params$Resource$Httphealthchecks$Delete, + insert( + params: Params$Resource$Healthchecks$Insert, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - delete( - params: Params$Resource$Httphealthchecks$Delete, + insert( + params: Params$Resource$Healthchecks$Insert, callback: BodyResponseCallback ): void; - delete(callback: BodyResponseCallback): void; - delete( + insert(callback: BodyResponseCallback): void; + insert( paramsOrCallback?: - | Params$Resource$Httphealthchecks$Delete + | Params$Resource$Healthchecks$Insert | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -37667,12 +38232,12 @@ export namespace compute_v1 { | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Httphealthchecks$Delete; + {}) as Params$Resource$Healthchecks$Insert; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Httphealthchecks$Delete; + params = {} as Params$Resource$Healthchecks$Insert; options = {}; } @@ -37686,16 +38251,15 @@ export namespace compute_v1 { options: Object.assign( { url: ( - rootUrl + - '/compute/v1/projects/{project}/global/httpHealthChecks/{httpHealthCheck}' + rootUrl + '/compute/v1/projects/{project}/global/healthChecks' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'DELETE', + method: 'POST', }, options ), params, - requiredParams: ['project', 'httpHealthCheck'], - pathParams: ['httpHealthCheck', 'project'], + requiredParams: ['project'], + pathParams: ['project'], context: this.context, }; if (callback) { @@ -37709,7 +38273,7 @@ export namespace compute_v1 { } /** - * Returns the specified HttpHealthCheck resource. Gets a list of available HTTP health checks by making a list() request. + * Retrieves the list of HealthCheck resources available to the specified project. * @example * ```js * // Before running the sample: @@ -37738,30 +38302,41 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.httpHealthChecks.get({ - * // Name of the HttpHealthCheck resource to return. - * httpHealthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * const res = await compute.healthChecks.list({ + * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. + * // + * // 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) ``` + * filter: 'placeholder-value', + * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * maxResults: 'placeholder-value', + * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * // + * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. + * // + * // Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * orderBy: 'placeholder-value', + * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * pageToken: 'placeholder-value', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + * returnPartialSuccess: 'placeholder-value', * }); * console.log(res.data); * * // Example response * // { - * // "checkIntervalSec": 0, - * // "creationTimestamp": "my_creationTimestamp", - * // "description": "my_description", - * // "healthyThreshold": 0, - * // "host": "my_host", * // "id": "my_id", + * // "items": [], * // "kind": "my_kind", - * // "name": "my_name", - * // "port": 0, - * // "requestPath": "my_requestPath", + * // "nextPageToken": "my_nextPageToken", * // "selfLink": "my_selfLink", - * // "timeoutSec": 0, - * // "unhealthyThreshold": 0 + * // "warning": {} * // } * } * @@ -37777,50 +38352,50 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - get( - params: Params$Resource$Httphealthchecks$Get, + list( + params: Params$Resource$Healthchecks$List, options: StreamMethodOptions ): GaxiosPromise; - get( - params?: Params$Resource$Httphealthchecks$Get, + list( + params?: Params$Resource$Healthchecks$List, options?: MethodOptions - ): GaxiosPromise; - get( - params: Params$Resource$Httphealthchecks$Get, + ): GaxiosPromise; + list( + params: Params$Resource$Healthchecks$List, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - get( - params: Params$Resource$Httphealthchecks$Get, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + list( + params: Params$Resource$Healthchecks$List, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - get( - params: Params$Resource$Httphealthchecks$Get, - callback: BodyResponseCallback + list( + params: Params$Resource$Healthchecks$List, + callback: BodyResponseCallback ): void; - get(callback: BodyResponseCallback): void; - get( + list(callback: BodyResponseCallback): void; + list( paramsOrCallback?: - | Params$Resource$Httphealthchecks$Get - | BodyResponseCallback + | Params$Resource$Healthchecks$List + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { + ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Httphealthchecks$Get; + {}) as Params$Resource$Healthchecks$List; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Httphealthchecks$Get; + params = {} as Params$Resource$Healthchecks$List; options = {}; } @@ -37834,30 +38409,29 @@ export namespace compute_v1 { options: Object.assign( { url: ( - rootUrl + - '/compute/v1/projects/{project}/global/httpHealthChecks/{httpHealthCheck}' + rootUrl + '/compute/v1/projects/{project}/global/healthChecks' ).replace(/([^:]\/)\/+/g, '$1'), method: 'GET', }, options ), params, - requiredParams: ['project', 'httpHealthCheck'], - pathParams: ['httpHealthCheck', 'project'], + requiredParams: ['project'], + pathParams: ['project'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Creates a HttpHealthCheck resource in the specified project using the data included in the request. + * Updates a HealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. * @example * ```js * // Before running the sample: @@ -37885,7 +38459,9 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.httpHealthChecks.insert({ + * const res = await compute.healthChecks.patch({ + * // Name of the HealthCheck resource to patch. + * healthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', @@ -37903,15 +38479,21 @@ export namespace compute_v1 { * // "checkIntervalSec": 0, * // "creationTimestamp": "my_creationTimestamp", * // "description": "my_description", + * // "grpcHealthCheck": {}, * // "healthyThreshold": 0, - * // "host": "my_host", + * // "http2HealthCheck": {}, + * // "httpHealthCheck": {}, + * // "httpsHealthCheck": {}, * // "id": "my_id", * // "kind": "my_kind", + * // "logConfig": {}, * // "name": "my_name", - * // "port": 0, - * // "requestPath": "my_requestPath", + * // "region": "my_region", * // "selfLink": "my_selfLink", + * // "sslHealthCheck": {}, + * // "tcpHealthCheck": {}, * // "timeoutSec": 0, + * // "type": "my_type", * // "unhealthyThreshold": 0 * // } * }, @@ -37959,32 +38541,32 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - insert( - params: Params$Resource$Httphealthchecks$Insert, + patch( + params: Params$Resource$Healthchecks$Patch, options: StreamMethodOptions ): GaxiosPromise; - insert( - params?: Params$Resource$Httphealthchecks$Insert, + patch( + params?: Params$Resource$Healthchecks$Patch, options?: MethodOptions ): GaxiosPromise; - insert( - params: Params$Resource$Httphealthchecks$Insert, + patch( + params: Params$Resource$Healthchecks$Patch, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - insert( - params: Params$Resource$Httphealthchecks$Insert, + patch( + params: Params$Resource$Healthchecks$Patch, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - insert( - params: Params$Resource$Httphealthchecks$Insert, + patch( + params: Params$Resource$Healthchecks$Patch, callback: BodyResponseCallback ): void; - insert(callback: BodyResponseCallback): void; - insert( + patch(callback: BodyResponseCallback): void; + patch( paramsOrCallback?: - | Params$Resource$Httphealthchecks$Insert + | Params$Resource$Healthchecks$Patch | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -37997,12 +38579,12 @@ export namespace compute_v1 { | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Httphealthchecks$Insert; + {}) as Params$Resource$Healthchecks$Patch; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Httphealthchecks$Insert; + params = {} as Params$Resource$Healthchecks$Patch; options = {}; } @@ -38016,15 +38598,16 @@ export namespace compute_v1 { options: Object.assign( { url: ( - rootUrl + '/compute/v1/projects/{project}/global/httpHealthChecks' + rootUrl + + '/compute/v1/projects/{project}/global/healthChecks/{healthCheck}' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'POST', + method: 'PATCH', }, options ), params, - requiredParams: ['project'], - pathParams: ['project'], + requiredParams: ['project', 'healthCheck'], + pathParams: ['healthCheck', 'project'], context: this.context, }; if (callback) { @@ -38038,7 +38621,7 @@ export namespace compute_v1 { } /** - * Retrieves the list of HttpHealthCheck resources available to the specified project. + * Updates a HealthCheck resource in the specified project using the data included in the request. * @example * ```js * // Before running the sample: @@ -38058,7 +38641,6 @@ export namespace compute_v1 { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', - * 'https://www.googleapis.com/auth/compute.readonly', * ], * }); * @@ -38067,41 +38649,73 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.httpHealthChecks.list({ - * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. - * // - * // 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) ``` - * filter: 'placeholder-value', - * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) - * maxResults: 'placeholder-value', - * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. - * // - * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. - * // - * // Currently, only sorting by `name` or `creationTimestamp desc` is supported. - * orderBy: 'placeholder-value', - * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. - * pageToken: 'placeholder-value', + * const res = await compute.healthChecks.update({ + * // Name of the HealthCheck resource to update. + * healthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. - * returnPartialSuccess: 'placeholder-value', + * // 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. + * // + * // 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: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "checkIntervalSec": 0, + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "grpcHealthCheck": {}, + * // "healthyThreshold": 0, + * // "http2HealthCheck": {}, + * // "httpHealthCheck": {}, + * // "httpsHealthCheck": {}, + * // "id": "my_id", + * // "kind": "my_kind", + * // "logConfig": {}, + * // "name": "my_name", + * // "region": "my_region", + * // "selfLink": "my_selfLink", + * // "sslHealthCheck": {}, + * // "tcpHealthCheck": {}, + * // "timeoutSec": 0, + * // "type": "my_type", + * // "unhealthyThreshold": 0 + * // } + * }, * }); * console.log(res.data); * * // Example response * // { + * // "clientOperationId": "my_clientOperationId", + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "endTime": "my_endTime", + * // "error": {}, + * // "httpErrorMessage": "my_httpErrorMessage", + * // "httpErrorStatusCode": 0, * // "id": "my_id", - * // "items": [], + * // "insertTime": "my_insertTime", * // "kind": "my_kind", - * // "nextPageToken": "my_nextPageToken", + * // "name": "my_name", + * // "operationGroupId": "my_operationGroupId", + * // "operationType": "my_operationType", + * // "progress": 0, + * // "region": "my_region", * // "selfLink": "my_selfLink", - * // "warning": {} + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "statusMessage": "my_statusMessage", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "user": "my_user", + * // "warnings": [], + * // "zone": "my_zone" * // } * } * @@ -38117,218 +38731,32 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - list( - params: Params$Resource$Httphealthchecks$List, + update( + params: Params$Resource$Healthchecks$Update, options: StreamMethodOptions ): GaxiosPromise; - list( - params?: Params$Resource$Httphealthchecks$List, - options?: MethodOptions - ): GaxiosPromise; - list( - params: Params$Resource$Httphealthchecks$List, - options: StreamMethodOptions | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - list( - params: Params$Resource$Httphealthchecks$List, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - list( - params: Params$Resource$Httphealthchecks$List, - callback: BodyResponseCallback - ): void; - list(callback: BodyResponseCallback): void; - list( - paramsOrCallback?: - | Params$Resource$Httphealthchecks$List - | BodyResponseCallback - | BodyResponseCallback, - optionsOrCallback?: - | MethodOptions - | StreamMethodOptions - | BodyResponseCallback - | BodyResponseCallback, - callback?: - | BodyResponseCallback - | BodyResponseCallback - ): - | void - | GaxiosPromise - | GaxiosPromise { - let params = (paramsOrCallback || - {}) as Params$Resource$Httphealthchecks$List; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Httphealthchecks$List; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: ( - rootUrl + '/compute/v1/projects/{project}/global/httpHealthChecks' - ).replace(/([^:]\/)\/+/g, '$1'), - method: 'GET', - }, - options - ), - params, - requiredParams: ['project'], - pathParams: ['project'], - context: this.context, - }; - if (callback) { - createAPIRequest( - parameters, - callback as BodyResponseCallback - ); - } else { - return createAPIRequest(parameters); - } - } - - /** - * Updates a HttpHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. - * @example - * ```js - * // Before running the sample: - * // - Enable the API at: - * // https://console.developers.google.com/apis/api/compute.googleapis.com - * // - Login into gcloud by running: - * // `$ gcloud auth application-default login` - * // - Install the npm module by running: - * // `$ npm install googleapis` - * - * const {google} = require('googleapis'); - * const compute = google.compute('v1'); - * - * async function main() { - * const auth = new google.auth.GoogleAuth({ - * // Scopes can be specified either as an array or as a single, space-delimited string. - * scopes: [ - * 'https://www.googleapis.com/auth/cloud-platform', - * 'https://www.googleapis.com/auth/compute', - * ], - * }); - * - * // Acquire an auth client, and bind it to all future calls - * const authClient = await auth.getClient(); - * google.options({auth: authClient}); - * - * // Do the magic - * const res = await compute.httpHealthChecks.patch({ - * // Name of the HttpHealthCheck resource to patch. - * httpHealthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', - * // Project ID for this request. - * project: - * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // 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. - * // - * // 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: 'placeholder-value', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "checkIntervalSec": 0, - * // "creationTimestamp": "my_creationTimestamp", - * // "description": "my_description", - * // "healthyThreshold": 0, - * // "host": "my_host", - * // "id": "my_id", - * // "kind": "my_kind", - * // "name": "my_name", - * // "port": 0, - * // "requestPath": "my_requestPath", - * // "selfLink": "my_selfLink", - * // "timeoutSec": 0, - * // "unhealthyThreshold": 0 - * // } - * }, - * }); - * console.log(res.data); - * - * // Example response - * // { - * // "clientOperationId": "my_clientOperationId", - * // "creationTimestamp": "my_creationTimestamp", - * // "description": "my_description", - * // "endTime": "my_endTime", - * // "error": {}, - * // "httpErrorMessage": "my_httpErrorMessage", - * // "httpErrorStatusCode": 0, - * // "id": "my_id", - * // "insertTime": "my_insertTime", - * // "kind": "my_kind", - * // "name": "my_name", - * // "operationGroupId": "my_operationGroupId", - * // "operationType": "my_operationType", - * // "progress": 0, - * // "region": "my_region", - * // "selfLink": "my_selfLink", - * // "startTime": "my_startTime", - * // "status": "my_status", - * // "statusMessage": "my_statusMessage", - * // "targetId": "my_targetId", - * // "targetLink": "my_targetLink", - * // "user": "my_user", - * // "warnings": [], - * // "zone": "my_zone" - * // } - * } - * - * main().catch(e => { - * console.error(e); - * throw e; - * }); - * - * ``` - * - * @param params - Parameters for request - * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. - * @param callback - Optional callback that handles the response. - * @returns A promise if used with async/await, or void if used with a callback. - */ - patch( - params: Params$Resource$Httphealthchecks$Patch, - options: StreamMethodOptions - ): GaxiosPromise; - patch( - params?: Params$Resource$Httphealthchecks$Patch, + update( + params?: Params$Resource$Healthchecks$Update, options?: MethodOptions ): GaxiosPromise; - patch( - params: Params$Resource$Httphealthchecks$Patch, + update( + params: Params$Resource$Healthchecks$Update, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - patch( - params: Params$Resource$Httphealthchecks$Patch, + update( + params: Params$Resource$Healthchecks$Update, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - patch( - params: Params$Resource$Httphealthchecks$Patch, + update( + params: Params$Resource$Healthchecks$Update, callback: BodyResponseCallback ): void; - patch(callback: BodyResponseCallback): void; - patch( + update(callback: BodyResponseCallback): void; + update( paramsOrCallback?: - | Params$Resource$Httphealthchecks$Patch + | Params$Resource$Healthchecks$Update | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -38341,12 +38769,12 @@ export namespace compute_v1 { | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Httphealthchecks$Patch; + {}) as Params$Resource$Healthchecks$Update; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Httphealthchecks$Patch; + params = {} as Params$Resource$Healthchecks$Update; options = {}; } @@ -38361,15 +38789,15 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/global/httpHealthChecks/{httpHealthCheck}' + '/compute/v1/projects/{project}/global/healthChecks/{healthCheck}' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'PATCH', + method: 'PUT', }, options ), params, - requiredParams: ['project', 'httpHealthCheck'], - pathParams: ['httpHealthCheck', 'project'], + requiredParams: ['project', 'healthCheck'], + pathParams: ['healthCheck', 'project'], context: this.context, }; if (callback) { @@ -38381,198 +38809,55 @@ export namespace compute_v1 { return createAPIRequest(parameters); } } + } + export interface Params$Resource$Healthchecks$Aggregatedlist + extends StandardParameters { /** - * Updates a HttpHealthCheck resource in the specified project using the data included in the request. - * @example - * ```js - * // Before running the sample: - * // - Enable the API at: - * // https://console.developers.google.com/apis/api/compute.googleapis.com - * // - Login into gcloud by running: - * // `$ gcloud auth application-default login` - * // - Install the npm module by running: - * // `$ npm install googleapis` - * - * const {google} = require('googleapis'); - * const compute = google.compute('v1'); - * - * async function main() { - * const auth = new google.auth.GoogleAuth({ - * // Scopes can be specified either as an array or as a single, space-delimited string. - * scopes: [ - * 'https://www.googleapis.com/auth/cloud-platform', - * 'https://www.googleapis.com/auth/compute', - * ], - * }); - * - * // Acquire an auth client, and bind it to all future calls - * const authClient = await auth.getClient(); - * google.options({auth: authClient}); - * - * // Do the magic - * const res = await compute.httpHealthChecks.update({ - * // Name of the HttpHealthCheck resource to update. - * httpHealthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', - * // Project ID for this request. - * project: - * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // 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. - * // - * // 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: 'placeholder-value', + * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `\>`, or `<`. * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "checkIntervalSec": 0, - * // "creationTimestamp": "my_creationTimestamp", - * // "description": "my_description", - * // "healthyThreshold": 0, - * // "host": "my_host", - * // "id": "my_id", - * // "kind": "my_kind", - * // "name": "my_name", - * // "port": 0, - * // "requestPath": "my_requestPath", - * // "selfLink": "my_selfLink", - * // "timeoutSec": 0, - * // "unhealthyThreshold": 0 - * // } - * }, - * }); - * console.log(res.data); + * For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. * - * // Example response - * // { - * // "clientOperationId": "my_clientOperationId", - * // "creationTimestamp": "my_creationTimestamp", - * // "description": "my_description", - * // "endTime": "my_endTime", - * // "error": {}, - * // "httpErrorMessage": "my_httpErrorMessage", - * // "httpErrorStatusCode": 0, - * // "id": "my_id", - * // "insertTime": "my_insertTime", - * // "kind": "my_kind", - * // "name": "my_name", - * // "operationGroupId": "my_operationGroupId", - * // "operationType": "my_operationType", - * // "progress": 0, - * // "region": "my_region", - * // "selfLink": "my_selfLink", - * // "startTime": "my_startTime", - * // "status": "my_status", - * // "statusMessage": "my_statusMessage", - * // "targetId": "my_targetId", - * // "targetLink": "my_targetLink", - * // "user": "my_user", - * // "warnings": [], - * // "zone": "my_zone" - * // } - * } + * 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. * - * main().catch(e => { - * console.error(e); - * throw e; - * }); + * 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) ``` + */ + filter?: string; + /** + * Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. + */ + includeAllScopes?: boolean; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + */ + maxResults?: number; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. * - * ``` + * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. * - * @param params - Parameters for request - * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. - * @param callback - Optional callback that handles the response. - * @returns A promise if used with async/await, or void if used with a callback. + * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ - update( - params: Params$Resource$Httphealthchecks$Update, - options: StreamMethodOptions - ): GaxiosPromise; - update( - params?: Params$Resource$Httphealthchecks$Update, - options?: MethodOptions - ): GaxiosPromise; - update( - params: Params$Resource$Httphealthchecks$Update, - options: StreamMethodOptions | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - update( - params: Params$Resource$Httphealthchecks$Update, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - update( - params: Params$Resource$Httphealthchecks$Update, - callback: BodyResponseCallback - ): void; - update(callback: BodyResponseCallback): void; - update( - paramsOrCallback?: - | Params$Resource$Httphealthchecks$Update - | BodyResponseCallback - | BodyResponseCallback, - optionsOrCallback?: - | MethodOptions - | StreamMethodOptions - | BodyResponseCallback - | BodyResponseCallback, - callback?: - | BodyResponseCallback - | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { - let params = (paramsOrCallback || - {}) as Params$Resource$Httphealthchecks$Update; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Httphealthchecks$Update; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: ( - rootUrl + - '/compute/v1/projects/{project}/global/httpHealthChecks/{httpHealthCheck}' - ).replace(/([^:]\/)\/+/g, '$1'), - method: 'PUT', - }, - options - ), - params, - requiredParams: ['project', 'httpHealthCheck'], - pathParams: ['httpHealthCheck', 'project'], - context: this.context, - }; - if (callback) { - createAPIRequest( - parameters, - callback as BodyResponseCallback - ); - } else { - return createAPIRequest(parameters); - } - } + orderBy?: string; + /** + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + */ + pageToken?: string; + /** + * Name of the project scoping this request. + */ + project?: string; + /** + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + */ + returnPartialSuccess?: boolean; } - - export interface Params$Resource$Httphealthchecks$Delete + export interface Params$Resource$Healthchecks$Delete extends StandardParameters { /** - * Name of the HttpHealthCheck resource to delete. + * Name of the HealthCheck resource to delete. */ - httpHealthCheck?: string; + healthCheck?: string; /** * Project ID for this request. */ @@ -38586,18 +38871,17 @@ export namespace compute_v1 { */ requestId?: string; } - export interface Params$Resource$Httphealthchecks$Get - extends StandardParameters { + export interface Params$Resource$Healthchecks$Get extends StandardParameters { /** - * Name of the HttpHealthCheck resource to return. + * Name of the HealthCheck resource to return. */ - httpHealthCheck?: string; + healthCheck?: string; /** * Project ID for this request. */ project?: string; } - export interface Params$Resource$Httphealthchecks$Insert + export interface Params$Resource$Healthchecks$Insert extends StandardParameters { /** * Project ID for this request. @@ -38615,9 +38899,9 @@ export namespace compute_v1 { /** * Request body metadata */ - requestBody?: Schema$HttpHealthCheck; + requestBody?: Schema$HealthCheck; } - export interface Params$Resource$Httphealthchecks$List + export interface Params$Resource$Healthchecks$List extends StandardParameters { /** * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `\>`, or `<`. @@ -38654,12 +38938,12 @@ export namespace compute_v1 { */ returnPartialSuccess?: boolean; } - export interface Params$Resource$Httphealthchecks$Patch + export interface Params$Resource$Healthchecks$Patch extends StandardParameters { /** - * Name of the HttpHealthCheck resource to patch. + * Name of the HealthCheck resource to patch. */ - httpHealthCheck?: string; + healthCheck?: string; /** * Project ID for this request. */ @@ -38676,14 +38960,14 @@ export namespace compute_v1 { /** * Request body metadata */ - requestBody?: Schema$HttpHealthCheck; + requestBody?: Schema$HealthCheck; } - export interface Params$Resource$Httphealthchecks$Update + export interface Params$Resource$Healthchecks$Update extends StandardParameters { /** - * Name of the HttpHealthCheck resource to update. + * Name of the HealthCheck resource to update. */ - httpHealthCheck?: string; + healthCheck?: string; /** * Project ID for this request. */ @@ -38700,17 +38984,17 @@ export namespace compute_v1 { /** * Request body metadata */ - requestBody?: Schema$HttpHealthCheck; + requestBody?: Schema$HealthCheck; } - export class Resource$Httpshealthchecks { + export class Resource$Httphealthchecks { context: APIRequestContext; constructor(context: APIRequestContext) { this.context = context; } /** - * Deletes the specified HttpsHealthCheck resource. + * Deletes the specified HttpHealthCheck resource. * @example * ```js * // Before running the sample: @@ -38738,9 +39022,9 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.httpsHealthChecks.delete({ - * // Name of the HttpsHealthCheck resource to delete. - * httpsHealthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * const res = await compute.httpHealthChecks.delete({ + * // Name of the HttpHealthCheck resource to delete. + * httpHealthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', @@ -38795,31 +39079,31 @@ export namespace compute_v1 { * @returns A promise if used with async/await, or void if used with a callback. */ delete( - params: Params$Resource$Httpshealthchecks$Delete, + params: Params$Resource$Httphealthchecks$Delete, options: StreamMethodOptions ): GaxiosPromise; delete( - params?: Params$Resource$Httpshealthchecks$Delete, + params?: Params$Resource$Httphealthchecks$Delete, options?: MethodOptions ): GaxiosPromise; delete( - params: Params$Resource$Httpshealthchecks$Delete, + params: Params$Resource$Httphealthchecks$Delete, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; delete( - params: Params$Resource$Httpshealthchecks$Delete, + params: Params$Resource$Httphealthchecks$Delete, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; delete( - params: Params$Resource$Httpshealthchecks$Delete, + params: Params$Resource$Httphealthchecks$Delete, callback: BodyResponseCallback ): void; delete(callback: BodyResponseCallback): void; delete( paramsOrCallback?: - | Params$Resource$Httpshealthchecks$Delete + | Params$Resource$Httphealthchecks$Delete | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -38832,12 +39116,12 @@ export namespace compute_v1 { | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Httpshealthchecks$Delete; + {}) as Params$Resource$Httphealthchecks$Delete; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Httpshealthchecks$Delete; + params = {} as Params$Resource$Httphealthchecks$Delete; options = {}; } @@ -38852,15 +39136,15 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}' + '/compute/v1/projects/{project}/global/httpHealthChecks/{httpHealthCheck}' ).replace(/([^:]\/)\/+/g, '$1'), method: 'DELETE', }, options ), params, - requiredParams: ['project', 'httpsHealthCheck'], - pathParams: ['httpsHealthCheck', 'project'], + requiredParams: ['project', 'httpHealthCheck'], + pathParams: ['httpHealthCheck', 'project'], context: this.context, }; if (callback) { @@ -38874,7 +39158,7 @@ export namespace compute_v1 { } /** - * Returns the specified HttpsHealthCheck resource. Gets a list of available HTTPS health checks by making a list() request. + * Returns the specified HttpHealthCheck resource. Gets a list of available HTTP health checks by making a list() request. * @example * ```js * // Before running the sample: @@ -38903,9 +39187,9 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.httpsHealthChecks.get({ - * // Name of the HttpsHealthCheck resource to return. - * httpsHealthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * const res = await compute.httpHealthChecks.get({ + * // Name of the HttpHealthCheck resource to return. + * httpHealthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', @@ -38943,49 +39227,49 @@ export namespace compute_v1 { * @returns A promise if used with async/await, or void if used with a callback. */ get( - params: Params$Resource$Httpshealthchecks$Get, + params: Params$Resource$Httphealthchecks$Get, options: StreamMethodOptions ): GaxiosPromise; get( - params?: Params$Resource$Httpshealthchecks$Get, + params?: Params$Resource$Httphealthchecks$Get, options?: MethodOptions - ): GaxiosPromise; + ): GaxiosPromise; get( - params: Params$Resource$Httpshealthchecks$Get, + params: Params$Resource$Httphealthchecks$Get, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; get( - params: Params$Resource$Httpshealthchecks$Get, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + params: Params$Resource$Httphealthchecks$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; get( - params: Params$Resource$Httpshealthchecks$Get, - callback: BodyResponseCallback + params: Params$Resource$Httphealthchecks$Get, + callback: BodyResponseCallback ): void; - get(callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; get( paramsOrCallback?: - | Params$Resource$Httpshealthchecks$Get - | BodyResponseCallback + | Params$Resource$Httphealthchecks$Get + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { + ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Httpshealthchecks$Get; + {}) as Params$Resource$Httphealthchecks$Get; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Httpshealthchecks$Get; + params = {} as Params$Resource$Httphealthchecks$Get; options = {}; } @@ -39000,29 +39284,29 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}' + '/compute/v1/projects/{project}/global/httpHealthChecks/{httpHealthCheck}' ).replace(/([^:]\/)\/+/g, '$1'), method: 'GET', }, options ), params, - requiredParams: ['project', 'httpsHealthCheck'], - pathParams: ['httpsHealthCheck', 'project'], + requiredParams: ['project', 'httpHealthCheck'], + pathParams: ['httpHealthCheck', 'project'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Creates a HttpsHealthCheck resource in the specified project using the data included in the request. + * Creates a HttpHealthCheck resource in the specified project using the data included in the request. * @example * ```js * // Before running the sample: @@ -39050,7 +39334,7 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.httpsHealthChecks.insert({ + * const res = await compute.httpHealthChecks.insert({ * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', @@ -39125,31 +39409,31 @@ export namespace compute_v1 { * @returns A promise if used with async/await, or void if used with a callback. */ insert( - params: Params$Resource$Httpshealthchecks$Insert, + params: Params$Resource$Httphealthchecks$Insert, options: StreamMethodOptions ): GaxiosPromise; insert( - params?: Params$Resource$Httpshealthchecks$Insert, + params?: Params$Resource$Httphealthchecks$Insert, options?: MethodOptions ): GaxiosPromise; insert( - params: Params$Resource$Httpshealthchecks$Insert, + params: Params$Resource$Httphealthchecks$Insert, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; insert( - params: Params$Resource$Httpshealthchecks$Insert, + params: Params$Resource$Httphealthchecks$Insert, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; insert( - params: Params$Resource$Httpshealthchecks$Insert, + params: Params$Resource$Httphealthchecks$Insert, callback: BodyResponseCallback ): void; insert(callback: BodyResponseCallback): void; insert( paramsOrCallback?: - | Params$Resource$Httpshealthchecks$Insert + | Params$Resource$Httphealthchecks$Insert | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -39162,12 +39446,12 @@ export namespace compute_v1 { | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Httpshealthchecks$Insert; + {}) as Params$Resource$Httphealthchecks$Insert; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Httpshealthchecks$Insert; + params = {} as Params$Resource$Httphealthchecks$Insert; options = {}; } @@ -39181,8 +39465,7 @@ export namespace compute_v1 { options: Object.assign( { url: ( - rootUrl + - '/compute/v1/projects/{project}/global/httpsHealthChecks' + rootUrl + '/compute/v1/projects/{project}/global/httpHealthChecks' ).replace(/([^:]\/)\/+/g, '$1'), method: 'POST', }, @@ -39204,7 +39487,7 @@ export namespace compute_v1 { } /** - * Retrieves the list of HttpsHealthCheck resources available to the specified project. + * Retrieves the list of HttpHealthCheck resources available to the specified project. * @example * ```js * // Before running the sample: @@ -39233,7 +39516,7 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.httpsHealthChecks.list({ + * const res = await compute.httpHealthChecks.list({ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. @@ -39284,54 +39567,52 @@ export namespace compute_v1 { * @returns A promise if used with async/await, or void if used with a callback. */ list( - params: Params$Resource$Httpshealthchecks$List, + params: Params$Resource$Httphealthchecks$List, options: StreamMethodOptions ): GaxiosPromise; list( - params?: Params$Resource$Httpshealthchecks$List, + params?: Params$Resource$Httphealthchecks$List, options?: MethodOptions - ): GaxiosPromise; + ): GaxiosPromise; list( - params: Params$Resource$Httpshealthchecks$List, + params: Params$Resource$Httphealthchecks$List, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; list( - params: Params$Resource$Httpshealthchecks$List, - options: - | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + params: Params$Resource$Httphealthchecks$List, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; list( - params: Params$Resource$Httpshealthchecks$List, - callback: BodyResponseCallback + params: Params$Resource$Httphealthchecks$List, + callback: BodyResponseCallback ): void; - list(callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; list( paramsOrCallback?: - | Params$Resource$Httpshealthchecks$List - | BodyResponseCallback + | Params$Resource$Httphealthchecks$List + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Httpshealthchecks$List; + {}) as Params$Resource$Httphealthchecks$List; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Httpshealthchecks$List; + params = {} as Params$Resource$Httphealthchecks$List; options = {}; } @@ -39345,8 +39626,7 @@ export namespace compute_v1 { options: Object.assign( { url: ( - rootUrl + - '/compute/v1/projects/{project}/global/httpsHealthChecks' + rootUrl + '/compute/v1/projects/{project}/global/httpHealthChecks' ).replace(/([^:]\/)\/+/g, '$1'), method: 'GET', }, @@ -39358,17 +39638,17 @@ export namespace compute_v1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Updates a HttpsHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. + * Updates a HttpHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. * @example * ```js * // Before running the sample: @@ -39396,9 +39676,9 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.httpsHealthChecks.patch({ - * // Name of the HttpsHealthCheck resource to patch. - * httpsHealthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * const res = await compute.httpHealthChecks.patch({ + * // Name of the HttpHealthCheck resource to patch. + * httpHealthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', @@ -39473,31 +39753,31 @@ export namespace compute_v1 { * @returns A promise if used with async/await, or void if used with a callback. */ patch( - params: Params$Resource$Httpshealthchecks$Patch, + params: Params$Resource$Httphealthchecks$Patch, options: StreamMethodOptions ): GaxiosPromise; patch( - params?: Params$Resource$Httpshealthchecks$Patch, + params?: Params$Resource$Httphealthchecks$Patch, options?: MethodOptions ): GaxiosPromise; patch( - params: Params$Resource$Httpshealthchecks$Patch, + params: Params$Resource$Httphealthchecks$Patch, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; patch( - params: Params$Resource$Httpshealthchecks$Patch, + params: Params$Resource$Httphealthchecks$Patch, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; patch( - params: Params$Resource$Httpshealthchecks$Patch, + params: Params$Resource$Httphealthchecks$Patch, callback: BodyResponseCallback ): void; patch(callback: BodyResponseCallback): void; patch( paramsOrCallback?: - | Params$Resource$Httpshealthchecks$Patch + | Params$Resource$Httphealthchecks$Patch | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -39510,12 +39790,12 @@ export namespace compute_v1 { | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Httpshealthchecks$Patch; + {}) as Params$Resource$Httphealthchecks$Patch; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Httpshealthchecks$Patch; + params = {} as Params$Resource$Httphealthchecks$Patch; options = {}; } @@ -39530,15 +39810,15 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}' + '/compute/v1/projects/{project}/global/httpHealthChecks/{httpHealthCheck}' ).replace(/([^:]\/)\/+/g, '$1'), method: 'PATCH', }, options ), params, - requiredParams: ['project', 'httpsHealthCheck'], - pathParams: ['httpsHealthCheck', 'project'], + requiredParams: ['project', 'httpHealthCheck'], + pathParams: ['httpHealthCheck', 'project'], context: this.context, }; if (callback) { @@ -39552,7 +39832,7 @@ export namespace compute_v1 { } /** - * Updates a HttpsHealthCheck resource in the specified project using the data included in the request. + * Updates a HttpHealthCheck resource in the specified project using the data included in the request. * @example * ```js * // Before running the sample: @@ -39580,9 +39860,9 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.httpsHealthChecks.update({ - * // Name of the HttpsHealthCheck resource to update. - * httpsHealthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * const res = await compute.httpHealthChecks.update({ + * // Name of the HttpHealthCheck resource to update. + * httpHealthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', @@ -39657,31 +39937,31 @@ export namespace compute_v1 { * @returns A promise if used with async/await, or void if used with a callback. */ update( - params: Params$Resource$Httpshealthchecks$Update, + params: Params$Resource$Httphealthchecks$Update, options: StreamMethodOptions ): GaxiosPromise; update( - params?: Params$Resource$Httpshealthchecks$Update, + params?: Params$Resource$Httphealthchecks$Update, options?: MethodOptions ): GaxiosPromise; update( - params: Params$Resource$Httpshealthchecks$Update, + params: Params$Resource$Httphealthchecks$Update, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; update( - params: Params$Resource$Httpshealthchecks$Update, + params: Params$Resource$Httphealthchecks$Update, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; update( - params: Params$Resource$Httpshealthchecks$Update, + params: Params$Resource$Httphealthchecks$Update, callback: BodyResponseCallback ): void; update(callback: BodyResponseCallback): void; update( paramsOrCallback?: - | Params$Resource$Httpshealthchecks$Update + | Params$Resource$Httphealthchecks$Update | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -39694,12 +39974,12 @@ export namespace compute_v1 { | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Httpshealthchecks$Update; + {}) as Params$Resource$Httphealthchecks$Update; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Httpshealthchecks$Update; + params = {} as Params$Resource$Httphealthchecks$Update; options = {}; } @@ -39714,15 +39994,15 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}' + '/compute/v1/projects/{project}/global/httpHealthChecks/{httpHealthCheck}' ).replace(/([^:]\/)\/+/g, '$1'), method: 'PUT', }, options ), params, - requiredParams: ['project', 'httpsHealthCheck'], - pathParams: ['httpsHealthCheck', 'project'], + requiredParams: ['project', 'httpHealthCheck'], + pathParams: ['httpHealthCheck', 'project'], context: this.context, }; if (callback) { @@ -39736,12 +40016,12 @@ export namespace compute_v1 { } } - export interface Params$Resource$Httpshealthchecks$Delete + export interface Params$Resource$Httphealthchecks$Delete extends StandardParameters { /** - * Name of the HttpsHealthCheck resource to delete. + * Name of the HttpHealthCheck resource to delete. */ - httpsHealthCheck?: string; + httpHealthCheck?: string; /** * Project ID for this request. */ @@ -39755,18 +40035,18 @@ export namespace compute_v1 { */ requestId?: string; } - export interface Params$Resource$Httpshealthchecks$Get + export interface Params$Resource$Httphealthchecks$Get extends StandardParameters { /** - * Name of the HttpsHealthCheck resource to return. + * Name of the HttpHealthCheck resource to return. */ - httpsHealthCheck?: string; + httpHealthCheck?: string; /** * Project ID for this request. */ project?: string; } - export interface Params$Resource$Httpshealthchecks$Insert + export interface Params$Resource$Httphealthchecks$Insert extends StandardParameters { /** * Project ID for this request. @@ -39784,9 +40064,9 @@ export namespace compute_v1 { /** * Request body metadata */ - requestBody?: Schema$HttpsHealthCheck; + requestBody?: Schema$HttpHealthCheck; } - export interface Params$Resource$Httpshealthchecks$List + export interface Params$Resource$Httphealthchecks$List extends StandardParameters { /** * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `\>`, or `<`. @@ -39823,12 +40103,12 @@ export namespace compute_v1 { */ returnPartialSuccess?: boolean; } - export interface Params$Resource$Httpshealthchecks$Patch + export interface Params$Resource$Httphealthchecks$Patch extends StandardParameters { /** - * Name of the HttpsHealthCheck resource to patch. + * Name of the HttpHealthCheck resource to patch. */ - httpsHealthCheck?: string; + httpHealthCheck?: string; /** * Project ID for this request. */ @@ -39845,14 +40125,14 @@ export namespace compute_v1 { /** * Request body metadata */ - requestBody?: Schema$HttpsHealthCheck; + requestBody?: Schema$HttpHealthCheck; } - export interface Params$Resource$Httpshealthchecks$Update + export interface Params$Resource$Httphealthchecks$Update extends StandardParameters { /** - * Name of the HttpsHealthCheck resource to update. + * Name of the HttpHealthCheck resource to update. */ - httpsHealthCheck?: string; + httpHealthCheck?: string; /** * Project ID for this request. */ @@ -39869,17 +40149,17 @@ export namespace compute_v1 { /** * Request body metadata */ - requestBody?: Schema$HttpsHealthCheck; + requestBody?: Schema$HttpHealthCheck; } - export class Resource$Images { + export class Resource$Httpshealthchecks { context: APIRequestContext; constructor(context: APIRequestContext) { this.context = context; } /** - * Deletes the specified image. + * Deletes the specified HttpsHealthCheck resource. * @example * ```js * // Before running the sample: @@ -39907,9 +40187,9 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.images.delete({ - * // Name of the image resource to delete. - * image: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * const res = await compute.httpsHealthChecks.delete({ + * // Name of the HttpsHealthCheck resource to delete. + * httpsHealthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', @@ -39964,31 +40244,31 @@ export namespace compute_v1 { * @returns A promise if used with async/await, or void if used with a callback. */ delete( - params: Params$Resource$Images$Delete, + params: Params$Resource$Httpshealthchecks$Delete, options: StreamMethodOptions ): GaxiosPromise; delete( - params?: Params$Resource$Images$Delete, + params?: Params$Resource$Httpshealthchecks$Delete, options?: MethodOptions ): GaxiosPromise; delete( - params: Params$Resource$Images$Delete, + params: Params$Resource$Httpshealthchecks$Delete, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; delete( - params: Params$Resource$Images$Delete, + params: Params$Resource$Httpshealthchecks$Delete, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; delete( - params: Params$Resource$Images$Delete, + params: Params$Resource$Httpshealthchecks$Delete, callback: BodyResponseCallback ): void; delete(callback: BodyResponseCallback): void; delete( paramsOrCallback?: - | Params$Resource$Images$Delete + | Params$Resource$Httpshealthchecks$Delete | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -40000,12 +40280,13 @@ export namespace compute_v1 { | BodyResponseCallback | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Images$Delete; + let params = (paramsOrCallback || + {}) as Params$Resource$Httpshealthchecks$Delete; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Images$Delete; + params = {} as Params$Resource$Httpshealthchecks$Delete; options = {}; } @@ -40019,15 +40300,16 @@ export namespace compute_v1 { options: Object.assign( { url: ( - rootUrl + '/compute/v1/projects/{project}/global/images/{image}' + rootUrl + + '/compute/v1/projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}' ).replace(/([^:]\/)\/+/g, '$1'), method: 'DELETE', }, options ), params, - requiredParams: ['project', 'image'], - pathParams: ['image', 'project'], + requiredParams: ['project', 'httpsHealthCheck'], + pathParams: ['httpsHealthCheck', 'project'], context: this.context, }; if (callback) { @@ -40041,9 +40323,155 @@ export namespace compute_v1 { } /** - * Sets the deprecation status of an image. + * Returns the specified HttpsHealthCheck resource. Gets a list of available HTTPS health checks by making a list() request. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` * - * If an empty request body is given, clears the deprecation status instead. + * const {google} = require('googleapis'); + * const compute = google.compute('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.httpsHealthChecks.get({ + * // Name of the HttpsHealthCheck resource to return. + * httpsHealthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "checkIntervalSec": 0, + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "healthyThreshold": 0, + * // "host": "my_host", + * // "id": "my_id", + * // "kind": "my_kind", + * // "name": "my_name", + * // "port": 0, + * // "requestPath": "my_requestPath", + * // "selfLink": "my_selfLink", + * // "timeoutSec": 0, + * // "unhealthyThreshold": 0 + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Httpshealthchecks$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Httpshealthchecks$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Httpshealthchecks$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Httpshealthchecks$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Httpshealthchecks$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Httpshealthchecks$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Httpshealthchecks$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Httpshealthchecks$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/v1/projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['project', 'httpsHealthCheck'], + pathParams: ['httpsHealthCheck', 'project'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Creates a HttpsHealthCheck resource in the specified project using the data included in the request. * @example * ```js * // Before running the sample: @@ -40071,9 +40499,7 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.images.deprecate({ - * // Image name. - * image: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * const res = await compute.httpsHealthChecks.insert({ * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', @@ -40088,11 +40514,19 @@ export namespace compute_v1 { * requestBody: { * // request body parameters * // { - * // "deleted": "my_deleted", - * // "deprecated": "my_deprecated", - * // "obsolete": "my_obsolete", - * // "replacement": "my_replacement", - * // "state": "my_state" + * // "checkIntervalSec": 0, + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "healthyThreshold": 0, + * // "host": "my_host", + * // "id": "my_id", + * // "kind": "my_kind", + * // "name": "my_name", + * // "port": 0, + * // "requestPath": "my_requestPath", + * // "selfLink": "my_selfLink", + * // "timeoutSec": 0, + * // "unhealthyThreshold": 0 * // } * }, * }); @@ -40139,32 +40573,32 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - deprecate( - params: Params$Resource$Images$Deprecate, + insert( + params: Params$Resource$Httpshealthchecks$Insert, options: StreamMethodOptions ): GaxiosPromise; - deprecate( - params?: Params$Resource$Images$Deprecate, + insert( + params?: Params$Resource$Httpshealthchecks$Insert, options?: MethodOptions ): GaxiosPromise; - deprecate( - params: Params$Resource$Images$Deprecate, + insert( + params: Params$Resource$Httpshealthchecks$Insert, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - deprecate( - params: Params$Resource$Images$Deprecate, + insert( + params: Params$Resource$Httpshealthchecks$Insert, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - deprecate( - params: Params$Resource$Images$Deprecate, + insert( + params: Params$Resource$Httpshealthchecks$Insert, callback: BodyResponseCallback ): void; - deprecate(callback: BodyResponseCallback): void; - deprecate( + insert(callback: BodyResponseCallback): void; + insert( paramsOrCallback?: - | Params$Resource$Images$Deprecate + | Params$Resource$Httpshealthchecks$Insert | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -40176,12 +40610,13 @@ export namespace compute_v1 { | BodyResponseCallback | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Images$Deprecate; + let params = (paramsOrCallback || + {}) as Params$Resource$Httpshealthchecks$Insert; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Images$Deprecate; + params = {} as Params$Resource$Httpshealthchecks$Insert; options = {}; } @@ -40196,15 +40631,15 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/global/images/{image}/deprecate' + '/compute/v1/projects/{project}/global/httpsHealthChecks' ).replace(/([^:]\/)\/+/g, '$1'), method: 'POST', }, options ), params, - requiredParams: ['project', 'image'], - pathParams: ['image', 'project'], + requiredParams: ['project'], + pathParams: ['project'], context: this.context, }; if (callback) { @@ -40218,7 +40653,7 @@ export namespace compute_v1 { } /** - * Returns the specified image. Gets a list of available images by making a list() request. + * Retrieves the list of HttpsHealthCheck resources available to the specified project. * @example * ```js * // Before running the sample: @@ -40247,48 +40682,41 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.images.get({ - * // Name of the image resource to return. - * image: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * const res = await compute.httpsHealthChecks.list({ + * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. + * // + * // 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) ``` + * filter: 'placeholder-value', + * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * maxResults: 'placeholder-value', + * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * // + * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. + * // + * // Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * orderBy: 'placeholder-value', + * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * pageToken: 'placeholder-value', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + * returnPartialSuccess: 'placeholder-value', * }); * console.log(res.data); * * // Example response * // { - * // "archiveSizeBytes": "my_archiveSizeBytes", - * // "creationTimestamp": "my_creationTimestamp", - * // "deprecated": {}, - * // "description": "my_description", - * // "diskSizeGb": "my_diskSizeGb", - * // "family": "my_family", - * // "guestOsFeatures": [], * // "id": "my_id", - * // "imageEncryptionKey": {}, + * // "items": [], * // "kind": "my_kind", - * // "labelFingerprint": "my_labelFingerprint", - * // "labels": {}, - * // "licenseCodes": [], - * // "licenses": [], - * // "name": "my_name", - * // "rawDisk": {}, - * // "satisfiesPzs": false, + * // "nextPageToken": "my_nextPageToken", * // "selfLink": "my_selfLink", - * // "shieldedInstanceInitialState": {}, - * // "sourceDisk": "my_sourceDisk", - * // "sourceDiskEncryptionKey": {}, - * // "sourceDiskId": "my_sourceDiskId", - * // "sourceImage": "my_sourceImage", - * // "sourceImageEncryptionKey": {}, - * // "sourceImageId": "my_sourceImageId", - * // "sourceSnapshot": "my_sourceSnapshot", - * // "sourceSnapshotEncryptionKey": {}, - * // "sourceSnapshotId": "my_sourceSnapshotId", - * // "sourceType": "my_sourceType", - * // "status": "my_status", - * // "storageLocations": [] + * // "warning": {} * // } * } * @@ -40304,49 +40732,55 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - get( - params: Params$Resource$Images$Get, + list( + params: Params$Resource$Httpshealthchecks$List, options: StreamMethodOptions ): GaxiosPromise; - get( - params?: Params$Resource$Images$Get, + list( + params?: Params$Resource$Httpshealthchecks$List, options?: MethodOptions - ): GaxiosPromise; - get( - params: Params$Resource$Images$Get, + ): GaxiosPromise; + list( + params: Params$Resource$Httpshealthchecks$List, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - get( - params: Params$Resource$Images$Get, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + list( + params: Params$Resource$Httpshealthchecks$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - get( - params: Params$Resource$Images$Get, - callback: BodyResponseCallback + list( + params: Params$Resource$Httpshealthchecks$List, + callback: BodyResponseCallback ): void; - get(callback: BodyResponseCallback): void; - get( + list(callback: BodyResponseCallback): void; + list( paramsOrCallback?: - | Params$Resource$Images$Get - | BodyResponseCallback + | Params$Resource$Httpshealthchecks$List + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Images$Get; + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Httpshealthchecks$List; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Images$Get; + params = {} as Params$Resource$Httpshealthchecks$List; options = {}; } @@ -40360,29 +40794,30 @@ export namespace compute_v1 { options: Object.assign( { url: ( - rootUrl + '/compute/v1/projects/{project}/global/images/{image}' + rootUrl + + '/compute/v1/projects/{project}/global/httpsHealthChecks' ).replace(/([^:]\/)\/+/g, '$1'), method: 'GET', }, options ), params, - requiredParams: ['project', 'image'], - pathParams: ['image', 'project'], + requiredParams: ['project'], + pathParams: ['project'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Returns the latest image that is part of an image family and is not deprecated. + * Updates a HttpsHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. * @example * ```js * // Before running the sample: @@ -40402,7 +40837,6 @@ export namespace compute_v1 { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', - * 'https://www.googleapis.com/auth/compute.readonly', * ], * }); * @@ -40411,48 +40845,67 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.images.getFromFamily({ - * // Name of the image family to search for. - * family: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * const res = await compute.httpsHealthChecks.patch({ + * // Name of the HttpsHealthCheck resource to patch. + * httpsHealthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // 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. + * // + * // 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: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "checkIntervalSec": 0, + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "healthyThreshold": 0, + * // "host": "my_host", + * // "id": "my_id", + * // "kind": "my_kind", + * // "name": "my_name", + * // "port": 0, + * // "requestPath": "my_requestPath", + * // "selfLink": "my_selfLink", + * // "timeoutSec": 0, + * // "unhealthyThreshold": 0 + * // } + * }, * }); * console.log(res.data); * * // Example response * // { - * // "archiveSizeBytes": "my_archiveSizeBytes", + * // "clientOperationId": "my_clientOperationId", * // "creationTimestamp": "my_creationTimestamp", - * // "deprecated": {}, * // "description": "my_description", - * // "diskSizeGb": "my_diskSizeGb", - * // "family": "my_family", - * // "guestOsFeatures": [], + * // "endTime": "my_endTime", + * // "error": {}, + * // "httpErrorMessage": "my_httpErrorMessage", + * // "httpErrorStatusCode": 0, * // "id": "my_id", - * // "imageEncryptionKey": {}, + * // "insertTime": "my_insertTime", * // "kind": "my_kind", - * // "labelFingerprint": "my_labelFingerprint", - * // "labels": {}, - * // "licenseCodes": [], - * // "licenses": [], * // "name": "my_name", - * // "rawDisk": {}, - * // "satisfiesPzs": false, + * // "operationGroupId": "my_operationGroupId", + * // "operationType": "my_operationType", + * // "progress": 0, + * // "region": "my_region", * // "selfLink": "my_selfLink", - * // "shieldedInstanceInitialState": {}, - * // "sourceDisk": "my_sourceDisk", - * // "sourceDiskEncryptionKey": {}, - * // "sourceDiskId": "my_sourceDiskId", - * // "sourceImage": "my_sourceImage", - * // "sourceImageEncryptionKey": {}, - * // "sourceImageId": "my_sourceImageId", - * // "sourceSnapshot": "my_sourceSnapshot", - * // "sourceSnapshotEncryptionKey": {}, - * // "sourceSnapshotId": "my_sourceSnapshotId", - * // "sourceType": "my_sourceType", + * // "startTime": "my_startTime", * // "status": "my_status", - * // "storageLocations": [] + * // "statusMessage": "my_statusMessage", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "user": "my_user", + * // "warnings": [], + * // "zone": "my_zone" * // } * } * @@ -40468,50 +40921,50 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - getFromFamily( - params: Params$Resource$Images$Getfromfamily, + patch( + params: Params$Resource$Httpshealthchecks$Patch, options: StreamMethodOptions ): GaxiosPromise; - getFromFamily( - params?: Params$Resource$Images$Getfromfamily, + patch( + params?: Params$Resource$Httpshealthchecks$Patch, options?: MethodOptions - ): GaxiosPromise; - getFromFamily( - params: Params$Resource$Images$Getfromfamily, + ): GaxiosPromise; + patch( + params: Params$Resource$Httpshealthchecks$Patch, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - getFromFamily( - params: Params$Resource$Images$Getfromfamily, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + patch( + params: Params$Resource$Httpshealthchecks$Patch, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - getFromFamily( - params: Params$Resource$Images$Getfromfamily, - callback: BodyResponseCallback + patch( + params: Params$Resource$Httpshealthchecks$Patch, + callback: BodyResponseCallback ): void; - getFromFamily(callback: BodyResponseCallback): void; - getFromFamily( + patch(callback: BodyResponseCallback): void; + patch( paramsOrCallback?: - | Params$Resource$Images$Getfromfamily - | BodyResponseCallback + | Params$Resource$Httpshealthchecks$Patch + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { + ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Images$Getfromfamily; + {}) as Params$Resource$Httpshealthchecks$Patch; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Images$Getfromfamily; + params = {} as Params$Resource$Httpshealthchecks$Patch; options = {}; } @@ -40526,29 +40979,29 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/global/images/family/{family}' + '/compute/v1/projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'GET', + method: 'PATCH', }, options ), params, - requiredParams: ['project', 'family'], - pathParams: ['family', 'project'], + requiredParams: ['project', 'httpsHealthCheck'], + pathParams: ['httpsHealthCheck', 'project'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Gets the access control policy for a resource. May be empty if no such policy or resource exists. + * Updates a HttpsHealthCheck resource in the specified project using the data included in the request. * @example * ```js * // Before running the sample: @@ -40568,7 +41021,6 @@ export namespace compute_v1 { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', - * 'https://www.googleapis.com/auth/compute.readonly', * ], * }); * @@ -40577,25 +41029,67 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.images.getIamPolicy({ - * // Requested IAM Policy version. - * optionsRequestedPolicyVersion: 'placeholder-value', + * const res = await compute.httpsHealthChecks.update({ + * // Name of the HttpsHealthCheck resource to update. + * httpsHealthCheck: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // Name or id of the resource for this request. - * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * // 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. + * // + * // 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: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "checkIntervalSec": 0, + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "healthyThreshold": 0, + * // "host": "my_host", + * // "id": "my_id", + * // "kind": "my_kind", + * // "name": "my_name", + * // "port": 0, + * // "requestPath": "my_requestPath", + * // "selfLink": "my_selfLink", + * // "timeoutSec": 0, + * // "unhealthyThreshold": 0 + * // } + * }, * }); * console.log(res.data); * * // Example response * // { - * // "auditConfigs": [], - * // "bindings": [], - * // "etag": "my_etag", - * // "iamOwned": false, - * // "rules": [], - * // "version": 0 + * // "clientOperationId": "my_clientOperationId", + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "endTime": "my_endTime", + * // "error": {}, + * // "httpErrorMessage": "my_httpErrorMessage", + * // "httpErrorStatusCode": 0, + * // "id": "my_id", + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "name": "my_name", + * // "operationGroupId": "my_operationGroupId", + * // "operationType": "my_operationType", + * // "progress": 0, + * // "region": "my_region", + * // "selfLink": "my_selfLink", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "statusMessage": "my_statusMessage", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "user": "my_user", + * // "warnings": [], + * // "zone": "my_zone" * // } * } * @@ -40611,50 +41105,50 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - getIamPolicy( - params: Params$Resource$Images$Getiampolicy, + update( + params: Params$Resource$Httpshealthchecks$Update, options: StreamMethodOptions ): GaxiosPromise; - getIamPolicy( - params?: Params$Resource$Images$Getiampolicy, + update( + params?: Params$Resource$Httpshealthchecks$Update, options?: MethodOptions - ): GaxiosPromise; - getIamPolicy( - params: Params$Resource$Images$Getiampolicy, + ): GaxiosPromise; + update( + params: Params$Resource$Httpshealthchecks$Update, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - getIamPolicy( - params: Params$Resource$Images$Getiampolicy, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + update( + params: Params$Resource$Httpshealthchecks$Update, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - getIamPolicy( - params: Params$Resource$Images$Getiampolicy, - callback: BodyResponseCallback + update( + params: Params$Resource$Httpshealthchecks$Update, + callback: BodyResponseCallback ): void; - getIamPolicy(callback: BodyResponseCallback): void; - getIamPolicy( + update(callback: BodyResponseCallback): void; + update( paramsOrCallback?: - | Params$Resource$Images$Getiampolicy - | BodyResponseCallback + | Params$Resource$Httpshealthchecks$Update + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { + ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Images$Getiampolicy; + {}) as Params$Resource$Httpshealthchecks$Update; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Images$Getiampolicy; + params = {} as Params$Resource$Httpshealthchecks$Update; options = {}; } @@ -40669,109 +41163,211 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/global/images/{resource}/getIamPolicy' + '/compute/v1/projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'GET', + method: 'PUT', }, options ), params, - requiredParams: ['project', 'resource'], - pathParams: ['project', 'resource'], + requiredParams: ['project', 'httpsHealthCheck'], + pathParams: ['httpsHealthCheck', 'project'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } + } + export interface Params$Resource$Httpshealthchecks$Delete + extends StandardParameters { /** - * Creates an image in the specified project using the data included in the request. - * @example - * ```js - * // Before running the sample: - * // - Enable the API at: - * // https://console.developers.google.com/apis/api/compute.googleapis.com - * // - Login into gcloud by running: - * // `$ gcloud auth application-default login` - * // - Install the npm module by running: - * // `$ npm install googleapis` + * Name of the HttpsHealthCheck resource to delete. + */ + httpsHealthCheck?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. * - * const {google} = require('googleapis'); - * const compute = google.compute('v1'); + * 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. * - * async function main() { - * const auth = new google.auth.GoogleAuth({ - * // Scopes can be specified either as an array or as a single, space-delimited string. - * scopes: [ - * 'https://www.googleapis.com/auth/cloud-platform', - * 'https://www.googleapis.com/auth/compute', - * 'https://www.googleapis.com/auth/devstorage.full_control', - * 'https://www.googleapis.com/auth/devstorage.read_only', - * 'https://www.googleapis.com/auth/devstorage.read_write', - * ], - * }); + * The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + */ + requestId?: string; + } + export interface Params$Resource$Httpshealthchecks$Get + extends StandardParameters { + /** + * Name of the HttpsHealthCheck resource to return. + */ + httpsHealthCheck?: string; + /** + * Project ID for this request. + */ + project?: string; + } + export interface Params$Resource$Httpshealthchecks$Insert + extends StandardParameters { + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. * - * // Acquire an auth client, and bind it to all future calls - * const authClient = await auth.getClient(); - * google.options({auth: authClient}); + * 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. * - * // Do the magic - * const res = await compute.images.insert({ - * // Force image creation if true. - * forceCreate: 'placeholder-value', - * // Project ID for this request. - * project: - * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // 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. - * // - * // 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; + + /** + * Request body metadata + */ + requestBody?: Schema$HttpsHealthCheck; + } + export interface Params$Resource$Httpshealthchecks$List + extends StandardParameters { + /** + * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. + * + * 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) ``` + */ + filter?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + */ + maxResults?: number; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. + * + * Currently, only sorting by `name` or `creationTimestamp desc` is supported. + */ + orderBy?: string; + /** + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + */ + pageToken?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + */ + returnPartialSuccess?: boolean; + } + export interface Params$Resource$Httpshealthchecks$Patch + extends StandardParameters { + /** + * Name of the HttpsHealthCheck resource to patch. + */ + httpsHealthCheck?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + + /** + * Request body metadata + */ + requestBody?: Schema$HttpsHealthCheck; + } + export interface Params$Resource$Httpshealthchecks$Update + extends StandardParameters { + /** + * Name of the HttpsHealthCheck resource to update. + */ + httpsHealthCheck?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + + /** + * Request body metadata + */ + requestBody?: Schema$HttpsHealthCheck; + } + + export class Resource$Images { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Deletes the specified image. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.images.delete({ + * // Name of the image resource to delete. + * image: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // 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. + * // + * // 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: 'placeholder-value', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "archiveSizeBytes": "my_archiveSizeBytes", - * // "creationTimestamp": "my_creationTimestamp", - * // "deprecated": {}, - * // "description": "my_description", - * // "diskSizeGb": "my_diskSizeGb", - * // "family": "my_family", - * // "guestOsFeatures": [], - * // "id": "my_id", - * // "imageEncryptionKey": {}, - * // "kind": "my_kind", - * // "labelFingerprint": "my_labelFingerprint", - * // "labels": {}, - * // "licenseCodes": [], - * // "licenses": [], - * // "name": "my_name", - * // "rawDisk": {}, - * // "satisfiesPzs": false, - * // "selfLink": "my_selfLink", - * // "shieldedInstanceInitialState": {}, - * // "sourceDisk": "my_sourceDisk", - * // "sourceDiskEncryptionKey": {}, - * // "sourceDiskId": "my_sourceDiskId", - * // "sourceImage": "my_sourceImage", - * // "sourceImageEncryptionKey": {}, - * // "sourceImageId": "my_sourceImageId", - * // "sourceSnapshot": "my_sourceSnapshot", - * // "sourceSnapshotEncryptionKey": {}, - * // "sourceSnapshotId": "my_sourceSnapshotId", - * // "sourceType": "my_sourceType", - * // "status": "my_status", - * // "storageLocations": [] - * // } - * }, * }); * console.log(res.data); * @@ -40816,32 +41412,32 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - insert( - params: Params$Resource$Images$Insert, + delete( + params: Params$Resource$Images$Delete, options: StreamMethodOptions ): GaxiosPromise; - insert( - params?: Params$Resource$Images$Insert, + delete( + params?: Params$Resource$Images$Delete, options?: MethodOptions ): GaxiosPromise; - insert( - params: Params$Resource$Images$Insert, + delete( + params: Params$Resource$Images$Delete, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - insert( - params: Params$Resource$Images$Insert, + delete( + params: Params$Resource$Images$Delete, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - insert( - params: Params$Resource$Images$Insert, + delete( + params: Params$Resource$Images$Delete, callback: BodyResponseCallback ): void; - insert(callback: BodyResponseCallback): void; - insert( + delete(callback: BodyResponseCallback): void; + delete( paramsOrCallback?: - | Params$Resource$Images$Insert + | Params$Resource$Images$Delete | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -40853,12 +41449,12 @@ export namespace compute_v1 { | BodyResponseCallback | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Images$Insert; + let params = (paramsOrCallback || {}) as Params$Resource$Images$Delete; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Images$Insert; + params = {} as Params$Resource$Images$Delete; options = {}; } @@ -40872,15 +41468,15 @@ export namespace compute_v1 { options: Object.assign( { url: ( - rootUrl + '/compute/v1/projects/{project}/global/images' + rootUrl + '/compute/v1/projects/{project}/global/images/{image}' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'POST', + method: 'DELETE', }, options ), params, - requiredParams: ['project'], - pathParams: ['project'], + requiredParams: ['project', 'image'], + pathParams: ['image', 'project'], context: this.context, }; if (callback) { @@ -40894,7 +41490,9 @@ export namespace compute_v1 { } /** - * Retrieves the list of custom images available to the specified project. Custom images are images you create that belong to your project. This method does not get any images that belong to other projects, including publicly-available images, like Debian 8. If you want to get a list of publicly-available images, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud. + * Sets the deprecation status of an image. + * + * If an empty request body is given, clears the deprecation status instead. * @example * ```js * // Before running the sample: @@ -40914,7 +41512,6 @@ export namespace compute_v1 { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', - * 'https://www.googleapis.com/auth/compute.readonly', * ], * }); * @@ -40923,41 +41520,59 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.images.list({ - * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. - * // - * // 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) ``` - * filter: 'placeholder-value', - * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) - * maxResults: 'placeholder-value', - * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. - * // - * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. - * // - * // Currently, only sorting by `name` or `creationTimestamp desc` is supported. - * orderBy: 'placeholder-value', - * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. - * pageToken: 'placeholder-value', + * const res = await compute.images.deprecate({ + * // Image name. + * image: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. - * returnPartialSuccess: 'placeholder-value', + * // 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. + * // + * // 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: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "deleted": "my_deleted", + * // "deprecated": "my_deprecated", + * // "obsolete": "my_obsolete", + * // "replacement": "my_replacement", + * // "state": "my_state" + * // } + * }, * }); * console.log(res.data); * * // Example response * // { + * // "clientOperationId": "my_clientOperationId", + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "endTime": "my_endTime", + * // "error": {}, + * // "httpErrorMessage": "my_httpErrorMessage", + * // "httpErrorStatusCode": 0, * // "id": "my_id", - * // "items": [], + * // "insertTime": "my_insertTime", * // "kind": "my_kind", - * // "nextPageToken": "my_nextPageToken", + * // "name": "my_name", + * // "operationGroupId": "my_operationGroupId", + * // "operationType": "my_operationType", + * // "progress": 0, + * // "region": "my_region", * // "selfLink": "my_selfLink", - * // "warning": {} + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "statusMessage": "my_statusMessage", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "user": "my_user", + * // "warnings": [], + * // "zone": "my_zone" * // } * } * @@ -40973,49 +41588,49 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - list( - params: Params$Resource$Images$List, + deprecate( + params: Params$Resource$Images$Deprecate, options: StreamMethodOptions ): GaxiosPromise; - list( - params?: Params$Resource$Images$List, + deprecate( + params?: Params$Resource$Images$Deprecate, options?: MethodOptions - ): GaxiosPromise; - list( - params: Params$Resource$Images$List, + ): GaxiosPromise; + deprecate( + params: Params$Resource$Images$Deprecate, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Images$List, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + deprecate( + params: Params$Resource$Images$Deprecate, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Images$List, - callback: BodyResponseCallback + deprecate( + params: Params$Resource$Images$Deprecate, + callback: BodyResponseCallback ): void; - list(callback: BodyResponseCallback): void; - list( + deprecate(callback: BodyResponseCallback): void; + deprecate( paramsOrCallback?: - | Params$Resource$Images$List - | BodyResponseCallback + | Params$Resource$Images$Deprecate + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Images$List; + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Images$Deprecate; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Images$List; + params = {} as Params$Resource$Images$Deprecate; options = {}; } @@ -41029,29 +41644,30 @@ export namespace compute_v1 { options: Object.assign( { url: ( - rootUrl + '/compute/v1/projects/{project}/global/images' + rootUrl + + '/compute/v1/projects/{project}/global/images/{image}/deprecate' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'GET', + method: 'POST', }, options ), params, - requiredParams: ['project'], - pathParams: ['project'], + requiredParams: ['project', 'image'], + pathParams: ['image', 'project'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Patches the specified image with the data included in the request. Only the following fields can be modified: family, description, deprecation status. + * Returns the specified image. Gets a list of available images by making a list() request. * @example * ```js * // Before running the sample: @@ -41071,6 +41687,7 @@ export namespace compute_v1 { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', * ], * }); * @@ -41079,85 +41696,48 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.images.patch({ - * // Name of the image resource to patch. + * const res = await compute.images.get({ + * // Name of the image resource to return. * image: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // 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. - * // - * // 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: 'placeholder-value', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "archiveSizeBytes": "my_archiveSizeBytes", - * // "creationTimestamp": "my_creationTimestamp", - * // "deprecated": {}, - * // "description": "my_description", - * // "diskSizeGb": "my_diskSizeGb", - * // "family": "my_family", - * // "guestOsFeatures": [], - * // "id": "my_id", - * // "imageEncryptionKey": {}, - * // "kind": "my_kind", - * // "labelFingerprint": "my_labelFingerprint", - * // "labels": {}, - * // "licenseCodes": [], - * // "licenses": [], - * // "name": "my_name", - * // "rawDisk": {}, - * // "satisfiesPzs": false, - * // "selfLink": "my_selfLink", - * // "shieldedInstanceInitialState": {}, - * // "sourceDisk": "my_sourceDisk", - * // "sourceDiskEncryptionKey": {}, - * // "sourceDiskId": "my_sourceDiskId", - * // "sourceImage": "my_sourceImage", - * // "sourceImageEncryptionKey": {}, - * // "sourceImageId": "my_sourceImageId", - * // "sourceSnapshot": "my_sourceSnapshot", - * // "sourceSnapshotEncryptionKey": {}, - * // "sourceSnapshotId": "my_sourceSnapshotId", - * // "sourceType": "my_sourceType", - * // "status": "my_status", - * // "storageLocations": [] - * // } - * }, * }); * console.log(res.data); * * // Example response * // { - * // "clientOperationId": "my_clientOperationId", + * // "archiveSizeBytes": "my_archiveSizeBytes", * // "creationTimestamp": "my_creationTimestamp", + * // "deprecated": {}, * // "description": "my_description", - * // "endTime": "my_endTime", - * // "error": {}, - * // "httpErrorMessage": "my_httpErrorMessage", - * // "httpErrorStatusCode": 0, + * // "diskSizeGb": "my_diskSizeGb", + * // "family": "my_family", + * // "guestOsFeatures": [], * // "id": "my_id", - * // "insertTime": "my_insertTime", + * // "imageEncryptionKey": {}, * // "kind": "my_kind", + * // "labelFingerprint": "my_labelFingerprint", + * // "labels": {}, + * // "licenseCodes": [], + * // "licenses": [], * // "name": "my_name", - * // "operationGroupId": "my_operationGroupId", - * // "operationType": "my_operationType", - * // "progress": 0, - * // "region": "my_region", + * // "rawDisk": {}, + * // "satisfiesPzs": false, * // "selfLink": "my_selfLink", - * // "startTime": "my_startTime", + * // "shieldedInstanceInitialState": {}, + * // "sourceDisk": "my_sourceDisk", + * // "sourceDiskEncryptionKey": {}, + * // "sourceDiskId": "my_sourceDiskId", + * // "sourceImage": "my_sourceImage", + * // "sourceImageEncryptionKey": {}, + * // "sourceImageId": "my_sourceImageId", + * // "sourceSnapshot": "my_sourceSnapshot", + * // "sourceSnapshotEncryptionKey": {}, + * // "sourceSnapshotId": "my_sourceSnapshotId", + * // "sourceType": "my_sourceType", * // "status": "my_status", - * // "statusMessage": "my_statusMessage", - * // "targetId": "my_targetId", - * // "targetLink": "my_targetLink", - * // "user": "my_user", - * // "warnings": [], - * // "zone": "my_zone" + * // "storageLocations": [] * // } * } * @@ -41173,49 +41753,49 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - patch( - params: Params$Resource$Images$Patch, + get( + params: Params$Resource$Images$Get, options: StreamMethodOptions ): GaxiosPromise; - patch( - params?: Params$Resource$Images$Patch, + get( + params?: Params$Resource$Images$Get, options?: MethodOptions - ): GaxiosPromise; - patch( - params: Params$Resource$Images$Patch, + ): GaxiosPromise; + get( + params: Params$Resource$Images$Get, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - patch( - params: Params$Resource$Images$Patch, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + get( + params: Params$Resource$Images$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - patch( - params: Params$Resource$Images$Patch, - callback: BodyResponseCallback + get( + params: Params$Resource$Images$Get, + callback: BodyResponseCallback ): void; - patch(callback: BodyResponseCallback): void; - patch( + get(callback: BodyResponseCallback): void; + get( paramsOrCallback?: - | Params$Resource$Images$Patch - | BodyResponseCallback + | Params$Resource$Images$Get + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Images$Patch; + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Images$Get; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Images$Patch; + params = {} as Params$Resource$Images$Get; options = {}; } @@ -41231,7 +41811,7 @@ export namespace compute_v1 { url: ( rootUrl + '/compute/v1/projects/{project}/global/images/{image}' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'PATCH', + method: 'GET', }, options ), @@ -41241,17 +41821,17 @@ export namespace compute_v1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Sets the access control policy on the specified resource. Replaces any existing policy. + * Returns the latest image that is part of an image family and is not deprecated. * @example * ```js * // Before running the sample: @@ -41271,6 +41851,7 @@ export namespace compute_v1 { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', * ], * }); * @@ -41279,30 +41860,188 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.images.setIamPolicy({ + * const res = await compute.images.getFromFamily({ + * // Name of the image family to search for. + * family: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // Name or id of the resource for this request. - * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "bindings": [], - * // "etag": "my_etag", - * // "policy": {} - * // } - * }, * }); * console.log(res.data); * * // Example response * // { - * // "auditConfigs": [], - * // "bindings": [], - * // "etag": "my_etag", + * // "archiveSizeBytes": "my_archiveSizeBytes", + * // "creationTimestamp": "my_creationTimestamp", + * // "deprecated": {}, + * // "description": "my_description", + * // "diskSizeGb": "my_diskSizeGb", + * // "family": "my_family", + * // "guestOsFeatures": [], + * // "id": "my_id", + * // "imageEncryptionKey": {}, + * // "kind": "my_kind", + * // "labelFingerprint": "my_labelFingerprint", + * // "labels": {}, + * // "licenseCodes": [], + * // "licenses": [], + * // "name": "my_name", + * // "rawDisk": {}, + * // "satisfiesPzs": false, + * // "selfLink": "my_selfLink", + * // "shieldedInstanceInitialState": {}, + * // "sourceDisk": "my_sourceDisk", + * // "sourceDiskEncryptionKey": {}, + * // "sourceDiskId": "my_sourceDiskId", + * // "sourceImage": "my_sourceImage", + * // "sourceImageEncryptionKey": {}, + * // "sourceImageId": "my_sourceImageId", + * // "sourceSnapshot": "my_sourceSnapshot", + * // "sourceSnapshotEncryptionKey": {}, + * // "sourceSnapshotId": "my_sourceSnapshotId", + * // "sourceType": "my_sourceType", + * // "status": "my_status", + * // "storageLocations": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + getFromFamily( + params: Params$Resource$Images$Getfromfamily, + options: StreamMethodOptions + ): GaxiosPromise; + getFromFamily( + params?: Params$Resource$Images$Getfromfamily, + options?: MethodOptions + ): GaxiosPromise; + getFromFamily( + params: Params$Resource$Images$Getfromfamily, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getFromFamily( + params: Params$Resource$Images$Getfromfamily, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getFromFamily( + params: Params$Resource$Images$Getfromfamily, + callback: BodyResponseCallback + ): void; + getFromFamily(callback: BodyResponseCallback): void; + getFromFamily( + paramsOrCallback?: + | Params$Resource$Images$Getfromfamily + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Images$Getfromfamily; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Images$Getfromfamily; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/v1/projects/{project}/global/images/family/{family}' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['project', 'family'], + pathParams: ['family', 'project'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Gets the access control policy for a resource. May be empty if no such policy or resource exists. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.images.getIamPolicy({ + * // Requested IAM Policy version. + * optionsRequestedPolicyVersion: 'placeholder-value', + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // Name or id of the resource for this request. + * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "auditConfigs": [], + * // "bindings": [], + * // "etag": "my_etag", * // "iamOwned": false, * // "rules": [], * // "version": 0 @@ -41321,32 +42060,32 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - setIamPolicy( - params: Params$Resource$Images$Setiampolicy, + getIamPolicy( + params: Params$Resource$Images$Getiampolicy, options: StreamMethodOptions ): GaxiosPromise; - setIamPolicy( - params?: Params$Resource$Images$Setiampolicy, + getIamPolicy( + params?: Params$Resource$Images$Getiampolicy, options?: MethodOptions ): GaxiosPromise; - setIamPolicy( - params: Params$Resource$Images$Setiampolicy, + getIamPolicy( + params: Params$Resource$Images$Getiampolicy, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - setIamPolicy( - params: Params$Resource$Images$Setiampolicy, + getIamPolicy( + params: Params$Resource$Images$Getiampolicy, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - setIamPolicy( - params: Params$Resource$Images$Setiampolicy, + getIamPolicy( + params: Params$Resource$Images$Getiampolicy, callback: BodyResponseCallback ): void; - setIamPolicy(callback: BodyResponseCallback): void; - setIamPolicy( + getIamPolicy(callback: BodyResponseCallback): void; + getIamPolicy( paramsOrCallback?: - | Params$Resource$Images$Setiampolicy + | Params$Resource$Images$Getiampolicy | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -41359,12 +42098,12 @@ export namespace compute_v1 { | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Images$Setiampolicy; + {}) as Params$Resource$Images$Getiampolicy; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Images$Setiampolicy; + params = {} as Params$Resource$Images$Getiampolicy; options = {}; } @@ -41379,9 +42118,9 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/global/images/{resource}/setIamPolicy' + '/compute/v1/projects/{project}/global/images/{resource}/getIamPolicy' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'POST', + method: 'GET', }, options ), @@ -41401,7 +42140,7 @@ export namespace compute_v1 { } /** - * Sets the labels on an image. To learn more about labels, read the Labeling Resources documentation. + * Creates an image in the specified project using the data included in the request. * @example * ```js * // Before running the sample: @@ -41421,6 +42160,9 @@ export namespace compute_v1 { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/devstorage.full_control', + * 'https://www.googleapis.com/auth/devstorage.read_only', + * 'https://www.googleapis.com/auth/devstorage.read_write', * ], * }); * @@ -41429,19 +42171,54 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.images.setLabels({ + * const res = await compute.images.insert({ + * // Force image creation if true. + * forceCreate: 'placeholder-value', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // Name or id of the resource for this request. - * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * // 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. + * // + * // 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: 'placeholder-value', * * // Request body metadata * requestBody: { * // request body parameters * // { + * // "archiveSizeBytes": "my_archiveSizeBytes", + * // "creationTimestamp": "my_creationTimestamp", + * // "deprecated": {}, + * // "description": "my_description", + * // "diskSizeGb": "my_diskSizeGb", + * // "family": "my_family", + * // "guestOsFeatures": [], + * // "id": "my_id", + * // "imageEncryptionKey": {}, + * // "kind": "my_kind", * // "labelFingerprint": "my_labelFingerprint", - * // "labels": {} + * // "labels": {}, + * // "licenseCodes": [], + * // "licenses": [], + * // "name": "my_name", + * // "rawDisk": {}, + * // "satisfiesPzs": false, + * // "selfLink": "my_selfLink", + * // "shieldedInstanceInitialState": {}, + * // "sourceDisk": "my_sourceDisk", + * // "sourceDiskEncryptionKey": {}, + * // "sourceDiskId": "my_sourceDiskId", + * // "sourceImage": "my_sourceImage", + * // "sourceImageEncryptionKey": {}, + * // "sourceImageId": "my_sourceImageId", + * // "sourceSnapshot": "my_sourceSnapshot", + * // "sourceSnapshotEncryptionKey": {}, + * // "sourceSnapshotId": "my_sourceSnapshotId", + * // "sourceType": "my_sourceType", + * // "status": "my_status", + * // "storageLocations": [] * // } * }, * }); @@ -41488,32 +42265,32 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - setLabels( - params: Params$Resource$Images$Setlabels, + insert( + params: Params$Resource$Images$Insert, options: StreamMethodOptions ): GaxiosPromise; - setLabels( - params?: Params$Resource$Images$Setlabels, + insert( + params?: Params$Resource$Images$Insert, options?: MethodOptions ): GaxiosPromise; - setLabels( - params: Params$Resource$Images$Setlabels, + insert( + params: Params$Resource$Images$Insert, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - setLabels( - params: Params$Resource$Images$Setlabels, + insert( + params: Params$Resource$Images$Insert, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - setLabels( - params: Params$Resource$Images$Setlabels, + insert( + params: Params$Resource$Images$Insert, callback: BodyResponseCallback ): void; - setLabels(callback: BodyResponseCallback): void; - setLabels( + insert(callback: BodyResponseCallback): void; + insert( paramsOrCallback?: - | Params$Resource$Images$Setlabels + | Params$Resource$Images$Insert | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -41525,12 +42302,12 @@ export namespace compute_v1 { | BodyResponseCallback | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Images$Setlabels; + let params = (paramsOrCallback || {}) as Params$Resource$Images$Insert; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Images$Setlabels; + params = {} as Params$Resource$Images$Insert; options = {}; } @@ -41544,16 +42321,15 @@ export namespace compute_v1 { options: Object.assign( { url: ( - rootUrl + - '/compute/v1/projects/{project}/global/images/{resource}/setLabels' + rootUrl + '/compute/v1/projects/{project}/global/images' ).replace(/([^:]\/)\/+/g, '$1'), method: 'POST', }, options ), params, - requiredParams: ['project', 'resource'], - pathParams: ['project', 'resource'], + requiredParams: ['project'], + pathParams: ['project'], context: this.context, }; if (callback) { @@ -41567,7 +42343,7 @@ export namespace compute_v1 { } /** - * Returns permissions that a caller has on the specified resource. + * Retrieves the list of custom images available to the specified project. Custom images are images you create that belong to your project. This method does not get any images that belong to other projects, including publicly-available images, like Debian 8. If you want to get a list of publicly-available images, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud. * @example * ```js * // Before running the sample: @@ -41596,26 +42372,41 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.images.testIamPermissions({ + * const res = await compute.images.list({ + * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. + * // + * // 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) ``` + * filter: 'placeholder-value', + * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * maxResults: 'placeholder-value', + * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * // + * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. + * // + * // Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * orderBy: 'placeholder-value', + * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * pageToken: 'placeholder-value', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // Name or id of the resource for this request. - * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "permissions": [] - * // } - * }, + * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + * returnPartialSuccess: 'placeholder-value', * }); * console.log(res.data); * * // Example response * // { - * // "permissions": [] + * // "id": "my_id", + * // "items": [], + * // "kind": "my_kind", + * // "nextPageToken": "my_nextPageToken", + * // "selfLink": "my_selfLink", + * // "warning": {} * // } * } * @@ -41631,57 +42422,49 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - testIamPermissions( - params: Params$Resource$Images$Testiampermissions, + list( + params: Params$Resource$Images$List, options: StreamMethodOptions ): GaxiosPromise; - testIamPermissions( - params?: Params$Resource$Images$Testiampermissions, + list( + params?: Params$Resource$Images$List, options?: MethodOptions - ): GaxiosPromise; - testIamPermissions( - params: Params$Resource$Images$Testiampermissions, + ): GaxiosPromise; + list( + params: Params$Resource$Images$List, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - testIamPermissions( - params: Params$Resource$Images$Testiampermissions, - options: - | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - testIamPermissions( - params: Params$Resource$Images$Testiampermissions, - callback: BodyResponseCallback + list( + params: Params$Resource$Images$List, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - testIamPermissions( - callback: BodyResponseCallback + list( + params: Params$Resource$Images$List, + callback: BodyResponseCallback ): void; - testIamPermissions( + list(callback: BodyResponseCallback): void; + list( paramsOrCallback?: - | Params$Resource$Images$Testiampermissions - | BodyResponseCallback + | Params$Resource$Images$List + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): - | void - | GaxiosPromise - | GaxiosPromise { - let params = (paramsOrCallback || - {}) as Params$Resource$Images$Testiampermissions; + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Images$List; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Images$Testiampermissions; + params = {} as Params$Resource$Images$List; options = {}; } @@ -41695,278 +42478,59 @@ export namespace compute_v1 { options: Object.assign( { url: ( - rootUrl + - '/compute/v1/projects/{project}/global/images/{resource}/testIamPermissions' + rootUrl + '/compute/v1/projects/{project}/global/images' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'POST', + method: 'GET', }, options ), params, - requiredParams: ['project', 'resource'], - pathParams: ['project', 'resource'], + requiredParams: ['project'], + pathParams: ['project'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } - } - export interface Params$Resource$Images$Delete extends StandardParameters { - /** - * Name of the image resource to delete. - */ - image?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * 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. - * - * 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; - } - export interface Params$Resource$Images$Deprecate extends StandardParameters { - /** - * Image name. - */ - image?: string; - /** - * Project ID for this request. - */ - project?: string; /** - * 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. + * Patches the specified image with the data included in the request. Only the following fields can be modified: family, description, deprecation status. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` * - * 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. + * const {google} = require('googleapis'); + * const compute = google.compute('v1'); * - * The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). - */ - requestId?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$DeprecationStatus; - } - export interface Params$Resource$Images$Get extends StandardParameters { - /** - * Name of the image resource to return. - */ - image?: string; - /** - * Project ID for this request. - */ - project?: string; - } - export interface Params$Resource$Images$Getfromfamily - extends StandardParameters { - /** - * Name of the image family to search for. - */ - family?: string; - /** - * Project ID for this request. - */ - project?: string; - } - export interface Params$Resource$Images$Getiampolicy - extends StandardParameters { - /** - * Requested IAM Policy version. - */ - optionsRequestedPolicyVersion?: number; - /** - * Project ID for this request. - */ - project?: string; - /** - * Name or id of the resource for this request. - */ - resource?: string; - } - export interface Params$Resource$Images$Insert extends StandardParameters { - /** - * Force image creation if true. - */ - forceCreate?: boolean; - /** - * Project ID for this request. - */ - project?: string; - /** - * 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. + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * ], + * }); * - * 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; - - /** - * Request body metadata - */ - requestBody?: Schema$Image; - } - export interface Params$Resource$Images$List extends StandardParameters { - /** - * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. - * - * 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) ``` - */ - filter?: string; - /** - * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) - */ - maxResults?: number; - /** - * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. - * - * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. - * - * Currently, only sorting by `name` or `creationTimestamp desc` is supported. - */ - orderBy?: string; - /** - * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. - */ - pageToken?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. - */ - returnPartialSuccess?: boolean; - } - export interface Params$Resource$Images$Patch extends StandardParameters { - /** - * Name of the image resource to patch. - */ - image?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * 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. - * - * 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; - - /** - * Request body metadata - */ - requestBody?: Schema$Image; - } - export interface Params$Resource$Images$Setiampolicy - extends StandardParameters { - /** - * Project ID for this request. - */ - project?: string; - /** - * Name or id of the resource for this request. - */ - resource?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$GlobalSetPolicyRequest; - } - export interface Params$Resource$Images$Setlabels extends StandardParameters { - /** - * Project ID for this request. - */ - project?: string; - /** - * Name or id of the resource for this request. - */ - resource?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$GlobalSetLabelsRequest; - } - export interface Params$Resource$Images$Testiampermissions - extends StandardParameters { - /** - * Project ID for this request. - */ - project?: string; - /** - * Name or id of the resource for this request. - */ - resource?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$TestPermissionsRequest; - } - - export class Resource$Instancegroupmanagers { - context: APIRequestContext; - constructor(context: APIRequestContext) { - this.context = context; - } - - /** - * Flags the specified instances to be removed from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method. - * - * If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. - * - * You can specify a maximum of 1000 instances with this method per request. - * @example - * ```js - * // Before running the sample: - * // - Enable the API at: - * // https://console.developers.google.com/apis/api/compute.googleapis.com - * // - Login into gcloud by running: - * // `$ gcloud auth application-default login` - * // - Install the npm module by running: - * // `$ npm install googleapis` - * - * const {google} = require('googleapis'); - * const compute = google.compute('v1'); - * - * async function main() { - * const auth = new google.auth.GoogleAuth({ - * // Scopes can be specified either as an array or as a single, space-delimited string. - * scopes: [ - * 'https://www.googleapis.com/auth/cloud-platform', - * 'https://www.googleapis.com/auth/compute', - * ], - * }); - * - * // Acquire an auth client, and bind it to all future calls - * const authClient = await auth.getClient(); - * google.options({auth: authClient}); + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.instanceGroupManagers.abandonInstances({ - * // The name of the managed instance group. - * instanceGroupManager: 'placeholder-value', + * const res = await compute.images.patch({ + * // Name of the image resource to patch. + * image: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', @@ -41976,14 +42540,42 @@ export namespace compute_v1 { * // * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). * requestId: 'placeholder-value', - * // The name of the zone where the managed instance group is located. - * zone: 'placeholder-value', * * // Request body metadata * requestBody: { * // request body parameters * // { - * // "instances": [] + * // "archiveSizeBytes": "my_archiveSizeBytes", + * // "creationTimestamp": "my_creationTimestamp", + * // "deprecated": {}, + * // "description": "my_description", + * // "diskSizeGb": "my_diskSizeGb", + * // "family": "my_family", + * // "guestOsFeatures": [], + * // "id": "my_id", + * // "imageEncryptionKey": {}, + * // "kind": "my_kind", + * // "labelFingerprint": "my_labelFingerprint", + * // "labels": {}, + * // "licenseCodes": [], + * // "licenses": [], + * // "name": "my_name", + * // "rawDisk": {}, + * // "satisfiesPzs": false, + * // "selfLink": "my_selfLink", + * // "shieldedInstanceInitialState": {}, + * // "sourceDisk": "my_sourceDisk", + * // "sourceDiskEncryptionKey": {}, + * // "sourceDiskId": "my_sourceDiskId", + * // "sourceImage": "my_sourceImage", + * // "sourceImageEncryptionKey": {}, + * // "sourceImageId": "my_sourceImageId", + * // "sourceSnapshot": "my_sourceSnapshot", + * // "sourceSnapshotEncryptionKey": {}, + * // "sourceSnapshotId": "my_sourceSnapshotId", + * // "sourceType": "my_sourceType", + * // "status": "my_status", + * // "storageLocations": [] * // } * }, * }); @@ -42030,32 +42622,32 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - abandonInstances( - params: Params$Resource$Instancegroupmanagers$Abandoninstances, + patch( + params: Params$Resource$Images$Patch, options: StreamMethodOptions ): GaxiosPromise; - abandonInstances( - params?: Params$Resource$Instancegroupmanagers$Abandoninstances, + patch( + params?: Params$Resource$Images$Patch, options?: MethodOptions ): GaxiosPromise; - abandonInstances( - params: Params$Resource$Instancegroupmanagers$Abandoninstances, + patch( + params: Params$Resource$Images$Patch, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - abandonInstances( - params: Params$Resource$Instancegroupmanagers$Abandoninstances, + patch( + params: Params$Resource$Images$Patch, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - abandonInstances( - params: Params$Resource$Instancegroupmanagers$Abandoninstances, + patch( + params: Params$Resource$Images$Patch, callback: BodyResponseCallback ): void; - abandonInstances(callback: BodyResponseCallback): void; - abandonInstances( + patch(callback: BodyResponseCallback): void; + patch( paramsOrCallback?: - | Params$Resource$Instancegroupmanagers$Abandoninstances + | Params$Resource$Images$Patch | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -42067,13 +42659,12 @@ export namespace compute_v1 { | BodyResponseCallback | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { - let params = (paramsOrCallback || - {}) as Params$Resource$Instancegroupmanagers$Abandoninstances; + let params = (paramsOrCallback || {}) as Params$Resource$Images$Patch; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Instancegroupmanagers$Abandoninstances; + params = {} as Params$Resource$Images$Patch; options = {}; } @@ -42087,16 +42678,15 @@ export namespace compute_v1 { options: Object.assign( { url: ( - rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/abandonInstances' + rootUrl + '/compute/v1/projects/{project}/global/images/{image}' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'POST', + method: 'PATCH', }, options ), params, - requiredParams: ['project', 'zone', 'instanceGroupManager'], - pathParams: ['instanceGroupManager', 'project', 'zone'], + requiredParams: ['project', 'image'], + pathParams: ['image', 'project'], context: this.context, }; if (callback) { @@ -42110,7 +42700,7 @@ export namespace compute_v1 { } /** - * Retrieves the list of managed instance groups and groups them by zone. + * Sets the access control policy on the specified resource. Replaces any existing policy. * @example * ```js * // Before running the sample: @@ -42130,7 +42720,6 @@ export namespace compute_v1 { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', - * 'https://www.googleapis.com/auth/compute.readonly', * ], * }); * @@ -42139,44 +42728,33 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.instanceGroupManagers.aggregatedList({ - * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. - * // - * // 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) ``` - * filter: 'placeholder-value', - * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. - * includeAllScopes: 'placeholder-value', - * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) - * maxResults: 'placeholder-value', - * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. - * // - * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. - * // - * // Currently, only sorting by `name` or `creationTimestamp desc` is supported. - * orderBy: 'placeholder-value', - * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. - * pageToken: 'placeholder-value', + * const res = await compute.images.setIamPolicy({ * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. - * returnPartialSuccess: 'placeholder-value', + * // Name or id of the resource for this request. + * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "bindings": [], + * // "etag": "my_etag", + * // "policy": {} + * // } + * }, * }); * console.log(res.data); * * // Example response * // { - * // "id": "my_id", - * // "items": {}, - * // "kind": "my_kind", - * // "nextPageToken": "my_nextPageToken", - * // "selfLink": "my_selfLink", - * // "unreachables": [], - * // "warning": {} + * // "auditConfigs": [], + * // "bindings": [], + * // "etag": "my_etag", + * // "iamOwned": false, + * // "rules": [], + * // "version": 0 * // } * } * @@ -42192,57 +42770,50 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - aggregatedList( - params: Params$Resource$Instancegroupmanagers$Aggregatedlist, + setIamPolicy( + params: Params$Resource$Images$Setiampolicy, options: StreamMethodOptions ): GaxiosPromise; - aggregatedList( - params?: Params$Resource$Instancegroupmanagers$Aggregatedlist, + setIamPolicy( + params?: Params$Resource$Images$Setiampolicy, options?: MethodOptions - ): GaxiosPromise; - aggregatedList( - params: Params$Resource$Instancegroupmanagers$Aggregatedlist, + ): GaxiosPromise; + setIamPolicy( + params: Params$Resource$Images$Setiampolicy, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - aggregatedList( - params: Params$Resource$Instancegroupmanagers$Aggregatedlist, - options: - | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - aggregatedList( - params: Params$Resource$Instancegroupmanagers$Aggregatedlist, - callback: BodyResponseCallback + setIamPolicy( + params: Params$Resource$Images$Setiampolicy, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - aggregatedList( - callback: BodyResponseCallback + setIamPolicy( + params: Params$Resource$Images$Setiampolicy, + callback: BodyResponseCallback ): void; - aggregatedList( + setIamPolicy(callback: BodyResponseCallback): void; + setIamPolicy( paramsOrCallback?: - | Params$Resource$Instancegroupmanagers$Aggregatedlist - | BodyResponseCallback + | Params$Resource$Images$Setiampolicy + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): - | void - | GaxiosPromise - | GaxiosPromise { + ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Instancegroupmanagers$Aggregatedlist; + {}) as Params$Resource$Images$Setiampolicy; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Instancegroupmanagers$Aggregatedlist; + params = {} as Params$Resource$Images$Setiampolicy; options = {}; } @@ -42257,31 +42828,29 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/aggregated/instanceGroupManagers' + '/compute/v1/projects/{project}/global/images/{resource}/setIamPolicy' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'GET', + method: 'POST', }, options ), params, - requiredParams: ['project'], - pathParams: ['project'], + requiredParams: ['project', 'resource'], + pathParams: ['project', 'resource'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest( - parameters - ); + return createAPIRequest(parameters); } } /** - * Applies changes to selected instances on the managed instance group. This method can be used to apply new overrides and/or new versions. + * Sets the labels on an image. To learn more about labels, read the Labeling Resources documentation. * @example * ```js * // Before running the sample: @@ -42309,23 +42878,19 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.instanceGroupManagers.applyUpdatesToInstances({ - * // The name of the managed instance group, should conform to RFC1035. - * instanceGroupManager: 'placeholder-value', + * const res = await compute.images.setLabels({ * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // The name of the zone where the managed instance group is located. Should conform to RFC1035. - * zone: 'placeholder-value', + * // Name or id of the resource for this request. + * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * * // Request body metadata * requestBody: { * // request body parameters * // { - * // "allInstances": false, - * // "instances": [], - * // "minimalAction": "my_minimalAction", - * // "mostDisruptiveAllowedAction": "my_mostDisruptiveAllowedAction" + * // "labelFingerprint": "my_labelFingerprint", + * // "labels": {} * // } * }, * }); @@ -42372,34 +42937,32 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - applyUpdatesToInstances( - params: Params$Resource$Instancegroupmanagers$Applyupdatestoinstances, + setLabels( + params: Params$Resource$Images$Setlabels, options: StreamMethodOptions ): GaxiosPromise; - applyUpdatesToInstances( - params?: Params$Resource$Instancegroupmanagers$Applyupdatestoinstances, + setLabels( + params?: Params$Resource$Images$Setlabels, options?: MethodOptions ): GaxiosPromise; - applyUpdatesToInstances( - params: Params$Resource$Instancegroupmanagers$Applyupdatestoinstances, + setLabels( + params: Params$Resource$Images$Setlabels, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - applyUpdatesToInstances( - params: Params$Resource$Instancegroupmanagers$Applyupdatestoinstances, + setLabels( + params: Params$Resource$Images$Setlabels, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - applyUpdatesToInstances( - params: Params$Resource$Instancegroupmanagers$Applyupdatestoinstances, - callback: BodyResponseCallback - ): void; - applyUpdatesToInstances( + setLabels( + params: Params$Resource$Images$Setlabels, callback: BodyResponseCallback ): void; - applyUpdatesToInstances( + setLabels(callback: BodyResponseCallback): void; + setLabels( paramsOrCallback?: - | Params$Resource$Instancegroupmanagers$Applyupdatestoinstances + | Params$Resource$Images$Setlabels | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -42411,13 +42974,12 @@ export namespace compute_v1 { | BodyResponseCallback | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { - let params = (paramsOrCallback || - {}) as Params$Resource$Instancegroupmanagers$Applyupdatestoinstances; + let params = (paramsOrCallback || {}) as Params$Resource$Images$Setlabels; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Instancegroupmanagers$Applyupdatestoinstances; + params = {} as Params$Resource$Images$Setlabels; options = {}; } @@ -42432,15 +42994,15 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/applyUpdatesToInstances' + '/compute/v1/projects/{project}/global/images/{resource}/setLabels' ).replace(/([^:]\/)\/+/g, '$1'), method: 'POST', }, options ), params, - requiredParams: ['project', 'zone', 'instanceGroupManager'], - pathParams: ['instanceGroupManager', 'project', 'zone'], + requiredParams: ['project', 'resource'], + pathParams: ['project', 'resource'], context: this.context, }; if (callback) { @@ -42454,7 +43016,7 @@ export namespace compute_v1 { } /** - * Creates instances with per-instance configs in this managed instance group. Instances are created using the current instance template. The create instances operation is marked DONE if the createInstances request is successful. The underlying actions take additional time. You must separately verify the status of the creating or actions with the listmanagedinstances method. + * Returns permissions that a caller has on the specified resource. * @example * ```js * // Before running the sample: @@ -42474,6 +43036,7 @@ export namespace compute_v1 { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', * ], * }); * @@ -42482,26 +43045,18 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.instanceGroupManagers.createInstances({ - * // The name of the managed instance group. It should conform to RFC1035. - * instanceGroupManager: 'placeholder-value', + * const res = await compute.images.testIamPermissions({ * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // 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. - * // - * // 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. - * // - * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). - * requestId: 'placeholder-value', - * // The name of the zone where the managed instance group is located. It should conform to RFC1035. - * zone: 'placeholder-value', + * // Name or id of the resource for this request. + * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * * // Request body metadata * requestBody: { * // request body parameters * // { - * // "instances": [] + * // "permissions": [] * // } * }, * }); @@ -42509,30 +43064,7 @@ export namespace compute_v1 { * * // Example response * // { - * // "clientOperationId": "my_clientOperationId", - * // "creationTimestamp": "my_creationTimestamp", - * // "description": "my_description", - * // "endTime": "my_endTime", - * // "error": {}, - * // "httpErrorMessage": "my_httpErrorMessage", - * // "httpErrorStatusCode": 0, - * // "id": "my_id", - * // "insertTime": "my_insertTime", - * // "kind": "my_kind", - * // "name": "my_name", - * // "operationGroupId": "my_operationGroupId", - * // "operationType": "my_operationType", - * // "progress": 0, - * // "region": "my_region", - * // "selfLink": "my_selfLink", - * // "startTime": "my_startTime", - * // "status": "my_status", - * // "statusMessage": "my_statusMessage", - * // "targetId": "my_targetId", - * // "targetLink": "my_targetLink", - * // "user": "my_user", - * // "warnings": [], - * // "zone": "my_zone" + * // "permissions": [] * // } * } * @@ -42548,50 +43080,57 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - createInstances( - params: Params$Resource$Instancegroupmanagers$Createinstances, + testIamPermissions( + params: Params$Resource$Images$Testiampermissions, options: StreamMethodOptions ): GaxiosPromise; - createInstances( - params?: Params$Resource$Instancegroupmanagers$Createinstances, + testIamPermissions( + params?: Params$Resource$Images$Testiampermissions, options?: MethodOptions - ): GaxiosPromise; - createInstances( - params: Params$Resource$Instancegroupmanagers$Createinstances, + ): GaxiosPromise; + testIamPermissions( + params: Params$Resource$Images$Testiampermissions, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - createInstances( - params: Params$Resource$Instancegroupmanagers$Createinstances, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + testIamPermissions( + params: Params$Resource$Images$Testiampermissions, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - createInstances( - params: Params$Resource$Instancegroupmanagers$Createinstances, - callback: BodyResponseCallback + testIamPermissions( + params: Params$Resource$Images$Testiampermissions, + callback: BodyResponseCallback ): void; - createInstances(callback: BodyResponseCallback): void; - createInstances( + testIamPermissions( + callback: BodyResponseCallback + ): void; + testIamPermissions( paramsOrCallback?: - | Params$Resource$Instancegroupmanagers$Createinstances - | BodyResponseCallback + | Params$Resource$Images$Testiampermissions + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { + ): + | void + | GaxiosPromise + | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Instancegroupmanagers$Createinstances; + {}) as Params$Resource$Images$Testiampermissions; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Instancegroupmanagers$Createinstances; + params = {} as Params$Resource$Images$Testiampermissions; options = {}; } @@ -42606,29 +43145,247 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/createInstances' + '/compute/v1/projects/{project}/global/images/{resource}/testIamPermissions' ).replace(/([^:]\/)\/+/g, '$1'), method: 'POST', }, options ), params, - requiredParams: ['project', 'zone', 'instanceGroupManager'], - pathParams: ['instanceGroupManager', 'project', 'zone'], + requiredParams: ['project', 'resource'], + pathParams: ['project', 'resource'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } + } + export interface Params$Resource$Images$Delete extends StandardParameters { /** - * Deletes the specified managed instance group and all of the instances in that group. Note that the instance group must not belong to a backend service. Read Deleting an instance group for more information. + * Name of the image resource to delete. + */ + image?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + } + export interface Params$Resource$Images$Deprecate extends StandardParameters { + /** + * Image name. + */ + image?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + + /** + * Request body metadata + */ + requestBody?: Schema$DeprecationStatus; + } + export interface Params$Resource$Images$Get extends StandardParameters { + /** + * Name of the image resource to return. + */ + image?: string; + /** + * Project ID for this request. + */ + project?: string; + } + export interface Params$Resource$Images$Getfromfamily + extends StandardParameters { + /** + * Name of the image family to search for. + */ + family?: string; + /** + * Project ID for this request. + */ + project?: string; + } + export interface Params$Resource$Images$Getiampolicy + extends StandardParameters { + /** + * Requested IAM Policy version. + */ + optionsRequestedPolicyVersion?: number; + /** + * Project ID for this request. + */ + project?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + } + export interface Params$Resource$Images$Insert extends StandardParameters { + /** + * Force image creation if true. + */ + forceCreate?: boolean; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + + /** + * Request body metadata + */ + requestBody?: Schema$Image; + } + export interface Params$Resource$Images$List extends StandardParameters { + /** + * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. + * + * 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) ``` + */ + filter?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + */ + maxResults?: number; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. + * + * Currently, only sorting by `name` or `creationTimestamp desc` is supported. + */ + orderBy?: string; + /** + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + */ + pageToken?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + */ + returnPartialSuccess?: boolean; + } + export interface Params$Resource$Images$Patch extends StandardParameters { + /** + * Name of the image resource to patch. + */ + image?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + + /** + * Request body metadata + */ + requestBody?: Schema$Image; + } + export interface Params$Resource$Images$Setiampolicy + extends StandardParameters { + /** + * Project ID for this request. + */ + project?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GlobalSetPolicyRequest; + } + export interface Params$Resource$Images$Setlabels extends StandardParameters { + /** + * Project ID for this request. + */ + project?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GlobalSetLabelsRequest; + } + export interface Params$Resource$Images$Testiampermissions + extends StandardParameters { + /** + * Project ID for this request. + */ + project?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$TestPermissionsRequest; + } + + export class Resource$Instancegroupmanagers { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Flags the specified instances to be removed from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method. + * + * If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. + * + * You can specify a maximum of 1000 instances with this method per request. * @example * ```js * // Before running the sample: @@ -42656,8 +43413,8 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.instanceGroupManagers.delete({ - * // The name of the managed instance group to delete. + * const res = await compute.instanceGroupManagers.abandonInstances({ + * // The name of the managed instance group. * instanceGroupManager: 'placeholder-value', * // Project ID for this request. * project: @@ -42670,6 +43427,14 @@ export namespace compute_v1 { * requestId: 'placeholder-value', * // The name of the zone where the managed instance group is located. * zone: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "instances": [] + * // } + * }, * }); * console.log(res.data); * @@ -42714,32 +43479,32 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - delete( - params: Params$Resource$Instancegroupmanagers$Delete, + abandonInstances( + params: Params$Resource$Instancegroupmanagers$Abandoninstances, options: StreamMethodOptions ): GaxiosPromise; - delete( - params?: Params$Resource$Instancegroupmanagers$Delete, + abandonInstances( + params?: Params$Resource$Instancegroupmanagers$Abandoninstances, options?: MethodOptions ): GaxiosPromise; - delete( - params: Params$Resource$Instancegroupmanagers$Delete, + abandonInstances( + params: Params$Resource$Instancegroupmanagers$Abandoninstances, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - delete( - params: Params$Resource$Instancegroupmanagers$Delete, + abandonInstances( + params: Params$Resource$Instancegroupmanagers$Abandoninstances, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - delete( - params: Params$Resource$Instancegroupmanagers$Delete, + abandonInstances( + params: Params$Resource$Instancegroupmanagers$Abandoninstances, callback: BodyResponseCallback ): void; - delete(callback: BodyResponseCallback): void; - delete( + abandonInstances(callback: BodyResponseCallback): void; + abandonInstances( paramsOrCallback?: - | Params$Resource$Instancegroupmanagers$Delete + | Params$Resource$Instancegroupmanagers$Abandoninstances | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -42752,12 +43517,12 @@ export namespace compute_v1 { | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Instancegroupmanagers$Delete; + {}) as Params$Resource$Instancegroupmanagers$Abandoninstances; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Instancegroupmanagers$Delete; + params = {} as Params$Resource$Instancegroupmanagers$Abandoninstances; options = {}; } @@ -42772,9 +43537,9 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}' + '/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/abandonInstances' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'DELETE', + method: 'POST', }, options ), @@ -42794,11 +43559,7 @@ export namespace compute_v1 { } /** - * Flags the specified instances in the managed instance group for immediate deletion. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method. - * - * If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. - * - * You can specify a maximum of 1000 instances with this method per request. + * Retrieves the list of managed instance groups and groups them by zone. * @example * ```js * // Before running the sample: @@ -42818,6 +43579,7 @@ export namespace compute_v1 { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', * ], * }); * @@ -42826,57 +43588,44 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.instanceGroupManagers.deleteInstances({ - * // The name of the managed instance group. - * instanceGroupManager: 'placeholder-value', + * const res = await compute.instanceGroupManagers.aggregatedList({ + * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. + * // + * // 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) ``` + * filter: 'placeholder-value', + * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. + * includeAllScopes: 'placeholder-value', + * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * maxResults: 'placeholder-value', + * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * // + * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. + * // + * // Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * orderBy: 'placeholder-value', + * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * pageToken: 'placeholder-value', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // 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. - * // - * // 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: 'placeholder-value', - * // The name of the zone where the managed instance group is located. - * zone: 'placeholder-value', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "instances": [] - * // } - * }, + * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + * returnPartialSuccess: 'placeholder-value', * }); * console.log(res.data); * * // Example response * // { - * // "clientOperationId": "my_clientOperationId", - * // "creationTimestamp": "my_creationTimestamp", - * // "description": "my_description", - * // "endTime": "my_endTime", - * // "error": {}, - * // "httpErrorMessage": "my_httpErrorMessage", - * // "httpErrorStatusCode": 0, * // "id": "my_id", - * // "insertTime": "my_insertTime", + * // "items": {}, * // "kind": "my_kind", - * // "name": "my_name", - * // "operationGroupId": "my_operationGroupId", - * // "operationType": "my_operationType", - * // "progress": 0, - * // "region": "my_region", + * // "nextPageToken": "my_nextPageToken", * // "selfLink": "my_selfLink", - * // "startTime": "my_startTime", - * // "status": "my_status", - * // "statusMessage": "my_statusMessage", - * // "targetId": "my_targetId", - * // "targetLink": "my_targetLink", - * // "user": "my_user", - * // "warnings": [], - * // "zone": "my_zone" + * // "unreachables": [], + * // "warning": {} * // } * } * @@ -42892,50 +43641,57 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - deleteInstances( - params: Params$Resource$Instancegroupmanagers$Deleteinstances, + aggregatedList( + params: Params$Resource$Instancegroupmanagers$Aggregatedlist, options: StreamMethodOptions ): GaxiosPromise; - deleteInstances( - params?: Params$Resource$Instancegroupmanagers$Deleteinstances, + aggregatedList( + params?: Params$Resource$Instancegroupmanagers$Aggregatedlist, options?: MethodOptions - ): GaxiosPromise; - deleteInstances( - params: Params$Resource$Instancegroupmanagers$Deleteinstances, + ): GaxiosPromise; + aggregatedList( + params: Params$Resource$Instancegroupmanagers$Aggregatedlist, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - deleteInstances( - params: Params$Resource$Instancegroupmanagers$Deleteinstances, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + aggregatedList( + params: Params$Resource$Instancegroupmanagers$Aggregatedlist, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - deleteInstances( - params: Params$Resource$Instancegroupmanagers$Deleteinstances, - callback: BodyResponseCallback + aggregatedList( + params: Params$Resource$Instancegroupmanagers$Aggregatedlist, + callback: BodyResponseCallback ): void; - deleteInstances(callback: BodyResponseCallback): void; - deleteInstances( + aggregatedList( + callback: BodyResponseCallback + ): void; + aggregatedList( paramsOrCallback?: - | Params$Resource$Instancegroupmanagers$Deleteinstances - | BodyResponseCallback + | Params$Resource$Instancegroupmanagers$Aggregatedlist + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { + ): + | void + | GaxiosPromise + | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Instancegroupmanagers$Deleteinstances; + {}) as Params$Resource$Instancegroupmanagers$Aggregatedlist; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Instancegroupmanagers$Deleteinstances; + params = {} as Params$Resource$Instancegroupmanagers$Aggregatedlist; options = {}; } @@ -42950,29 +43706,31 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/deleteInstances' + '/compute/v1/projects/{project}/aggregated/instanceGroupManagers' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'POST', + method: 'GET', }, options ), params, - requiredParams: ['project', 'zone', 'instanceGroupManager'], - pathParams: ['instanceGroupManager', 'project', 'zone'], + requiredParams: ['project'], + pathParams: ['project'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest( + parameters + ); } } /** - * Deletes selected per-instance configs for the managed instance group. + * Applies changes to selected instances on the managed instance group. This method can be used to apply new overrides and/or new versions. * @example * ```js * // Before running the sample: @@ -43000,20 +43758,23 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.instanceGroupManagers.deletePerInstanceConfigs({ - * // The name of the managed instance group. It should conform to RFC1035. + * const res = await compute.instanceGroupManagers.applyUpdatesToInstances({ + * // The name of the managed instance group, should conform to RFC1035. * instanceGroupManager: 'placeholder-value', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // The name of the zone where the managed instance group is located. It should conform to RFC1035. + * // The name of the zone where the managed instance group is located. Should conform to RFC1035. * zone: 'placeholder-value', * * // Request body metadata * requestBody: { * // request body parameters * // { - * // "names": [] + * // "allInstances": false, + * // "instances": [], + * // "minimalAction": "my_minimalAction", + * // "mostDisruptiveAllowedAction": "my_mostDisruptiveAllowedAction" * // } * }, * }); @@ -43060,34 +43821,34 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - deletePerInstanceConfigs( - params: Params$Resource$Instancegroupmanagers$Deleteperinstanceconfigs, + applyUpdatesToInstances( + params: Params$Resource$Instancegroupmanagers$Applyupdatestoinstances, options: StreamMethodOptions ): GaxiosPromise; - deletePerInstanceConfigs( - params?: Params$Resource$Instancegroupmanagers$Deleteperinstanceconfigs, + applyUpdatesToInstances( + params?: Params$Resource$Instancegroupmanagers$Applyupdatestoinstances, options?: MethodOptions ): GaxiosPromise; - deletePerInstanceConfigs( - params: Params$Resource$Instancegroupmanagers$Deleteperinstanceconfigs, + applyUpdatesToInstances( + params: Params$Resource$Instancegroupmanagers$Applyupdatestoinstances, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - deletePerInstanceConfigs( - params: Params$Resource$Instancegroupmanagers$Deleteperinstanceconfigs, + applyUpdatesToInstances( + params: Params$Resource$Instancegroupmanagers$Applyupdatestoinstances, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - deletePerInstanceConfigs( - params: Params$Resource$Instancegroupmanagers$Deleteperinstanceconfigs, + applyUpdatesToInstances( + params: Params$Resource$Instancegroupmanagers$Applyupdatestoinstances, callback: BodyResponseCallback ): void; - deletePerInstanceConfigs( + applyUpdatesToInstances( callback: BodyResponseCallback ): void; - deletePerInstanceConfigs( + applyUpdatesToInstances( paramsOrCallback?: - | Params$Resource$Instancegroupmanagers$Deleteperinstanceconfigs + | Params$Resource$Instancegroupmanagers$Applyupdatestoinstances | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -43100,12 +43861,12 @@ export namespace compute_v1 { | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Instancegroupmanagers$Deleteperinstanceconfigs; + {}) as Params$Resource$Instancegroupmanagers$Applyupdatestoinstances; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Instancegroupmanagers$Deleteperinstanceconfigs; + params = {} as Params$Resource$Instancegroupmanagers$Applyupdatestoinstances; options = {}; } @@ -43120,7 +43881,7 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/deletePerInstanceConfigs' + '/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/applyUpdatesToInstances' ).replace(/([^:]\/)\/+/g, '$1'), method: 'POST', }, @@ -43142,7 +43903,7 @@ export namespace compute_v1 { } /** - * Returns all of the details about the specified managed instance group. Gets a list of available managed instance groups by making a list() request. + * Creates instances with per-instance configs in this managed instance group. Instances are created using the current instance template. The create instances operation is marked DONE if the createInstances request is successful. The underlying actions take additional time. You must separately verify the status of the creating or actions with the listmanagedinstances method. * @example * ```js * // Before running the sample: @@ -43162,7 +43923,6 @@ export namespace compute_v1 { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', - * 'https://www.googleapis.com/auth/compute.readonly', * ], * }); * @@ -43171,40 +43931,56 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.instanceGroupManagers.get({ - * // The name of the managed instance group. + * const res = await compute.instanceGroupManagers.createInstances({ + * // The name of the managed instance group. It should conform to RFC1035. * instanceGroupManager: 'placeholder-value', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // The name of the zone where the managed instance group is located. + * // 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. + * // + * // 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. + * // + * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + * requestId: 'placeholder-value', + * // The name of the zone where the managed instance group is located. It should conform to RFC1035. * zone: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "instances": [] + * // } + * }, * }); * console.log(res.data); * * // Example response * // { - * // "autoHealingPolicies": [], - * // "baseInstanceName": "my_baseInstanceName", + * // "clientOperationId": "my_clientOperationId", * // "creationTimestamp": "my_creationTimestamp", - * // "currentActions": {}, * // "description": "my_description", - * // "distributionPolicy": {}, - * // "fingerprint": "my_fingerprint", + * // "endTime": "my_endTime", + * // "error": {}, + * // "httpErrorMessage": "my_httpErrorMessage", + * // "httpErrorStatusCode": 0, * // "id": "my_id", - * // "instanceGroup": "my_instanceGroup", - * // "instanceTemplate": "my_instanceTemplate", + * // "insertTime": "my_insertTime", * // "kind": "my_kind", * // "name": "my_name", - * // "namedPorts": [], + * // "operationGroupId": "my_operationGroupId", + * // "operationType": "my_operationType", + * // "progress": 0, * // "region": "my_region", * // "selfLink": "my_selfLink", - * // "statefulPolicy": {}, - * // "status": {}, - * // "targetPools": [], - * // "targetSize": 0, - * // "updatePolicy": {}, - * // "versions": [], + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "statusMessage": "my_statusMessage", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "user": "my_user", + * // "warnings": [], * // "zone": "my_zone" * // } * } @@ -43221,55 +43997,50 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - get( - params: Params$Resource$Instancegroupmanagers$Get, + createInstances( + params: Params$Resource$Instancegroupmanagers$Createinstances, options: StreamMethodOptions ): GaxiosPromise; - get( - params?: Params$Resource$Instancegroupmanagers$Get, + createInstances( + params?: Params$Resource$Instancegroupmanagers$Createinstances, options?: MethodOptions - ): GaxiosPromise; - get( - params: Params$Resource$Instancegroupmanagers$Get, + ): GaxiosPromise; + createInstances( + params: Params$Resource$Instancegroupmanagers$Createinstances, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - get( - params: Params$Resource$Instancegroupmanagers$Get, - options: - | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + createInstances( + params: Params$Resource$Instancegroupmanagers$Createinstances, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - get( - params: Params$Resource$Instancegroupmanagers$Get, - callback: BodyResponseCallback + createInstances( + params: Params$Resource$Instancegroupmanagers$Createinstances, + callback: BodyResponseCallback ): void; - get(callback: BodyResponseCallback): void; - get( + createInstances(callback: BodyResponseCallback): void; + createInstances( paramsOrCallback?: - | Params$Resource$Instancegroupmanagers$Get - | BodyResponseCallback + | Params$Resource$Instancegroupmanagers$Createinstances + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): - | void - | GaxiosPromise - | GaxiosPromise { + ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Instancegroupmanagers$Get; + {}) as Params$Resource$Instancegroupmanagers$Createinstances; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Instancegroupmanagers$Get; + params = {} as Params$Resource$Instancegroupmanagers$Createinstances; options = {}; } @@ -43284,9 +44055,9 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}' + '/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/createInstances' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'GET', + method: 'POST', }, options ), @@ -43296,19 +44067,17 @@ export namespace compute_v1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method. - * - * A managed instance group can have up to 1000 VM instances per group. Please contact Cloud Support if you need an increase in this limit. + * Deletes the specified managed instance group and all of the instances in that group. Note that the instance group must not belong to a backend service. Read Deleting an instance group for more information. * @example * ```js * // Before running the sample: @@ -43336,7 +44105,9 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.instanceGroupManagers.insert({ + * const res = await compute.instanceGroupManagers.delete({ + * // The name of the managed instance group to delete. + * instanceGroupManager: 'placeholder-value', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', @@ -43346,37 +44117,8 @@ export namespace compute_v1 { * // * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). * requestId: 'placeholder-value', - * // The name of the zone where you want to create the managed instance group. + * // The name of the zone where the managed instance group is located. * zone: 'placeholder-value', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "autoHealingPolicies": [], - * // "baseInstanceName": "my_baseInstanceName", - * // "creationTimestamp": "my_creationTimestamp", - * // "currentActions": {}, - * // "description": "my_description", - * // "distributionPolicy": {}, - * // "fingerprint": "my_fingerprint", - * // "id": "my_id", - * // "instanceGroup": "my_instanceGroup", - * // "instanceTemplate": "my_instanceTemplate", - * // "kind": "my_kind", - * // "name": "my_name", - * // "namedPorts": [], - * // "region": "my_region", - * // "selfLink": "my_selfLink", - * // "statefulPolicy": {}, - * // "status": {}, - * // "targetPools": [], - * // "targetSize": 0, - * // "updatePolicy": {}, - * // "versions": [], - * // "zone": "my_zone" - * // } - * }, * }); * console.log(res.data); * @@ -43421,32 +44163,32 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - insert( - params: Params$Resource$Instancegroupmanagers$Insert, + delete( + params: Params$Resource$Instancegroupmanagers$Delete, options: StreamMethodOptions ): GaxiosPromise; - insert( - params?: Params$Resource$Instancegroupmanagers$Insert, + delete( + params?: Params$Resource$Instancegroupmanagers$Delete, options?: MethodOptions ): GaxiosPromise; - insert( - params: Params$Resource$Instancegroupmanagers$Insert, + delete( + params: Params$Resource$Instancegroupmanagers$Delete, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - insert( - params: Params$Resource$Instancegroupmanagers$Insert, + delete( + params: Params$Resource$Instancegroupmanagers$Delete, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - insert( - params: Params$Resource$Instancegroupmanagers$Insert, + delete( + params: Params$Resource$Instancegroupmanagers$Delete, callback: BodyResponseCallback ): void; - insert(callback: BodyResponseCallback): void; - insert( + delete(callback: BodyResponseCallback): void; + delete( paramsOrCallback?: - | Params$Resource$Instancegroupmanagers$Insert + | Params$Resource$Instancegroupmanagers$Delete | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -43459,12 +44201,12 @@ export namespace compute_v1 { | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Instancegroupmanagers$Insert; + {}) as Params$Resource$Instancegroupmanagers$Delete; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Instancegroupmanagers$Insert; + params = {} as Params$Resource$Instancegroupmanagers$Delete; options = {}; } @@ -43479,15 +44221,15 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers' + '/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'POST', + method: 'DELETE', }, options ), params, - requiredParams: ['project', 'zone'], - pathParams: ['project', 'zone'], + requiredParams: ['project', 'zone', 'instanceGroupManager'], + pathParams: ['instanceGroupManager', 'project', 'zone'], context: this.context, }; if (callback) { @@ -43501,7 +44243,11 @@ export namespace compute_v1 { } /** - * Retrieves a list of managed instance groups that are contained within the specified project and zone. + * Flags the specified instances in the managed instance group for immediate deletion. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method. + * + * If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. + * + * You can specify a maximum of 1000 instances with this method per request. * @example * ```js * // Before running the sample: @@ -43521,7 +44267,6 @@ export namespace compute_v1 { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', - * 'https://www.googleapis.com/auth/compute.readonly', * ], * }); * @@ -43530,43 +44275,57 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.instanceGroupManagers.list({ - * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. - * // - * // 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) ``` - * filter: 'placeholder-value', - * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) - * maxResults: 'placeholder-value', - * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. - * // - * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. - * // - * // Currently, only sorting by `name` or `creationTimestamp desc` is supported. - * orderBy: 'placeholder-value', - * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. - * pageToken: 'placeholder-value', + * const res = await compute.instanceGroupManagers.deleteInstances({ + * // The name of the managed instance group. + * instanceGroupManager: 'placeholder-value', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. - * returnPartialSuccess: 'placeholder-value', + * // 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. + * // + * // 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: 'placeholder-value', * // The name of the zone where the managed instance group is located. * zone: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "instances": [] + * // } + * }, * }); * console.log(res.data); * * // Example response * // { + * // "clientOperationId": "my_clientOperationId", + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "endTime": "my_endTime", + * // "error": {}, + * // "httpErrorMessage": "my_httpErrorMessage", + * // "httpErrorStatusCode": 0, * // "id": "my_id", - * // "items": [], + * // "insertTime": "my_insertTime", * // "kind": "my_kind", - * // "nextPageToken": "my_nextPageToken", + * // "name": "my_name", + * // "operationGroupId": "my_operationGroupId", + * // "operationType": "my_operationType", + * // "progress": 0, + * // "region": "my_region", * // "selfLink": "my_selfLink", - * // "warning": {} + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "statusMessage": "my_statusMessage", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "user": "my_user", + * // "warnings": [], + * // "zone": "my_zone" * // } * } * @@ -43582,55 +44341,50 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - list( - params: Params$Resource$Instancegroupmanagers$List, + deleteInstances( + params: Params$Resource$Instancegroupmanagers$Deleteinstances, options: StreamMethodOptions ): GaxiosPromise; - list( - params?: Params$Resource$Instancegroupmanagers$List, + deleteInstances( + params?: Params$Resource$Instancegroupmanagers$Deleteinstances, options?: MethodOptions - ): GaxiosPromise; - list( - params: Params$Resource$Instancegroupmanagers$List, + ): GaxiosPromise; + deleteInstances( + params: Params$Resource$Instancegroupmanagers$Deleteinstances, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Instancegroupmanagers$List, - options: - | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + deleteInstances( + params: Params$Resource$Instancegroupmanagers$Deleteinstances, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Instancegroupmanagers$List, - callback: BodyResponseCallback + deleteInstances( + params: Params$Resource$Instancegroupmanagers$Deleteinstances, + callback: BodyResponseCallback ): void; - list(callback: BodyResponseCallback): void; - list( + deleteInstances(callback: BodyResponseCallback): void; + deleteInstances( paramsOrCallback?: - | Params$Resource$Instancegroupmanagers$List - | BodyResponseCallback + | Params$Resource$Instancegroupmanagers$Deleteinstances + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): - | void - | GaxiosPromise - | GaxiosPromise { + ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Instancegroupmanagers$List; + {}) as Params$Resource$Instancegroupmanagers$Deleteinstances; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Instancegroupmanagers$List; + params = {} as Params$Resource$Instancegroupmanagers$Deleteinstances; options = {}; } @@ -43645,29 +44399,29 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers' + '/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/deleteInstances' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'GET', + method: 'POST', }, options ), params, - requiredParams: ['project', 'zone'], - pathParams: ['project', 'zone'], + requiredParams: ['project', 'zone', 'instanceGroupManager'], + pathParams: ['instanceGroupManager', 'project', 'zone'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Lists all errors thrown by actions on instances for a given managed instance group. The filter and orderBy query parameters are not supported. + * Deletes selected per-instance configs for the managed instance group. * @example * ```js * // Before running the sample: @@ -43687,7 +44441,6 @@ export namespace compute_v1 { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', - * 'https://www.googleapis.com/auth/compute.readonly', * ], * }); * @@ -43696,41 +44449,51 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.instanceGroupManagers.listErrors({ - * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. - * // - * // 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) ``` - * filter: 'placeholder-value', - * // The name of the managed instance group. It must be a string that meets the requirements in RFC1035, or an unsigned long integer: must match regexp pattern: (?:[a-z](?:[-a-z0-9]{0,61\}[a-z0-9])?)|[1-9][0-9]{0,19\}. + * const res = await compute.instanceGroupManagers.deletePerInstanceConfigs({ + * // The name of the managed instance group. It should conform to RFC1035. * instanceGroupManager: 'placeholder-value', - * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) - * maxResults: 'placeholder-value', - * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. - * // - * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. - * // - * // Currently, only sorting by `name` or `creationTimestamp desc` is supported. - * orderBy: 'placeholder-value', - * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. - * pageToken: 'placeholder-value', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. - * returnPartialSuccess: 'placeholder-value', * // The name of the zone where the managed instance group is located. It should conform to RFC1035. * zone: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "names": [] + * // } + * }, * }); * console.log(res.data); * * // Example response * // { - * // "items": [], - * // "nextPageToken": "my_nextPageToken" + * // "clientOperationId": "my_clientOperationId", + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "endTime": "my_endTime", + * // "error": {}, + * // "httpErrorMessage": "my_httpErrorMessage", + * // "httpErrorStatusCode": 0, + * // "id": "my_id", + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "name": "my_name", + * // "operationGroupId": "my_operationGroupId", + * // "operationType": "my_operationType", + * // "progress": 0, + * // "region": "my_region", + * // "selfLink": "my_selfLink", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "statusMessage": "my_statusMessage", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "user": "my_user", + * // "warnings": [], + * // "zone": "my_zone" * // } * } * @@ -43746,57 +44509,52 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - listErrors( - params: Params$Resource$Instancegroupmanagers$Listerrors, + deletePerInstanceConfigs( + params: Params$Resource$Instancegroupmanagers$Deleteperinstanceconfigs, options: StreamMethodOptions ): GaxiosPromise; - listErrors( - params?: Params$Resource$Instancegroupmanagers$Listerrors, + deletePerInstanceConfigs( + params?: Params$Resource$Instancegroupmanagers$Deleteperinstanceconfigs, options?: MethodOptions - ): GaxiosPromise; - listErrors( - params: Params$Resource$Instancegroupmanagers$Listerrors, + ): GaxiosPromise; + deletePerInstanceConfigs( + params: Params$Resource$Instancegroupmanagers$Deleteperinstanceconfigs, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - listErrors( - params: Params$Resource$Instancegroupmanagers$Listerrors, - options: - | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + deletePerInstanceConfigs( + params: Params$Resource$Instancegroupmanagers$Deleteperinstanceconfigs, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - listErrors( - params: Params$Resource$Instancegroupmanagers$Listerrors, - callback: BodyResponseCallback + deletePerInstanceConfigs( + params: Params$Resource$Instancegroupmanagers$Deleteperinstanceconfigs, + callback: BodyResponseCallback ): void; - listErrors( - callback: BodyResponseCallback + deletePerInstanceConfigs( + callback: BodyResponseCallback ): void; - listErrors( + deletePerInstanceConfigs( paramsOrCallback?: - | Params$Resource$Instancegroupmanagers$Listerrors - | BodyResponseCallback + | Params$Resource$Instancegroupmanagers$Deleteperinstanceconfigs + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): - | void - | GaxiosPromise - | GaxiosPromise { + ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Instancegroupmanagers$Listerrors; + {}) as Params$Resource$Instancegroupmanagers$Deleteperinstanceconfigs; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Instancegroupmanagers$Listerrors; + params = {} as Params$Resource$Instancegroupmanagers$Deleteperinstanceconfigs; options = {}; } @@ -43811,9 +44569,9 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listErrors' + '/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/deletePerInstanceConfigs' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'GET', + method: 'POST', }, options ), @@ -43823,19 +44581,17 @@ export namespace compute_v1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest( - parameters - ); + return createAPIRequest(parameters); } } /** - * Lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous action failed, the list displays the errors for that failed action. The orderBy query parameter is not supported. + * Returns all of the details about the specified managed instance group. Gets a list of available managed instance groups by making a list() request. * @example * ```js * // Before running the sample: @@ -43864,32 +44620,12 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.instanceGroupManagers.listManagedInstances({ - * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. - * // - * // 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) ``` - * filter: 'placeholder-value', + * const res = await compute.instanceGroupManagers.get({ * // The name of the managed instance group. * instanceGroupManager: 'placeholder-value', - * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) - * maxResults: 'placeholder-value', - * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. - * // - * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. - * // - * // Currently, only sorting by `name` or `creationTimestamp desc` is supported. - * orderBy: 'placeholder-value', - * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. - * pageToken: 'placeholder-value', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. - * returnPartialSuccess: 'placeholder-value', * // The name of the zone where the managed instance group is located. * zone: 'placeholder-value', * }); @@ -43897,8 +44633,28 @@ export namespace compute_v1 { * * // Example response * // { - * // "managedInstances": [], - * // "nextPageToken": "my_nextPageToken" + * // "autoHealingPolicies": [], + * // "baseInstanceName": "my_baseInstanceName", + * // "creationTimestamp": "my_creationTimestamp", + * // "currentActions": {}, + * // "description": "my_description", + * // "distributionPolicy": {}, + * // "fingerprint": "my_fingerprint", + * // "id": "my_id", + * // "instanceGroup": "my_instanceGroup", + * // "instanceTemplate": "my_instanceTemplate", + * // "kind": "my_kind", + * // "name": "my_name", + * // "namedPorts": [], + * // "region": "my_region", + * // "selfLink": "my_selfLink", + * // "statefulPolicy": {}, + * // "status": {}, + * // "targetPools": [], + * // "targetSize": 0, + * // "updatePolicy": {}, + * // "versions": [], + * // "zone": "my_zone" * // } * } * @@ -43914,57 +44670,55 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - listManagedInstances( - params: Params$Resource$Instancegroupmanagers$Listmanagedinstances, + get( + params: Params$Resource$Instancegroupmanagers$Get, options: StreamMethodOptions ): GaxiosPromise; - listManagedInstances( - params?: Params$Resource$Instancegroupmanagers$Listmanagedinstances, + get( + params?: Params$Resource$Instancegroupmanagers$Get, options?: MethodOptions - ): GaxiosPromise; - listManagedInstances( - params: Params$Resource$Instancegroupmanagers$Listmanagedinstances, + ): GaxiosPromise; + get( + params: Params$Resource$Instancegroupmanagers$Get, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - listManagedInstances( - params: Params$Resource$Instancegroupmanagers$Listmanagedinstances, + get( + params: Params$Resource$Instancegroupmanagers$Get, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - listManagedInstances( - params: Params$Resource$Instancegroupmanagers$Listmanagedinstances, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - listManagedInstances( - callback: BodyResponseCallback + get( + params: Params$Resource$Instancegroupmanagers$Get, + callback: BodyResponseCallback ): void; - listManagedInstances( + get(callback: BodyResponseCallback): void; + get( paramsOrCallback?: - | Params$Resource$Instancegroupmanagers$Listmanagedinstances - | BodyResponseCallback + | Params$Resource$Instancegroupmanagers$Get + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Instancegroupmanagers$Listmanagedinstances; + {}) as Params$Resource$Instancegroupmanagers$Get; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Instancegroupmanagers$Listmanagedinstances; + params = {} as Params$Resource$Instancegroupmanagers$Get; options = {}; } @@ -43979,9 +44733,9 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances' + '/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'POST', + method: 'GET', }, options ), @@ -43991,19 +44745,19 @@ export namespace compute_v1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest( - parameters - ); + return createAPIRequest(parameters); } } /** - * Lists all of the per-instance configs defined for the managed instance group. The orderBy query parameter is not supported. + * Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method. + * + * A managed instance group can have up to 1000 VM instances per group. Please contact Cloud Support if you need an increase in this limit. * @example * ```js * // Before running the sample: @@ -44023,7 +44777,6 @@ export namespace compute_v1 { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', - * 'https://www.googleapis.com/auth/compute.readonly', * ], * }); * @@ -44032,183 +44785,13 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.instanceGroupManagers.listPerInstanceConfigs({ - * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. + * const res = await compute.instanceGroupManagers.insert({ + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // 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. * // - * // 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) ``` - * filter: 'placeholder-value', - * // The name of the managed instance group. It should conform to RFC1035. - * instanceGroupManager: 'placeholder-value', - * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) - * maxResults: 'placeholder-value', - * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. - * // - * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. - * // - * // Currently, only sorting by `name` or `creationTimestamp desc` is supported. - * orderBy: 'placeholder-value', - * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. - * pageToken: 'placeholder-value', - * // Project ID for this request. - * project: - * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. - * returnPartialSuccess: 'placeholder-value', - * // The name of the zone where the managed instance group is located. It should conform to RFC1035. - * zone: 'placeholder-value', - * }); - * console.log(res.data); - * - * // Example response - * // { - * // "items": [], - * // "nextPageToken": "my_nextPageToken", - * // "warning": {} - * // } - * } - * - * main().catch(e => { - * console.error(e); - * throw e; - * }); - * - * ``` - * - * @param params - Parameters for request - * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. - * @param callback - Optional callback that handles the response. - * @returns A promise if used with async/await, or void if used with a callback. - */ - listPerInstanceConfigs( - params: Params$Resource$Instancegroupmanagers$Listperinstanceconfigs, - options: StreamMethodOptions - ): GaxiosPromise; - listPerInstanceConfigs( - params?: Params$Resource$Instancegroupmanagers$Listperinstanceconfigs, - options?: MethodOptions - ): GaxiosPromise; - listPerInstanceConfigs( - params: Params$Resource$Instancegroupmanagers$Listperinstanceconfigs, - options: StreamMethodOptions | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - listPerInstanceConfigs( - params: Params$Resource$Instancegroupmanagers$Listperinstanceconfigs, - options: - | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - listPerInstanceConfigs( - params: Params$Resource$Instancegroupmanagers$Listperinstanceconfigs, - callback: BodyResponseCallback - ): void; - listPerInstanceConfigs( - callback: BodyResponseCallback - ): void; - listPerInstanceConfigs( - paramsOrCallback?: - | Params$Resource$Instancegroupmanagers$Listperinstanceconfigs - | BodyResponseCallback - | BodyResponseCallback, - optionsOrCallback?: - | MethodOptions - | StreamMethodOptions - | BodyResponseCallback - | BodyResponseCallback, - callback?: - | BodyResponseCallback - | BodyResponseCallback - ): - | void - | GaxiosPromise - | GaxiosPromise { - let params = (paramsOrCallback || - {}) as Params$Resource$Instancegroupmanagers$Listperinstanceconfigs; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Instancegroupmanagers$Listperinstanceconfigs; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: ( - rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listPerInstanceConfigs' - ).replace(/([^:]\/)\/+/g, '$1'), - method: 'POST', - }, - options - ), - params, - requiredParams: ['project', 'zone', 'instanceGroupManager'], - pathParams: ['instanceGroupManager', 'project', 'zone'], - context: this.context, - }; - if (callback) { - createAPIRequest( - parameters, - callback as BodyResponseCallback - ); - } else { - return createAPIRequest( - parameters - ); - } - } - - /** - * Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listManagedInstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. - * @example - * ```js - * // Before running the sample: - * // - Enable the API at: - * // https://console.developers.google.com/apis/api/compute.googleapis.com - * // - Login into gcloud by running: - * // `$ gcloud auth application-default login` - * // - Install the npm module by running: - * // `$ npm install googleapis` - * - * const {google} = require('googleapis'); - * const compute = google.compute('v1'); - * - * async function main() { - * const auth = new google.auth.GoogleAuth({ - * // Scopes can be specified either as an array or as a single, space-delimited string. - * scopes: [ - * 'https://www.googleapis.com/auth/cloud-platform', - * 'https://www.googleapis.com/auth/compute', - * ], - * }); - * - * // Acquire an auth client, and bind it to all future calls - * const authClient = await auth.getClient(); - * google.options({auth: authClient}); - * - * // Do the magic - * const res = await compute.instanceGroupManagers.patch({ - * // The name of the instance group manager. - * instanceGroupManager: 'placeholder-value', - * // Project ID for this request. - * project: - * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // 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. - * // - * // 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. + * // 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: 'placeholder-value', @@ -44287,32 +44870,32 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - patch( - params: Params$Resource$Instancegroupmanagers$Patch, + insert( + params: Params$Resource$Instancegroupmanagers$Insert, options: StreamMethodOptions ): GaxiosPromise; - patch( - params?: Params$Resource$Instancegroupmanagers$Patch, + insert( + params?: Params$Resource$Instancegroupmanagers$Insert, options?: MethodOptions ): GaxiosPromise; - patch( - params: Params$Resource$Instancegroupmanagers$Patch, + insert( + params: Params$Resource$Instancegroupmanagers$Insert, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - patch( - params: Params$Resource$Instancegroupmanagers$Patch, + insert( + params: Params$Resource$Instancegroupmanagers$Insert, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - patch( - params: Params$Resource$Instancegroupmanagers$Patch, + insert( + params: Params$Resource$Instancegroupmanagers$Insert, callback: BodyResponseCallback ): void; - patch(callback: BodyResponseCallback): void; - patch( + insert(callback: BodyResponseCallback): void; + insert( paramsOrCallback?: - | Params$Resource$Instancegroupmanagers$Patch + | Params$Resource$Instancegroupmanagers$Insert | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -44325,12 +44908,12 @@ export namespace compute_v1 { | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Instancegroupmanagers$Patch; + {}) as Params$Resource$Instancegroupmanagers$Insert; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Instancegroupmanagers$Patch; + params = {} as Params$Resource$Instancegroupmanagers$Insert; options = {}; } @@ -44345,15 +44928,15 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}' + '/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'PATCH', + method: 'POST', }, options ), params, - requiredParams: ['project', 'zone', 'instanceGroupManager'], - pathParams: ['instanceGroupManager', 'project', 'zone'], + requiredParams: ['project', 'zone'], + pathParams: ['project', 'zone'], context: this.context, }; if (callback) { @@ -44367,7 +44950,7 @@ export namespace compute_v1 { } /** - * Inserts or patches per-instance configs for the managed instance group. perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch. + * Retrieves a list of managed instance groups that are contained within the specified project and zone. * @example * ```js * // Before running the sample: @@ -44387,6 +44970,7 @@ export namespace compute_v1 { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', * ], * }); * @@ -44395,57 +44979,43 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.instanceGroupManagers.patchPerInstanceConfigs({ - * // The name of the managed instance group. It should conform to RFC1035. - * instanceGroupManager: 'placeholder-value', + * const res = await compute.instanceGroupManagers.list({ + * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. + * // + * // 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) ``` + * filter: 'placeholder-value', + * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * maxResults: 'placeholder-value', + * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * // + * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. + * // + * // Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * orderBy: 'placeholder-value', + * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * pageToken: 'placeholder-value', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // 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. - * // - * // 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: 'placeholder-value', - * // The name of the zone where the managed instance group is located. It should conform to RFC1035. + * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + * returnPartialSuccess: 'placeholder-value', + * // The name of the zone where the managed instance group is located. * zone: 'placeholder-value', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "perInstanceConfigs": [] - * // } - * }, * }); * console.log(res.data); * * // Example response * // { - * // "clientOperationId": "my_clientOperationId", - * // "creationTimestamp": "my_creationTimestamp", - * // "description": "my_description", - * // "endTime": "my_endTime", - * // "error": {}, - * // "httpErrorMessage": "my_httpErrorMessage", - * // "httpErrorStatusCode": 0, * // "id": "my_id", - * // "insertTime": "my_insertTime", + * // "items": [], * // "kind": "my_kind", - * // "name": "my_name", - * // "operationGroupId": "my_operationGroupId", - * // "operationType": "my_operationType", - * // "progress": 0, - * // "region": "my_region", + * // "nextPageToken": "my_nextPageToken", * // "selfLink": "my_selfLink", - * // "startTime": "my_startTime", - * // "status": "my_status", - * // "statusMessage": "my_statusMessage", - * // "targetId": "my_targetId", - * // "targetLink": "my_targetLink", - * // "user": "my_user", - * // "warnings": [], - * // "zone": "my_zone" + * // "warning": {} * // } * } * @@ -44461,52 +45031,55 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - patchPerInstanceConfigs( - params: Params$Resource$Instancegroupmanagers$Patchperinstanceconfigs, + list( + params: Params$Resource$Instancegroupmanagers$List, options: StreamMethodOptions ): GaxiosPromise; - patchPerInstanceConfigs( - params?: Params$Resource$Instancegroupmanagers$Patchperinstanceconfigs, + list( + params?: Params$Resource$Instancegroupmanagers$List, options?: MethodOptions - ): GaxiosPromise; - patchPerInstanceConfigs( - params: Params$Resource$Instancegroupmanagers$Patchperinstanceconfigs, + ): GaxiosPromise; + list( + params: Params$Resource$Instancegroupmanagers$List, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - patchPerInstanceConfigs( - params: Params$Resource$Instancegroupmanagers$Patchperinstanceconfigs, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - patchPerInstanceConfigs( - params: Params$Resource$Instancegroupmanagers$Patchperinstanceconfigs, - callback: BodyResponseCallback + list( + params: Params$Resource$Instancegroupmanagers$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - patchPerInstanceConfigs( - callback: BodyResponseCallback + list( + params: Params$Resource$Instancegroupmanagers$List, + callback: BodyResponseCallback ): void; - patchPerInstanceConfigs( + list(callback: BodyResponseCallback): void; + list( paramsOrCallback?: - | Params$Resource$Instancegroupmanagers$Patchperinstanceconfigs - | BodyResponseCallback + | Params$Resource$Instancegroupmanagers$List + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { + ): + | void + | GaxiosPromise + | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Instancegroupmanagers$Patchperinstanceconfigs; + {}) as Params$Resource$Instancegroupmanagers$List; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Instancegroupmanagers$Patchperinstanceconfigs; + params = {} as Params$Resource$Instancegroupmanagers$List; options = {}; } @@ -44521,33 +45094,29 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/patchPerInstanceConfigs' + '/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'POST', + method: 'GET', }, options ), params, - requiredParams: ['project', 'zone', 'instanceGroupManager'], - pathParams: ['instanceGroupManager', 'project', 'zone'], + requiredParams: ['project', 'zone'], + pathParams: ['project', 'zone'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Flags the specified instances in the managed instance group to be immediately recreated. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method. - * - * If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. - * - * You can specify a maximum of 1000 instances with this method per request. + * Lists all errors thrown by actions on instances for a given managed instance group. The filter and orderBy query parameters are not supported. * @example * ```js * // Before running the sample: @@ -44567,6 +45136,7 @@ export namespace compute_v1 { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', * ], * }); * @@ -44575,57 +45145,41 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.instanceGroupManagers.recreateInstances({ - * // The name of the managed instance group. + * const res = await compute.instanceGroupManagers.listErrors({ + * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. + * // + * // 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) ``` + * filter: 'placeholder-value', + * // The name of the managed instance group. It must be a string that meets the requirements in RFC1035, or an unsigned long integer: must match regexp pattern: (?:[a-z](?:[-a-z0-9]{0,61\}[a-z0-9])?)|[1-9][0-9]{0,19\}. * instanceGroupManager: 'placeholder-value', + * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * maxResults: 'placeholder-value', + * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * // + * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. + * // + * // Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * orderBy: 'placeholder-value', + * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * pageToken: 'placeholder-value', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // 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. - * // - * // 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: 'placeholder-value', - * // The name of the zone where the managed instance group is located. + * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + * returnPartialSuccess: 'placeholder-value', + * // The name of the zone where the managed instance group is located. It should conform to RFC1035. * zone: 'placeholder-value', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "instances": [] - * // } - * }, * }); * console.log(res.data); * * // Example response * // { - * // "clientOperationId": "my_clientOperationId", - * // "creationTimestamp": "my_creationTimestamp", - * // "description": "my_description", - * // "endTime": "my_endTime", - * // "error": {}, - * // "httpErrorMessage": "my_httpErrorMessage", - * // "httpErrorStatusCode": 0, - * // "id": "my_id", - * // "insertTime": "my_insertTime", - * // "kind": "my_kind", - * // "name": "my_name", - * // "operationGroupId": "my_operationGroupId", - * // "operationType": "my_operationType", - * // "progress": 0, - * // "region": "my_region", - * // "selfLink": "my_selfLink", - * // "startTime": "my_startTime", - * // "status": "my_status", - * // "statusMessage": "my_statusMessage", - * // "targetId": "my_targetId", - * // "targetLink": "my_targetLink", - * // "user": "my_user", - * // "warnings": [], - * // "zone": "my_zone" + * // "items": [], + * // "nextPageToken": "my_nextPageToken" * // } * } * @@ -44641,50 +45195,57 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - recreateInstances( - params: Params$Resource$Instancegroupmanagers$Recreateinstances, + listErrors( + params: Params$Resource$Instancegroupmanagers$Listerrors, options: StreamMethodOptions ): GaxiosPromise; - recreateInstances( - params?: Params$Resource$Instancegroupmanagers$Recreateinstances, + listErrors( + params?: Params$Resource$Instancegroupmanagers$Listerrors, options?: MethodOptions - ): GaxiosPromise; - recreateInstances( - params: Params$Resource$Instancegroupmanagers$Recreateinstances, + ): GaxiosPromise; + listErrors( + params: Params$Resource$Instancegroupmanagers$Listerrors, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - recreateInstances( - params: Params$Resource$Instancegroupmanagers$Recreateinstances, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + listErrors( + params: Params$Resource$Instancegroupmanagers$Listerrors, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - recreateInstances( - params: Params$Resource$Instancegroupmanagers$Recreateinstances, - callback: BodyResponseCallback + listErrors( + params: Params$Resource$Instancegroupmanagers$Listerrors, + callback: BodyResponseCallback ): void; - recreateInstances(callback: BodyResponseCallback): void; - recreateInstances( + listErrors( + callback: BodyResponseCallback + ): void; + listErrors( paramsOrCallback?: - | Params$Resource$Instancegroupmanagers$Recreateinstances - | BodyResponseCallback + | Params$Resource$Instancegroupmanagers$Listerrors + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { + ): + | void + | GaxiosPromise + | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Instancegroupmanagers$Recreateinstances; + {}) as Params$Resource$Instancegroupmanagers$Listerrors; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Instancegroupmanagers$Recreateinstances; + params = {} as Params$Resource$Instancegroupmanagers$Listerrors; options = {}; } @@ -44699,9 +45260,9 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/recreateInstances' + '/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listErrors' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'POST', + method: 'GET', }, options ), @@ -44711,25 +45272,19 @@ export namespace compute_v1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest( + parameters + ); } } /** - * Resizes the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method. - * - * When resizing down, the instance group arbitrarily chooses the order in which VMs are deleted. The group takes into account some VM attributes when making the selection including: - * - * + The status of the VM instance. + The health of the VM instance. + The instance template version the VM is based on. + For regional managed instance groups, the location of the VM instance. - * - * This list is subject to change. - * - * If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. + * Lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous action failed, the list displays the errors for that failed action. The orderBy query parameter is not supported. * @example * ```js * // Before running the sample: @@ -44749,6 +45304,7 @@ export namespace compute_v1 { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', * ], * }); * @@ -44757,20 +45313,32 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.instanceGroupManagers.resize({ + * const res = await compute.instanceGroupManagers.listManagedInstances({ + * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. + * // + * // 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) ``` + * filter: 'placeholder-value', * // The name of the managed instance group. * instanceGroupManager: 'placeholder-value', + * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * maxResults: 'placeholder-value', + * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * // + * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. + * // + * // Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * orderBy: 'placeholder-value', + * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * pageToken: 'placeholder-value', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // 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. - * // - * // 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: 'placeholder-value', - * // The number of running instances that the managed instance group should maintain at any given time. The group automatically adds or removes instances to maintain the number of instances specified by this parameter. - * size: 'placeholder-value', + * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + * returnPartialSuccess: 'placeholder-value', * // The name of the zone where the managed instance group is located. * zone: 'placeholder-value', * }); @@ -44778,30 +45346,8 @@ export namespace compute_v1 { * * // Example response * // { - * // "clientOperationId": "my_clientOperationId", - * // "creationTimestamp": "my_creationTimestamp", - * // "description": "my_description", - * // "endTime": "my_endTime", - * // "error": {}, - * // "httpErrorMessage": "my_httpErrorMessage", - * // "httpErrorStatusCode": 0, - * // "id": "my_id", - * // "insertTime": "my_insertTime", - * // "kind": "my_kind", - * // "name": "my_name", - * // "operationGroupId": "my_operationGroupId", - * // "operationType": "my_operationType", - * // "progress": 0, - * // "region": "my_region", - * // "selfLink": "my_selfLink", - * // "startTime": "my_startTime", - * // "status": "my_status", - * // "statusMessage": "my_statusMessage", - * // "targetId": "my_targetId", - * // "targetLink": "my_targetLink", - * // "user": "my_user", - * // "warnings": [], - * // "zone": "my_zone" + * // "managedInstances": [], + * // "nextPageToken": "my_nextPageToken" * // } * } * @@ -44817,50 +45363,57 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - resize( - params: Params$Resource$Instancegroupmanagers$Resize, + listManagedInstances( + params: Params$Resource$Instancegroupmanagers$Listmanagedinstances, options: StreamMethodOptions ): GaxiosPromise; - resize( - params?: Params$Resource$Instancegroupmanagers$Resize, + listManagedInstances( + params?: Params$Resource$Instancegroupmanagers$Listmanagedinstances, options?: MethodOptions - ): GaxiosPromise; - resize( - params: Params$Resource$Instancegroupmanagers$Resize, + ): GaxiosPromise; + listManagedInstances( + params: Params$Resource$Instancegroupmanagers$Listmanagedinstances, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - resize( - params: Params$Resource$Instancegroupmanagers$Resize, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + listManagedInstances( + params: Params$Resource$Instancegroupmanagers$Listmanagedinstances, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - resize( - params: Params$Resource$Instancegroupmanagers$Resize, - callback: BodyResponseCallback + listManagedInstances( + params: Params$Resource$Instancegroupmanagers$Listmanagedinstances, + callback: BodyResponseCallback ): void; - resize(callback: BodyResponseCallback): void; - resize( + listManagedInstances( + callback: BodyResponseCallback + ): void; + listManagedInstances( paramsOrCallback?: - | Params$Resource$Instancegroupmanagers$Resize - | BodyResponseCallback + | Params$Resource$Instancegroupmanagers$Listmanagedinstances + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { + ): + | void + | GaxiosPromise + | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Instancegroupmanagers$Resize; + {}) as Params$Resource$Instancegroupmanagers$Listmanagedinstances; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Instancegroupmanagers$Resize; + params = {} as Params$Resource$Instancegroupmanagers$Listmanagedinstances; options = {}; } @@ -44875,29 +45428,31 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resize' + '/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances' ).replace(/([^:]\/)\/+/g, '$1'), method: 'POST', }, options ), params, - requiredParams: ['project', 'zone', 'instanceGroupManager', 'size'], + requiredParams: ['project', 'zone', 'instanceGroupManager'], pathParams: ['instanceGroupManager', 'project', 'zone'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest( + parameters + ); } } /** - * Specifies the instance template to use when creating new instances in this group. The templates for existing instances in the group do not change unless you run recreateInstances, run applyUpdatesToInstances, or set the group's updatePolicy.type to PROACTIVE. + * Lists all of the per-instance configs defined for the managed instance group. The orderBy query parameter is not supported. * @example * ```js * // Before running the sample: @@ -44917,6 +45472,7 @@ export namespace compute_v1 { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', * ], * }); * @@ -44925,8 +45481,176 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.instanceGroupManagers.setInstanceTemplate({ - * // The name of the managed instance group. + * const res = await compute.instanceGroupManagers.listPerInstanceConfigs({ + * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. + * // + * // 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) ``` + * filter: 'placeholder-value', + * // The name of the managed instance group. It should conform to RFC1035. + * instanceGroupManager: 'placeholder-value', + * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * maxResults: 'placeholder-value', + * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * // + * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. + * // + * // Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * orderBy: 'placeholder-value', + * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * pageToken: 'placeholder-value', + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + * returnPartialSuccess: 'placeholder-value', + * // The name of the zone where the managed instance group is located. It should conform to RFC1035. + * zone: 'placeholder-value', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "items": [], + * // "nextPageToken": "my_nextPageToken", + * // "warning": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + listPerInstanceConfigs( + params: Params$Resource$Instancegroupmanagers$Listperinstanceconfigs, + options: StreamMethodOptions + ): GaxiosPromise; + listPerInstanceConfigs( + params?: Params$Resource$Instancegroupmanagers$Listperinstanceconfigs, + options?: MethodOptions + ): GaxiosPromise; + listPerInstanceConfigs( + params: Params$Resource$Instancegroupmanagers$Listperinstanceconfigs, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + listPerInstanceConfigs( + params: Params$Resource$Instancegroupmanagers$Listperinstanceconfigs, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + listPerInstanceConfigs( + params: Params$Resource$Instancegroupmanagers$Listperinstanceconfigs, + callback: BodyResponseCallback + ): void; + listPerInstanceConfigs( + callback: BodyResponseCallback + ): void; + listPerInstanceConfigs( + paramsOrCallback?: + | Params$Resource$Instancegroupmanagers$Listperinstanceconfigs + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Instancegroupmanagers$Listperinstanceconfigs; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Instancegroupmanagers$Listperinstanceconfigs; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listPerInstanceConfigs' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'zone', 'instanceGroupManager'], + pathParams: ['instanceGroupManager', 'project', 'zone'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listManagedInstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.instanceGroupManagers.patch({ + * // The name of the instance group manager. * instanceGroupManager: 'placeholder-value', * // Project ID for this request. * project: @@ -44937,14 +45661,35 @@ export namespace compute_v1 { * // * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). * requestId: 'placeholder-value', - * // The name of the zone where the managed instance group is located. + * // The name of the zone where you want to create the managed instance group. * zone: 'placeholder-value', * * // Request body metadata * requestBody: { * // request body parameters * // { - * // "instanceTemplate": "my_instanceTemplate" + * // "autoHealingPolicies": [], + * // "baseInstanceName": "my_baseInstanceName", + * // "creationTimestamp": "my_creationTimestamp", + * // "currentActions": {}, + * // "description": "my_description", + * // "distributionPolicy": {}, + * // "fingerprint": "my_fingerprint", + * // "id": "my_id", + * // "instanceGroup": "my_instanceGroup", + * // "instanceTemplate": "my_instanceTemplate", + * // "kind": "my_kind", + * // "name": "my_name", + * // "namedPorts": [], + * // "region": "my_region", + * // "selfLink": "my_selfLink", + * // "statefulPolicy": {}, + * // "status": {}, + * // "targetPools": [], + * // "targetSize": 0, + * // "updatePolicy": {}, + * // "versions": [], + * // "zone": "my_zone" * // } * }, * }); @@ -44991,32 +45736,32 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - setInstanceTemplate( - params: Params$Resource$Instancegroupmanagers$Setinstancetemplate, + patch( + params: Params$Resource$Instancegroupmanagers$Patch, options: StreamMethodOptions ): GaxiosPromise; - setInstanceTemplate( - params?: Params$Resource$Instancegroupmanagers$Setinstancetemplate, + patch( + params?: Params$Resource$Instancegroupmanagers$Patch, options?: MethodOptions ): GaxiosPromise; - setInstanceTemplate( - params: Params$Resource$Instancegroupmanagers$Setinstancetemplate, + patch( + params: Params$Resource$Instancegroupmanagers$Patch, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - setInstanceTemplate( - params: Params$Resource$Instancegroupmanagers$Setinstancetemplate, + patch( + params: Params$Resource$Instancegroupmanagers$Patch, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - setInstanceTemplate( - params: Params$Resource$Instancegroupmanagers$Setinstancetemplate, + patch( + params: Params$Resource$Instancegroupmanagers$Patch, callback: BodyResponseCallback ): void; - setInstanceTemplate(callback: BodyResponseCallback): void; - setInstanceTemplate( + patch(callback: BodyResponseCallback): void; + patch( paramsOrCallback?: - | Params$Resource$Instancegroupmanagers$Setinstancetemplate + | Params$Resource$Instancegroupmanagers$Patch | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -45029,12 +45774,12 @@ export namespace compute_v1 { | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Instancegroupmanagers$Setinstancetemplate; + {}) as Params$Resource$Instancegroupmanagers$Patch; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Instancegroupmanagers$Setinstancetemplate; + params = {} as Params$Resource$Instancegroupmanagers$Patch; options = {}; } @@ -45049,9 +45794,9 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate' + '/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'POST', + method: 'PATCH', }, options ), @@ -45071,7 +45816,7 @@ export namespace compute_v1 { } /** - * Modifies the target pools to which all instances in this managed instance group are assigned. The target pools automatically apply to all of the instances in the managed instance group. This operation is marked DONE when you make the request even if the instances have not yet been added to their target pools. The change might take some time to apply to all of the instances in the group depending on the size of the group. + * Inserts or patches per-instance configs for the managed instance group. perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch. * @example * ```js * // Before running the sample: @@ -45099,8 +45844,8 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.instanceGroupManagers.setTargetPools({ - * // The name of the managed instance group. + * const res = await compute.instanceGroupManagers.patchPerInstanceConfigs({ + * // The name of the managed instance group. It should conform to RFC1035. * instanceGroupManager: 'placeholder-value', * // Project ID for this request. * project: @@ -45111,15 +45856,14 @@ export namespace compute_v1 { * // * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). * requestId: 'placeholder-value', - * // The name of the zone where the managed instance group is located. + * // The name of the zone where the managed instance group is located. It should conform to RFC1035. * zone: 'placeholder-value', * * // Request body metadata * requestBody: { * // request body parameters * // { - * // "fingerprint": "my_fingerprint", - * // "targetPools": [] + * // "perInstanceConfigs": [] * // } * }, * }); @@ -45166,32 +45910,34 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - setTargetPools( - params: Params$Resource$Instancegroupmanagers$Settargetpools, + patchPerInstanceConfigs( + params: Params$Resource$Instancegroupmanagers$Patchperinstanceconfigs, options: StreamMethodOptions ): GaxiosPromise; - setTargetPools( - params?: Params$Resource$Instancegroupmanagers$Settargetpools, + patchPerInstanceConfigs( + params?: Params$Resource$Instancegroupmanagers$Patchperinstanceconfigs, options?: MethodOptions ): GaxiosPromise; - setTargetPools( - params: Params$Resource$Instancegroupmanagers$Settargetpools, + patchPerInstanceConfigs( + params: Params$Resource$Instancegroupmanagers$Patchperinstanceconfigs, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - setTargetPools( - params: Params$Resource$Instancegroupmanagers$Settargetpools, + patchPerInstanceConfigs( + params: Params$Resource$Instancegroupmanagers$Patchperinstanceconfigs, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - setTargetPools( - params: Params$Resource$Instancegroupmanagers$Settargetpools, + patchPerInstanceConfigs( + params: Params$Resource$Instancegroupmanagers$Patchperinstanceconfigs, callback: BodyResponseCallback ): void; - setTargetPools(callback: BodyResponseCallback): void; - setTargetPools( + patchPerInstanceConfigs( + callback: BodyResponseCallback + ): void; + patchPerInstanceConfigs( paramsOrCallback?: - | Params$Resource$Instancegroupmanagers$Settargetpools + | Params$Resource$Instancegroupmanagers$Patchperinstanceconfigs | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -45204,12 +45950,12 @@ export namespace compute_v1 { | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Instancegroupmanagers$Settargetpools; + {}) as Params$Resource$Instancegroupmanagers$Patchperinstanceconfigs; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Instancegroupmanagers$Settargetpools; + params = {} as Params$Resource$Instancegroupmanagers$Patchperinstanceconfigs; options = {}; } @@ -45224,7 +45970,7 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setTargetPools' + '/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/patchPerInstanceConfigs' ).replace(/([^:]\/)\/+/g, '$1'), method: 'POST', }, @@ -45246,7 +45992,11 @@ export namespace compute_v1 { } /** - * Inserts or updates per-instance configs for the managed instance group. perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch. + * Flags the specified instances in the managed instance group to be immediately recreated. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method. + * + * If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. + * + * You can specify a maximum of 1000 instances with this method per request. * @example * ```js * // Before running the sample: @@ -45274,8 +46024,8 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.instanceGroupManagers.updatePerInstanceConfigs({ - * // The name of the managed instance group. It should conform to RFC1035. + * const res = await compute.instanceGroupManagers.recreateInstances({ + * // The name of the managed instance group. * instanceGroupManager: 'placeholder-value', * // Project ID for this request. * project: @@ -45286,14 +46036,14 @@ export namespace compute_v1 { * // * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). * requestId: 'placeholder-value', - * // The name of the zone where the managed instance group is located. It should conform to RFC1035. + * // The name of the zone where the managed instance group is located. * zone: 'placeholder-value', * * // Request body metadata * requestBody: { * // request body parameters * // { - * // "perInstanceConfigs": [] + * // "instances": [] * // } * }, * }); @@ -45340,34 +46090,32 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - updatePerInstanceConfigs( - params: Params$Resource$Instancegroupmanagers$Updateperinstanceconfigs, + recreateInstances( + params: Params$Resource$Instancegroupmanagers$Recreateinstances, options: StreamMethodOptions ): GaxiosPromise; - updatePerInstanceConfigs( - params?: Params$Resource$Instancegroupmanagers$Updateperinstanceconfigs, + recreateInstances( + params?: Params$Resource$Instancegroupmanagers$Recreateinstances, options?: MethodOptions ): GaxiosPromise; - updatePerInstanceConfigs( - params: Params$Resource$Instancegroupmanagers$Updateperinstanceconfigs, + recreateInstances( + params: Params$Resource$Instancegroupmanagers$Recreateinstances, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - updatePerInstanceConfigs( - params: Params$Resource$Instancegroupmanagers$Updateperinstanceconfigs, + recreateInstances( + params: Params$Resource$Instancegroupmanagers$Recreateinstances, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - updatePerInstanceConfigs( - params: Params$Resource$Instancegroupmanagers$Updateperinstanceconfigs, - callback: BodyResponseCallback - ): void; - updatePerInstanceConfigs( + recreateInstances( + params: Params$Resource$Instancegroupmanagers$Recreateinstances, callback: BodyResponseCallback ): void; - updatePerInstanceConfigs( + recreateInstances(callback: BodyResponseCallback): void; + recreateInstances( paramsOrCallback?: - | Params$Resource$Instancegroupmanagers$Updateperinstanceconfigs + | Params$Resource$Instancegroupmanagers$Recreateinstances | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -45380,12 +46128,12 @@ export namespace compute_v1 { | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Instancegroupmanagers$Updateperinstanceconfigs; + {}) as Params$Resource$Instancegroupmanagers$Recreateinstances; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Instancegroupmanagers$Updateperinstanceconfigs; + params = {} as Params$Resource$Instancegroupmanagers$Recreateinstances; options = {}; } @@ -45400,7 +46148,7 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/updatePerInstanceConfigs' + '/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/recreateInstances' ).replace(/([^:]\/)\/+/g, '$1'), method: 'POST', }, @@ -45420,627 +46168,371 @@ export namespace compute_v1 { return createAPIRequest(parameters); } } - } - export interface Params$Resource$Instancegroupmanagers$Abandoninstances - extends StandardParameters { - /** - * The name of the managed instance group. - */ - instanceGroupManager?: string; - /** - * Project ID for this request. - */ - project?: string; /** - * 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. + * Resizes the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method. * - * 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. + * When resizing down, the instance group arbitrarily chooses the order in which VMs are deleted. The group takes into account some VM attributes when making the selection including: * - * The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). - */ - requestId?: string; - /** - * The name of the zone where the managed instance group is located. - */ - zone?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$InstanceGroupManagersAbandonInstancesRequest; - } - export interface Params$Resource$Instancegroupmanagers$Aggregatedlist - extends StandardParameters { - /** - * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `\>`, or `<`. + * + The status of the VM instance. + The health of the VM instance. + The instance template version the VM is based on. + For regional managed instance groups, the location of the VM instance. * - * For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. + * This list is subject to change. * - * 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. + * If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` * - * 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) ``` - */ - filter?: string; - /** - * Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. - */ - includeAllScopes?: boolean; - /** - * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) - */ - maxResults?: number; - /** - * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * const {google} = require('googleapis'); + * const compute = google.compute('v1'); * - * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * ], + * }); * - * Currently, only sorting by `name` or `creationTimestamp desc` is supported. - */ - orderBy?: string; - /** - * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. - */ - pageToken?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. - */ - returnPartialSuccess?: boolean; - } - export interface Params$Resource$Instancegroupmanagers$Applyupdatestoinstances - extends StandardParameters { - /** - * The name of the managed instance group, should conform to RFC1035. - */ - instanceGroupManager?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * The name of the zone where the managed instance group is located. Should conform to RFC1035. - */ - zone?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$InstanceGroupManagersApplyUpdatesRequest; - } - export interface Params$Resource$Instancegroupmanagers$Createinstances - extends StandardParameters { - /** - * The name of the managed instance group. It should conform to RFC1035. - */ - instanceGroupManager?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * 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. - * - * 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. + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); * - * The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). - */ - requestId?: string; - /** - * The name of the zone where the managed instance group is located. It should conform to RFC1035. - */ - zone?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$InstanceGroupManagersCreateInstancesRequest; - } - export interface Params$Resource$Instancegroupmanagers$Delete - extends StandardParameters { - /** - * The name of the managed instance group to delete. - */ - instanceGroupManager?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * 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. + * // Do the magic + * const res = await compute.instanceGroupManagers.resize({ + * // The name of the managed instance group. + * instanceGroupManager: 'placeholder-value', + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // 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. + * // + * // 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: 'placeholder-value', + * // The number of running instances that the managed instance group should maintain at any given time. The group automatically adds or removes instances to maintain the number of instances specified by this parameter. + * size: 'placeholder-value', + * // The name of the zone where the managed instance group is located. + * zone: 'placeholder-value', + * }); + * console.log(res.data); * - * 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. + * // Example response + * // { + * // "clientOperationId": "my_clientOperationId", + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "endTime": "my_endTime", + * // "error": {}, + * // "httpErrorMessage": "my_httpErrorMessage", + * // "httpErrorStatusCode": 0, + * // "id": "my_id", + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "name": "my_name", + * // "operationGroupId": "my_operationGroupId", + * // "operationType": "my_operationType", + * // "progress": 0, + * // "region": "my_region", + * // "selfLink": "my_selfLink", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "statusMessage": "my_statusMessage", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "user": "my_user", + * // "warnings": [], + * // "zone": "my_zone" + * // } + * } * - * The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). - */ - requestId?: string; - /** - * The name of the zone where the managed instance group is located. - */ - zone?: string; - } - export interface Params$Resource$Instancegroupmanagers$Deleteinstances - extends StandardParameters { - /** - * The name of the managed instance group. - */ - instanceGroupManager?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * 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. + * main().catch(e => { + * console.error(e); + * throw e; + * }); * - * 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; - /** - * The name of the zone where the managed instance group is located. + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. */ - zone?: string; + resize( + params: Params$Resource$Instancegroupmanagers$Resize, + options: StreamMethodOptions + ): GaxiosPromise; + resize( + params?: Params$Resource$Instancegroupmanagers$Resize, + options?: MethodOptions + ): GaxiosPromise; + resize( + params: Params$Resource$Instancegroupmanagers$Resize, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + resize( + params: Params$Resource$Instancegroupmanagers$Resize, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + resize( + params: Params$Resource$Instancegroupmanagers$Resize, + callback: BodyResponseCallback + ): void; + resize(callback: BodyResponseCallback): void; + resize( + paramsOrCallback?: + | Params$Resource$Instancegroupmanagers$Resize + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Instancegroupmanagers$Resize; + let options = (optionsOrCallback || {}) as MethodOptions; - /** - * Request body metadata - */ - requestBody?: Schema$InstanceGroupManagersDeleteInstancesRequest; - } - export interface Params$Resource$Instancegroupmanagers$Deleteperinstanceconfigs - extends StandardParameters { - /** - * The name of the managed instance group. It should conform to RFC1035. - */ - instanceGroupManager?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * The name of the zone where the managed instance group is located. It should conform to RFC1035. - */ - zone?: string; + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Instancegroupmanagers$Resize; + options = {}; + } - /** - * Request body metadata - */ - requestBody?: Schema$InstanceGroupManagersDeletePerInstanceConfigsReq; - } - export interface Params$Resource$Instancegroupmanagers$Get - extends StandardParameters { - /** - * The name of the managed instance group. - */ - instanceGroupManager?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * The name of the zone where the managed instance group is located. - */ - zone?: string; - } - export interface Params$Resource$Instancegroupmanagers$Insert - extends StandardParameters { - /** - * Project ID for this request. - */ - project?: string; - /** - * 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. - * - * 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; - /** - * The name of the zone where you want to create the managed instance group. - */ - zone?: string; + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resize' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'zone', 'instanceGroupManager', 'size'], + pathParams: ['instanceGroupManager', 'project', 'zone'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } /** - * Request body metadata - */ - requestBody?: Schema$InstanceGroupManager; - } - export interface Params$Resource$Instancegroupmanagers$List - extends StandardParameters { - /** - * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `\>`, or `<`. + * Specifies the instance template to use when creating new instances in this group. The templates for existing instances in the group do not change unless you run recreateInstances, run applyUpdatesToInstances, or set the group's updatePolicy.type to PROACTIVE. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` * - * For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. + * const {google} = require('googleapis'); + * const compute = google.compute('v1'); * - * 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. + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * ], + * }); * - * 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) ``` - */ - filter?: string; - /** - * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) - */ - maxResults?: number; - /** - * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); * - * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. + * // Do the magic + * const res = await compute.instanceGroupManagers.setInstanceTemplate({ + * // The name of the managed instance group. + * instanceGroupManager: 'placeholder-value', + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // 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. + * // + * // 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: 'placeholder-value', + * // The name of the zone where the managed instance group is located. + * zone: 'placeholder-value', * - * Currently, only sorting by `name` or `creationTimestamp desc` is supported. - */ - orderBy?: string; - /** - * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. - */ - pageToken?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. - */ - returnPartialSuccess?: boolean; - /** - * The name of the zone where the managed instance group is located. - */ - zone?: string; - } - export interface Params$Resource$Instancegroupmanagers$Listerrors - extends StandardParameters { - /** - * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `\>`, or `<`. + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "instanceTemplate": "my_instanceTemplate" + * // } + * }, + * }); + * console.log(res.data); * - * For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. + * // Example response + * // { + * // "clientOperationId": "my_clientOperationId", + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "endTime": "my_endTime", + * // "error": {}, + * // "httpErrorMessage": "my_httpErrorMessage", + * // "httpErrorStatusCode": 0, + * // "id": "my_id", + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "name": "my_name", + * // "operationGroupId": "my_operationGroupId", + * // "operationType": "my_operationType", + * // "progress": 0, + * // "region": "my_region", + * // "selfLink": "my_selfLink", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "statusMessage": "my_statusMessage", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "user": "my_user", + * // "warnings": [], + * // "zone": "my_zone" + * // } + * } * - * 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. + * main().catch(e => { + * console.error(e); + * throw e; + * }); * - * 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) ``` - */ - filter?: string; - /** - * The name of the managed instance group. It must be a string that meets the requirements in RFC1035, or an unsigned long integer: must match regexp pattern: (?:[a-z](?:[-a-z0-9]{0,61\}[a-z0-9])?)|[1-9][0-9]{0,19\}. - */ - instanceGroupManager?: string; - /** - * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. */ - maxResults?: number; + setInstanceTemplate( + params: Params$Resource$Instancegroupmanagers$Setinstancetemplate, + options: StreamMethodOptions + ): GaxiosPromise; + setInstanceTemplate( + params?: Params$Resource$Instancegroupmanagers$Setinstancetemplate, + options?: MethodOptions + ): GaxiosPromise; + setInstanceTemplate( + params: Params$Resource$Instancegroupmanagers$Setinstancetemplate, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + setInstanceTemplate( + params: Params$Resource$Instancegroupmanagers$Setinstancetemplate, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + setInstanceTemplate( + params: Params$Resource$Instancegroupmanagers$Setinstancetemplate, + callback: BodyResponseCallback + ): void; + setInstanceTemplate(callback: BodyResponseCallback): void; + setInstanceTemplate( + paramsOrCallback?: + | Params$Resource$Instancegroupmanagers$Setinstancetemplate + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Instancegroupmanagers$Setinstancetemplate; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Instancegroupmanagers$Setinstancetemplate; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'zone', 'instanceGroupManager'], + pathParams: ['instanceGroupManager', 'project', 'zone'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + /** - * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * Modifies the target pools to which all instances in this managed instance group are assigned. The target pools automatically apply to all of the instances in the managed instance group. This operation is marked DONE when you make the request even if the instances have not yet been added to their target pools. The change might take some time to apply to all of the instances in the group depending on the size of the group. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` * - * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. - * - * Currently, only sorting by `name` or `creationTimestamp desc` is supported. - */ - orderBy?: string; - /** - * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. - */ - pageToken?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. - */ - returnPartialSuccess?: boolean; - /** - * The name of the zone where the managed instance group is located. It should conform to RFC1035. - */ - zone?: string; - } - export interface Params$Resource$Instancegroupmanagers$Listmanagedinstances - extends StandardParameters { - /** - * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. - * - * 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) ``` - */ - filter?: string; - /** - * The name of the managed instance group. - */ - instanceGroupManager?: string; - /** - * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) - */ - maxResults?: number; - /** - * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. - * - * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. - * - * Currently, only sorting by `name` or `creationTimestamp desc` is supported. - */ - orderBy?: string; - /** - * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. - */ - pageToken?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. - */ - returnPartialSuccess?: boolean; - /** - * The name of the zone where the managed instance group is located. - */ - zone?: string; - } - export interface Params$Resource$Instancegroupmanagers$Listperinstanceconfigs - extends StandardParameters { - /** - * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. - * - * 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) ``` - */ - filter?: string; - /** - * The name of the managed instance group. It should conform to RFC1035. - */ - instanceGroupManager?: string; - /** - * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) - */ - maxResults?: number; - /** - * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. - * - * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. - * - * Currently, only sorting by `name` or `creationTimestamp desc` is supported. - */ - orderBy?: string; - /** - * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. - */ - pageToken?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. - */ - returnPartialSuccess?: boolean; - /** - * The name of the zone where the managed instance group is located. It should conform to RFC1035. - */ - zone?: string; - } - export interface Params$Resource$Instancegroupmanagers$Patch - extends StandardParameters { - /** - * The name of the instance group manager. - */ - instanceGroupManager?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * 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. - * - * 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; - /** - * The name of the zone where you want to create the managed instance group. - */ - zone?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$InstanceGroupManager; - } - export interface Params$Resource$Instancegroupmanagers$Patchperinstanceconfigs - extends StandardParameters { - /** - * The name of the managed instance group. It should conform to RFC1035. - */ - instanceGroupManager?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * 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. - * - * 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; - /** - * The name of the zone where the managed instance group is located. It should conform to RFC1035. - */ - zone?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$InstanceGroupManagersPatchPerInstanceConfigsReq; - } - export interface Params$Resource$Instancegroupmanagers$Recreateinstances - extends StandardParameters { - /** - * The name of the managed instance group. - */ - instanceGroupManager?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * 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. - * - * 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; - /** - * The name of the zone where the managed instance group is located. - */ - zone?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$InstanceGroupManagersRecreateInstancesRequest; - } - export interface Params$Resource$Instancegroupmanagers$Resize - extends StandardParameters { - /** - * The name of the managed instance group. - */ - instanceGroupManager?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * 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. - * - * 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; - /** - * The number of running instances that the managed instance group should maintain at any given time. The group automatically adds or removes instances to maintain the number of instances specified by this parameter. - */ - size?: number; - /** - * The name of the zone where the managed instance group is located. - */ - zone?: string; - } - export interface Params$Resource$Instancegroupmanagers$Setinstancetemplate - extends StandardParameters { - /** - * The name of the managed instance group. - */ - instanceGroupManager?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * 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. - * - * 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; - /** - * The name of the zone where the managed instance group is located. - */ - zone?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$InstanceGroupManagersSetInstanceTemplateRequest; - } - export interface Params$Resource$Instancegroupmanagers$Settargetpools - extends StandardParameters { - /** - * The name of the managed instance group. - */ - instanceGroupManager?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * 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. - * - * 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; - /** - * The name of the zone where the managed instance group is located. - */ - zone?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$InstanceGroupManagersSetTargetPoolsRequest; - } - export interface Params$Resource$Instancegroupmanagers$Updateperinstanceconfigs - extends StandardParameters { - /** - * The name of the managed instance group. It should conform to RFC1035. - */ - instanceGroupManager?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * 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. - * - * 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; - /** - * The name of the zone where the managed instance group is located. It should conform to RFC1035. - */ - zone?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$InstanceGroupManagersUpdatePerInstanceConfigsReq; - } - - export class Resource$Instancegroups { - context: APIRequestContext; - constructor(context: APIRequestContext) { - this.context = context; - } - - /** - * Adds a list of instances to the specified instance group. All of the instances in the instance group must be in the same network/subnetwork. Read Adding instances for more information. - * @example - * ```js - * // Before running the sample: - * // - Enable the API at: - * // https://console.developers.google.com/apis/api/compute.googleapis.com - * // - Login into gcloud by running: - * // `$ gcloud auth application-default login` - * // - Install the npm module by running: - * // `$ npm install googleapis` - * - * const {google} = require('googleapis'); - * const compute = google.compute('v1'); + * const {google} = require('googleapis'); + * const compute = google.compute('v1'); * * async function main() { * const auth = new google.auth.GoogleAuth({ @@ -46056,9 +46548,9 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.instanceGroups.addInstances({ - * // The name of the instance group where you are adding instances. - * instanceGroup: 'placeholder-value', + * const res = await compute.instanceGroupManagers.setTargetPools({ + * // The name of the managed instance group. + * instanceGroupManager: 'placeholder-value', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', @@ -46068,14 +46560,15 @@ export namespace compute_v1 { * // * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). * requestId: 'placeholder-value', - * // The name of the zone where the instance group is located. + * // The name of the zone where the managed instance group is located. * zone: 'placeholder-value', * * // Request body metadata * requestBody: { * // request body parameters * // { - * // "instances": [] + * // "fingerprint": "my_fingerprint", + * // "targetPools": [] * // } * }, * }); @@ -46122,32 +46615,32 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - addInstances( - params: Params$Resource$Instancegroups$Addinstances, + setTargetPools( + params: Params$Resource$Instancegroupmanagers$Settargetpools, options: StreamMethodOptions ): GaxiosPromise; - addInstances( - params?: Params$Resource$Instancegroups$Addinstances, + setTargetPools( + params?: Params$Resource$Instancegroupmanagers$Settargetpools, options?: MethodOptions ): GaxiosPromise; - addInstances( - params: Params$Resource$Instancegroups$Addinstances, + setTargetPools( + params: Params$Resource$Instancegroupmanagers$Settargetpools, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - addInstances( - params: Params$Resource$Instancegroups$Addinstances, + setTargetPools( + params: Params$Resource$Instancegroupmanagers$Settargetpools, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - addInstances( - params: Params$Resource$Instancegroups$Addinstances, + setTargetPools( + params: Params$Resource$Instancegroupmanagers$Settargetpools, callback: BodyResponseCallback ): void; - addInstances(callback: BodyResponseCallback): void; - addInstances( + setTargetPools(callback: BodyResponseCallback): void; + setTargetPools( paramsOrCallback?: - | Params$Resource$Instancegroups$Addinstances + | Params$Resource$Instancegroupmanagers$Settargetpools | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -46160,12 +46653,12 @@ export namespace compute_v1 { | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Instancegroups$Addinstances; + {}) as Params$Resource$Instancegroupmanagers$Settargetpools; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Instancegroups$Addinstances; + params = {} as Params$Resource$Instancegroupmanagers$Settargetpools; options = {}; } @@ -46180,15 +46673,15 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/addInstances' + '/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setTargetPools' ).replace(/([^:]\/)\/+/g, '$1'), method: 'POST', }, options ), params, - requiredParams: ['project', 'zone', 'instanceGroup'], - pathParams: ['instanceGroup', 'project', 'zone'], + requiredParams: ['project', 'zone', 'instanceGroupManager'], + pathParams: ['instanceGroupManager', 'project', 'zone'], context: this.context, }; if (callback) { @@ -46202,7 +46695,7 @@ export namespace compute_v1 { } /** - * Retrieves the list of instance groups and sorts them by zone. + * Inserts or updates per-instance configs for the managed instance group. perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch. * @example * ```js * // Before running the sample: @@ -46222,7 +46715,6 @@ export namespace compute_v1 { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', - * 'https://www.googleapis.com/auth/compute.readonly', * ], * }); * @@ -46231,44 +46723,57 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.instanceGroups.aggregatedList({ - * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. - * // - * // 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) ``` - * filter: 'placeholder-value', - * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. - * includeAllScopes: 'placeholder-value', - * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) - * maxResults: 'placeholder-value', - * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. - * // - * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. - * // - * // Currently, only sorting by `name` or `creationTimestamp desc` is supported. - * orderBy: 'placeholder-value', - * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. - * pageToken: 'placeholder-value', + * const res = await compute.instanceGroupManagers.updatePerInstanceConfigs({ + * // The name of the managed instance group. It should conform to RFC1035. + * instanceGroupManager: 'placeholder-value', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. - * returnPartialSuccess: 'placeholder-value', + * // 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. + * // + * // 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: 'placeholder-value', + * // The name of the zone where the managed instance group is located. It should conform to RFC1035. + * zone: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "perInstanceConfigs": [] + * // } + * }, * }); * console.log(res.data); * * // Example response * // { + * // "clientOperationId": "my_clientOperationId", + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "endTime": "my_endTime", + * // "error": {}, + * // "httpErrorMessage": "my_httpErrorMessage", + * // "httpErrorStatusCode": 0, * // "id": "my_id", - * // "items": {}, + * // "insertTime": "my_insertTime", * // "kind": "my_kind", - * // "nextPageToken": "my_nextPageToken", + * // "name": "my_name", + * // "operationGroupId": "my_operationGroupId", + * // "operationType": "my_operationType", + * // "progress": 0, + * // "region": "my_region", * // "selfLink": "my_selfLink", - * // "unreachables": [], - * // "warning": {} + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "statusMessage": "my_statusMessage", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "user": "my_user", + * // "warnings": [], + * // "zone": "my_zone" * // } * } * @@ -46284,57 +46789,52 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - aggregatedList( - params: Params$Resource$Instancegroups$Aggregatedlist, + updatePerInstanceConfigs( + params: Params$Resource$Instancegroupmanagers$Updateperinstanceconfigs, options: StreamMethodOptions ): GaxiosPromise; - aggregatedList( - params?: Params$Resource$Instancegroups$Aggregatedlist, + updatePerInstanceConfigs( + params?: Params$Resource$Instancegroupmanagers$Updateperinstanceconfigs, options?: MethodOptions - ): GaxiosPromise; - aggregatedList( - params: Params$Resource$Instancegroups$Aggregatedlist, + ): GaxiosPromise; + updatePerInstanceConfigs( + params: Params$Resource$Instancegroupmanagers$Updateperinstanceconfigs, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - aggregatedList( - params: Params$Resource$Instancegroups$Aggregatedlist, - options: - | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + updatePerInstanceConfigs( + params: Params$Resource$Instancegroupmanagers$Updateperinstanceconfigs, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - aggregatedList( - params: Params$Resource$Instancegroups$Aggregatedlist, - callback: BodyResponseCallback + updatePerInstanceConfigs( + params: Params$Resource$Instancegroupmanagers$Updateperinstanceconfigs, + callback: BodyResponseCallback ): void; - aggregatedList( - callback: BodyResponseCallback + updatePerInstanceConfigs( + callback: BodyResponseCallback ): void; - aggregatedList( + updatePerInstanceConfigs( paramsOrCallback?: - | Params$Resource$Instancegroups$Aggregatedlist - | BodyResponseCallback + | Params$Resource$Instancegroupmanagers$Updateperinstanceconfigs + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): - | void - | GaxiosPromise - | GaxiosPromise { + ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Instancegroups$Aggregatedlist; + {}) as Params$Resource$Instancegroupmanagers$Updateperinstanceconfigs; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Instancegroups$Aggregatedlist; + params = {} as Params$Resource$Instancegroupmanagers$Updateperinstanceconfigs; options = {}; } @@ -46349,347 +46849,635 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/aggregated/instanceGroups' + '/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/updatePerInstanceConfigs' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'GET', + method: 'POST', }, options ), params, - requiredParams: ['project'], - pathParams: ['project'], + requiredParams: ['project', 'zone', 'instanceGroupManager'], + pathParams: ['instanceGroupManager', 'project', 'zone'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } + } + export interface Params$Resource$Instancegroupmanagers$Abandoninstances + extends StandardParameters { /** - * Deletes the specified instance group. The instances in the group are not deleted. Note that instance group must not belong to a backend service. Read Deleting an instance group for more information. - * @example - * ```js - * // Before running the sample: - * // - Enable the API at: - * // https://console.developers.google.com/apis/api/compute.googleapis.com - * // - Login into gcloud by running: - * // `$ gcloud auth application-default login` - * // - Install the npm module by running: - * // `$ npm install googleapis` + * The name of the managed instance group. + */ + instanceGroupManager?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. * - * const {google} = require('googleapis'); - * const compute = google.compute('v1'); + * 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. * - * async function main() { - * const auth = new google.auth.GoogleAuth({ - * // Scopes can be specified either as an array or as a single, space-delimited string. - * scopes: [ - * 'https://www.googleapis.com/auth/cloud-platform', - * 'https://www.googleapis.com/auth/compute', - * ], - * }); + * The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + */ + requestId?: string; + /** + * The name of the zone where the managed instance group is located. + */ + zone?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$InstanceGroupManagersAbandonInstancesRequest; + } + export interface Params$Resource$Instancegroupmanagers$Aggregatedlist + extends StandardParameters { + /** + * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `\>`, or `<`. * - * // Acquire an auth client, and bind it to all future calls - * const authClient = await auth.getClient(); - * google.options({auth: authClient}); + * For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. * - * // Do the magic - * const res = await compute.instanceGroups.delete({ - * // The name of the instance group to delete. - * instanceGroup: 'placeholder-value', - * // Project ID for this request. - * project: - * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // 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. - * // - * // 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: 'placeholder-value', - * // The name of the zone where the instance group is located. - * zone: 'placeholder-value', - * }); - * console.log(res.data); + * 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. * - * // Example response - * // { - * // "clientOperationId": "my_clientOperationId", - * // "creationTimestamp": "my_creationTimestamp", - * // "description": "my_description", - * // "endTime": "my_endTime", - * // "error": {}, - * // "httpErrorMessage": "my_httpErrorMessage", - * // "httpErrorStatusCode": 0, - * // "id": "my_id", - * // "insertTime": "my_insertTime", - * // "kind": "my_kind", - * // "name": "my_name", - * // "operationGroupId": "my_operationGroupId", - * // "operationType": "my_operationType", - * // "progress": 0, - * // "region": "my_region", - * // "selfLink": "my_selfLink", - * // "startTime": "my_startTime", - * // "status": "my_status", - * // "statusMessage": "my_statusMessage", - * // "targetId": "my_targetId", - * // "targetLink": "my_targetLink", - * // "user": "my_user", - * // "warnings": [], - * // "zone": "my_zone" - * // } - * } + * 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) ``` + */ + filter?: string; + /** + * Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. + */ + includeAllScopes?: boolean; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + */ + maxResults?: number; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. * - * main().catch(e => { - * console.error(e); - * throw e; - * }); + * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. * - * ``` + * Currently, only sorting by `name` or `creationTimestamp desc` is supported. + */ + orderBy?: string; + /** + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + */ + pageToken?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + */ + returnPartialSuccess?: boolean; + } + export interface Params$Resource$Instancegroupmanagers$Applyupdatestoinstances + extends StandardParameters { + /** + * The name of the managed instance group, should conform to RFC1035. + */ + instanceGroupManager?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * The name of the zone where the managed instance group is located. Should conform to RFC1035. + */ + zone?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$InstanceGroupManagersApplyUpdatesRequest; + } + export interface Params$Resource$Instancegroupmanagers$Createinstances + extends StandardParameters { + /** + * The name of the managed instance group. It should conform to RFC1035. + */ + instanceGroupManager?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. * - * @param params - Parameters for request - * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. - * @param callback - Optional callback that handles the response. - * @returns A promise if used with async/await, or void if used with a callback. + * 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. + * + * The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). */ - delete( - params: Params$Resource$Instancegroups$Delete, - options: StreamMethodOptions - ): GaxiosPromise; - delete( - params?: Params$Resource$Instancegroups$Delete, - options?: MethodOptions - ): GaxiosPromise; - delete( - params: Params$Resource$Instancegroups$Delete, - options: StreamMethodOptions | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - delete( - params: Params$Resource$Instancegroups$Delete, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - delete( - params: Params$Resource$Instancegroups$Delete, - callback: BodyResponseCallback - ): void; - delete(callback: BodyResponseCallback): void; - delete( - paramsOrCallback?: - | Params$Resource$Instancegroups$Delete - | BodyResponseCallback - | BodyResponseCallback, - optionsOrCallback?: - | MethodOptions - | StreamMethodOptions - | BodyResponseCallback - | BodyResponseCallback, - callback?: - | BodyResponseCallback - | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { - let params = (paramsOrCallback || - {}) as Params$Resource$Instancegroups$Delete; - let options = (optionsOrCallback || {}) as MethodOptions; + requestId?: string; + /** + * The name of the zone where the managed instance group is located. It should conform to RFC1035. + */ + zone?: string; - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Instancegroups$Delete; - options = {}; - } + /** + * Request body metadata + */ + requestBody?: Schema$InstanceGroupManagersCreateInstancesRequest; + } + export interface Params$Resource$Instancegroupmanagers$Delete + extends StandardParameters { + /** + * The name of the managed instance group to delete. + */ + instanceGroupManager?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + /** + * The name of the zone where the managed instance group is located. + */ + zone?: string; + } + export interface Params$Resource$Instancegroupmanagers$Deleteinstances + extends StandardParameters { + /** + * The name of the managed instance group. + */ + instanceGroupManager?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + /** + * The name of the zone where the managed instance group is located. + */ + zone?: string; - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } + /** + * Request body metadata + */ + requestBody?: Schema$InstanceGroupManagersDeleteInstancesRequest; + } + export interface Params$Resource$Instancegroupmanagers$Deleteperinstanceconfigs + extends StandardParameters { + /** + * The name of the managed instance group. It should conform to RFC1035. + */ + instanceGroupManager?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * The name of the zone where the managed instance group is located. It should conform to RFC1035. + */ + zone?: string; - const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: ( - rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}' - ).replace(/([^:]\/)\/+/g, '$1'), - method: 'DELETE', - }, - options - ), - params, - requiredParams: ['project', 'zone', 'instanceGroup'], - pathParams: ['instanceGroup', 'project', 'zone'], - context: this.context, - }; - if (callback) { - createAPIRequest( - parameters, - callback as BodyResponseCallback - ); - } else { - return createAPIRequest(parameters); - } - } + /** + * Request body metadata + */ + requestBody?: Schema$InstanceGroupManagersDeletePerInstanceConfigsReq; + } + export interface Params$Resource$Instancegroupmanagers$Get + extends StandardParameters { + /** + * The name of the managed instance group. + */ + instanceGroupManager?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * The name of the zone where the managed instance group is located. + */ + zone?: string; + } + export interface Params$Resource$Instancegroupmanagers$Insert + extends StandardParameters { + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + /** + * The name of the zone where you want to create the managed instance group. + */ + zone?: string; /** - * Returns the specified zonal instance group. Get a list of available zonal instance groups by making a list() request. + * Request body metadata + */ + requestBody?: Schema$InstanceGroupManager; + } + export interface Params$Resource$Instancegroupmanagers$List + extends StandardParameters { + /** + * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `\>`, or `<`. * - * For managed instance groups, use the instanceGroupManagers or regionInstanceGroupManagers methods instead. - * @example - * ```js - * // Before running the sample: - * // - Enable the API at: - * // https://console.developers.google.com/apis/api/compute.googleapis.com - * // - Login into gcloud by running: - * // `$ gcloud auth application-default login` - * // - Install the npm module by running: - * // `$ npm install googleapis` + * For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. * - * const {google} = require('googleapis'); - * const compute = google.compute('v1'); + * 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. * - * async function main() { - * const auth = new google.auth.GoogleAuth({ - * // Scopes can be specified either as an array or as a single, space-delimited string. - * scopes: [ - * 'https://www.googleapis.com/auth/cloud-platform', - * 'https://www.googleapis.com/auth/compute', - * 'https://www.googleapis.com/auth/compute.readonly', - * ], - * }); + * 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) ``` + */ + filter?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + */ + maxResults?: number; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. * - * // Acquire an auth client, and bind it to all future calls - * const authClient = await auth.getClient(); - * google.options({auth: authClient}); + * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. * - * // Do the magic - * const res = await compute.instanceGroups.get({ - * // The name of the instance group. - * instanceGroup: 'placeholder-value', - * // Project ID for this request. - * project: - * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // The name of the zone where the instance group is located. - * zone: 'placeholder-value', - * }); - * console.log(res.data); + * Currently, only sorting by `name` or `creationTimestamp desc` is supported. + */ + orderBy?: string; + /** + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + */ + pageToken?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + */ + returnPartialSuccess?: boolean; + /** + * The name of the zone where the managed instance group is located. + */ + zone?: string; + } + export interface Params$Resource$Instancegroupmanagers$Listerrors + extends StandardParameters { + /** + * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `\>`, or `<`. * - * // Example response - * // { - * // "creationTimestamp": "my_creationTimestamp", - * // "description": "my_description", - * // "fingerprint": "my_fingerprint", - * // "id": "my_id", - * // "kind": "my_kind", - * // "name": "my_name", - * // "namedPorts": [], - * // "network": "my_network", - * // "region": "my_region", - * // "selfLink": "my_selfLink", - * // "size": 0, - * // "subnetwork": "my_subnetwork", - * // "zone": "my_zone" - * // } - * } + * For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. * - * main().catch(e => { - * console.error(e); - * throw e; - * }); + * 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) ``` + */ + filter?: string; + /** + * The name of the managed instance group. It must be a string that meets the requirements in RFC1035, or an unsigned long integer: must match regexp pattern: (?:[a-z](?:[-a-z0-9]{0,61\}[a-z0-9])?)|[1-9][0-9]{0,19\}. + */ + instanceGroupManager?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + */ + maxResults?: number; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. * - * @param params - Parameters for request - * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. - * @param callback - Optional callback that handles the response. - * @returns A promise if used with async/await, or void if used with a callback. + * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. + * + * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ - get( - params: Params$Resource$Instancegroups$Get, - options: StreamMethodOptions - ): GaxiosPromise; - get( - params?: Params$Resource$Instancegroups$Get, - options?: MethodOptions - ): GaxiosPromise; - get( - params: Params$Resource$Instancegroups$Get, - options: StreamMethodOptions | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - get( - params: Params$Resource$Instancegroups$Get, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - get( - params: Params$Resource$Instancegroups$Get, - callback: BodyResponseCallback - ): void; - get(callback: BodyResponseCallback): void; - get( - paramsOrCallback?: - | Params$Resource$Instancegroups$Get - | BodyResponseCallback - | BodyResponseCallback, - optionsOrCallback?: - | MethodOptions - | StreamMethodOptions - | BodyResponseCallback - | BodyResponseCallback, - callback?: - | BodyResponseCallback - | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { - let params = (paramsOrCallback || - {}) as Params$Resource$Instancegroups$Get; - let options = (optionsOrCallback || {}) as MethodOptions; + orderBy?: string; + /** + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + */ + pageToken?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + */ + returnPartialSuccess?: boolean; + /** + * The name of the zone where the managed instance group is located. It should conform to RFC1035. + */ + zone?: string; + } + export interface Params$Resource$Instancegroupmanagers$Listmanagedinstances + extends StandardParameters { + /** + * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. + * + * 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) ``` + */ + filter?: string; + /** + * The name of the managed instance group. + */ + instanceGroupManager?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + */ + maxResults?: number; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. + * + * Currently, only sorting by `name` or `creationTimestamp desc` is supported. + */ + orderBy?: string; + /** + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + */ + pageToken?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + */ + returnPartialSuccess?: boolean; + /** + * The name of the zone where the managed instance group is located. + */ + zone?: string; + } + export interface Params$Resource$Instancegroupmanagers$Listperinstanceconfigs + extends StandardParameters { + /** + * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. + * + * 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) ``` + */ + filter?: string; + /** + * The name of the managed instance group. It should conform to RFC1035. + */ + instanceGroupManager?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + */ + maxResults?: number; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. + * + * Currently, only sorting by `name` or `creationTimestamp desc` is supported. + */ + orderBy?: string; + /** + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + */ + pageToken?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + */ + returnPartialSuccess?: boolean; + /** + * The name of the zone where the managed instance group is located. It should conform to RFC1035. + */ + zone?: string; + } + export interface Params$Resource$Instancegroupmanagers$Patch + extends StandardParameters { + /** + * The name of the instance group manager. + */ + instanceGroupManager?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + /** + * The name of the zone where you want to create the managed instance group. + */ + zone?: string; - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Instancegroups$Get; - options = {}; - } + /** + * Request body metadata + */ + requestBody?: Schema$InstanceGroupManager; + } + export interface Params$Resource$Instancegroupmanagers$Patchperinstanceconfigs + extends StandardParameters { + /** + * The name of the managed instance group. It should conform to RFC1035. + */ + instanceGroupManager?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + /** + * The name of the zone where the managed instance group is located. It should conform to RFC1035. + */ + zone?: string; - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } + /** + * Request body metadata + */ + requestBody?: Schema$InstanceGroupManagersPatchPerInstanceConfigsReq; + } + export interface Params$Resource$Instancegroupmanagers$Recreateinstances + extends StandardParameters { + /** + * The name of the managed instance group. + */ + instanceGroupManager?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + /** + * The name of the zone where the managed instance group is located. + */ + zone?: string; - const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: ( - rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}' - ).replace(/([^:]\/)\/+/g, '$1'), - method: 'GET', - }, - options - ), - params, - requiredParams: ['project', 'zone', 'instanceGroup'], - pathParams: ['instanceGroup', 'project', 'zone'], - context: this.context, - }; - if (callback) { - createAPIRequest( - parameters, - callback as BodyResponseCallback - ); - } else { - return createAPIRequest(parameters); - } + /** + * Request body metadata + */ + requestBody?: Schema$InstanceGroupManagersRecreateInstancesRequest; + } + export interface Params$Resource$Instancegroupmanagers$Resize + extends StandardParameters { + /** + * The name of the managed instance group. + */ + instanceGroupManager?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + /** + * The number of running instances that the managed instance group should maintain at any given time. The group automatically adds or removes instances to maintain the number of instances specified by this parameter. + */ + size?: number; + /** + * The name of the zone where the managed instance group is located. + */ + zone?: string; + } + export interface Params$Resource$Instancegroupmanagers$Setinstancetemplate + extends StandardParameters { + /** + * The name of the managed instance group. + */ + instanceGroupManager?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + /** + * The name of the zone where the managed instance group is located. + */ + zone?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$InstanceGroupManagersSetInstanceTemplateRequest; + } + export interface Params$Resource$Instancegroupmanagers$Settargetpools + extends StandardParameters { + /** + * The name of the managed instance group. + */ + instanceGroupManager?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + /** + * The name of the zone where the managed instance group is located. + */ + zone?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$InstanceGroupManagersSetTargetPoolsRequest; + } + export interface Params$Resource$Instancegroupmanagers$Updateperinstanceconfigs + extends StandardParameters { + /** + * The name of the managed instance group. It should conform to RFC1035. + */ + instanceGroupManager?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + /** + * The name of the zone where the managed instance group is located. It should conform to RFC1035. + */ + zone?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$InstanceGroupManagersUpdatePerInstanceConfigsReq; + } + + export class Resource$Instancegroups { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; } /** - * Creates an instance group in the specified project using the parameters that are included in the request. + * Adds a list of instances to the specified instance group. All of the instances in the instance group must be in the same network/subnetwork. Read Adding instances for more information. * @example * ```js * // Before running the sample: @@ -46717,7 +47505,9 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.instanceGroups.insert({ + * const res = await compute.instanceGroups.addInstances({ + * // The name of the instance group where you are adding instances. + * instanceGroup: 'placeholder-value', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', @@ -46727,26 +47517,14 @@ export namespace compute_v1 { * // * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). * requestId: 'placeholder-value', - * // The name of the zone where you want to create the instance group. + * // The name of the zone where the instance group is located. * zone: 'placeholder-value', * * // Request body metadata * requestBody: { * // request body parameters * // { - * // "creationTimestamp": "my_creationTimestamp", - * // "description": "my_description", - * // "fingerprint": "my_fingerprint", - * // "id": "my_id", - * // "kind": "my_kind", - * // "name": "my_name", - * // "namedPorts": [], - * // "network": "my_network", - * // "region": "my_region", - * // "selfLink": "my_selfLink", - * // "size": 0, - * // "subnetwork": "my_subnetwork", - * // "zone": "my_zone" + * // "instances": [] * // } * }, * }); @@ -46793,32 +47571,32 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - insert( - params: Params$Resource$Instancegroups$Insert, + addInstances( + params: Params$Resource$Instancegroups$Addinstances, options: StreamMethodOptions ): GaxiosPromise; - insert( - params?: Params$Resource$Instancegroups$Insert, + addInstances( + params?: Params$Resource$Instancegroups$Addinstances, options?: MethodOptions ): GaxiosPromise; - insert( - params: Params$Resource$Instancegroups$Insert, + addInstances( + params: Params$Resource$Instancegroups$Addinstances, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - insert( - params: Params$Resource$Instancegroups$Insert, + addInstances( + params: Params$Resource$Instancegroups$Addinstances, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - insert( - params: Params$Resource$Instancegroups$Insert, + addInstances( + params: Params$Resource$Instancegroups$Addinstances, callback: BodyResponseCallback ): void; - insert(callback: BodyResponseCallback): void; - insert( + addInstances(callback: BodyResponseCallback): void; + addInstances( paramsOrCallback?: - | Params$Resource$Instancegroups$Insert + | Params$Resource$Instancegroups$Addinstances | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -46831,12 +47609,12 @@ export namespace compute_v1 { | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Instancegroups$Insert; + {}) as Params$Resource$Instancegroups$Addinstances; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Instancegroups$Insert; + params = {} as Params$Resource$Instancegroups$Addinstances; options = {}; } @@ -46851,15 +47629,15 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/instanceGroups' + '/compute/v1/projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/addInstances' ).replace(/([^:]\/)\/+/g, '$1'), method: 'POST', }, options ), params, - requiredParams: ['project', 'zone'], - pathParams: ['project', 'zone'], + requiredParams: ['project', 'zone', 'instanceGroup'], + pathParams: ['instanceGroup', 'project', 'zone'], context: this.context, }; if (callback) { @@ -46873,9 +47651,7 @@ export namespace compute_v1 { } /** - * Retrieves the list of zonal instance group resources contained within the specified zone. - * - * For managed instance groups, use the instanceGroupManagers or regionInstanceGroupManagers methods instead. + * Retrieves the list of instance groups and sorts them by zone. * @example * ```js * // Before running the sample: @@ -46904,7 +47680,7 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.instanceGroups.list({ + * const res = await compute.instanceGroups.aggregatedList({ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. @@ -46913,6 +47689,8 @@ export namespace compute_v1 { * // * // 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) ``` * filter: 'placeholder-value', + * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. + * includeAllScopes: 'placeholder-value', * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) * maxResults: 'placeholder-value', * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. @@ -46928,18 +47706,17 @@ export namespace compute_v1 { * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. * returnPartialSuccess: 'placeholder-value', - * // The name of the zone where the instance group is located. - * zone: 'placeholder-value', * }); * console.log(res.data); * * // Example response * // { * // "id": "my_id", - * // "items": [], + * // "items": {}, * // "kind": "my_kind", * // "nextPageToken": "my_nextPageToken", * // "selfLink": "my_selfLink", + * // "unreachables": [], * // "warning": {} * // } * } @@ -46956,53 +47733,57 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - list( - params: Params$Resource$Instancegroups$List, + aggregatedList( + params: Params$Resource$Instancegroups$Aggregatedlist, options: StreamMethodOptions ): GaxiosPromise; - list( - params?: Params$Resource$Instancegroups$List, + aggregatedList( + params?: Params$Resource$Instancegroups$Aggregatedlist, options?: MethodOptions - ): GaxiosPromise; - list( - params: Params$Resource$Instancegroups$List, + ): GaxiosPromise; + aggregatedList( + params: Params$Resource$Instancegroups$Aggregatedlist, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Instancegroups$List, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + aggregatedList( + params: Params$Resource$Instancegroups$Aggregatedlist, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Instancegroups$List, - callback: BodyResponseCallback + aggregatedList( + params: Params$Resource$Instancegroups$Aggregatedlist, + callback: BodyResponseCallback ): void; - list(callback: BodyResponseCallback): void; - list( + aggregatedList( + callback: BodyResponseCallback + ): void; + aggregatedList( paramsOrCallback?: - | Params$Resource$Instancegroups$List - | BodyResponseCallback + | Params$Resource$Instancegroups$Aggregatedlist + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Instancegroups$List; + {}) as Params$Resource$Instancegroups$Aggregatedlist; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Instancegroups$List; + params = {} as Params$Resource$Instancegroups$Aggregatedlist; options = {}; } @@ -47017,29 +47798,29 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/instanceGroups' + '/compute/v1/projects/{project}/aggregated/instanceGroups' ).replace(/([^:]\/)\/+/g, '$1'), method: 'GET', }, options ), params, - requiredParams: ['project', 'zone'], - pathParams: ['project', 'zone'], + requiredParams: ['project'], + pathParams: ['project'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Lists the instances in the specified instance group. The orderBy query parameter is not supported. + * Deletes the specified instance group. The instances in the group are not deleted. Note that instance group must not belong to a backend service. Read Deleting an instance group for more information. * @example * ```js * // Before running the sample: @@ -47059,7 +47840,6 @@ export namespace compute_v1 { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', - * 'https://www.googleapis.com/auth/compute.readonly', * ], * }); * @@ -47068,53 +47848,49 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.instanceGroups.listInstances({ - * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. - * // - * // 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) ``` - * filter: 'placeholder-value', - * // The name of the instance group from which you want to generate a list of included instances. + * const res = await compute.instanceGroups.delete({ + * // The name of the instance group to delete. * instanceGroup: 'placeholder-value', - * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) - * maxResults: 'placeholder-value', - * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. - * // - * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. - * // - * // Currently, only sorting by `name` or `creationTimestamp desc` is supported. - * orderBy: 'placeholder-value', - * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. - * pageToken: 'placeholder-value', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. - * returnPartialSuccess: 'placeholder-value', + * // 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. + * // + * // 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: 'placeholder-value', * // The name of the zone where the instance group is located. * zone: 'placeholder-value', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "instanceState": "my_instanceState" - * // } - * }, * }); * console.log(res.data); * * // Example response * // { + * // "clientOperationId": "my_clientOperationId", + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "endTime": "my_endTime", + * // "error": {}, + * // "httpErrorMessage": "my_httpErrorMessage", + * // "httpErrorStatusCode": 0, * // "id": "my_id", - * // "items": [], + * // "insertTime": "my_insertTime", * // "kind": "my_kind", - * // "nextPageToken": "my_nextPageToken", + * // "name": "my_name", + * // "operationGroupId": "my_operationGroupId", + * // "operationType": "my_operationType", + * // "progress": 0, + * // "region": "my_region", * // "selfLink": "my_selfLink", - * // "warning": {} + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "statusMessage": "my_statusMessage", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "user": "my_user", + * // "warnings": [], + * // "zone": "my_zone" * // } * } * @@ -47130,57 +47906,50 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - listInstances( - params: Params$Resource$Instancegroups$Listinstances, + delete( + params: Params$Resource$Instancegroups$Delete, options: StreamMethodOptions ): GaxiosPromise; - listInstances( - params?: Params$Resource$Instancegroups$Listinstances, + delete( + params?: Params$Resource$Instancegroups$Delete, options?: MethodOptions - ): GaxiosPromise; - listInstances( - params: Params$Resource$Instancegroups$Listinstances, + ): GaxiosPromise; + delete( + params: Params$Resource$Instancegroups$Delete, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - listInstances( - params: Params$Resource$Instancegroups$Listinstances, - options: - | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - listInstances( - params: Params$Resource$Instancegroups$Listinstances, - callback: BodyResponseCallback + delete( + params: Params$Resource$Instancegroups$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - listInstances( - callback: BodyResponseCallback + delete( + params: Params$Resource$Instancegroups$Delete, + callback: BodyResponseCallback ): void; - listInstances( + delete(callback: BodyResponseCallback): void; + delete( paramsOrCallback?: - | Params$Resource$Instancegroups$Listinstances - | BodyResponseCallback + | Params$Resource$Instancegroups$Delete + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): - | void - | GaxiosPromise - | GaxiosPromise { + ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Instancegroups$Listinstances; + {}) as Params$Resource$Instancegroups$Delete; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Instancegroups$Listinstances; + params = {} as Params$Resource$Instancegroups$Delete; options = {}; } @@ -47195,9 +47964,9 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/listInstances' + '/compute/v1/projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'POST', + method: 'DELETE', }, options ), @@ -47207,19 +47976,19 @@ export namespace compute_v1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Removes one or more instances from the specified instance group, but does not delete those instances. + * Returns the specified zonal instance group. Get a list of available zonal instance groups by making a list() request. * - * If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration before the VM instance is removed or deleted. + * For managed instance groups, use the instanceGroupManagers or regionInstanceGroupManagers methods instead. * @example * ```js * // Before running the sample: @@ -47239,6 +48008,7 @@ export namespace compute_v1 { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', * ], * }); * @@ -47247,56 +48017,31 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.instanceGroups.removeInstances({ - * // The name of the instance group where the specified instances will be removed. + * const res = await compute.instanceGroups.get({ + * // The name of the instance group. * instanceGroup: 'placeholder-value', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // 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. - * // - * // 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: 'placeholder-value', * // The name of the zone where the instance group is located. * zone: 'placeholder-value', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "instances": [] - * // } - * }, * }); * console.log(res.data); * * // Example response * // { - * // "clientOperationId": "my_clientOperationId", * // "creationTimestamp": "my_creationTimestamp", * // "description": "my_description", - * // "endTime": "my_endTime", - * // "error": {}, - * // "httpErrorMessage": "my_httpErrorMessage", - * // "httpErrorStatusCode": 0, + * // "fingerprint": "my_fingerprint", * // "id": "my_id", - * // "insertTime": "my_insertTime", * // "kind": "my_kind", * // "name": "my_name", - * // "operationGroupId": "my_operationGroupId", - * // "operationType": "my_operationType", - * // "progress": 0, + * // "namedPorts": [], + * // "network": "my_network", * // "region": "my_region", * // "selfLink": "my_selfLink", - * // "startTime": "my_startTime", - * // "status": "my_status", - * // "statusMessage": "my_statusMessage", - * // "targetId": "my_targetId", - * // "targetLink": "my_targetLink", - * // "user": "my_user", - * // "warnings": [], + * // "size": 0, + * // "subnetwork": "my_subnetwork", * // "zone": "my_zone" * // } * } @@ -47313,50 +48058,50 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - removeInstances( - params: Params$Resource$Instancegroups$Removeinstances, + get( + params: Params$Resource$Instancegroups$Get, options: StreamMethodOptions ): GaxiosPromise; - removeInstances( - params?: Params$Resource$Instancegroups$Removeinstances, + get( + params?: Params$Resource$Instancegroups$Get, options?: MethodOptions - ): GaxiosPromise; - removeInstances( - params: Params$Resource$Instancegroups$Removeinstances, + ): GaxiosPromise; + get( + params: Params$Resource$Instancegroups$Get, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - removeInstances( - params: Params$Resource$Instancegroups$Removeinstances, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + get( + params: Params$Resource$Instancegroups$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - removeInstances( - params: Params$Resource$Instancegroups$Removeinstances, - callback: BodyResponseCallback + get( + params: Params$Resource$Instancegroups$Get, + callback: BodyResponseCallback ): void; - removeInstances(callback: BodyResponseCallback): void; - removeInstances( + get(callback: BodyResponseCallback): void; + get( paramsOrCallback?: - | Params$Resource$Instancegroups$Removeinstances - | BodyResponseCallback + | Params$Resource$Instancegroups$Get + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { + ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Instancegroups$Removeinstances; + {}) as Params$Resource$Instancegroups$Get; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Instancegroups$Removeinstances; + params = {} as Params$Resource$Instancegroups$Get; options = {}; } @@ -47371,9 +48116,9 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/removeInstances' + '/compute/v1/projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'POST', + method: 'GET', }, options ), @@ -47383,17 +48128,17 @@ export namespace compute_v1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Sets the named ports for the specified instance group. + * Creates an instance group in the specified project using the parameters that are included in the request. * @example * ```js * // Before running the sample: @@ -47421,9 +48166,7 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.instanceGroups.setNamedPorts({ - * // The name of the instance group where the named ports are updated. - * instanceGroup: 'placeholder-value', + * const res = await compute.instanceGroups.insert({ * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', @@ -47433,15 +48176,26 @@ export namespace compute_v1 { * // * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). * requestId: 'placeholder-value', - * // The name of the zone where the instance group is located. + * // The name of the zone where you want to create the instance group. * zone: 'placeholder-value', * * // Request body metadata * requestBody: { * // request body parameters * // { + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", * // "fingerprint": "my_fingerprint", - * // "namedPorts": [] + * // "id": "my_id", + * // "kind": "my_kind", + * // "name": "my_name", + * // "namedPorts": [], + * // "network": "my_network", + * // "region": "my_region", + * // "selfLink": "my_selfLink", + * // "size": 0, + * // "subnetwork": "my_subnetwork", + * // "zone": "my_zone" * // } * }, * }); @@ -47488,32 +48242,32 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - setNamedPorts( - params: Params$Resource$Instancegroups$Setnamedports, + insert( + params: Params$Resource$Instancegroups$Insert, options: StreamMethodOptions ): GaxiosPromise; - setNamedPorts( - params?: Params$Resource$Instancegroups$Setnamedports, + insert( + params?: Params$Resource$Instancegroups$Insert, options?: MethodOptions ): GaxiosPromise; - setNamedPorts( - params: Params$Resource$Instancegroups$Setnamedports, + insert( + params: Params$Resource$Instancegroups$Insert, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - setNamedPorts( - params: Params$Resource$Instancegroups$Setnamedports, + insert( + params: Params$Resource$Instancegroups$Insert, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - setNamedPorts( - params: Params$Resource$Instancegroups$Setnamedports, + insert( + params: Params$Resource$Instancegroups$Insert, callback: BodyResponseCallback ): void; - setNamedPorts(callback: BodyResponseCallback): void; - setNamedPorts( + insert(callback: BodyResponseCallback): void; + insert( paramsOrCallback?: - | Params$Resource$Instancegroups$Setnamedports + | Params$Resource$Instancegroups$Insert | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -47526,12 +48280,12 @@ export namespace compute_v1 { | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Instancegroups$Setnamedports; + {}) as Params$Resource$Instancegroups$Insert; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Instancegroups$Setnamedports; + params = {} as Params$Resource$Instancegroups$Insert; options = {}; } @@ -47546,15 +48300,15 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/setNamedPorts' + '/compute/v1/projects/{project}/zones/{zone}/instanceGroups' ).replace(/([^:]\/)\/+/g, '$1'), method: 'POST', }, options ), params, - requiredParams: ['project', 'zone', 'instanceGroup'], - pathParams: ['instanceGroup', 'project', 'zone'], + requiredParams: ['project', 'zone'], + pathParams: ['project', 'zone'], context: this.context, }; if (callback) { @@ -47566,307 +48320,187 @@ export namespace compute_v1 { return createAPIRequest(parameters); } } - } - export interface Params$Resource$Instancegroups$Addinstances - extends StandardParameters { - /** - * The name of the instance group where you are adding instances. - */ - instanceGroup?: string; - /** - * Project ID for this request. - */ - project?: string; /** - * 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. + * Retrieves the list of zonal instance group resources contained within the specified zone. * - * 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. + * For managed instance groups, use the instanceGroupManagers or regionInstanceGroupManagers methods instead. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` * - * The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). - */ - requestId?: string; - /** - * The name of the zone where the instance group is located. - */ - zone?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$InstanceGroupsAddInstancesRequest; - } - export interface Params$Resource$Instancegroups$Aggregatedlist - extends StandardParameters { - /** - * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `\>`, or `<`. + * const {google} = require('googleapis'); + * const compute = google.compute('v1'); * - * For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', + * ], + * }); * - * 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. + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); * - * 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) ``` - */ - filter?: string; - /** - * Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. - */ - includeAllScopes?: boolean; - /** - * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) - */ - maxResults?: number; - /** - * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * // Do the magic + * const res = await compute.instanceGroups.list({ + * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. + * // + * // 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) ``` + * filter: 'placeholder-value', + * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * maxResults: 'placeholder-value', + * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * // + * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. + * // + * // Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * orderBy: 'placeholder-value', + * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * pageToken: 'placeholder-value', + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + * returnPartialSuccess: 'placeholder-value', + * // The name of the zone where the instance group is located. + * zone: 'placeholder-value', + * }); + * console.log(res.data); * - * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. + * // Example response + * // { + * // "id": "my_id", + * // "items": [], + * // "kind": "my_kind", + * // "nextPageToken": "my_nextPageToken", + * // "selfLink": "my_selfLink", + * // "warning": {} + * // } + * } * - * Currently, only sorting by `name` or `creationTimestamp desc` is supported. - */ - orderBy?: string; - /** - * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. - */ - pageToken?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. - */ - returnPartialSuccess?: boolean; - } - export interface Params$Resource$Instancegroups$Delete - extends StandardParameters { - /** - * The name of the instance group to delete. - */ - instanceGroup?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * 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. + * main().catch(e => { + * console.error(e); + * throw e; + * }); * - * 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; - /** - * The name of the zone where the instance group is located. - */ - zone?: string; - } - export interface Params$Resource$Instancegroups$Get - extends StandardParameters { - /** - * The name of the instance group. - */ - instanceGroup?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * The name of the zone where the instance group is located. - */ - zone?: string; - } - export interface Params$Resource$Instancegroups$Insert - extends StandardParameters { - /** - * Project ID for this request. + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. */ - project?: string; + list( + params: Params$Resource$Instancegroups$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Instancegroups$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Instancegroups$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Instancegroups$List, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Instancegroups$List, + callback: BodyResponseCallback + ): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: + | Params$Resource$Instancegroups$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Instancegroups$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Instancegroups$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/v1/projects/{project}/zones/{zone}/instanceGroups' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['project', 'zone'], + pathParams: ['project', 'zone'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + /** - * 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. + * Lists the instances in the specified instance group. The orderBy query parameter is not supported. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` * - * 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; - /** - * The name of the zone where you want to create the instance group. - */ - zone?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$InstanceGroup; - } - export interface Params$Resource$Instancegroups$List - extends StandardParameters { - /** - * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. - * - * 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) ``` - */ - filter?: string; - /** - * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) - */ - maxResults?: number; - /** - * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. - * - * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. - * - * Currently, only sorting by `name` or `creationTimestamp desc` is supported. - */ - orderBy?: string; - /** - * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. - */ - pageToken?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. - */ - returnPartialSuccess?: boolean; - /** - * The name of the zone where the instance group is located. - */ - zone?: string; - } - export interface Params$Resource$Instancegroups$Listinstances - extends StandardParameters { - /** - * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. - * - * 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) ``` - */ - filter?: string; - /** - * The name of the instance group from which you want to generate a list of included instances. - */ - instanceGroup?: string; - /** - * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) - */ - maxResults?: number; - /** - * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. - * - * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. - * - * Currently, only sorting by `name` or `creationTimestamp desc` is supported. - */ - orderBy?: string; - /** - * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. - */ - pageToken?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. - */ - returnPartialSuccess?: boolean; - /** - * The name of the zone where the instance group is located. - */ - zone?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$InstanceGroupsListInstancesRequest; - } - export interface Params$Resource$Instancegroups$Removeinstances - extends StandardParameters { - /** - * The name of the instance group where the specified instances will be removed. - */ - instanceGroup?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * 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. - * - * 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; - /** - * The name of the zone where the instance group is located. - */ - zone?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$InstanceGroupsRemoveInstancesRequest; - } - export interface Params$Resource$Instancegroups$Setnamedports - extends StandardParameters { - /** - * The name of the instance group where the named ports are updated. - */ - instanceGroup?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * 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. - * - * 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; - /** - * The name of the zone where the instance group is located. - */ - zone?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$InstanceGroupsSetNamedPortsRequest; - } - - export class Resource$Instances { - context: APIRequestContext; - constructor(context: APIRequestContext) { - this.context = context; - } - - /** - * Adds an access config to an instance's network interface. - * @example - * ```js - * // Before running the sample: - * // - Enable the API at: - * // https://console.developers.google.com/apis/api/compute.googleapis.com - * // - Login into gcloud by running: - * // `$ gcloud auth application-default login` - * // - Install the npm module by running: - * // `$ npm install googleapis` - * - * const {google} = require('googleapis'); - * const compute = google.compute('v1'); + * const {google} = require('googleapis'); + * const compute = google.compute('v1'); * * async function main() { * const auth = new google.auth.GoogleAuth({ @@ -47874,6 +48508,7 @@ export namespace compute_v1 { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', * ], * }); * @@ -47882,34 +48517,40 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.instances.addAccessConfig({ - * // The instance name for this request. - * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', - * // The name of the network interface to add to this instance. - * networkInterface: 'placeholder-value', + * const res = await compute.instanceGroups.listInstances({ + * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. + * // + * // 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) ``` + * filter: 'placeholder-value', + * // The name of the instance group from which you want to generate a list of included instances. + * instanceGroup: 'placeholder-value', + * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * maxResults: 'placeholder-value', + * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * // + * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. + * // + * // Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * orderBy: 'placeholder-value', + * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * pageToken: 'placeholder-value', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // 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. - * // - * // 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: 'placeholder-value', - * // The name of the zone for this request. - * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + * returnPartialSuccess: 'placeholder-value', + * // The name of the zone where the instance group is located. + * zone: 'placeholder-value', * * // Request body metadata * requestBody: { * // request body parameters * // { - * // "kind": "my_kind", - * // "name": "my_name", - * // "natIP": "my_natIP", - * // "networkTier": "my_networkTier", - * // "publicPtrDomainName": "my_publicPtrDomainName", - * // "setPublicPtr": false, - * // "type": "my_type" + * // "instanceState": "my_instanceState" * // } * }, * }); @@ -47917,30 +48558,12 @@ export namespace compute_v1 { * * // Example response * // { - * // "clientOperationId": "my_clientOperationId", - * // "creationTimestamp": "my_creationTimestamp", - * // "description": "my_description", - * // "endTime": "my_endTime", - * // "error": {}, - * // "httpErrorMessage": "my_httpErrorMessage", - * // "httpErrorStatusCode": 0, * // "id": "my_id", - * // "insertTime": "my_insertTime", + * // "items": [], * // "kind": "my_kind", - * // "name": "my_name", - * // "operationGroupId": "my_operationGroupId", - * // "operationType": "my_operationType", - * // "progress": 0, - * // "region": "my_region", + * // "nextPageToken": "my_nextPageToken", * // "selfLink": "my_selfLink", - * // "startTime": "my_startTime", - * // "status": "my_status", - * // "statusMessage": "my_statusMessage", - * // "targetId": "my_targetId", - * // "targetLink": "my_targetLink", - * // "user": "my_user", - * // "warnings": [], - * // "zone": "my_zone" + * // "warning": {} * // } * } * @@ -47956,50 +48579,57 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - addAccessConfig( - params: Params$Resource$Instances$Addaccessconfig, + listInstances( + params: Params$Resource$Instancegroups$Listinstances, options: StreamMethodOptions ): GaxiosPromise; - addAccessConfig( - params?: Params$Resource$Instances$Addaccessconfig, + listInstances( + params?: Params$Resource$Instancegroups$Listinstances, options?: MethodOptions - ): GaxiosPromise; - addAccessConfig( - params: Params$Resource$Instances$Addaccessconfig, + ): GaxiosPromise; + listInstances( + params: Params$Resource$Instancegroups$Listinstances, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - addAccessConfig( - params: Params$Resource$Instances$Addaccessconfig, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + listInstances( + params: Params$Resource$Instancegroups$Listinstances, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - addAccessConfig( - params: Params$Resource$Instances$Addaccessconfig, - callback: BodyResponseCallback + listInstances( + params: Params$Resource$Instancegroups$Listinstances, + callback: BodyResponseCallback ): void; - addAccessConfig(callback: BodyResponseCallback): void; - addAccessConfig( + listInstances( + callback: BodyResponseCallback + ): void; + listInstances( paramsOrCallback?: - | Params$Resource$Instances$Addaccessconfig - | BodyResponseCallback + | Params$Resource$Instancegroups$Listinstances + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { + ): + | void + | GaxiosPromise + | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Instances$Addaccessconfig; + {}) as Params$Resource$Instancegroups$Listinstances; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Instances$Addaccessconfig; + params = {} as Params$Resource$Instancegroups$Listinstances; options = {}; } @@ -48014,29 +48644,31 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/addAccessConfig' + '/compute/v1/projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/listInstances' ).replace(/([^:]\/)\/+/g, '$1'), method: 'POST', }, options ), params, - requiredParams: ['project', 'zone', 'instance', 'networkInterface'], - pathParams: ['instance', 'project', 'zone'], + requiredParams: ['project', 'zone', 'instanceGroup'], + pathParams: ['instanceGroup', 'project', 'zone'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Adds existing resource policies to an instance. You can only add one policy right now which will be applied to this instance for scheduling live migrations. + * Removes one or more instances from the specified instance group, but does not delete those instances. + * + * If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration before the VM instance is removed or deleted. * @example * ```js * // Before running the sample: @@ -48064,9 +48696,9 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.instances.addResourcePolicies({ - * // The instance name for this request. - * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * const res = await compute.instanceGroups.removeInstances({ + * // The name of the instance group where the specified instances will be removed. + * instanceGroup: 'placeholder-value', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', @@ -48076,14 +48708,14 @@ export namespace compute_v1 { * // * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). * requestId: 'placeholder-value', - * // The name of the zone for this request. - * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * // The name of the zone where the instance group is located. + * zone: 'placeholder-value', * * // Request body metadata * requestBody: { * // request body parameters * // { - * // "resourcePolicies": [] + * // "instances": [] * // } * }, * }); @@ -48130,32 +48762,32 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - addResourcePolicies( - params: Params$Resource$Instances$Addresourcepolicies, + removeInstances( + params: Params$Resource$Instancegroups$Removeinstances, options: StreamMethodOptions ): GaxiosPromise; - addResourcePolicies( - params?: Params$Resource$Instances$Addresourcepolicies, + removeInstances( + params?: Params$Resource$Instancegroups$Removeinstances, options?: MethodOptions ): GaxiosPromise; - addResourcePolicies( - params: Params$Resource$Instances$Addresourcepolicies, + removeInstances( + params: Params$Resource$Instancegroups$Removeinstances, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - addResourcePolicies( - params: Params$Resource$Instances$Addresourcepolicies, + removeInstances( + params: Params$Resource$Instancegroups$Removeinstances, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - addResourcePolicies( - params: Params$Resource$Instances$Addresourcepolicies, + removeInstances( + params: Params$Resource$Instancegroups$Removeinstances, callback: BodyResponseCallback ): void; - addResourcePolicies(callback: BodyResponseCallback): void; - addResourcePolicies( + removeInstances(callback: BodyResponseCallback): void; + removeInstances( paramsOrCallback?: - | Params$Resource$Instances$Addresourcepolicies + | Params$Resource$Instancegroups$Removeinstances | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -48168,12 +48800,12 @@ export namespace compute_v1 { | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Instances$Addresourcepolicies; + {}) as Params$Resource$Instancegroups$Removeinstances; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Instances$Addresourcepolicies; + params = {} as Params$Resource$Instancegroups$Removeinstances; options = {}; } @@ -48188,15 +48820,15 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/addResourcePolicies' + '/compute/v1/projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/removeInstances' ).replace(/([^:]\/)\/+/g, '$1'), method: 'POST', }, options ), params, - requiredParams: ['project', 'zone', 'instance'], - pathParams: ['instance', 'project', 'zone'], + requiredParams: ['project', 'zone', 'instanceGroup'], + pathParams: ['instanceGroup', 'project', 'zone'], context: this.context, }; if (callback) { @@ -48210,7 +48842,7 @@ export namespace compute_v1 { } /** - * Retrieves aggregated list of all of the instances in your project across all regions and zones. + * Sets the named ports for the specified instance group. * @example * ```js * // Before running the sample: @@ -48230,7 +48862,6 @@ export namespace compute_v1 { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', - * 'https://www.googleapis.com/auth/compute.readonly', * ], * }); * @@ -48239,44 +48870,58 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.instances.aggregatedList({ - * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. - * // - * // 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) ``` - * filter: 'placeholder-value', - * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. - * includeAllScopes: 'placeholder-value', - * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) - * maxResults: 'placeholder-value', - * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. - * // - * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. - * // - * // Currently, only sorting by `name` or `creationTimestamp desc` is supported. - * orderBy: 'placeholder-value', - * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. - * pageToken: 'placeholder-value', + * const res = await compute.instanceGroups.setNamedPorts({ + * // The name of the instance group where the named ports are updated. + * instanceGroup: 'placeholder-value', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. - * returnPartialSuccess: 'placeholder-value', + * // 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. + * // + * // 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: 'placeholder-value', + * // The name of the zone where the instance group is located. + * zone: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "fingerprint": "my_fingerprint", + * // "namedPorts": [] + * // } + * }, * }); * console.log(res.data); * * // Example response * // { + * // "clientOperationId": "my_clientOperationId", + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "endTime": "my_endTime", + * // "error": {}, + * // "httpErrorMessage": "my_httpErrorMessage", + * // "httpErrorStatusCode": 0, * // "id": "my_id", - * // "items": {}, + * // "insertTime": "my_insertTime", * // "kind": "my_kind", - * // "nextPageToken": "my_nextPageToken", + * // "name": "my_name", + * // "operationGroupId": "my_operationGroupId", + * // "operationType": "my_operationType", + * // "progress": 0, + * // "region": "my_region", * // "selfLink": "my_selfLink", - * // "unreachables": [], - * // "warning": {} + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "statusMessage": "my_statusMessage", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "user": "my_user", + * // "warnings": [], + * // "zone": "my_zone" * // } * } * @@ -48292,57 +48937,50 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - aggregatedList( - params: Params$Resource$Instances$Aggregatedlist, + setNamedPorts( + params: Params$Resource$Instancegroups$Setnamedports, options: StreamMethodOptions ): GaxiosPromise; - aggregatedList( - params?: Params$Resource$Instances$Aggregatedlist, + setNamedPorts( + params?: Params$Resource$Instancegroups$Setnamedports, options?: MethodOptions - ): GaxiosPromise; - aggregatedList( - params: Params$Resource$Instances$Aggregatedlist, + ): GaxiosPromise; + setNamedPorts( + params: Params$Resource$Instancegroups$Setnamedports, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - aggregatedList( - params: Params$Resource$Instances$Aggregatedlist, - options: - | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - aggregatedList( - params: Params$Resource$Instances$Aggregatedlist, - callback: BodyResponseCallback + setNamedPorts( + params: Params$Resource$Instancegroups$Setnamedports, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - aggregatedList( - callback: BodyResponseCallback + setNamedPorts( + params: Params$Resource$Instancegroups$Setnamedports, + callback: BodyResponseCallback ): void; - aggregatedList( + setNamedPorts(callback: BodyResponseCallback): void; + setNamedPorts( paramsOrCallback?: - | Params$Resource$Instances$Aggregatedlist - | BodyResponseCallback + | Params$Resource$Instancegroups$Setnamedports + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): - | void - | GaxiosPromise - | GaxiosPromise { + ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Instances$Aggregatedlist; + {}) as Params$Resource$Instancegroups$Setnamedports; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Instances$Aggregatedlist; + params = {} as Params$Resource$Instancegroups$Setnamedports; options = {}; } @@ -48356,32 +48994,319 @@ export namespace compute_v1 { options: Object.assign( { url: ( - rootUrl + '/compute/v1/projects/{project}/aggregated/instances' + rootUrl + + '/compute/v1/projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/setNamedPorts' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'GET', + method: 'POST', }, options ), params, - requiredParams: ['project'], - pathParams: ['project'], + requiredParams: ['project', 'zone', 'instanceGroup'], + pathParams: ['instanceGroup', 'project', 'zone'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } + } + export interface Params$Resource$Instancegroups$Addinstances + extends StandardParameters { /** - * Attaches an existing Disk resource to an instance. You must first create the disk before you can attach it. It is not possible to create and attach a disk at the same time. For more information, read Adding a persistent disk to your instance. - * @example - * ```js - * // Before running the sample: + * The name of the instance group where you are adding instances. + */ + instanceGroup?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + /** + * The name of the zone where the instance group is located. + */ + zone?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$InstanceGroupsAddInstancesRequest; + } + export interface Params$Resource$Instancegroups$Aggregatedlist + extends StandardParameters { + /** + * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. + * + * 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) ``` + */ + filter?: string; + /** + * Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. + */ + includeAllScopes?: boolean; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + */ + maxResults?: number; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. + * + * Currently, only sorting by `name` or `creationTimestamp desc` is supported. + */ + orderBy?: string; + /** + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + */ + pageToken?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + */ + returnPartialSuccess?: boolean; + } + export interface Params$Resource$Instancegroups$Delete + extends StandardParameters { + /** + * The name of the instance group to delete. + */ + instanceGroup?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + /** + * The name of the zone where the instance group is located. + */ + zone?: string; + } + export interface Params$Resource$Instancegroups$Get + extends StandardParameters { + /** + * The name of the instance group. + */ + instanceGroup?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * The name of the zone where the instance group is located. + */ + zone?: string; + } + export interface Params$Resource$Instancegroups$Insert + extends StandardParameters { + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + /** + * The name of the zone where you want to create the instance group. + */ + zone?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$InstanceGroup; + } + export interface Params$Resource$Instancegroups$List + extends StandardParameters { + /** + * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. + * + * 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) ``` + */ + filter?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + */ + maxResults?: number; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. + * + * Currently, only sorting by `name` or `creationTimestamp desc` is supported. + */ + orderBy?: string; + /** + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + */ + pageToken?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + */ + returnPartialSuccess?: boolean; + /** + * The name of the zone where the instance group is located. + */ + zone?: string; + } + export interface Params$Resource$Instancegroups$Listinstances + extends StandardParameters { + /** + * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. + * + * 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) ``` + */ + filter?: string; + /** + * The name of the instance group from which you want to generate a list of included instances. + */ + instanceGroup?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + */ + maxResults?: number; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. + * + * Currently, only sorting by `name` or `creationTimestamp desc` is supported. + */ + orderBy?: string; + /** + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + */ + pageToken?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + */ + returnPartialSuccess?: boolean; + /** + * The name of the zone where the instance group is located. + */ + zone?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$InstanceGroupsListInstancesRequest; + } + export interface Params$Resource$Instancegroups$Removeinstances + extends StandardParameters { + /** + * The name of the instance group where the specified instances will be removed. + */ + instanceGroup?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + /** + * The name of the zone where the instance group is located. + */ + zone?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$InstanceGroupsRemoveInstancesRequest; + } + export interface Params$Resource$Instancegroups$Setnamedports + extends StandardParameters { + /** + * The name of the instance group where the named ports are updated. + */ + instanceGroup?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + /** + * The name of the zone where the instance group is located. + */ + zone?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$InstanceGroupsSetNamedPortsRequest; + } + + export class Resource$Instances { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Adds an access config to an instance's network interface. + * @example + * ```js + * // Before running the sample: * // - Enable the API at: * // https://console.developers.google.com/apis/api/compute.googleapis.com * // - Login into gcloud by running: @@ -48406,11 +49331,11 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.instances.attachDisk({ - * // Whether to force attach the regional disk even if it's currently attached to another instance. If you try to force attach a zonal disk to an instance, you will receive an error. - * forceAttach: 'placeholder-value', + * const res = await compute.instances.addAccessConfig({ * // The instance name for this request. * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * // The name of the network interface to add to this instance. + * networkInterface: 'placeholder-value', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', @@ -48427,20 +49352,12 @@ export namespace compute_v1 { * requestBody: { * // request body parameters * // { - * // "autoDelete": false, - * // "boot": false, - * // "deviceName": "my_deviceName", - * // "diskEncryptionKey": {}, - * // "diskSizeGb": "my_diskSizeGb", - * // "guestOsFeatures": [], - * // "index": 0, - * // "initializeParams": {}, - * // "interface": "my_interface", * // "kind": "my_kind", - * // "licenses": [], - * // "mode": "my_mode", - * // "shieldedInstanceInitialState": {}, - * // "source": "my_source", + * // "name": "my_name", + * // "natIP": "my_natIP", + * // "networkTier": "my_networkTier", + * // "publicPtrDomainName": "my_publicPtrDomainName", + * // "setPublicPtr": false, * // "type": "my_type" * // } * }, @@ -48488,32 +49405,32 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - attachDisk( - params: Params$Resource$Instances$Attachdisk, + addAccessConfig( + params: Params$Resource$Instances$Addaccessconfig, options: StreamMethodOptions ): GaxiosPromise; - attachDisk( - params?: Params$Resource$Instances$Attachdisk, + addAccessConfig( + params?: Params$Resource$Instances$Addaccessconfig, options?: MethodOptions ): GaxiosPromise; - attachDisk( - params: Params$Resource$Instances$Attachdisk, + addAccessConfig( + params: Params$Resource$Instances$Addaccessconfig, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - attachDisk( - params: Params$Resource$Instances$Attachdisk, + addAccessConfig( + params: Params$Resource$Instances$Addaccessconfig, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - attachDisk( - params: Params$Resource$Instances$Attachdisk, + addAccessConfig( + params: Params$Resource$Instances$Addaccessconfig, callback: BodyResponseCallback ): void; - attachDisk(callback: BodyResponseCallback): void; - attachDisk( + addAccessConfig(callback: BodyResponseCallback): void; + addAccessConfig( paramsOrCallback?: - | Params$Resource$Instances$Attachdisk + | Params$Resource$Instances$Addaccessconfig | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -48526,12 +49443,12 @@ export namespace compute_v1 { | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Instances$Attachdisk; + {}) as Params$Resource$Instances$Addaccessconfig; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Instances$Attachdisk; + params = {} as Params$Resource$Instances$Addaccessconfig; options = {}; } @@ -48546,14 +49463,14 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/attachDisk' + '/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/addAccessConfig' ).replace(/([^:]\/)\/+/g, '$1'), method: 'POST', }, options ), params, - requiredParams: ['project', 'zone', 'instance'], + requiredParams: ['project', 'zone', 'instance', 'networkInterface'], pathParams: ['instance', 'project', 'zone'], context: this.context, }; @@ -48568,7 +49485,7 @@ export namespace compute_v1 { } /** - * Creates multiple instances. Count specifies the number of instances to create. + * Adds existing resource policies to an instance. You can only add one policy right now which will be applied to this instance for scheduling live migrations. * @example * ```js * // Before running the sample: @@ -48596,7 +49513,9 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.instances.bulkInsert({ + * const res = await compute.instances.addResourcePolicies({ + * // The instance name for this request. + * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', @@ -48613,13 +49532,7 @@ export namespace compute_v1 { * requestBody: { * // request body parameters * // { - * // "count": "my_count", - * // "instanceProperties": {}, - * // "locationPolicy": {}, - * // "minCount": "my_minCount", - * // "namePattern": "my_namePattern", - * // "perInstanceProperties": {}, - * // "sourceInstanceTemplate": "my_sourceInstanceTemplate" + * // "resourcePolicies": [] * // } * }, * }); @@ -48666,32 +49579,32 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - bulkInsert( - params: Params$Resource$Instances$Bulkinsert, + addResourcePolicies( + params: Params$Resource$Instances$Addresourcepolicies, options: StreamMethodOptions ): GaxiosPromise; - bulkInsert( - params?: Params$Resource$Instances$Bulkinsert, + addResourcePolicies( + params?: Params$Resource$Instances$Addresourcepolicies, options?: MethodOptions ): GaxiosPromise; - bulkInsert( - params: Params$Resource$Instances$Bulkinsert, + addResourcePolicies( + params: Params$Resource$Instances$Addresourcepolicies, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - bulkInsert( - params: Params$Resource$Instances$Bulkinsert, + addResourcePolicies( + params: Params$Resource$Instances$Addresourcepolicies, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - bulkInsert( - params: Params$Resource$Instances$Bulkinsert, + addResourcePolicies( + params: Params$Resource$Instances$Addresourcepolicies, callback: BodyResponseCallback ): void; - bulkInsert(callback: BodyResponseCallback): void; - bulkInsert( + addResourcePolicies(callback: BodyResponseCallback): void; + addResourcePolicies( paramsOrCallback?: - | Params$Resource$Instances$Bulkinsert + | Params$Resource$Instances$Addresourcepolicies | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -48704,12 +49617,12 @@ export namespace compute_v1 { | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Instances$Bulkinsert; + {}) as Params$Resource$Instances$Addresourcepolicies; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Instances$Bulkinsert; + params = {} as Params$Resource$Instances$Addresourcepolicies; options = {}; } @@ -48724,15 +49637,15 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/instances/bulkInsert' + '/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/addResourcePolicies' ).replace(/([^:]\/)\/+/g, '$1'), method: 'POST', }, options ), params, - requiredParams: ['project', 'zone'], - pathParams: ['project', 'zone'], + requiredParams: ['project', 'zone', 'instance'], + pathParams: ['instance', 'project', 'zone'], context: this.context, }; if (callback) { @@ -48746,7 +49659,7 @@ export namespace compute_v1 { } /** - * Deletes the specified Instance resource. For more information, see Stopping or Deleting an Instance. + * Retrieves aggregated list of all of the instances in your project across all regions and zones. * @example * ```js * // Before running the sample: @@ -48766,6 +49679,7 @@ export namespace compute_v1 { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', * ], * }); * @@ -48774,49 +49688,44 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.instances.delete({ - * // Name of the instance resource to delete. - * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * const res = await compute.instances.aggregatedList({ + * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. + * // + * // 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) ``` + * filter: 'placeholder-value', + * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. + * includeAllScopes: 'placeholder-value', + * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * maxResults: 'placeholder-value', + * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * // + * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. + * // + * // Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * orderBy: 'placeholder-value', + * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * pageToken: 'placeholder-value', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // 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. - * // - * // 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: 'placeholder-value', - * // The name of the zone for this request. - * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + * returnPartialSuccess: 'placeholder-value', * }); * console.log(res.data); * * // Example response * // { - * // "clientOperationId": "my_clientOperationId", - * // "creationTimestamp": "my_creationTimestamp", - * // "description": "my_description", - * // "endTime": "my_endTime", - * // "error": {}, - * // "httpErrorMessage": "my_httpErrorMessage", - * // "httpErrorStatusCode": 0, * // "id": "my_id", - * // "insertTime": "my_insertTime", + * // "items": {}, * // "kind": "my_kind", - * // "name": "my_name", - * // "operationGroupId": "my_operationGroupId", - * // "operationType": "my_operationType", - * // "progress": 0, - * // "region": "my_region", + * // "nextPageToken": "my_nextPageToken", * // "selfLink": "my_selfLink", - * // "startTime": "my_startTime", - * // "status": "my_status", - * // "statusMessage": "my_statusMessage", - * // "targetId": "my_targetId", - * // "targetLink": "my_targetLink", - * // "user": "my_user", - * // "warnings": [], - * // "zone": "my_zone" + * // "unreachables": [], + * // "warning": {} * // } * } * @@ -48832,49 +49741,57 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - delete( - params: Params$Resource$Instances$Delete, + aggregatedList( + params: Params$Resource$Instances$Aggregatedlist, options: StreamMethodOptions ): GaxiosPromise; - delete( - params?: Params$Resource$Instances$Delete, + aggregatedList( + params?: Params$Resource$Instances$Aggregatedlist, options?: MethodOptions - ): GaxiosPromise; - delete( - params: Params$Resource$Instances$Delete, + ): GaxiosPromise; + aggregatedList( + params: Params$Resource$Instances$Aggregatedlist, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - delete( - params: Params$Resource$Instances$Delete, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + aggregatedList( + params: Params$Resource$Instances$Aggregatedlist, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - delete( - params: Params$Resource$Instances$Delete, - callback: BodyResponseCallback + aggregatedList( + params: Params$Resource$Instances$Aggregatedlist, + callback: BodyResponseCallback ): void; - delete(callback: BodyResponseCallback): void; - delete( + aggregatedList( + callback: BodyResponseCallback + ): void; + aggregatedList( paramsOrCallback?: - | Params$Resource$Instances$Delete - | BodyResponseCallback + | Params$Resource$Instances$Aggregatedlist + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Instances$Delete; + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Instances$Aggregatedlist; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Instances$Delete; + params = {} as Params$Resource$Instances$Aggregatedlist; options = {}; } @@ -48888,30 +49805,29 @@ export namespace compute_v1 { options: Object.assign( { url: ( - rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/instances/{instance}' + rootUrl + '/compute/v1/projects/{project}/aggregated/instances' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'DELETE', + method: 'GET', }, options ), params, - requiredParams: ['project', 'zone', 'instance'], - pathParams: ['instance', 'project', 'zone'], + requiredParams: ['project'], + pathParams: ['project'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Deletes an access config from an instance's network interface. + * Attaches an existing Disk resource to an instance. You must first create the disk before you can attach it. It is not possible to create and attach a disk at the same time. For more information, read Adding a persistent disk to your instance. * @example * ```js * // Before running the sample: @@ -48939,13 +49855,11 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.instances.deleteAccessConfig({ - * // The name of the access config to delete. - * accessConfig: 'placeholder-value', + * const res = await compute.instances.attachDisk({ + * // Whether to force attach the regional disk even if it's currently attached to another instance. If you try to force attach a zonal disk to an instance, you will receive an error. + * forceAttach: 'placeholder-value', * // The instance name for this request. * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', - * // The name of the network interface. - * networkInterface: 'placeholder-value', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', @@ -48957,6 +49871,28 @@ export namespace compute_v1 { * requestId: 'placeholder-value', * // The name of the zone for this request. * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "autoDelete": false, + * // "boot": false, + * // "deviceName": "my_deviceName", + * // "diskEncryptionKey": {}, + * // "diskSizeGb": "my_diskSizeGb", + * // "guestOsFeatures": [], + * // "index": 0, + * // "initializeParams": {}, + * // "interface": "my_interface", + * // "kind": "my_kind", + * // "licenses": [], + * // "mode": "my_mode", + * // "shieldedInstanceInitialState": {}, + * // "source": "my_source", + * // "type": "my_type" + * // } + * }, * }); * console.log(res.data); * @@ -49001,32 +49937,32 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - deleteAccessConfig( - params: Params$Resource$Instances$Deleteaccessconfig, + attachDisk( + params: Params$Resource$Instances$Attachdisk, options: StreamMethodOptions ): GaxiosPromise; - deleteAccessConfig( - params?: Params$Resource$Instances$Deleteaccessconfig, + attachDisk( + params?: Params$Resource$Instances$Attachdisk, options?: MethodOptions ): GaxiosPromise; - deleteAccessConfig( - params: Params$Resource$Instances$Deleteaccessconfig, + attachDisk( + params: Params$Resource$Instances$Attachdisk, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - deleteAccessConfig( - params: Params$Resource$Instances$Deleteaccessconfig, + attachDisk( + params: Params$Resource$Instances$Attachdisk, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - deleteAccessConfig( - params: Params$Resource$Instances$Deleteaccessconfig, + attachDisk( + params: Params$Resource$Instances$Attachdisk, callback: BodyResponseCallback ): void; - deleteAccessConfig(callback: BodyResponseCallback): void; - deleteAccessConfig( + attachDisk(callback: BodyResponseCallback): void; + attachDisk( paramsOrCallback?: - | Params$Resource$Instances$Deleteaccessconfig + | Params$Resource$Instances$Attachdisk | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -49039,12 +49975,12 @@ export namespace compute_v1 { | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Instances$Deleteaccessconfig; + {}) as Params$Resource$Instances$Attachdisk; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Instances$Deleteaccessconfig; + params = {} as Params$Resource$Instances$Attachdisk; options = {}; } @@ -49059,20 +49995,14 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/deleteAccessConfig' + '/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/attachDisk' ).replace(/([^:]\/)\/+/g, '$1'), method: 'POST', }, options ), params, - requiredParams: [ - 'project', - 'zone', - 'instance', - 'accessConfig', - 'networkInterface', - ], + requiredParams: ['project', 'zone', 'instance'], pathParams: ['instance', 'project', 'zone'], context: this.context, }; @@ -49087,7 +50017,7 @@ export namespace compute_v1 { } /** - * Detaches a disk from an instance. + * Creates multiple instances. Count specifies the number of instances to create. * @example * ```js * // Before running the sample: @@ -49115,11 +50045,7 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.instances.detachDisk({ - * // The device name of the disk to detach. Make a get() request on the instance to view currently attached disks and device names. - * deviceName: 'placeholder-value', - * // Instance name for this request. - * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * const res = await compute.instances.bulkInsert({ * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', @@ -49131,6 +50057,20 @@ export namespace compute_v1 { * requestId: 'placeholder-value', * // The name of the zone for this request. * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "count": "my_count", + * // "instanceProperties": {}, + * // "locationPolicy": {}, + * // "minCount": "my_minCount", + * // "namePattern": "my_namePattern", + * // "perInstanceProperties": {}, + * // "sourceInstanceTemplate": "my_sourceInstanceTemplate" + * // } + * }, * }); * console.log(res.data); * @@ -49175,32 +50115,32 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - detachDisk( - params: Params$Resource$Instances$Detachdisk, + bulkInsert( + params: Params$Resource$Instances$Bulkinsert, options: StreamMethodOptions ): GaxiosPromise; - detachDisk( - params?: Params$Resource$Instances$Detachdisk, + bulkInsert( + params?: Params$Resource$Instances$Bulkinsert, options?: MethodOptions ): GaxiosPromise; - detachDisk( - params: Params$Resource$Instances$Detachdisk, + bulkInsert( + params: Params$Resource$Instances$Bulkinsert, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - detachDisk( - params: Params$Resource$Instances$Detachdisk, + bulkInsert( + params: Params$Resource$Instances$Bulkinsert, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - detachDisk( - params: Params$Resource$Instances$Detachdisk, + bulkInsert( + params: Params$Resource$Instances$Bulkinsert, callback: BodyResponseCallback ): void; - detachDisk(callback: BodyResponseCallback): void; - detachDisk( + bulkInsert(callback: BodyResponseCallback): void; + bulkInsert( paramsOrCallback?: - | Params$Resource$Instances$Detachdisk + | Params$Resource$Instances$Bulkinsert | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -49213,12 +50153,12 @@ export namespace compute_v1 { | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Instances$Detachdisk; + {}) as Params$Resource$Instances$Bulkinsert; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Instances$Detachdisk; + params = {} as Params$Resource$Instances$Bulkinsert; options = {}; } @@ -49233,15 +50173,15 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/detachDisk' + '/compute/v1/projects/{project}/zones/{zone}/instances/bulkInsert' ).replace(/([^:]\/)\/+/g, '$1'), method: 'POST', }, options ), params, - requiredParams: ['project', 'zone', 'instance', 'deviceName'], - pathParams: ['instance', 'project', 'zone'], + requiredParams: ['project', 'zone'], + pathParams: ['project', 'zone'], context: this.context, }; if (callback) { @@ -49255,7 +50195,7 @@ export namespace compute_v1 { } /** - * Returns the specified Instance resource. Gets a list of available instances by making a list() request. + * Deletes the specified Instance resource. For more information, see Stopping or Deleting an Instance. * @example * ```js * // Before running the sample: @@ -49275,7 +50215,6 @@ export namespace compute_v1 { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', - * 'https://www.googleapis.com/auth/compute.readonly', * ], * }); * @@ -49284,12 +50223,18 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.instances.get({ - * // Name of the instance resource to return. + * const res = await compute.instances.delete({ + * // Name of the instance resource to delete. * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // 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. + * // + * // 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: 'placeholder-value', * // The name of the zone for this request. * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', * }); @@ -49297,44 +50242,29 @@ export namespace compute_v1 { * * // Example response * // { - * // "advancedMachineFeatures": {}, - * // "canIpForward": false, - * // "confidentialInstanceConfig": {}, - * // "cpuPlatform": "my_cpuPlatform", + * // "clientOperationId": "my_clientOperationId", * // "creationTimestamp": "my_creationTimestamp", - * // "deletionProtection": false, * // "description": "my_description", - * // "disks": [], - * // "displayDevice": {}, - * // "fingerprint": "my_fingerprint", - * // "guestAccelerators": [], - * // "hostname": "my_hostname", + * // "endTime": "my_endTime", + * // "error": {}, + * // "httpErrorMessage": "my_httpErrorMessage", + * // "httpErrorStatusCode": 0, * // "id": "my_id", + * // "insertTime": "my_insertTime", * // "kind": "my_kind", - * // "labelFingerprint": "my_labelFingerprint", - * // "labels": {}, - * // "lastStartTimestamp": "my_lastStartTimestamp", - * // "lastStopTimestamp": "my_lastStopTimestamp", - * // "lastSuspendedTimestamp": "my_lastSuspendedTimestamp", - * // "machineType": "my_machineType", - * // "metadata": {}, - * // "minCpuPlatform": "my_minCpuPlatform", * // "name": "my_name", - * // "networkInterfaces": [], - * // "postKeyRevocationActionType": "my_postKeyRevocationActionType", - * // "privateIpv6GoogleAccess": "my_privateIpv6GoogleAccess", - * // "reservationAffinity": {}, - * // "resourcePolicies": [], - * // "satisfiesPzs": false, - * // "scheduling": {}, + * // "operationGroupId": "my_operationGroupId", + * // "operationType": "my_operationType", + * // "progress": 0, + * // "region": "my_region", * // "selfLink": "my_selfLink", - * // "serviceAccounts": [], - * // "shieldedInstanceConfig": {}, - * // "shieldedInstanceIntegrityPolicy": {}, - * // "startRestricted": false, + * // "startTime": "my_startTime", * // "status": "my_status", * // "statusMessage": "my_statusMessage", - * // "tags": {}, + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "user": "my_user", + * // "warnings": [], * // "zone": "my_zone" * // } * } @@ -49351,49 +50281,49 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - get( - params: Params$Resource$Instances$Get, + delete( + params: Params$Resource$Instances$Delete, options: StreamMethodOptions ): GaxiosPromise; - get( - params?: Params$Resource$Instances$Get, + delete( + params?: Params$Resource$Instances$Delete, options?: MethodOptions - ): GaxiosPromise; - get( - params: Params$Resource$Instances$Get, + ): GaxiosPromise; + delete( + params: Params$Resource$Instances$Delete, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - get( - params: Params$Resource$Instances$Get, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + delete( + params: Params$Resource$Instances$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - get( - params: Params$Resource$Instances$Get, - callback: BodyResponseCallback + delete( + params: Params$Resource$Instances$Delete, + callback: BodyResponseCallback ): void; - get(callback: BodyResponseCallback): void; - get( + delete(callback: BodyResponseCallback): void; + delete( paramsOrCallback?: - | Params$Resource$Instances$Get - | BodyResponseCallback + | Params$Resource$Instances$Delete + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Instances$Get; + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Instances$Delete; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Instances$Get; + params = {} as Params$Resource$Instances$Delete; options = {}; } @@ -49410,7 +50340,7 @@ export namespace compute_v1 { rootUrl + '/compute/v1/projects/{project}/zones/{zone}/instances/{instance}' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'GET', + method: 'DELETE', }, options ), @@ -49420,17 +50350,17 @@ export namespace compute_v1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Returns effective firewalls applied to an interface of the instance. + * Deletes an access config from an instance's network interface. * @example * ```js * // Before running the sample: @@ -49450,7 +50380,6 @@ export namespace compute_v1 { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', - * 'https://www.googleapis.com/auth/compute.readonly', * ], * }); * @@ -49459,14 +50388,22 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.instances.getEffectiveFirewalls({ - * // Name of the instance scoping this request. - * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', - * // The name of the network interface to get the effective firewalls. + * const res = await compute.instances.deleteAccessConfig({ + * // The name of the access config to delete. + * accessConfig: 'placeholder-value', + * // The instance name for this request. + * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * // The name of the network interface. * networkInterface: 'placeholder-value', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // 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. + * // + * // 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: 'placeholder-value', * // The name of the zone for this request. * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', * }); @@ -49474,8 +50411,30 @@ export namespace compute_v1 { * * // Example response * // { - * // "firewallPolicys": [], - * // "firewalls": [] + * // "clientOperationId": "my_clientOperationId", + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "endTime": "my_endTime", + * // "error": {}, + * // "httpErrorMessage": "my_httpErrorMessage", + * // "httpErrorStatusCode": 0, + * // "id": "my_id", + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "name": "my_name", + * // "operationGroupId": "my_operationGroupId", + * // "operationType": "my_operationType", + * // "progress": 0, + * // "region": "my_region", + * // "selfLink": "my_selfLink", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "statusMessage": "my_statusMessage", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "user": "my_user", + * // "warnings": [], + * // "zone": "my_zone" * // } * } * @@ -49491,57 +50450,50 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - getEffectiveFirewalls( - params: Params$Resource$Instances$Geteffectivefirewalls, + deleteAccessConfig( + params: Params$Resource$Instances$Deleteaccessconfig, options: StreamMethodOptions ): GaxiosPromise; - getEffectiveFirewalls( - params?: Params$Resource$Instances$Geteffectivefirewalls, + deleteAccessConfig( + params?: Params$Resource$Instances$Deleteaccessconfig, options?: MethodOptions - ): GaxiosPromise; - getEffectiveFirewalls( - params: Params$Resource$Instances$Geteffectivefirewalls, + ): GaxiosPromise; + deleteAccessConfig( + params: Params$Resource$Instances$Deleteaccessconfig, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - getEffectiveFirewalls( - params: Params$Resource$Instances$Geteffectivefirewalls, - options: - | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - getEffectiveFirewalls( - params: Params$Resource$Instances$Geteffectivefirewalls, - callback: BodyResponseCallback + deleteAccessConfig( + params: Params$Resource$Instances$Deleteaccessconfig, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - getEffectiveFirewalls( - callback: BodyResponseCallback + deleteAccessConfig( + params: Params$Resource$Instances$Deleteaccessconfig, + callback: BodyResponseCallback ): void; - getEffectiveFirewalls( + deleteAccessConfig(callback: BodyResponseCallback): void; + deleteAccessConfig( paramsOrCallback?: - | Params$Resource$Instances$Geteffectivefirewalls - | BodyResponseCallback + | Params$Resource$Instances$Deleteaccessconfig + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): - | void - | GaxiosPromise - | GaxiosPromise { + ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Instances$Geteffectivefirewalls; + {}) as Params$Resource$Instances$Deleteaccessconfig; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Instances$Geteffectivefirewalls; + params = {} as Params$Resource$Instances$Deleteaccessconfig; options = {}; } @@ -49556,31 +50508,35 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/getEffectiveFirewalls' + '/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/deleteAccessConfig' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'GET', + method: 'POST', }, options ), params, - requiredParams: ['project', 'zone', 'instance', 'networkInterface'], + requiredParams: [ + 'project', + 'zone', + 'instance', + 'accessConfig', + 'networkInterface', + ], pathParams: ['instance', 'project', 'zone'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest( - parameters - ); + return createAPIRequest(parameters); } } /** - * Returns the specified guest attributes entry. + * Detaches a disk from an instance. * @example * ```js * // Before running the sample: @@ -49600,7 +50556,6 @@ export namespace compute_v1 { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', - * 'https://www.googleapis.com/auth/compute.readonly', * ], * }); * @@ -49609,16 +50564,20 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.instances.getGuestAttributes({ - * // Name of the instance scoping this request. + * const res = await compute.instances.detachDisk({ + * // The device name of the disk to detach. Make a get() request on the instance to view currently attached disks and device names. + * deviceName: 'placeholder-value', + * // Instance name for this request. * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // Specifies the guest attributes path to be queried. - * queryPath: 'placeholder-value', - * // Specifies the key for the guest attributes entry. - * variableKey: 'placeholder-value', + * // 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. + * // + * // 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: 'placeholder-value', * // The name of the zone for this request. * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', * }); @@ -49626,12 +50585,30 @@ export namespace compute_v1 { * * // Example response * // { + * // "clientOperationId": "my_clientOperationId", + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "endTime": "my_endTime", + * // "error": {}, + * // "httpErrorMessage": "my_httpErrorMessage", + * // "httpErrorStatusCode": 0, + * // "id": "my_id", + * // "insertTime": "my_insertTime", * // "kind": "my_kind", - * // "queryPath": "my_queryPath", - * // "queryValue": {}, + * // "name": "my_name", + * // "operationGroupId": "my_operationGroupId", + * // "operationType": "my_operationType", + * // "progress": 0, + * // "region": "my_region", * // "selfLink": "my_selfLink", - * // "variableKey": "my_variableKey", - * // "variableValue": "my_variableValue" + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "statusMessage": "my_statusMessage", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "user": "my_user", + * // "warnings": [], + * // "zone": "my_zone" * // } * } * @@ -49647,52 +50624,50 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - getGuestAttributes( - params: Params$Resource$Instances$Getguestattributes, + detachDisk( + params: Params$Resource$Instances$Detachdisk, options: StreamMethodOptions ): GaxiosPromise; - getGuestAttributes( - params?: Params$Resource$Instances$Getguestattributes, + detachDisk( + params?: Params$Resource$Instances$Detachdisk, options?: MethodOptions - ): GaxiosPromise; - getGuestAttributes( - params: Params$Resource$Instances$Getguestattributes, + ): GaxiosPromise; + detachDisk( + params: Params$Resource$Instances$Detachdisk, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - getGuestAttributes( - params: Params$Resource$Instances$Getguestattributes, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - getGuestAttributes( - params: Params$Resource$Instances$Getguestattributes, - callback: BodyResponseCallback + detachDisk( + params: Params$Resource$Instances$Detachdisk, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - getGuestAttributes( - callback: BodyResponseCallback + detachDisk( + params: Params$Resource$Instances$Detachdisk, + callback: BodyResponseCallback ): void; - getGuestAttributes( + detachDisk(callback: BodyResponseCallback): void; + detachDisk( paramsOrCallback?: - | Params$Resource$Instances$Getguestattributes - | BodyResponseCallback + | Params$Resource$Instances$Detachdisk + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { + ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Instances$Getguestattributes; + {}) as Params$Resource$Instances$Detachdisk; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Instances$Getguestattributes; + params = {} as Params$Resource$Instances$Detachdisk; options = {}; } @@ -49707,29 +50682,29 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/getGuestAttributes' + '/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/detachDisk' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'GET', + method: 'POST', }, options ), params, - requiredParams: ['project', 'zone', 'instance'], + requiredParams: ['project', 'zone', 'instance', 'deviceName'], pathParams: ['instance', 'project', 'zone'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Gets the access control policy for a resource. May be empty if no such policy or resource exists. + * Returns the specified Instance resource. Gets a list of available instances by making a list() request. * @example * ```js * // Before running the sample: @@ -49758,14 +50733,12 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.instances.getIamPolicy({ - * // Requested IAM Policy version. - * optionsRequestedPolicyVersion: 'placeholder-value', + * const res = await compute.instances.get({ + * // Name of the instance resource to return. + * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // Name or id of the resource for this request. - * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * // The name of the zone for this request. * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', * }); @@ -49773,37 +50746,513 @@ export namespace compute_v1 { * * // Example response * // { - * // "auditConfigs": [], - * // "bindings": [], - * // "etag": "my_etag", - * // "iamOwned": false, - * // "rules": [], - * // "version": 0 - * // } - * } - * - * main().catch(e => { - * console.error(e); - * throw e; - * }); - * - * ``` - * - * @param params - Parameters for request - * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. - * @param callback - Optional callback that handles the response. - * @returns A promise if used with async/await, or void if used with a callback. - */ - getIamPolicy( - params: Params$Resource$Instances$Getiampolicy, - options: StreamMethodOptions - ): GaxiosPromise; - getIamPolicy( - params?: Params$Resource$Instances$Getiampolicy, - options?: MethodOptions - ): GaxiosPromise; - getIamPolicy( - params: Params$Resource$Instances$Getiampolicy, + * // "advancedMachineFeatures": {}, + * // "canIpForward": false, + * // "confidentialInstanceConfig": {}, + * // "cpuPlatform": "my_cpuPlatform", + * // "creationTimestamp": "my_creationTimestamp", + * // "deletionProtection": false, + * // "description": "my_description", + * // "disks": [], + * // "displayDevice": {}, + * // "fingerprint": "my_fingerprint", + * // "guestAccelerators": [], + * // "hostname": "my_hostname", + * // "id": "my_id", + * // "kind": "my_kind", + * // "labelFingerprint": "my_labelFingerprint", + * // "labels": {}, + * // "lastStartTimestamp": "my_lastStartTimestamp", + * // "lastStopTimestamp": "my_lastStopTimestamp", + * // "lastSuspendedTimestamp": "my_lastSuspendedTimestamp", + * // "machineType": "my_machineType", + * // "metadata": {}, + * // "minCpuPlatform": "my_minCpuPlatform", + * // "name": "my_name", + * // "networkInterfaces": [], + * // "postKeyRevocationActionType": "my_postKeyRevocationActionType", + * // "privateIpv6GoogleAccess": "my_privateIpv6GoogleAccess", + * // "reservationAffinity": {}, + * // "resourcePolicies": [], + * // "satisfiesPzs": false, + * // "scheduling": {}, + * // "selfLink": "my_selfLink", + * // "serviceAccounts": [], + * // "shieldedInstanceConfig": {}, + * // "shieldedInstanceIntegrityPolicy": {}, + * // "startRestricted": false, + * // "status": "my_status", + * // "statusMessage": "my_statusMessage", + * // "tags": {}, + * // "zone": "my_zone" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Instances$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Instances$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Instances$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Instances$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Instances$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Instances$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Instances$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Instances$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/v1/projects/{project}/zones/{zone}/instances/{instance}' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['project', 'zone', 'instance'], + pathParams: ['instance', 'project', 'zone'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Returns effective firewalls applied to an interface of the instance. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.instances.getEffectiveFirewalls({ + * // Name of the instance scoping this request. + * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * // The name of the network interface to get the effective firewalls. + * networkInterface: 'placeholder-value', + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // The name of the zone for this request. + * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "firewallPolicys": [], + * // "firewalls": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + getEffectiveFirewalls( + params: Params$Resource$Instances$Geteffectivefirewalls, + options: StreamMethodOptions + ): GaxiosPromise; + getEffectiveFirewalls( + params?: Params$Resource$Instances$Geteffectivefirewalls, + options?: MethodOptions + ): GaxiosPromise; + getEffectiveFirewalls( + params: Params$Resource$Instances$Geteffectivefirewalls, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getEffectiveFirewalls( + params: Params$Resource$Instances$Geteffectivefirewalls, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getEffectiveFirewalls( + params: Params$Resource$Instances$Geteffectivefirewalls, + callback: BodyResponseCallback + ): void; + getEffectiveFirewalls( + callback: BodyResponseCallback + ): void; + getEffectiveFirewalls( + paramsOrCallback?: + | Params$Resource$Instances$Geteffectivefirewalls + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Instances$Geteffectivefirewalls; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Instances$Geteffectivefirewalls; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/getEffectiveFirewalls' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['project', 'zone', 'instance', 'networkInterface'], + pathParams: ['instance', 'project', 'zone'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Returns the specified guest attributes entry. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.instances.getGuestAttributes({ + * // Name of the instance scoping this request. + * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // Specifies the guest attributes path to be queried. + * queryPath: 'placeholder-value', + * // Specifies the key for the guest attributes entry. + * variableKey: 'placeholder-value', + * // The name of the zone for this request. + * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "kind": "my_kind", + * // "queryPath": "my_queryPath", + * // "queryValue": {}, + * // "selfLink": "my_selfLink", + * // "variableKey": "my_variableKey", + * // "variableValue": "my_variableValue" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + getGuestAttributes( + params: Params$Resource$Instances$Getguestattributes, + options: StreamMethodOptions + ): GaxiosPromise; + getGuestAttributes( + params?: Params$Resource$Instances$Getguestattributes, + options?: MethodOptions + ): GaxiosPromise; + getGuestAttributes( + params: Params$Resource$Instances$Getguestattributes, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getGuestAttributes( + params: Params$Resource$Instances$Getguestattributes, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getGuestAttributes( + params: Params$Resource$Instances$Getguestattributes, + callback: BodyResponseCallback + ): void; + getGuestAttributes( + callback: BodyResponseCallback + ): void; + getGuestAttributes( + paramsOrCallback?: + | Params$Resource$Instances$Getguestattributes + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Instances$Getguestattributes; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Instances$Getguestattributes; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/getGuestAttributes' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['project', 'zone', 'instance'], + pathParams: ['instance', 'project', 'zone'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Gets the access control policy for a resource. May be empty if no such policy or resource exists. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.instances.getIamPolicy({ + * // Requested IAM Policy version. + * optionsRequestedPolicyVersion: 'placeholder-value', + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // Name or id of the resource for this request. + * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * // The name of the zone for this request. + * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "auditConfigs": [], + * // "bindings": [], + * // "etag": "my_etag", + * // "iamOwned": false, + * // "rules": [], + * // "version": 0 + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + getIamPolicy( + params: Params$Resource$Instances$Getiampolicy, + options: StreamMethodOptions + ): GaxiosPromise; + getIamPolicy( + params?: Params$Resource$Instances$Getiampolicy, + options?: MethodOptions + ): GaxiosPromise; + getIamPolicy( + params: Params$Resource$Instances$Getiampolicy, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; @@ -52660,94 +54109,3513 @@ export namespace compute_v1 { * throw e; * }); * - * ``` + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + setScheduling( + params: Params$Resource$Instances$Setscheduling, + options: StreamMethodOptions + ): GaxiosPromise; + setScheduling( + params?: Params$Resource$Instances$Setscheduling, + options?: MethodOptions + ): GaxiosPromise; + setScheduling( + params: Params$Resource$Instances$Setscheduling, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + setScheduling( + params: Params$Resource$Instances$Setscheduling, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + setScheduling( + params: Params$Resource$Instances$Setscheduling, + callback: BodyResponseCallback + ): void; + setScheduling(callback: BodyResponseCallback): void; + setScheduling( + paramsOrCallback?: + | Params$Resource$Instances$Setscheduling + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Instances$Setscheduling; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Instances$Setscheduling; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/setScheduling' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'zone', 'instance'], + pathParams: ['instance', 'project', 'zone'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.instances.setServiceAccount({ + * // Name of the instance resource to start. + * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // 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. + * // + * // 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: 'placeholder-value', + * // The name of the zone for this request. + * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "email": "my_email", + * // "scopes": [] + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "clientOperationId": "my_clientOperationId", + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "endTime": "my_endTime", + * // "error": {}, + * // "httpErrorMessage": "my_httpErrorMessage", + * // "httpErrorStatusCode": 0, + * // "id": "my_id", + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "name": "my_name", + * // "operationGroupId": "my_operationGroupId", + * // "operationType": "my_operationType", + * // "progress": 0, + * // "region": "my_region", + * // "selfLink": "my_selfLink", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "statusMessage": "my_statusMessage", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "user": "my_user", + * // "warnings": [], + * // "zone": "my_zone" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + setServiceAccount( + params: Params$Resource$Instances$Setserviceaccount, + options: StreamMethodOptions + ): GaxiosPromise; + setServiceAccount( + params?: Params$Resource$Instances$Setserviceaccount, + options?: MethodOptions + ): GaxiosPromise; + setServiceAccount( + params: Params$Resource$Instances$Setserviceaccount, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + setServiceAccount( + params: Params$Resource$Instances$Setserviceaccount, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + setServiceAccount( + params: Params$Resource$Instances$Setserviceaccount, + callback: BodyResponseCallback + ): void; + setServiceAccount(callback: BodyResponseCallback): void; + setServiceAccount( + paramsOrCallback?: + | Params$Resource$Instances$Setserviceaccount + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Instances$Setserviceaccount; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Instances$Setserviceaccount; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/setServiceAccount' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'zone', 'instance'], + pathParams: ['instance', 'project', 'zone'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Sets the Shielded Instance integrity policy for an instance. You can only use this method on a running instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.instances.setShieldedInstanceIntegrityPolicy({ + * // Name or id of the instance scoping this request. + * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // 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. + * // + * // 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: 'placeholder-value', + * // The name of the zone for this request. + * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "updateAutoLearnPolicy": false + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "clientOperationId": "my_clientOperationId", + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "endTime": "my_endTime", + * // "error": {}, + * // "httpErrorMessage": "my_httpErrorMessage", + * // "httpErrorStatusCode": 0, + * // "id": "my_id", + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "name": "my_name", + * // "operationGroupId": "my_operationGroupId", + * // "operationType": "my_operationType", + * // "progress": 0, + * // "region": "my_region", + * // "selfLink": "my_selfLink", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "statusMessage": "my_statusMessage", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "user": "my_user", + * // "warnings": [], + * // "zone": "my_zone" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + setShieldedInstanceIntegrityPolicy( + params: Params$Resource$Instances$Setshieldedinstanceintegritypolicy, + options: StreamMethodOptions + ): GaxiosPromise; + setShieldedInstanceIntegrityPolicy( + params?: Params$Resource$Instances$Setshieldedinstanceintegritypolicy, + options?: MethodOptions + ): GaxiosPromise; + setShieldedInstanceIntegrityPolicy( + params: Params$Resource$Instances$Setshieldedinstanceintegritypolicy, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + setShieldedInstanceIntegrityPolicy( + params: Params$Resource$Instances$Setshieldedinstanceintegritypolicy, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + setShieldedInstanceIntegrityPolicy( + params: Params$Resource$Instances$Setshieldedinstanceintegritypolicy, + callback: BodyResponseCallback + ): void; + setShieldedInstanceIntegrityPolicy( + callback: BodyResponseCallback + ): void; + setShieldedInstanceIntegrityPolicy( + paramsOrCallback?: + | Params$Resource$Instances$Setshieldedinstanceintegritypolicy + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Instances$Setshieldedinstanceintegritypolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Instances$Setshieldedinstanceintegritypolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/setShieldedInstanceIntegrityPolicy' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', + }, + options + ), + params, + requiredParams: ['project', 'zone', 'instance'], + pathParams: ['instance', 'project', 'zone'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Sets network tags for the specified instance to the data included in the request. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.instances.setTags({ + * // Name of the instance scoping this request. + * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // 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. + * // + * // 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: 'placeholder-value', + * // The name of the zone for this request. + * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "fingerprint": "my_fingerprint", + * // "items": [] + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "clientOperationId": "my_clientOperationId", + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "endTime": "my_endTime", + * // "error": {}, + * // "httpErrorMessage": "my_httpErrorMessage", + * // "httpErrorStatusCode": 0, + * // "id": "my_id", + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "name": "my_name", + * // "operationGroupId": "my_operationGroupId", + * // "operationType": "my_operationType", + * // "progress": 0, + * // "region": "my_region", + * // "selfLink": "my_selfLink", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "statusMessage": "my_statusMessage", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "user": "my_user", + * // "warnings": [], + * // "zone": "my_zone" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + setTags( + params: Params$Resource$Instances$Settags, + options: StreamMethodOptions + ): GaxiosPromise; + setTags( + params?: Params$Resource$Instances$Settags, + options?: MethodOptions + ): GaxiosPromise; + setTags( + params: Params$Resource$Instances$Settags, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + setTags( + params: Params$Resource$Instances$Settags, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + setTags( + params: Params$Resource$Instances$Settags, + callback: BodyResponseCallback + ): void; + setTags(callback: BodyResponseCallback): void; + setTags( + paramsOrCallback?: + | Params$Resource$Instances$Settags + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Instances$Settags; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Instances$Settags; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/setTags' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'zone', 'instance'], + pathParams: ['instance', 'project', 'zone'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Simulates a maintenance event on the instance. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.instances.simulateMaintenanceEvent({ + * // Name of the instance scoping this request. + * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // The name of the zone for this request. + * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "clientOperationId": "my_clientOperationId", + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "endTime": "my_endTime", + * // "error": {}, + * // "httpErrorMessage": "my_httpErrorMessage", + * // "httpErrorStatusCode": 0, + * // "id": "my_id", + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "name": "my_name", + * // "operationGroupId": "my_operationGroupId", + * // "operationType": "my_operationType", + * // "progress": 0, + * // "region": "my_region", + * // "selfLink": "my_selfLink", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "statusMessage": "my_statusMessage", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "user": "my_user", + * // "warnings": [], + * // "zone": "my_zone" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + simulateMaintenanceEvent( + params: Params$Resource$Instances$Simulatemaintenanceevent, + options: StreamMethodOptions + ): GaxiosPromise; + simulateMaintenanceEvent( + params?: Params$Resource$Instances$Simulatemaintenanceevent, + options?: MethodOptions + ): GaxiosPromise; + simulateMaintenanceEvent( + params: Params$Resource$Instances$Simulatemaintenanceevent, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + simulateMaintenanceEvent( + params: Params$Resource$Instances$Simulatemaintenanceevent, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + simulateMaintenanceEvent( + params: Params$Resource$Instances$Simulatemaintenanceevent, + callback: BodyResponseCallback + ): void; + simulateMaintenanceEvent( + callback: BodyResponseCallback + ): void; + simulateMaintenanceEvent( + paramsOrCallback?: + | Params$Resource$Instances$Simulatemaintenanceevent + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Instances$Simulatemaintenanceevent; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Instances$Simulatemaintenanceevent; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/simulateMaintenanceEvent' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'zone', 'instance'], + pathParams: ['instance', 'project', 'zone'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.instances.start({ + * // Name of the instance resource to start. + * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // 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. + * // + * // 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: 'placeholder-value', + * // The name of the zone for this request. + * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "clientOperationId": "my_clientOperationId", + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "endTime": "my_endTime", + * // "error": {}, + * // "httpErrorMessage": "my_httpErrorMessage", + * // "httpErrorStatusCode": 0, + * // "id": "my_id", + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "name": "my_name", + * // "operationGroupId": "my_operationGroupId", + * // "operationType": "my_operationType", + * // "progress": 0, + * // "region": "my_region", + * // "selfLink": "my_selfLink", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "statusMessage": "my_statusMessage", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "user": "my_user", + * // "warnings": [], + * // "zone": "my_zone" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + start( + params: Params$Resource$Instances$Start, + options: StreamMethodOptions + ): GaxiosPromise; + start( + params?: Params$Resource$Instances$Start, + options?: MethodOptions + ): GaxiosPromise; + start( + params: Params$Resource$Instances$Start, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + start( + params: Params$Resource$Instances$Start, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + start( + params: Params$Resource$Instances$Start, + callback: BodyResponseCallback + ): void; + start(callback: BodyResponseCallback): void; + start( + paramsOrCallback?: + | Params$Resource$Instances$Start + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Instances$Start; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Instances$Start; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/start' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'zone', 'instance'], + pathParams: ['instance', 'project', 'zone'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.instances.startWithEncryptionKey({ + * // Name of the instance resource to start. + * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // 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. + * // + * // 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: 'placeholder-value', + * // The name of the zone for this request. + * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "disks": [] + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "clientOperationId": "my_clientOperationId", + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "endTime": "my_endTime", + * // "error": {}, + * // "httpErrorMessage": "my_httpErrorMessage", + * // "httpErrorStatusCode": 0, + * // "id": "my_id", + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "name": "my_name", + * // "operationGroupId": "my_operationGroupId", + * // "operationType": "my_operationType", + * // "progress": 0, + * // "region": "my_region", + * // "selfLink": "my_selfLink", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "statusMessage": "my_statusMessage", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "user": "my_user", + * // "warnings": [], + * // "zone": "my_zone" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + startWithEncryptionKey( + params: Params$Resource$Instances$Startwithencryptionkey, + options: StreamMethodOptions + ): GaxiosPromise; + startWithEncryptionKey( + params?: Params$Resource$Instances$Startwithencryptionkey, + options?: MethodOptions + ): GaxiosPromise; + startWithEncryptionKey( + params: Params$Resource$Instances$Startwithencryptionkey, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + startWithEncryptionKey( + params: Params$Resource$Instances$Startwithencryptionkey, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + startWithEncryptionKey( + params: Params$Resource$Instances$Startwithencryptionkey, + callback: BodyResponseCallback + ): void; + startWithEncryptionKey( + callback: BodyResponseCallback + ): void; + startWithEncryptionKey( + paramsOrCallback?: + | Params$Resource$Instances$Startwithencryptionkey + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Instances$Startwithencryptionkey; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Instances$Startwithencryptionkey; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/startWithEncryptionKey' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'zone', 'instance'], + pathParams: ['instance', 'project', 'zone'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time. Stopped instances do not incur VM usage charges while they are stopped. However, resources that the VM is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted. For more information, see Stopping an instance. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.instances.stop({ + * // Name of the instance resource to stop. + * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // 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. + * // + * // 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: 'placeholder-value', + * // The name of the zone for this request. + * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "clientOperationId": "my_clientOperationId", + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "endTime": "my_endTime", + * // "error": {}, + * // "httpErrorMessage": "my_httpErrorMessage", + * // "httpErrorStatusCode": 0, + * // "id": "my_id", + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "name": "my_name", + * // "operationGroupId": "my_operationGroupId", + * // "operationType": "my_operationType", + * // "progress": 0, + * // "region": "my_region", + * // "selfLink": "my_selfLink", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "statusMessage": "my_statusMessage", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "user": "my_user", + * // "warnings": [], + * // "zone": "my_zone" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + stop( + params: Params$Resource$Instances$Stop, + options: StreamMethodOptions + ): GaxiosPromise; + stop( + params?: Params$Resource$Instances$Stop, + options?: MethodOptions + ): GaxiosPromise; + stop( + params: Params$Resource$Instances$Stop, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + stop( + params: Params$Resource$Instances$Stop, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + stop( + params: Params$Resource$Instances$Stop, + callback: BodyResponseCallback + ): void; + stop(callback: BodyResponseCallback): void; + stop( + paramsOrCallback?: + | Params$Resource$Instances$Stop + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Instances$Stop; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Instances$Stop; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/stop' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'zone', 'instance'], + pathParams: ['instance', 'project', 'zone'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Returns permissions that a caller has on the specified resource. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.instances.testIamPermissions({ + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // Name or id of the resource for this request. + * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * // The name of the zone for this request. + * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "permissions": [] + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "permissions": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + testIamPermissions( + params: Params$Resource$Instances$Testiampermissions, + options: StreamMethodOptions + ): GaxiosPromise; + testIamPermissions( + params?: Params$Resource$Instances$Testiampermissions, + options?: MethodOptions + ): GaxiosPromise; + testIamPermissions( + params: Params$Resource$Instances$Testiampermissions, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + testIamPermissions( + params: Params$Resource$Instances$Testiampermissions, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + testIamPermissions( + params: Params$Resource$Instances$Testiampermissions, + callback: BodyResponseCallback + ): void; + testIamPermissions( + callback: BodyResponseCallback + ): void; + testIamPermissions( + paramsOrCallback?: + | Params$Resource$Instances$Testiampermissions + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Instances$Testiampermissions; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Instances$Testiampermissions; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/v1/projects/{project}/zones/{zone}/instances/{resource}/testIamPermissions' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'zone', 'resource'], + pathParams: ['project', 'resource', 'zone'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Updates an instance only if the necessary resources are available. This method can update only a specific set of instance properties. See Updating a running instance for a list of updatable instance properties. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.instances.update({ + * // Name of the instance resource to update. + * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * // Specifies the action to take when updating an instance even if the updated properties do not require it. If not specified, then Compute Engine acts based on the minimum action that the updated properties require. + * minimalAction: 'placeholder-value', + * // Specifies the most disruptive action that can be taken on the instance as part of the update. Compute Engine returns an error if the instance properties require a more disruptive action as part of the instance update. Valid options from lowest to highest are NO_EFFECT, REFRESH, and RESTART. + * mostDisruptiveAllowedAction: 'placeholder-value', + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // 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. + * // + * // 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: 'placeholder-value', + * // The name of the zone for this request. + * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "advancedMachineFeatures": {}, + * // "canIpForward": false, + * // "confidentialInstanceConfig": {}, + * // "cpuPlatform": "my_cpuPlatform", + * // "creationTimestamp": "my_creationTimestamp", + * // "deletionProtection": false, + * // "description": "my_description", + * // "disks": [], + * // "displayDevice": {}, + * // "fingerprint": "my_fingerprint", + * // "guestAccelerators": [], + * // "hostname": "my_hostname", + * // "id": "my_id", + * // "kind": "my_kind", + * // "labelFingerprint": "my_labelFingerprint", + * // "labels": {}, + * // "lastStartTimestamp": "my_lastStartTimestamp", + * // "lastStopTimestamp": "my_lastStopTimestamp", + * // "lastSuspendedTimestamp": "my_lastSuspendedTimestamp", + * // "machineType": "my_machineType", + * // "metadata": {}, + * // "minCpuPlatform": "my_minCpuPlatform", + * // "name": "my_name", + * // "networkInterfaces": [], + * // "postKeyRevocationActionType": "my_postKeyRevocationActionType", + * // "privateIpv6GoogleAccess": "my_privateIpv6GoogleAccess", + * // "reservationAffinity": {}, + * // "resourcePolicies": [], + * // "satisfiesPzs": false, + * // "scheduling": {}, + * // "selfLink": "my_selfLink", + * // "serviceAccounts": [], + * // "shieldedInstanceConfig": {}, + * // "shieldedInstanceIntegrityPolicy": {}, + * // "startRestricted": false, + * // "status": "my_status", + * // "statusMessage": "my_statusMessage", + * // "tags": {}, + * // "zone": "my_zone" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "clientOperationId": "my_clientOperationId", + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "endTime": "my_endTime", + * // "error": {}, + * // "httpErrorMessage": "my_httpErrorMessage", + * // "httpErrorStatusCode": 0, + * // "id": "my_id", + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "name": "my_name", + * // "operationGroupId": "my_operationGroupId", + * // "operationType": "my_operationType", + * // "progress": 0, + * // "region": "my_region", + * // "selfLink": "my_selfLink", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "statusMessage": "my_statusMessage", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "user": "my_user", + * // "warnings": [], + * // "zone": "my_zone" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + update( + params: Params$Resource$Instances$Update, + options: StreamMethodOptions + ): GaxiosPromise; + update( + params?: Params$Resource$Instances$Update, + options?: MethodOptions + ): GaxiosPromise; + update( + params: Params$Resource$Instances$Update, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + update( + params: Params$Resource$Instances$Update, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + update( + params: Params$Resource$Instances$Update, + callback: BodyResponseCallback + ): void; + update(callback: BodyResponseCallback): void; + update( + paramsOrCallback?: + | Params$Resource$Instances$Update + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Instances$Update; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Instances$Update; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/v1/projects/{project}/zones/{zone}/instances/{instance}' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'PUT', + }, + options + ), + params, + requiredParams: ['project', 'zone', 'instance'], + pathParams: ['instance', 'project', 'zone'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Updates the specified access config from an instance's network interface with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.instances.updateAccessConfig({ + * // The instance name for this request. + * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * // The name of the network interface where the access config is attached. + * networkInterface: 'placeholder-value', + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // 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. + * // + * // 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: 'placeholder-value', + * // The name of the zone for this request. + * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "kind": "my_kind", + * // "name": "my_name", + * // "natIP": "my_natIP", + * // "networkTier": "my_networkTier", + * // "publicPtrDomainName": "my_publicPtrDomainName", + * // "setPublicPtr": false, + * // "type": "my_type" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "clientOperationId": "my_clientOperationId", + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "endTime": "my_endTime", + * // "error": {}, + * // "httpErrorMessage": "my_httpErrorMessage", + * // "httpErrorStatusCode": 0, + * // "id": "my_id", + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "name": "my_name", + * // "operationGroupId": "my_operationGroupId", + * // "operationType": "my_operationType", + * // "progress": 0, + * // "region": "my_region", + * // "selfLink": "my_selfLink", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "statusMessage": "my_statusMessage", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "user": "my_user", + * // "warnings": [], + * // "zone": "my_zone" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + updateAccessConfig( + params: Params$Resource$Instances$Updateaccessconfig, + options: StreamMethodOptions + ): GaxiosPromise; + updateAccessConfig( + params?: Params$Resource$Instances$Updateaccessconfig, + options?: MethodOptions + ): GaxiosPromise; + updateAccessConfig( + params: Params$Resource$Instances$Updateaccessconfig, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + updateAccessConfig( + params: Params$Resource$Instances$Updateaccessconfig, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + updateAccessConfig( + params: Params$Resource$Instances$Updateaccessconfig, + callback: BodyResponseCallback + ): void; + updateAccessConfig(callback: BodyResponseCallback): void; + updateAccessConfig( + paramsOrCallback?: + | Params$Resource$Instances$Updateaccessconfig + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Instances$Updateaccessconfig; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Instances$Updateaccessconfig; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/updateAccessConfig' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'zone', 'instance', 'networkInterface'], + pathParams: ['instance', 'project', 'zone'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Updates the Display config for a VM instance. You can only use this method on a stopped VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.instances.updateDisplayDevice({ + * // Name of the instance scoping this request. + * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // 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. + * // + * // 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: 'placeholder-value', + * // The name of the zone for this request. + * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "enableDisplay": false + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "clientOperationId": "my_clientOperationId", + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "endTime": "my_endTime", + * // "error": {}, + * // "httpErrorMessage": "my_httpErrorMessage", + * // "httpErrorStatusCode": 0, + * // "id": "my_id", + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "name": "my_name", + * // "operationGroupId": "my_operationGroupId", + * // "operationType": "my_operationType", + * // "progress": 0, + * // "region": "my_region", + * // "selfLink": "my_selfLink", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "statusMessage": "my_statusMessage", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "user": "my_user", + * // "warnings": [], + * // "zone": "my_zone" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + updateDisplayDevice( + params: Params$Resource$Instances$Updatedisplaydevice, + options: StreamMethodOptions + ): GaxiosPromise; + updateDisplayDevice( + params?: Params$Resource$Instances$Updatedisplaydevice, + options?: MethodOptions + ): GaxiosPromise; + updateDisplayDevice( + params: Params$Resource$Instances$Updatedisplaydevice, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + updateDisplayDevice( + params: Params$Resource$Instances$Updatedisplaydevice, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + updateDisplayDevice( + params: Params$Resource$Instances$Updatedisplaydevice, + callback: BodyResponseCallback + ): void; + updateDisplayDevice(callback: BodyResponseCallback): void; + updateDisplayDevice( + paramsOrCallback?: + | Params$Resource$Instances$Updatedisplaydevice + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Instances$Updatedisplaydevice; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Instances$Updatedisplaydevice; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/updateDisplayDevice' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', + }, + options + ), + params, + requiredParams: ['project', 'zone', 'instance'], + pathParams: ['instance', 'project', 'zone'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Updates an instance's network interface. This method can only update an interface's alias IP range and attached network. See Modifying alias IP ranges for an existing instance for instructions on changing alias IP ranges. See Migrating a VM between networks for instructions on migrating an interface. This method follows PATCH semantics. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.instances.updateNetworkInterface({ + * // The instance name for this request. + * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * // The name of the network interface to update. + * networkInterface: 'placeholder-value', + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // 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. + * // + * // 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: 'placeholder-value', + * // The name of the zone for this request. + * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "accessConfigs": [], + * // "aliasIpRanges": [], + * // "fingerprint": "my_fingerprint", + * // "ipv6Address": "my_ipv6Address", + * // "kind": "my_kind", + * // "name": "my_name", + * // "network": "my_network", + * // "networkIP": "my_networkIP", + * // "nicType": "my_nicType", + * // "subnetwork": "my_subnetwork" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "clientOperationId": "my_clientOperationId", + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "endTime": "my_endTime", + * // "error": {}, + * // "httpErrorMessage": "my_httpErrorMessage", + * // "httpErrorStatusCode": 0, + * // "id": "my_id", + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "name": "my_name", + * // "operationGroupId": "my_operationGroupId", + * // "operationType": "my_operationType", + * // "progress": 0, + * // "region": "my_region", + * // "selfLink": "my_selfLink", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "statusMessage": "my_statusMessage", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "user": "my_user", + * // "warnings": [], + * // "zone": "my_zone" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + updateNetworkInterface( + params: Params$Resource$Instances$Updatenetworkinterface, + options: StreamMethodOptions + ): GaxiosPromise; + updateNetworkInterface( + params?: Params$Resource$Instances$Updatenetworkinterface, + options?: MethodOptions + ): GaxiosPromise; + updateNetworkInterface( + params: Params$Resource$Instances$Updatenetworkinterface, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + updateNetworkInterface( + params: Params$Resource$Instances$Updatenetworkinterface, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + updateNetworkInterface( + params: Params$Resource$Instances$Updatenetworkinterface, + callback: BodyResponseCallback + ): void; + updateNetworkInterface( + callback: BodyResponseCallback + ): void; + updateNetworkInterface( + paramsOrCallback?: + | Params$Resource$Instances$Updatenetworkinterface + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Instances$Updatenetworkinterface; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Instances$Updatenetworkinterface; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/updateNetworkInterface' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', + }, + options + ), + params, + requiredParams: ['project', 'zone', 'instance', 'networkInterface'], + pathParams: ['instance', 'project', 'zone'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Updates the Shielded Instance config for an instance. You can only use this method on a stopped instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.instances.updateShieldedInstanceConfig({ + * // Name or id of the instance scoping this request. + * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // 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. + * // + * // 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: 'placeholder-value', + * // The name of the zone for this request. + * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "enableIntegrityMonitoring": false, + * // "enableSecureBoot": false, + * // "enableVtpm": false + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "clientOperationId": "my_clientOperationId", + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "endTime": "my_endTime", + * // "error": {}, + * // "httpErrorMessage": "my_httpErrorMessage", + * // "httpErrorStatusCode": 0, + * // "id": "my_id", + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "name": "my_name", + * // "operationGroupId": "my_operationGroupId", + * // "operationType": "my_operationType", + * // "progress": 0, + * // "region": "my_region", + * // "selfLink": "my_selfLink", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "statusMessage": "my_statusMessage", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "user": "my_user", + * // "warnings": [], + * // "zone": "my_zone" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + updateShieldedInstanceConfig( + params: Params$Resource$Instances$Updateshieldedinstanceconfig, + options: StreamMethodOptions + ): GaxiosPromise; + updateShieldedInstanceConfig( + params?: Params$Resource$Instances$Updateshieldedinstanceconfig, + options?: MethodOptions + ): GaxiosPromise; + updateShieldedInstanceConfig( + params: Params$Resource$Instances$Updateshieldedinstanceconfig, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + updateShieldedInstanceConfig( + params: Params$Resource$Instances$Updateshieldedinstanceconfig, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + updateShieldedInstanceConfig( + params: Params$Resource$Instances$Updateshieldedinstanceconfig, + callback: BodyResponseCallback + ): void; + updateShieldedInstanceConfig( + callback: BodyResponseCallback + ): void; + updateShieldedInstanceConfig( + paramsOrCallback?: + | Params$Resource$Instances$Updateshieldedinstanceconfig + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Instances$Updateshieldedinstanceconfig; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Instances$Updateshieldedinstanceconfig; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/updateShieldedInstanceConfig' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', + }, + options + ), + params, + requiredParams: ['project', 'zone', 'instance'], + pathParams: ['instance', 'project', 'zone'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Instances$Addaccessconfig + extends StandardParameters { + /** + * The instance name for this request. + */ + instance?: string; + /** + * The name of the network interface to add to this instance. + */ + networkInterface?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + /** + * The name of the zone for this request. + */ + zone?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$AccessConfig; + } + export interface Params$Resource$Instances$Addresourcepolicies + extends StandardParameters { + /** + * The instance name for this request. + */ + instance?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + /** + * The name of the zone for this request. + */ + zone?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$InstancesAddResourcePoliciesRequest; + } + export interface Params$Resource$Instances$Aggregatedlist + extends StandardParameters { + /** + * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. + * + * 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) ``` + */ + filter?: string; + /** + * Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. + */ + includeAllScopes?: boolean; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + */ + maxResults?: number; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. + * + * Currently, only sorting by `name` or `creationTimestamp desc` is supported. + */ + orderBy?: string; + /** + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + */ + pageToken?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + */ + returnPartialSuccess?: boolean; + } + export interface Params$Resource$Instances$Attachdisk + extends StandardParameters { + /** + * Whether to force attach the regional disk even if it's currently attached to another instance. If you try to force attach a zonal disk to an instance, you will receive an error. + */ + forceAttach?: boolean; + /** + * The instance name for this request. + */ + instance?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + /** + * The name of the zone for this request. + */ + zone?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$AttachedDisk; + } + export interface Params$Resource$Instances$Bulkinsert + extends StandardParameters { + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + /** + * The name of the zone for this request. + */ + zone?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$BulkInsertInstanceResource; + } + export interface Params$Resource$Instances$Delete extends StandardParameters { + /** + * Name of the instance resource to delete. + */ + instance?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + /** + * The name of the zone for this request. + */ + zone?: string; + } + export interface Params$Resource$Instances$Deleteaccessconfig + extends StandardParameters { + /** + * The name of the access config to delete. + */ + accessConfig?: string; + /** + * The instance name for this request. + */ + instance?: string; + /** + * The name of the network interface. + */ + networkInterface?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + /** + * The name of the zone for this request. + */ + zone?: string; + } + export interface Params$Resource$Instances$Detachdisk + extends StandardParameters { + /** + * The device name of the disk to detach. Make a get() request on the instance to view currently attached disks and device names. + */ + deviceName?: string; + /** + * Instance name for this request. + */ + instance?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + /** + * The name of the zone for this request. + */ + zone?: string; + } + export interface Params$Resource$Instances$Get extends StandardParameters { + /** + * Name of the instance resource to return. + */ + instance?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * The name of the zone for this request. + */ + zone?: string; + } + export interface Params$Resource$Instances$Geteffectivefirewalls + extends StandardParameters { + /** + * Name of the instance scoping this request. + */ + instance?: string; + /** + * The name of the network interface to get the effective firewalls. + */ + networkInterface?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * The name of the zone for this request. + */ + zone?: string; + } + export interface Params$Resource$Instances$Getguestattributes + extends StandardParameters { + /** + * Name of the instance scoping this request. + */ + instance?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * Specifies the guest attributes path to be queried. + */ + queryPath?: string; + /** + * Specifies the key for the guest attributes entry. + */ + variableKey?: string; + /** + * The name of the zone for this request. + */ + zone?: string; + } + export interface Params$Resource$Instances$Getiampolicy + extends StandardParameters { + /** + * Requested IAM Policy version. + */ + optionsRequestedPolicyVersion?: number; + /** + * Project ID for this request. + */ + project?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + /** + * The name of the zone for this request. + */ + zone?: string; + } + export interface Params$Resource$Instances$Getscreenshot + extends StandardParameters { + /** + * Name of the instance scoping this request. + */ + instance?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * The name of the zone for this request. + */ + zone?: string; + } + export interface Params$Resource$Instances$Getserialportoutput + extends StandardParameters { + /** + * Name of the instance for this request. + */ + instance?: string; + /** + * Specifies which COM or serial port to retrieve data from. + */ + port?: number; + /** + * Project ID for this request. + */ + project?: string; + /** + * Specifies the starting byte position of the output to return. To start with the first byte of output to the specified port, omit this field or set it to `0`. + * + * If the output for that byte position is available, this field matches the `start` parameter sent with the request. If the amount of serial console output exceeds the size of the buffer (1 MB), the oldest output is discarded and is no longer available. If the requested start position refers to discarded output, the start position is adjusted to the oldest output still available, and the adjusted start position is returned as the `start` property value. + * + * You can also provide a negative start position, which translates to the most recent number of bytes written to the serial port. For example, -3 is interpreted as the most recent 3 bytes written to the serial console. + */ + start?: string; + /** + * The name of the zone for this request. + */ + zone?: string; + } + export interface Params$Resource$Instances$Getshieldedinstanceidentity + extends StandardParameters { + /** + * Name or id of the instance scoping this request. + */ + instance?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * The name of the zone for this request. + */ + zone?: string; + } + export interface Params$Resource$Instances$Insert extends StandardParameters { + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + /** + * Specifies instance template to create the instance. + * + * This field is optional. It can be a full or partial URL. For example, the following are all valid URLs to an instance template: + * - https://www.googleapis.com/compute/v1/projects/project/global/instanceTemplates/instanceTemplate + * - projects/project/global/instanceTemplates/instanceTemplate + * - global/instanceTemplates/instanceTemplate + */ + sourceInstanceTemplate?: string; + /** + * The name of the zone for this request. + */ + zone?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Instance; + } + export interface Params$Resource$Instances$List extends StandardParameters { + /** + * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. + * + * 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) ``` + */ + filter?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + */ + maxResults?: number; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. + * + * Currently, only sorting by `name` or `creationTimestamp desc` is supported. + */ + orderBy?: string; + /** + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + */ + pageToken?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + */ + returnPartialSuccess?: boolean; + /** + * The name of the zone for this request. + */ + zone?: string; + } + export interface Params$Resource$Instances$Listreferrers + extends StandardParameters { + /** + * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. + * + * 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) ``` + */ + filter?: string; + /** + * Name of the target instance scoping this request, or '-' if the request should span over all instances in the container. + */ + instance?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + */ + maxResults?: number; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. + * + * Currently, only sorting by `name` or `creationTimestamp desc` is supported. + */ + orderBy?: string; + /** + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + */ + pageToken?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + */ + returnPartialSuccess?: boolean; + /** + * The name of the zone for this request. + */ + zone?: string; + } + export interface Params$Resource$Instances$Removeresourcepolicies + extends StandardParameters { + /** + * The instance name for this request. + */ + instance?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + /** + * The name of the zone for this request. + */ + zone?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$InstancesRemoveResourcePoliciesRequest; + } + export interface Params$Resource$Instances$Reset extends StandardParameters { + /** + * Name of the instance scoping this request. + */ + instance?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + /** + * The name of the zone for this request. + */ + zone?: string; + } + export interface Params$Resource$Instances$Setdeletionprotection + extends StandardParameters { + /** + * Whether the resource should be protected against deletion. + */ + deletionProtection?: boolean; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + /** + * Name or id of the resource for this request. + */ + resource?: string; + /** + * The name of the zone for this request. + */ + zone?: string; + } + export interface Params$Resource$Instances$Setdiskautodelete + extends StandardParameters { + /** + * Whether to auto-delete the disk when the instance is deleted. + */ + autoDelete?: boolean; + /** + * The device name of the disk to modify. Make a get() request on the instance to view currently attached disks and device names. + */ + deviceName?: string; + /** + * The instance name for this request. + */ + instance?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + /** + * The name of the zone for this request. + */ + zone?: string; + } + export interface Params$Resource$Instances$Setiampolicy + extends StandardParameters { + /** + * Project ID for this request. + */ + project?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + /** + * The name of the zone for this request. + */ + zone?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$ZoneSetPolicyRequest; + } + export interface Params$Resource$Instances$Setlabels + extends StandardParameters { + /** + * Name of the instance scoping this request. + */ + instance?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + /** + * The name of the zone for this request. + */ + zone?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$InstancesSetLabelsRequest; + } + export interface Params$Resource$Instances$Setmachineresources + extends StandardParameters { + /** + * Name of the instance scoping this request. + */ + instance?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + /** + * The name of the zone for this request. + */ + zone?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$InstancesSetMachineResourcesRequest; + } + export interface Params$Resource$Instances$Setmachinetype + extends StandardParameters { + /** + * Name of the instance scoping this request. + */ + instance?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + /** + * The name of the zone for this request. + */ + zone?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$InstancesSetMachineTypeRequest; + } + export interface Params$Resource$Instances$Setmetadata + extends StandardParameters { + /** + * Name of the instance scoping this request. + */ + instance?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + /** + * The name of the zone for this request. + */ + zone?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Metadata; + } + export interface Params$Resource$Instances$Setmincpuplatform + extends StandardParameters { + /** + * Name of the instance scoping this request. + */ + instance?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + /** + * The name of the zone for this request. + */ + zone?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$InstancesSetMinCpuPlatformRequest; + } + export interface Params$Resource$Instances$Setscheduling + extends StandardParameters { + /** + * Instance name for this request. + */ + instance?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + /** + * The name of the zone for this request. + */ + zone?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Scheduling; + } + export interface Params$Resource$Instances$Setserviceaccount + extends StandardParameters { + /** + * Name of the instance resource to start. + */ + instance?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + /** + * The name of the zone for this request. + */ + zone?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$InstancesSetServiceAccountRequest; + } + export interface Params$Resource$Instances$Setshieldedinstanceintegritypolicy + extends StandardParameters { + /** + * Name or id of the instance scoping this request. + */ + instance?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + /** + * The name of the zone for this request. + */ + zone?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$ShieldedInstanceIntegrityPolicy; + } + export interface Params$Resource$Instances$Settags + extends StandardParameters { + /** + * Name of the instance scoping this request. + */ + instance?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + /** + * The name of the zone for this request. + */ + zone?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Tags; + } + export interface Params$Resource$Instances$Simulatemaintenanceevent + extends StandardParameters { + /** + * Name of the instance scoping this request. + */ + instance?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * The name of the zone for this request. + */ + zone?: string; + } + export interface Params$Resource$Instances$Start extends StandardParameters { + /** + * Name of the instance resource to start. + */ + instance?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + /** + * The name of the zone for this request. + */ + zone?: string; + } + export interface Params$Resource$Instances$Startwithencryptionkey + extends StandardParameters { + /** + * Name of the instance resource to start. + */ + instance?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + /** + * The name of the zone for this request. + */ + zone?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$InstancesStartWithEncryptionKeyRequest; + } + export interface Params$Resource$Instances$Stop extends StandardParameters { + /** + * Name of the instance resource to stop. + */ + instance?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + /** + * The name of the zone for this request. + */ + zone?: string; + } + export interface Params$Resource$Instances$Testiampermissions + extends StandardParameters { + /** + * Project ID for this request. + */ + project?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + /** + * The name of the zone for this request. + */ + zone?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$TestPermissionsRequest; + } + export interface Params$Resource$Instances$Update extends StandardParameters { + /** + * Name of the instance resource to update. + */ + instance?: string; + /** + * Specifies the action to take when updating an instance even if the updated properties do not require it. If not specified, then Compute Engine acts based on the minimum action that the updated properties require. + */ + minimalAction?: string; + /** + * Specifies the most disruptive action that can be taken on the instance as part of the update. Compute Engine returns an error if the instance properties require a more disruptive action as part of the instance update. Valid options from lowest to highest are NO_EFFECT, REFRESH, and RESTART. + */ + mostDisruptiveAllowedAction?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + /** + * The name of the zone for this request. + */ + zone?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Instance; + } + export interface Params$Resource$Instances$Updateaccessconfig + extends StandardParameters { + /** + * The instance name for this request. + */ + instance?: string; + /** + * The name of the network interface where the access config is attached. + */ + networkInterface?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + /** + * The name of the zone for this request. + */ + zone?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$AccessConfig; + } + export interface Params$Resource$Instances$Updatedisplaydevice + extends StandardParameters { + /** + * Name of the instance scoping this request. + */ + instance?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + /** + * The name of the zone for this request. + */ + zone?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$DisplayDevice; + } + export interface Params$Resource$Instances$Updatenetworkinterface + extends StandardParameters { + /** + * The instance name for this request. + */ + instance?: string; + /** + * The name of the network interface to update. + */ + networkInterface?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + /** + * The name of the zone for this request. + */ + zone?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$NetworkInterface; + } + export interface Params$Resource$Instances$Updateshieldedinstanceconfig + extends StandardParameters { + /** + * Name or id of the instance scoping this request. + */ + instance?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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. * - * @param params - Parameters for request - * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. - * @param callback - Optional callback that handles the response. - * @returns A promise if used with async/await, or void if used with a callback. + * The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). */ - setScheduling( - params: Params$Resource$Instances$Setscheduling, - options: StreamMethodOptions - ): GaxiosPromise; - setScheduling( - params?: Params$Resource$Instances$Setscheduling, - options?: MethodOptions - ): GaxiosPromise; - setScheduling( - params: Params$Resource$Instances$Setscheduling, - options: StreamMethodOptions | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - setScheduling( - params: Params$Resource$Instances$Setscheduling, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - setScheduling( - params: Params$Resource$Instances$Setscheduling, - callback: BodyResponseCallback - ): void; - setScheduling(callback: BodyResponseCallback): void; - setScheduling( - paramsOrCallback?: - | Params$Resource$Instances$Setscheduling - | BodyResponseCallback - | BodyResponseCallback, - optionsOrCallback?: - | MethodOptions - | StreamMethodOptions - | BodyResponseCallback - | BodyResponseCallback, - callback?: - | BodyResponseCallback - | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { - let params = (paramsOrCallback || - {}) as Params$Resource$Instances$Setscheduling; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Instances$Setscheduling; - options = {}; - } + requestId?: string; + /** + * The name of the zone for this request. + */ + zone?: string; - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } + /** + * Request body metadata + */ + requestBody?: Schema$ShieldedInstanceConfig; + } - const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: ( - rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/setScheduling' - ).replace(/([^:]\/)\/+/g, '$1'), - method: 'POST', - }, - options - ), - params, - requiredParams: ['project', 'zone', 'instance'], - pathParams: ['instance', 'project', 'zone'], - context: this.context, - }; - if (callback) { - createAPIRequest( - parameters, - callback as BodyResponseCallback - ); - } else { - return createAPIRequest(parameters); - } + export class Resource$Instancetemplates { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; } /** - * Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance. + * Deletes the specified instance template. Deleting an instance template is permanent and cannot be undone. It is not possible to delete templates that are already in use by a managed instance group. * @example * ```js * // Before running the sample: @@ -52775,9 +57643,9 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.instances.setServiceAccount({ - * // Name of the instance resource to start. - * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * const res = await compute.instanceTemplates.delete({ + * // The name of the instance template to delete. + * instanceTemplate: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', @@ -52787,17 +57655,6 @@ export namespace compute_v1 { * // * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). * requestId: 'placeholder-value', - * // The name of the zone for this request. - * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "email": "my_email", - * // "scopes": [] - * // } - * }, * }); * console.log(res.data); * @@ -52842,32 +57699,32 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - setServiceAccount( - params: Params$Resource$Instances$Setserviceaccount, + delete( + params: Params$Resource$Instancetemplates$Delete, options: StreamMethodOptions ): GaxiosPromise; - setServiceAccount( - params?: Params$Resource$Instances$Setserviceaccount, + delete( + params?: Params$Resource$Instancetemplates$Delete, options?: MethodOptions ): GaxiosPromise; - setServiceAccount( - params: Params$Resource$Instances$Setserviceaccount, + delete( + params: Params$Resource$Instancetemplates$Delete, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - setServiceAccount( - params: Params$Resource$Instances$Setserviceaccount, + delete( + params: Params$Resource$Instancetemplates$Delete, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - setServiceAccount( - params: Params$Resource$Instances$Setserviceaccount, + delete( + params: Params$Resource$Instancetemplates$Delete, callback: BodyResponseCallback ): void; - setServiceAccount(callback: BodyResponseCallback): void; - setServiceAccount( + delete(callback: BodyResponseCallback): void; + delete( paramsOrCallback?: - | Params$Resource$Instances$Setserviceaccount + | Params$Resource$Instancetemplates$Delete | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -52880,12 +57737,12 @@ export namespace compute_v1 { | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Instances$Setserviceaccount; + {}) as Params$Resource$Instancetemplates$Delete; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Instances$Setserviceaccount; + params = {} as Params$Resource$Instancetemplates$Delete; options = {}; } @@ -52900,15 +57757,15 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/setServiceAccount' + '/compute/v1/projects/{project}/global/instanceTemplates/{instanceTemplate}' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'POST', + method: 'DELETE', }, options ), params, - requiredParams: ['project', 'zone', 'instance'], - pathParams: ['instance', 'project', 'zone'], + requiredParams: ['project', 'instanceTemplate'], + pathParams: ['instanceTemplate', 'project'], context: this.context, }; if (callback) { @@ -52922,7 +57779,7 @@ export namespace compute_v1 { } /** - * Sets the Shielded Instance integrity policy for an instance. You can only use this method on a running instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. + * Returns the specified instance template. Gets a list of available instance templates by making a list() request. * @example * ```js * // Before running the sample: @@ -52942,6 +57799,7 @@ export namespace compute_v1 { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', * ], * }); * @@ -52950,57 +57808,26 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.instances.setShieldedInstanceIntegrityPolicy({ - * // Name or id of the instance scoping this request. - * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * const res = await compute.instanceTemplates.get({ + * // The name of the instance template. + * instanceTemplate: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // 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. - * // - * // 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: 'placeholder-value', - * // The name of the zone for this request. - * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "updateAutoLearnPolicy": false - * // } - * }, * }); * console.log(res.data); * * // Example response * // { - * // "clientOperationId": "my_clientOperationId", * // "creationTimestamp": "my_creationTimestamp", * // "description": "my_description", - * // "endTime": "my_endTime", - * // "error": {}, - * // "httpErrorMessage": "my_httpErrorMessage", - * // "httpErrorStatusCode": 0, * // "id": "my_id", - * // "insertTime": "my_insertTime", * // "kind": "my_kind", * // "name": "my_name", - * // "operationGroupId": "my_operationGroupId", - * // "operationType": "my_operationType", - * // "progress": 0, - * // "region": "my_region", + * // "properties": {}, * // "selfLink": "my_selfLink", - * // "startTime": "my_startTime", - * // "status": "my_status", - * // "statusMessage": "my_statusMessage", - * // "targetId": "my_targetId", - * // "targetLink": "my_targetLink", - * // "user": "my_user", - * // "warnings": [], - * // "zone": "my_zone" + * // "sourceInstance": "my_sourceInstance", + * // "sourceInstanceParams": {} * // } * } * @@ -53016,52 +57843,50 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - setShieldedInstanceIntegrityPolicy( - params: Params$Resource$Instances$Setshieldedinstanceintegritypolicy, + get( + params: Params$Resource$Instancetemplates$Get, options: StreamMethodOptions ): GaxiosPromise; - setShieldedInstanceIntegrityPolicy( - params?: Params$Resource$Instances$Setshieldedinstanceintegritypolicy, + get( + params?: Params$Resource$Instancetemplates$Get, options?: MethodOptions - ): GaxiosPromise; - setShieldedInstanceIntegrityPolicy( - params: Params$Resource$Instances$Setshieldedinstanceintegritypolicy, + ): GaxiosPromise; + get( + params: Params$Resource$Instancetemplates$Get, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - setShieldedInstanceIntegrityPolicy( - params: Params$Resource$Instances$Setshieldedinstanceintegritypolicy, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - setShieldedInstanceIntegrityPolicy( - params: Params$Resource$Instances$Setshieldedinstanceintegritypolicy, - callback: BodyResponseCallback + get( + params: Params$Resource$Instancetemplates$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - setShieldedInstanceIntegrityPolicy( - callback: BodyResponseCallback + get( + params: Params$Resource$Instancetemplates$Get, + callback: BodyResponseCallback ): void; - setShieldedInstanceIntegrityPolicy( + get(callback: BodyResponseCallback): void; + get( paramsOrCallback?: - | Params$Resource$Instances$Setshieldedinstanceintegritypolicy - | BodyResponseCallback + | Params$Resource$Instancetemplates$Get + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { + ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Instances$Setshieldedinstanceintegritypolicy; + {}) as Params$Resource$Instancetemplates$Get; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Instances$Setshieldedinstanceintegritypolicy; + params = {} as Params$Resource$Instancetemplates$Get; options = {}; } @@ -53076,29 +57901,29 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/setShieldedInstanceIntegrityPolicy' + '/compute/v1/projects/{project}/global/instanceTemplates/{instanceTemplate}' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'PATCH', + method: 'GET', }, options ), params, - requiredParams: ['project', 'zone', 'instance'], - pathParams: ['instance', 'project', 'zone'], + requiredParams: ['project', 'instanceTemplate'], + pathParams: ['instanceTemplate', 'project'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Sets network tags for the specified instance to the data included in the request. + * Gets the access control policy for a resource. May be empty if no such policy or resource exists. * @example * ```js * // Before running the sample: @@ -53118,6 +57943,7 @@ export namespace compute_v1 { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', * ], * }); * @@ -53126,58 +57952,25 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.instances.setTags({ - * // Name of the instance scoping this request. - * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * const res = await compute.instanceTemplates.getIamPolicy({ + * // Requested IAM Policy version. + * optionsRequestedPolicyVersion: 'placeholder-value', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // 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. - * // - * // 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: 'placeholder-value', - * // The name of the zone for this request. - * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "fingerprint": "my_fingerprint", - * // "items": [] - * // } - * }, + * // Name or id of the resource for this request. + * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * }); * console.log(res.data); * * // Example response * // { - * // "clientOperationId": "my_clientOperationId", - * // "creationTimestamp": "my_creationTimestamp", - * // "description": "my_description", - * // "endTime": "my_endTime", - * // "error": {}, - * // "httpErrorMessage": "my_httpErrorMessage", - * // "httpErrorStatusCode": 0, - * // "id": "my_id", - * // "insertTime": "my_insertTime", - * // "kind": "my_kind", - * // "name": "my_name", - * // "operationGroupId": "my_operationGroupId", - * // "operationType": "my_operationType", - * // "progress": 0, - * // "region": "my_region", - * // "selfLink": "my_selfLink", - * // "startTime": "my_startTime", - * // "status": "my_status", - * // "statusMessage": "my_statusMessage", - * // "targetId": "my_targetId", - * // "targetLink": "my_targetLink", - * // "user": "my_user", - * // "warnings": [], - * // "zone": "my_zone" + * // "auditConfigs": [], + * // "bindings": [], + * // "etag": "my_etag", + * // "iamOwned": false, + * // "rules": [], + * // "version": 0 * // } * } * @@ -53193,50 +57986,50 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - setTags( - params: Params$Resource$Instances$Settags, + getIamPolicy( + params: Params$Resource$Instancetemplates$Getiampolicy, options: StreamMethodOptions ): GaxiosPromise; - setTags( - params?: Params$Resource$Instances$Settags, + getIamPolicy( + params?: Params$Resource$Instancetemplates$Getiampolicy, options?: MethodOptions - ): GaxiosPromise; - setTags( - params: Params$Resource$Instances$Settags, + ): GaxiosPromise; + getIamPolicy( + params: Params$Resource$Instancetemplates$Getiampolicy, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - setTags( - params: Params$Resource$Instances$Settags, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + getIamPolicy( + params: Params$Resource$Instancetemplates$Getiampolicy, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - setTags( - params: Params$Resource$Instances$Settags, - callback: BodyResponseCallback + getIamPolicy( + params: Params$Resource$Instancetemplates$Getiampolicy, + callback: BodyResponseCallback ): void; - setTags(callback: BodyResponseCallback): void; - setTags( + getIamPolicy(callback: BodyResponseCallback): void; + getIamPolicy( paramsOrCallback?: - | Params$Resource$Instances$Settags - | BodyResponseCallback + | Params$Resource$Instancetemplates$Getiampolicy + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { + ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Instances$Settags; + {}) as Params$Resource$Instancetemplates$Getiampolicy; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Instances$Settags; + params = {} as Params$Resource$Instancetemplates$Getiampolicy; options = {}; } @@ -53251,29 +58044,29 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/setTags' + '/compute/v1/projects/{project}/global/instanceTemplates/{resource}/getIamPolicy' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'POST', + method: 'GET', }, options ), params, - requiredParams: ['project', 'zone', 'instance'], - pathParams: ['instance', 'project', 'zone'], + requiredParams: ['project', 'resource'], + pathParams: ['project', 'resource'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Simulates a maintenance event on the instance. + * Creates an instance template in the specified project using the data that is included in the request. If you are creating a new template to update an existing instance group, your new instance template must use the same network or, if applicable, the same subnetwork as the original template. * @example * ```js * // Before running the sample: @@ -53301,14 +58094,32 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.instances.simulateMaintenanceEvent({ - * // Name of the instance scoping this request. - * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * const res = await compute.instanceTemplates.insert({ * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // The name of the zone for this request. - * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * // 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. + * // + * // 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: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "id": "my_id", + * // "kind": "my_kind", + * // "name": "my_name", + * // "properties": {}, + * // "selfLink": "my_selfLink", + * // "sourceInstance": "my_sourceInstance", + * // "sourceInstanceParams": {} + * // } + * }, * }); * console.log(res.data); * @@ -53353,34 +58164,32 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - simulateMaintenanceEvent( - params: Params$Resource$Instances$Simulatemaintenanceevent, + insert( + params: Params$Resource$Instancetemplates$Insert, options: StreamMethodOptions ): GaxiosPromise; - simulateMaintenanceEvent( - params?: Params$Resource$Instances$Simulatemaintenanceevent, + insert( + params?: Params$Resource$Instancetemplates$Insert, options?: MethodOptions ): GaxiosPromise; - simulateMaintenanceEvent( - params: Params$Resource$Instances$Simulatemaintenanceevent, + insert( + params: Params$Resource$Instancetemplates$Insert, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - simulateMaintenanceEvent( - params: Params$Resource$Instances$Simulatemaintenanceevent, + insert( + params: Params$Resource$Instancetemplates$Insert, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - simulateMaintenanceEvent( - params: Params$Resource$Instances$Simulatemaintenanceevent, - callback: BodyResponseCallback - ): void; - simulateMaintenanceEvent( + insert( + params: Params$Resource$Instancetemplates$Insert, callback: BodyResponseCallback ): void; - simulateMaintenanceEvent( + insert(callback: BodyResponseCallback): void; + insert( paramsOrCallback?: - | Params$Resource$Instances$Simulatemaintenanceevent + | Params$Resource$Instancetemplates$Insert | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -53393,12 +58202,12 @@ export namespace compute_v1 { | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Instances$Simulatemaintenanceevent; + {}) as Params$Resource$Instancetemplates$Insert; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Instances$Simulatemaintenanceevent; + params = {} as Params$Resource$Instancetemplates$Insert; options = {}; } @@ -53413,15 +58222,15 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/simulateMaintenanceEvent' + '/compute/v1/projects/{project}/global/instanceTemplates' ).replace(/([^:]\/)\/+/g, '$1'), method: 'POST', }, options ), params, - requiredParams: ['project', 'zone', 'instance'], - pathParams: ['instance', 'project', 'zone'], + requiredParams: ['project'], + pathParams: ['project'], context: this.context, }; if (callback) { @@ -53435,7 +58244,7 @@ export namespace compute_v1 { } /** - * Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance. + * Retrieves a list of instance templates that are contained within the specified project. * @example * ```js * // Before running the sample: @@ -53455,6 +58264,7 @@ export namespace compute_v1 { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', * ], * }); * @@ -53463,49 +58273,41 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.instances.start({ - * // Name of the instance resource to start. - * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * const res = await compute.instanceTemplates.list({ + * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. + * // + * // 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) ``` + * filter: 'placeholder-value', + * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * maxResults: 'placeholder-value', + * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * // + * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. + * // + * // Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * orderBy: 'placeholder-value', + * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * pageToken: 'placeholder-value', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // 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. - * // - * // 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: 'placeholder-value', - * // The name of the zone for this request. - * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + * returnPartialSuccess: 'placeholder-value', * }); * console.log(res.data); * * // Example response - * // { - * // "clientOperationId": "my_clientOperationId", - * // "creationTimestamp": "my_creationTimestamp", - * // "description": "my_description", - * // "endTime": "my_endTime", - * // "error": {}, - * // "httpErrorMessage": "my_httpErrorMessage", - * // "httpErrorStatusCode": 0, - * // "id": "my_id", - * // "insertTime": "my_insertTime", - * // "kind": "my_kind", - * // "name": "my_name", - * // "operationGroupId": "my_operationGroupId", - * // "operationType": "my_operationType", - * // "progress": 0, - * // "region": "my_region", - * // "selfLink": "my_selfLink", - * // "startTime": "my_startTime", - * // "status": "my_status", - * // "statusMessage": "my_statusMessage", - * // "targetId": "my_targetId", - * // "targetLink": "my_targetLink", - * // "user": "my_user", - * // "warnings": [], - * // "zone": "my_zone" + * // { + * // "id": "my_id", + * // "items": [], + * // "kind": "my_kind", + * // "nextPageToken": "my_nextPageToken", + * // "selfLink": "my_selfLink", + * // "warning": {} * // } * } * @@ -53521,49 +58323,55 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - start( - params: Params$Resource$Instances$Start, + list( + params: Params$Resource$Instancetemplates$List, options: StreamMethodOptions ): GaxiosPromise; - start( - params?: Params$Resource$Instances$Start, + list( + params?: Params$Resource$Instancetemplates$List, options?: MethodOptions - ): GaxiosPromise; - start( - params: Params$Resource$Instances$Start, + ): GaxiosPromise; + list( + params: Params$Resource$Instancetemplates$List, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - start( - params: Params$Resource$Instances$Start, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + list( + params: Params$Resource$Instancetemplates$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - start( - params: Params$Resource$Instances$Start, - callback: BodyResponseCallback + list( + params: Params$Resource$Instancetemplates$List, + callback: BodyResponseCallback ): void; - start(callback: BodyResponseCallback): void; - start( + list(callback: BodyResponseCallback): void; + list( paramsOrCallback?: - | Params$Resource$Instances$Start - | BodyResponseCallback + | Params$Resource$Instancetemplates$List + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Instances$Start; + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Instancetemplates$List; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Instances$Start; + params = {} as Params$Resource$Instancetemplates$List; options = {}; } @@ -53578,29 +58386,29 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/start' + '/compute/v1/projects/{project}/global/instanceTemplates' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'POST', + method: 'GET', }, options ), params, - requiredParams: ['project', 'zone', 'instance'], - pathParams: ['instance', 'project', 'zone'], + requiredParams: ['project'], + pathParams: ['project'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance. + * Sets the access control policy on the specified resource. Replaces any existing policy. * @example * ```js * // Before running the sample: @@ -53628,26 +58436,20 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.instances.startWithEncryptionKey({ - * // Name of the instance resource to start. - * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * const res = await compute.instanceTemplates.setIamPolicy({ * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // 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. - * // - * // 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: 'placeholder-value', - * // The name of the zone for this request. - * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * // Name or id of the resource for this request. + * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * * // Request body metadata * requestBody: { * // request body parameters * // { - * // "disks": [] + * // "bindings": [], + * // "etag": "my_etag", + * // "policy": {} * // } * }, * }); @@ -53655,30 +58457,12 @@ export namespace compute_v1 { * * // Example response * // { - * // "clientOperationId": "my_clientOperationId", - * // "creationTimestamp": "my_creationTimestamp", - * // "description": "my_description", - * // "endTime": "my_endTime", - * // "error": {}, - * // "httpErrorMessage": "my_httpErrorMessage", - * // "httpErrorStatusCode": 0, - * // "id": "my_id", - * // "insertTime": "my_insertTime", - * // "kind": "my_kind", - * // "name": "my_name", - * // "operationGroupId": "my_operationGroupId", - * // "operationType": "my_operationType", - * // "progress": 0, - * // "region": "my_region", - * // "selfLink": "my_selfLink", - * // "startTime": "my_startTime", - * // "status": "my_status", - * // "statusMessage": "my_statusMessage", - * // "targetId": "my_targetId", - * // "targetLink": "my_targetLink", - * // "user": "my_user", - * // "warnings": [], - * // "zone": "my_zone" + * // "auditConfigs": [], + * // "bindings": [], + * // "etag": "my_etag", + * // "iamOwned": false, + * // "rules": [], + * // "version": 0 * // } * } * @@ -53694,52 +58478,50 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - startWithEncryptionKey( - params: Params$Resource$Instances$Startwithencryptionkey, + setIamPolicy( + params: Params$Resource$Instancetemplates$Setiampolicy, options: StreamMethodOptions ): GaxiosPromise; - startWithEncryptionKey( - params?: Params$Resource$Instances$Startwithencryptionkey, + setIamPolicy( + params?: Params$Resource$Instancetemplates$Setiampolicy, options?: MethodOptions - ): GaxiosPromise; - startWithEncryptionKey( - params: Params$Resource$Instances$Startwithencryptionkey, + ): GaxiosPromise; + setIamPolicy( + params: Params$Resource$Instancetemplates$Setiampolicy, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - startWithEncryptionKey( - params: Params$Resource$Instances$Startwithencryptionkey, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - startWithEncryptionKey( - params: Params$Resource$Instances$Startwithencryptionkey, - callback: BodyResponseCallback + setIamPolicy( + params: Params$Resource$Instancetemplates$Setiampolicy, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - startWithEncryptionKey( - callback: BodyResponseCallback + setIamPolicy( + params: Params$Resource$Instancetemplates$Setiampolicy, + callback: BodyResponseCallback ): void; - startWithEncryptionKey( + setIamPolicy(callback: BodyResponseCallback): void; + setIamPolicy( paramsOrCallback?: - | Params$Resource$Instances$Startwithencryptionkey - | BodyResponseCallback + | Params$Resource$Instancetemplates$Setiampolicy + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { + ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Instances$Startwithencryptionkey; + {}) as Params$Resource$Instancetemplates$Setiampolicy; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Instances$Startwithencryptionkey; + params = {} as Params$Resource$Instancetemplates$Setiampolicy; options = {}; } @@ -53754,29 +58536,29 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/startWithEncryptionKey' + '/compute/v1/projects/{project}/global/instanceTemplates/{resource}/setIamPolicy' ).replace(/([^:]\/)\/+/g, '$1'), method: 'POST', }, options ), params, - requiredParams: ['project', 'zone', 'instance'], - pathParams: ['instance', 'project', 'zone'], + requiredParams: ['project', 'resource'], + pathParams: ['project', 'resource'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time. Stopped instances do not incur VM usage charges while they are stopped. However, resources that the VM is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted. For more information, see Stopping an instance. + * Returns permissions that a caller has on the specified resource. * @example * ```js * // Before running the sample: @@ -53796,6 +58578,7 @@ export namespace compute_v1 { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', * ], * }); * @@ -53804,49 +58587,26 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.instances.stop({ - * // Name of the instance resource to stop. - * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * const res = await compute.instanceTemplates.testIamPermissions({ * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // 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. - * // - * // 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: 'placeholder-value', - * // The name of the zone for this request. - * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * // Name or id of the resource for this request. + * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "permissions": [] + * // } + * }, * }); * console.log(res.data); * * // Example response * // { - * // "clientOperationId": "my_clientOperationId", - * // "creationTimestamp": "my_creationTimestamp", - * // "description": "my_description", - * // "endTime": "my_endTime", - * // "error": {}, - * // "httpErrorMessage": "my_httpErrorMessage", - * // "httpErrorStatusCode": 0, - * // "id": "my_id", - * // "insertTime": "my_insertTime", - * // "kind": "my_kind", - * // "name": "my_name", - * // "operationGroupId": "my_operationGroupId", - * // "operationType": "my_operationType", - * // "progress": 0, - * // "region": "my_region", - * // "selfLink": "my_selfLink", - * // "startTime": "my_startTime", - * // "status": "my_status", - * // "statusMessage": "my_statusMessage", - * // "targetId": "my_targetId", - * // "targetLink": "my_targetLink", - * // "user": "my_user", - * // "warnings": [], - * // "zone": "my_zone" + * // "permissions": [] * // } * } * @@ -53862,49 +58622,57 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - stop( - params: Params$Resource$Instances$Stop, + testIamPermissions( + params: Params$Resource$Instancetemplates$Testiampermissions, options: StreamMethodOptions ): GaxiosPromise; - stop( - params?: Params$Resource$Instances$Stop, + testIamPermissions( + params?: Params$Resource$Instancetemplates$Testiampermissions, options?: MethodOptions - ): GaxiosPromise; - stop( - params: Params$Resource$Instances$Stop, + ): GaxiosPromise; + testIamPermissions( + params: Params$Resource$Instancetemplates$Testiampermissions, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - stop( - params: Params$Resource$Instances$Stop, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + testIamPermissions( + params: Params$Resource$Instancetemplates$Testiampermissions, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - stop( - params: Params$Resource$Instances$Stop, - callback: BodyResponseCallback + testIamPermissions( + params: Params$Resource$Instancetemplates$Testiampermissions, + callback: BodyResponseCallback ): void; - stop(callback: BodyResponseCallback): void; - stop( + testIamPermissions( + callback: BodyResponseCallback + ): void; + testIamPermissions( paramsOrCallback?: - | Params$Resource$Instances$Stop - | BodyResponseCallback + | Params$Resource$Instancetemplates$Testiampermissions + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Instances$Stop; + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Instancetemplates$Testiampermissions; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Instances$Stop; + params = {} as Params$Resource$Instancetemplates$Testiampermissions; options = {}; } @@ -53919,29 +58687,171 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/stop' + '/compute/v1/projects/{project}/global/instanceTemplates/{resource}/testIamPermissions' ).replace(/([^:]\/)\/+/g, '$1'), method: 'POST', }, options ), params, - requiredParams: ['project', 'zone', 'instance'], - pathParams: ['instance', 'project', 'zone'], + requiredParams: ['project', 'resource'], + pathParams: ['project', 'resource'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } + } + export interface Params$Resource$Instancetemplates$Delete + extends StandardParameters { /** - * Returns permissions that a caller has on the specified resource. + * The name of the instance template to delete. + */ + instanceTemplate?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + } + export interface Params$Resource$Instancetemplates$Get + extends StandardParameters { + /** + * The name of the instance template. + */ + instanceTemplate?: string; + /** + * Project ID for this request. + */ + project?: string; + } + export interface Params$Resource$Instancetemplates$Getiampolicy + extends StandardParameters { + /** + * Requested IAM Policy version. + */ + optionsRequestedPolicyVersion?: number; + /** + * Project ID for this request. + */ + project?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + } + export interface Params$Resource$Instancetemplates$Insert + extends StandardParameters { + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + + /** + * Request body metadata + */ + requestBody?: Schema$InstanceTemplate; + } + export interface Params$Resource$Instancetemplates$List + extends StandardParameters { + /** + * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. + * + * 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) ``` + */ + filter?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + */ + maxResults?: number; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. + * + * Currently, only sorting by `name` or `creationTimestamp desc` is supported. + */ + orderBy?: string; + /** + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + */ + pageToken?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + */ + returnPartialSuccess?: boolean; + } + export interface Params$Resource$Instancetemplates$Setiampolicy + extends StandardParameters { + /** + * Project ID for this request. + */ + project?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GlobalSetPolicyRequest; + } + export interface Params$Resource$Instancetemplates$Testiampermissions + extends StandardParameters { + /** + * Project ID for this request. + */ + project?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$TestPermissionsRequest; + } + + export class Resource$Interconnectattachments { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Retrieves an aggregated list of interconnect attachments. * @example * ```js * // Before running the sample: @@ -53970,28 +58880,44 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.instances.testIamPermissions({ + * const res = await compute.interconnectAttachments.aggregatedList({ + * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. + * // + * // 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) ``` + * filter: 'placeholder-value', + * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. + * includeAllScopes: 'placeholder-value', + * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * maxResults: 'placeholder-value', + * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * // + * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. + * // + * // Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * orderBy: 'placeholder-value', + * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * pageToken: 'placeholder-value', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // Name or id of the resource for this request. - * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', - * // The name of the zone for this request. - * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "permissions": [] - * // } - * }, + * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + * returnPartialSuccess: 'placeholder-value', * }); * console.log(res.data); * * // Example response * // { - * // "permissions": [] + * // "id": "my_id", + * // "items": {}, + * // "kind": "my_kind", + * // "nextPageToken": "my_nextPageToken", + * // "selfLink": "my_selfLink", + * // "unreachables": [], + * // "warning": {} * // } * } * @@ -54007,57 +58933,57 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - testIamPermissions( - params: Params$Resource$Instances$Testiampermissions, + aggregatedList( + params: Params$Resource$Interconnectattachments$Aggregatedlist, options: StreamMethodOptions ): GaxiosPromise; - testIamPermissions( - params?: Params$Resource$Instances$Testiampermissions, + aggregatedList( + params?: Params$Resource$Interconnectattachments$Aggregatedlist, options?: MethodOptions - ): GaxiosPromise; - testIamPermissions( - params: Params$Resource$Instances$Testiampermissions, + ): GaxiosPromise; + aggregatedList( + params: Params$Resource$Interconnectattachments$Aggregatedlist, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - testIamPermissions( - params: Params$Resource$Instances$Testiampermissions, + aggregatedList( + params: Params$Resource$Interconnectattachments$Aggregatedlist, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - testIamPermissions( - params: Params$Resource$Instances$Testiampermissions, - callback: BodyResponseCallback + aggregatedList( + params: Params$Resource$Interconnectattachments$Aggregatedlist, + callback: BodyResponseCallback ): void; - testIamPermissions( - callback: BodyResponseCallback + aggregatedList( + callback: BodyResponseCallback ): void; - testIamPermissions( + aggregatedList( paramsOrCallback?: - | Params$Resource$Instances$Testiampermissions - | BodyResponseCallback + | Params$Resource$Interconnectattachments$Aggregatedlist + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Instances$Testiampermissions; + {}) as Params$Resource$Interconnectattachments$Aggregatedlist; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Instances$Testiampermissions; + params = {} as Params$Resource$Interconnectattachments$Aggregatedlist; options = {}; } @@ -54072,29 +58998,31 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/instances/{resource}/testIamPermissions' + '/compute/v1/projects/{project}/aggregated/interconnectAttachments' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'POST', + method: 'GET', }, options ), params, - requiredParams: ['project', 'zone', 'resource'], - pathParams: ['project', 'resource', 'zone'], + requiredParams: ['project'], + pathParams: ['project'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest( + parameters + ); } } /** - * Updates an instance only if the necessary resources are available. This method can update only a specific set of instance properties. See Updating a running instance for a list of updatable instance properties. + * Deletes the specified interconnect attachment. * @example * ```js * // Before running the sample: @@ -54122,70 +59050,21 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.instances.update({ - * // Name of the instance resource to update. - * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', - * // Specifies the action to take when updating an instance even if the updated properties do not require it. If not specified, then Compute Engine acts based on the minimum action that the updated properties require. - * minimalAction: 'placeholder-value', - * // Specifies the most disruptive action that can be taken on the instance as part of the update. Compute Engine returns an error if the instance properties require a more disruptive action as part of the instance update. Valid options from lowest to highest are NO_EFFECT, REFRESH, and RESTART. - * mostDisruptiveAllowedAction: 'placeholder-value', + * const res = await compute.interconnectAttachments.delete({ + * // Name of the interconnect attachment to delete. + * interconnectAttachment: + * '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // Name of the region for this request. + * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', * // 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. * // * // 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: 'placeholder-value', - * // The name of the zone for this request. - * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "advancedMachineFeatures": {}, - * // "canIpForward": false, - * // "confidentialInstanceConfig": {}, - * // "cpuPlatform": "my_cpuPlatform", - * // "creationTimestamp": "my_creationTimestamp", - * // "deletionProtection": false, - * // "description": "my_description", - * // "disks": [], - * // "displayDevice": {}, - * // "fingerprint": "my_fingerprint", - * // "guestAccelerators": [], - * // "hostname": "my_hostname", - * // "id": "my_id", - * // "kind": "my_kind", - * // "labelFingerprint": "my_labelFingerprint", - * // "labels": {}, - * // "lastStartTimestamp": "my_lastStartTimestamp", - * // "lastStopTimestamp": "my_lastStopTimestamp", - * // "lastSuspendedTimestamp": "my_lastSuspendedTimestamp", - * // "machineType": "my_machineType", - * // "metadata": {}, - * // "minCpuPlatform": "my_minCpuPlatform", - * // "name": "my_name", - * // "networkInterfaces": [], - * // "postKeyRevocationActionType": "my_postKeyRevocationActionType", - * // "privateIpv6GoogleAccess": "my_privateIpv6GoogleAccess", - * // "reservationAffinity": {}, - * // "resourcePolicies": [], - * // "satisfiesPzs": false, - * // "scheduling": {}, - * // "selfLink": "my_selfLink", - * // "serviceAccounts": [], - * // "shieldedInstanceConfig": {}, - * // "shieldedInstanceIntegrityPolicy": {}, - * // "startRestricted": false, - * // "status": "my_status", - * // "statusMessage": "my_statusMessage", - * // "tags": {}, - * // "zone": "my_zone" - * // } - * }, * }); * console.log(res.data); * @@ -54230,32 +59109,32 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - update( - params: Params$Resource$Instances$Update, + delete( + params: Params$Resource$Interconnectattachments$Delete, options: StreamMethodOptions ): GaxiosPromise; - update( - params?: Params$Resource$Instances$Update, + delete( + params?: Params$Resource$Interconnectattachments$Delete, options?: MethodOptions ): GaxiosPromise; - update( - params: Params$Resource$Instances$Update, + delete( + params: Params$Resource$Interconnectattachments$Delete, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - update( - params: Params$Resource$Instances$Update, + delete( + params: Params$Resource$Interconnectattachments$Delete, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - update( - params: Params$Resource$Instances$Update, + delete( + params: Params$Resource$Interconnectattachments$Delete, callback: BodyResponseCallback ): void; - update(callback: BodyResponseCallback): void; - update( + delete(callback: BodyResponseCallback): void; + delete( paramsOrCallback?: - | Params$Resource$Instances$Update + | Params$Resource$Interconnectattachments$Delete | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -54267,12 +59146,13 @@ export namespace compute_v1 { | BodyResponseCallback | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Instances$Update; + let params = (paramsOrCallback || + {}) as Params$Resource$Interconnectattachments$Delete; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Instances$Update; + params = {} as Params$Resource$Interconnectattachments$Delete; options = {}; } @@ -54287,15 +59167,15 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/instances/{instance}' + '/compute/v1/projects/{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'PUT', + method: 'DELETE', }, options ), params, - requiredParams: ['project', 'zone', 'instance'], - pathParams: ['instance', 'project', 'zone'], + requiredParams: ['project', 'region', 'interconnectAttachment'], + pathParams: ['interconnectAttachment', 'project', 'region'], context: this.context, }; if (callback) { @@ -54309,7 +59189,7 @@ export namespace compute_v1 { } /** - * Updates the specified access config from an instance's network interface with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. + * Returns the specified interconnect attachment. * @example * ```js * // Before running the sample: @@ -54329,6 +59209,7 @@ export namespace compute_v1 { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', * ], * }); * @@ -54337,65 +59218,48 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.instances.updateAccessConfig({ - * // The instance name for this request. - * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', - * // The name of the network interface where the access config is attached. - * networkInterface: 'placeholder-value', + * const res = await compute.interconnectAttachments.get({ + * // Name of the interconnect attachment to return. + * interconnectAttachment: + * '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // 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. - * // - * // 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: 'placeholder-value', - * // The name of the zone for this request. - * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "kind": "my_kind", - * // "name": "my_name", - * // "natIP": "my_natIP", - * // "networkTier": "my_networkTier", - * // "publicPtrDomainName": "my_publicPtrDomainName", - * // "setPublicPtr": false, - * // "type": "my_type" - * // } - * }, + * // Name of the region for this request. + * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', * }); * console.log(res.data); * * // Example response * // { - * // "clientOperationId": "my_clientOperationId", + * // "adminEnabled": false, + * // "bandwidth": "my_bandwidth", + * // "candidateSubnets": [], + * // "cloudRouterIpAddress": "my_cloudRouterIpAddress", * // "creationTimestamp": "my_creationTimestamp", + * // "customerRouterIpAddress": "my_customerRouterIpAddress", + * // "dataplaneVersion": 0, * // "description": "my_description", - * // "endTime": "my_endTime", - * // "error": {}, - * // "httpErrorMessage": "my_httpErrorMessage", - * // "httpErrorStatusCode": 0, + * // "edgeAvailabilityDomain": "my_edgeAvailabilityDomain", + * // "encryption": "my_encryption", + * // "googleReferenceId": "my_googleReferenceId", * // "id": "my_id", - * // "insertTime": "my_insertTime", + * // "interconnect": "my_interconnect", + * // "ipsecInternalAddresses": [], * // "kind": "my_kind", + * // "mtu": 0, * // "name": "my_name", - * // "operationGroupId": "my_operationGroupId", - * // "operationType": "my_operationType", - * // "progress": 0, + * // "operationalStatus": "my_operationalStatus", + * // "pairingKey": "my_pairingKey", + * // "partnerAsn": "my_partnerAsn", + * // "partnerMetadata": {}, + * // "privateInterconnectInfo": {}, * // "region": "my_region", + * // "router": "my_router", * // "selfLink": "my_selfLink", - * // "startTime": "my_startTime", - * // "status": "my_status", - * // "statusMessage": "my_statusMessage", - * // "targetId": "my_targetId", - * // "targetLink": "my_targetLink", - * // "user": "my_user", - * // "warnings": [], - * // "zone": "my_zone" + * // "state": "my_state", + * // "type": "my_type", + * // "vlanTag8021q": 0 * // } * } * @@ -54411,50 +59275,55 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - updateAccessConfig( - params: Params$Resource$Instances$Updateaccessconfig, + get( + params: Params$Resource$Interconnectattachments$Get, options: StreamMethodOptions ): GaxiosPromise; - updateAccessConfig( - params?: Params$Resource$Instances$Updateaccessconfig, + get( + params?: Params$Resource$Interconnectattachments$Get, options?: MethodOptions - ): GaxiosPromise; - updateAccessConfig( - params: Params$Resource$Instances$Updateaccessconfig, + ): GaxiosPromise; + get( + params: Params$Resource$Interconnectattachments$Get, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - updateAccessConfig( - params: Params$Resource$Instances$Updateaccessconfig, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + get( + params: Params$Resource$Interconnectattachments$Get, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - updateAccessConfig( - params: Params$Resource$Instances$Updateaccessconfig, - callback: BodyResponseCallback + get( + params: Params$Resource$Interconnectattachments$Get, + callback: BodyResponseCallback ): void; - updateAccessConfig(callback: BodyResponseCallback): void; - updateAccessConfig( + get(callback: BodyResponseCallback): void; + get( paramsOrCallback?: - | Params$Resource$Instances$Updateaccessconfig - | BodyResponseCallback + | Params$Resource$Interconnectattachments$Get + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { + ): + | void + | GaxiosPromise + | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Instances$Updateaccessconfig; + {}) as Params$Resource$Interconnectattachments$Get; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Instances$Updateaccessconfig; + params = {} as Params$Resource$Interconnectattachments$Get; options = {}; } @@ -54469,29 +59338,29 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/updateAccessConfig' + '/compute/v1/projects/{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'POST', + method: 'GET', }, options ), params, - requiredParams: ['project', 'zone', 'instance', 'networkInterface'], - pathParams: ['instance', 'project', 'zone'], + requiredParams: ['project', 'region', 'interconnectAttachment'], + pathParams: ['interconnectAttachment', 'project', 'region'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Updates the Display config for a VM instance. You can only use this method on a stopped VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. + * Creates an InterconnectAttachment in the specified project using the data included in the request. * @example * ```js * // Before running the sample: @@ -54519,26 +59388,53 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.instances.updateDisplayDevice({ - * // Name of the instance scoping this request. - * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * const res = await compute.interconnectAttachments.insert({ * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // Name of the region for this request. + * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', * // 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. * // * // 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: 'placeholder-value', - * // The name of the zone for this request. - * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * // If true, the request will not be committed. + * validateOnly: 'placeholder-value', * * // Request body metadata * requestBody: { * // request body parameters * // { - * // "enableDisplay": false + * // "adminEnabled": false, + * // "bandwidth": "my_bandwidth", + * // "candidateSubnets": [], + * // "cloudRouterIpAddress": "my_cloudRouterIpAddress", + * // "creationTimestamp": "my_creationTimestamp", + * // "customerRouterIpAddress": "my_customerRouterIpAddress", + * // "dataplaneVersion": 0, + * // "description": "my_description", + * // "edgeAvailabilityDomain": "my_edgeAvailabilityDomain", + * // "encryption": "my_encryption", + * // "googleReferenceId": "my_googleReferenceId", + * // "id": "my_id", + * // "interconnect": "my_interconnect", + * // "ipsecInternalAddresses": [], + * // "kind": "my_kind", + * // "mtu": 0, + * // "name": "my_name", + * // "operationalStatus": "my_operationalStatus", + * // "pairingKey": "my_pairingKey", + * // "partnerAsn": "my_partnerAsn", + * // "partnerMetadata": {}, + * // "privateInterconnectInfo": {}, + * // "region": "my_region", + * // "router": "my_router", + * // "selfLink": "my_selfLink", + * // "state": "my_state", + * // "type": "my_type", + * // "vlanTag8021q": 0 * // } * }, * }); @@ -54585,32 +59481,32 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - updateDisplayDevice( - params: Params$Resource$Instances$Updatedisplaydevice, + insert( + params: Params$Resource$Interconnectattachments$Insert, options: StreamMethodOptions ): GaxiosPromise; - updateDisplayDevice( - params?: Params$Resource$Instances$Updatedisplaydevice, + insert( + params?: Params$Resource$Interconnectattachments$Insert, options?: MethodOptions ): GaxiosPromise; - updateDisplayDevice( - params: Params$Resource$Instances$Updatedisplaydevice, + insert( + params: Params$Resource$Interconnectattachments$Insert, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - updateDisplayDevice( - params: Params$Resource$Instances$Updatedisplaydevice, + insert( + params: Params$Resource$Interconnectattachments$Insert, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - updateDisplayDevice( - params: Params$Resource$Instances$Updatedisplaydevice, + insert( + params: Params$Resource$Interconnectattachments$Insert, callback: BodyResponseCallback ): void; - updateDisplayDevice(callback: BodyResponseCallback): void; - updateDisplayDevice( + insert(callback: BodyResponseCallback): void; + insert( paramsOrCallback?: - | Params$Resource$Instances$Updatedisplaydevice + | Params$Resource$Interconnectattachments$Insert | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -54623,12 +59519,12 @@ export namespace compute_v1 { | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Instances$Updatedisplaydevice; + {}) as Params$Resource$Interconnectattachments$Insert; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Instances$Updatedisplaydevice; + params = {} as Params$Resource$Interconnectattachments$Insert; options = {}; } @@ -54643,15 +59539,15 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/updateDisplayDevice' + '/compute/v1/projects/{project}/regions/{region}/interconnectAttachments' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'PATCH', + method: 'POST', }, options ), params, - requiredParams: ['project', 'zone', 'instance'], - pathParams: ['instance', 'project', 'zone'], + requiredParams: ['project', 'region'], + pathParams: ['project', 'region'], context: this.context, }; if (callback) { @@ -54665,7 +59561,7 @@ export namespace compute_v1 { } /** - * Updates an instance's network interface. This method can only update an interface's alias IP range and attached network. See Modifying alias IP ranges for an existing instance for instructions on changing alias IP ranges. See Migrating a VM between networks for instructions on migrating an interface. This method follows PATCH semantics. + * Retrieves the list of interconnect attachments contained within the specified region. * @example * ```js * // Before running the sample: @@ -54685,6 +59581,7 @@ export namespace compute_v1 { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', * ], * }); * @@ -54693,68 +59590,43 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.instances.updateNetworkInterface({ - * // The instance name for this request. - * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', - * // The name of the network interface to update. - * networkInterface: 'placeholder-value', + * const res = await compute.interconnectAttachments.list({ + * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. + * // + * // 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) ``` + * filter: 'placeholder-value', + * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * maxResults: 'placeholder-value', + * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * // + * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. + * // + * // Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * orderBy: 'placeholder-value', + * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * pageToken: 'placeholder-value', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // 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. - * // - * // 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: 'placeholder-value', - * // The name of the zone for this request. - * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "accessConfigs": [], - * // "aliasIpRanges": [], - * // "fingerprint": "my_fingerprint", - * // "ipv6Address": "my_ipv6Address", - * // "kind": "my_kind", - * // "name": "my_name", - * // "network": "my_network", - * // "networkIP": "my_networkIP", - * // "nicType": "my_nicType", - * // "subnetwork": "my_subnetwork" - * // } - * }, + * // Name of the region for this request. + * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + * returnPartialSuccess: 'placeholder-value', * }); * console.log(res.data); * * // Example response * // { - * // "clientOperationId": "my_clientOperationId", - * // "creationTimestamp": "my_creationTimestamp", - * // "description": "my_description", - * // "endTime": "my_endTime", - * // "error": {}, - * // "httpErrorMessage": "my_httpErrorMessage", - * // "httpErrorStatusCode": 0, * // "id": "my_id", - * // "insertTime": "my_insertTime", + * // "items": [], * // "kind": "my_kind", - * // "name": "my_name", - * // "operationGroupId": "my_operationGroupId", - * // "operationType": "my_operationType", - * // "progress": 0, - * // "region": "my_region", + * // "nextPageToken": "my_nextPageToken", * // "selfLink": "my_selfLink", - * // "startTime": "my_startTime", - * // "status": "my_status", - * // "statusMessage": "my_statusMessage", - * // "targetId": "my_targetId", - * // "targetLink": "my_targetLink", - * // "user": "my_user", - * // "warnings": [], - * // "zone": "my_zone" + * // "warning": {} * // } * } * @@ -54770,52 +59642,57 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - updateNetworkInterface( - params: Params$Resource$Instances$Updatenetworkinterface, + list( + params: Params$Resource$Interconnectattachments$List, options: StreamMethodOptions ): GaxiosPromise; - updateNetworkInterface( - params?: Params$Resource$Instances$Updatenetworkinterface, + list( + params?: Params$Resource$Interconnectattachments$List, options?: MethodOptions - ): GaxiosPromise; - updateNetworkInterface( - params: Params$Resource$Instances$Updatenetworkinterface, + ): GaxiosPromise; + list( + params: Params$Resource$Interconnectattachments$List, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - updateNetworkInterface( - params: Params$Resource$Instances$Updatenetworkinterface, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + list( + params: Params$Resource$Interconnectattachments$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - updateNetworkInterface( - params: Params$Resource$Instances$Updatenetworkinterface, - callback: BodyResponseCallback + list( + params: Params$Resource$Interconnectattachments$List, + callback: BodyResponseCallback ): void; - updateNetworkInterface( - callback: BodyResponseCallback + list( + callback: BodyResponseCallback ): void; - updateNetworkInterface( + list( paramsOrCallback?: - | Params$Resource$Instances$Updatenetworkinterface - | BodyResponseCallback + | Params$Resource$Interconnectattachments$List + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { + ): + | void + | GaxiosPromise + | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Instances$Updatenetworkinterface; + {}) as Params$Resource$Interconnectattachments$List; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Instances$Updatenetworkinterface; + params = {} as Params$Resource$Interconnectattachments$List; options = {}; } @@ -54830,29 +59707,29 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/updateNetworkInterface' + '/compute/v1/projects/{project}/regions/{region}/interconnectAttachments' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'PATCH', + method: 'GET', }, options ), params, - requiredParams: ['project', 'zone', 'instance', 'networkInterface'], - pathParams: ['instance', 'project', 'zone'], + requiredParams: ['project', 'region'], + pathParams: ['project', 'region'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Updates the Shielded Instance config for an instance. You can only use this method on a stopped instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. + * Updates the specified interconnect attachment with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. * @example * ```js * // Before running the sample: @@ -54880,28 +59757,54 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.instances.updateShieldedInstanceConfig({ - * // Name or id of the instance scoping this request. - * instance: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * const res = await compute.interconnectAttachments.patch({ + * // Name of the interconnect attachment to patch. + * interconnectAttachment: + * '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // Name of the region scoping this request. + * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', * // 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. * // * // 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: 'placeholder-value', - * // The name of the zone for this request. - * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', * * // Request body metadata * requestBody: { * // request body parameters * // { - * // "enableIntegrityMonitoring": false, - * // "enableSecureBoot": false, - * // "enableVtpm": false + * // "adminEnabled": false, + * // "bandwidth": "my_bandwidth", + * // "candidateSubnets": [], + * // "cloudRouterIpAddress": "my_cloudRouterIpAddress", + * // "creationTimestamp": "my_creationTimestamp", + * // "customerRouterIpAddress": "my_customerRouterIpAddress", + * // "dataplaneVersion": 0, + * // "description": "my_description", + * // "edgeAvailabilityDomain": "my_edgeAvailabilityDomain", + * // "encryption": "my_encryption", + * // "googleReferenceId": "my_googleReferenceId", + * // "id": "my_id", + * // "interconnect": "my_interconnect", + * // "ipsecInternalAddresses": [], + * // "kind": "my_kind", + * // "mtu": 0, + * // "name": "my_name", + * // "operationalStatus": "my_operationalStatus", + * // "pairingKey": "my_pairingKey", + * // "partnerAsn": "my_partnerAsn", + * // "partnerMetadata": {}, + * // "privateInterconnectInfo": {}, + * // "region": "my_region", + * // "router": "my_router", + * // "selfLink": "my_selfLink", + * // "state": "my_state", + * // "type": "my_type", + * // "vlanTag8021q": 0 * // } * }, * }); @@ -54948,34 +59851,32 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - updateShieldedInstanceConfig( - params: Params$Resource$Instances$Updateshieldedinstanceconfig, + patch( + params: Params$Resource$Interconnectattachments$Patch, options: StreamMethodOptions ): GaxiosPromise; - updateShieldedInstanceConfig( - params?: Params$Resource$Instances$Updateshieldedinstanceconfig, + patch( + params?: Params$Resource$Interconnectattachments$Patch, options?: MethodOptions ): GaxiosPromise; - updateShieldedInstanceConfig( - params: Params$Resource$Instances$Updateshieldedinstanceconfig, + patch( + params: Params$Resource$Interconnectattachments$Patch, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - updateShieldedInstanceConfig( - params: Params$Resource$Instances$Updateshieldedinstanceconfig, + patch( + params: Params$Resource$Interconnectattachments$Patch, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - updateShieldedInstanceConfig( - params: Params$Resource$Instances$Updateshieldedinstanceconfig, - callback: BodyResponseCallback - ): void; - updateShieldedInstanceConfig( + patch( + params: Params$Resource$Interconnectattachments$Patch, callback: BodyResponseCallback ): void; - updateShieldedInstanceConfig( + patch(callback: BodyResponseCallback): void; + patch( paramsOrCallback?: - | Params$Resource$Instances$Updateshieldedinstanceconfig + | Params$Resource$Interconnectattachments$Patch | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -54988,12 +59889,12 @@ export namespace compute_v1 { | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Instances$Updateshieldedinstanceconfig; + {}) as Params$Resource$Interconnectattachments$Patch; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Instances$Updateshieldedinstanceconfig; + params = {} as Params$Resource$Interconnectattachments$Patch; options = {}; } @@ -55008,470 +59909,29 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/updateShieldedInstanceConfig' + '/compute/v1/projects/{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}' ).replace(/([^:]\/)\/+/g, '$1'), method: 'PATCH', }, - options - ), - params, - requiredParams: ['project', 'zone', 'instance'], - pathParams: ['instance', 'project', 'zone'], - context: this.context, - }; - if (callback) { - createAPIRequest( - parameters, - callback as BodyResponseCallback - ); - } else { - return createAPIRequest(parameters); - } - } - } - - export interface Params$Resource$Instances$Addaccessconfig - extends StandardParameters { - /** - * The instance name for this request. - */ - instance?: string; - /** - * The name of the network interface to add to this instance. - */ - networkInterface?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * 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. - * - * 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; - /** - * The name of the zone for this request. - */ - zone?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$AccessConfig; - } - export interface Params$Resource$Instances$Addresourcepolicies - extends StandardParameters { - /** - * The instance name for this request. - */ - instance?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * 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. - * - * 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; - /** - * The name of the zone for this request. - */ - zone?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$InstancesAddResourcePoliciesRequest; - } - export interface Params$Resource$Instances$Aggregatedlist - extends StandardParameters { - /** - * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. - * - * 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) ``` - */ - filter?: string; - /** - * Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. - */ - includeAllScopes?: boolean; - /** - * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) - */ - maxResults?: number; - /** - * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. - * - * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. - * - * Currently, only sorting by `name` or `creationTimestamp desc` is supported. - */ - orderBy?: string; - /** - * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. - */ - pageToken?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. - */ - returnPartialSuccess?: boolean; - } - export interface Params$Resource$Instances$Attachdisk - extends StandardParameters { - /** - * Whether to force attach the regional disk even if it's currently attached to another instance. If you try to force attach a zonal disk to an instance, you will receive an error. - */ - forceAttach?: boolean; - /** - * The instance name for this request. - */ - instance?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * 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. - * - * 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; - /** - * The name of the zone for this request. - */ - zone?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$AttachedDisk; - } - export interface Params$Resource$Instances$Bulkinsert - extends StandardParameters { - /** - * Project ID for this request. - */ - project?: string; - /** - * 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. - * - * 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; - /** - * The name of the zone for this request. - */ - zone?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$BulkInsertInstanceResource; - } - export interface Params$Resource$Instances$Delete extends StandardParameters { - /** - * Name of the instance resource to delete. - */ - instance?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * 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. - * - * 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; - /** - * The name of the zone for this request. - */ - zone?: string; - } - export interface Params$Resource$Instances$Deleteaccessconfig - extends StandardParameters { - /** - * The name of the access config to delete. - */ - accessConfig?: string; - /** - * The instance name for this request. - */ - instance?: string; - /** - * The name of the network interface. - */ - networkInterface?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * 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. - * - * 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; - /** - * The name of the zone for this request. - */ - zone?: string; - } - export interface Params$Resource$Instances$Detachdisk - extends StandardParameters { - /** - * The device name of the disk to detach. Make a get() request on the instance to view currently attached disks and device names. - */ - deviceName?: string; - /** - * Instance name for this request. - */ - instance?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * 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. - * - * 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; - /** - * The name of the zone for this request. - */ - zone?: string; - } - export interface Params$Resource$Instances$Get extends StandardParameters { - /** - * Name of the instance resource to return. - */ - instance?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * The name of the zone for this request. - */ - zone?: string; - } - export interface Params$Resource$Instances$Geteffectivefirewalls - extends StandardParameters { - /** - * Name of the instance scoping this request. - */ - instance?: string; - /** - * The name of the network interface to get the effective firewalls. - */ - networkInterface?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * The name of the zone for this request. - */ - zone?: string; - } - export interface Params$Resource$Instances$Getguestattributes - extends StandardParameters { - /** - * Name of the instance scoping this request. - */ - instance?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * Specifies the guest attributes path to be queried. - */ - queryPath?: string; - /** - * Specifies the key for the guest attributes entry. - */ - variableKey?: string; - /** - * The name of the zone for this request. - */ - zone?: string; - } - export interface Params$Resource$Instances$Getiampolicy - extends StandardParameters { - /** - * Requested IAM Policy version. - */ - optionsRequestedPolicyVersion?: number; - /** - * Project ID for this request. - */ - project?: string; - /** - * Name or id of the resource for this request. - */ - resource?: string; - /** - * The name of the zone for this request. - */ - zone?: string; - } - export interface Params$Resource$Instances$Getscreenshot - extends StandardParameters { - /** - * Name of the instance scoping this request. - */ - instance?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * The name of the zone for this request. - */ - zone?: string; - } - export interface Params$Resource$Instances$Getserialportoutput - extends StandardParameters { - /** - * Name of the instance for this request. - */ - instance?: string; - /** - * Specifies which COM or serial port to retrieve data from. - */ - port?: number; - /** - * Project ID for this request. - */ - project?: string; - /** - * Specifies the starting byte position of the output to return. To start with the first byte of output to the specified port, omit this field or set it to `0`. - * - * If the output for that byte position is available, this field matches the `start` parameter sent with the request. If the amount of serial console output exceeds the size of the buffer (1 MB), the oldest output is discarded and is no longer available. If the requested start position refers to discarded output, the start position is adjusted to the oldest output still available, and the adjusted start position is returned as the `start` property value. - * - * You can also provide a negative start position, which translates to the most recent number of bytes written to the serial port. For example, -3 is interpreted as the most recent 3 bytes written to the serial console. - */ - start?: string; - /** - * The name of the zone for this request. - */ - zone?: string; - } - export interface Params$Resource$Instances$Getshieldedinstanceidentity - extends StandardParameters { - /** - * Name or id of the instance scoping this request. - */ - instance?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * The name of the zone for this request. - */ - zone?: string; - } - export interface Params$Resource$Instances$Insert extends StandardParameters { - /** - * Project ID for this request. - */ - project?: string; - /** - * 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. - * - * 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; - /** - * Specifies instance template to create the instance. - * - * This field is optional. It can be a full or partial URL. For example, the following are all valid URLs to an instance template: - * - https://www.googleapis.com/compute/v1/projects/project/global/instanceTemplates/instanceTemplate - * - projects/project/global/instanceTemplates/instanceTemplate - * - global/instanceTemplates/instanceTemplate - */ - sourceInstanceTemplate?: string; - /** - * The name of the zone for this request. - */ - zone?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$Instance; - } - export interface Params$Resource$Instances$List extends StandardParameters { - /** - * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. - * - * 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) ``` - */ - filter?: string; - /** - * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) - */ - maxResults?: number; - /** - * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. - * - * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. - * - * Currently, only sorting by `name` or `creationTimestamp desc` is supported. - */ - orderBy?: string; - /** - * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. - */ - pageToken?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. - */ - returnPartialSuccess?: boolean; - /** - * The name of the zone for this request. - */ - zone?: string; + options + ), + params, + requiredParams: ['project', 'region', 'interconnectAttachment'], + pathParams: ['interconnectAttachment', 'project', 'region'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } } - export interface Params$Resource$Instances$Listreferrers + + export interface Params$Resource$Interconnectattachments$Aggregatedlist extends StandardParameters { /** * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `\>`, or `<`. @@ -55484,9 +59944,9 @@ export namespace compute_v1 { */ filter?: string; /** - * Name of the target instance scoping this request, or '-' if the request should span over all instances in the container. + * Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. */ - instance?: string; + includeAllScopes?: boolean; /** * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) */ @@ -55511,289 +59971,21 @@ export namespace compute_v1 { * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. */ returnPartialSuccess?: boolean; - /** - * The name of the zone for this request. - */ - zone?: string; - } - export interface Params$Resource$Instances$Removeresourcepolicies - extends StandardParameters { - /** - * The instance name for this request. - */ - instance?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * 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. - * - * 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; - /** - * The name of the zone for this request. - */ - zone?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$InstancesRemoveResourcePoliciesRequest; - } - export interface Params$Resource$Instances$Reset extends StandardParameters { - /** - * Name of the instance scoping this request. - */ - instance?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * 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. - * - * 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; - /** - * The name of the zone for this request. - */ - zone?: string; - } - export interface Params$Resource$Instances$Setdeletionprotection - extends StandardParameters { - /** - * Whether the resource should be protected against deletion. - */ - deletionProtection?: boolean; - /** - * Project ID for this request. - */ - project?: string; - /** - * 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. - * - * 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; - /** - * Name or id of the resource for this request. - */ - resource?: string; - /** - * The name of the zone for this request. - */ - zone?: string; - } - export interface Params$Resource$Instances$Setdiskautodelete - extends StandardParameters { - /** - * Whether to auto-delete the disk when the instance is deleted. - */ - autoDelete?: boolean; - /** - * The device name of the disk to modify. Make a get() request on the instance to view currently attached disks and device names. - */ - deviceName?: string; - /** - * The instance name for this request. - */ - instance?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * 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. - * - * 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; - /** - * The name of the zone for this request. - */ - zone?: string; - } - export interface Params$Resource$Instances$Setiampolicy - extends StandardParameters { - /** - * Project ID for this request. - */ - project?: string; - /** - * Name or id of the resource for this request. - */ - resource?: string; - /** - * The name of the zone for this request. - */ - zone?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$ZoneSetPolicyRequest; - } - export interface Params$Resource$Instances$Setlabels - extends StandardParameters { - /** - * Name of the instance scoping this request. - */ - instance?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * 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. - * - * 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; - /** - * The name of the zone for this request. - */ - zone?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$InstancesSetLabelsRequest; - } - export interface Params$Resource$Instances$Setmachineresources - extends StandardParameters { - /** - * Name of the instance scoping this request. - */ - instance?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * 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. - * - * 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; - /** - * The name of the zone for this request. - */ - zone?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$InstancesSetMachineResourcesRequest; - } - export interface Params$Resource$Instances$Setmachinetype - extends StandardParameters { - /** - * Name of the instance scoping this request. - */ - instance?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * 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. - * - * 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; - /** - * The name of the zone for this request. - */ - zone?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$InstancesSetMachineTypeRequest; - } - export interface Params$Resource$Instances$Setmetadata - extends StandardParameters { - /** - * Name of the instance scoping this request. - */ - instance?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * 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. - * - * 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; - /** - * The name of the zone for this request. - */ - zone?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$Metadata; } - export interface Params$Resource$Instances$Setmincpuplatform + export interface Params$Resource$Interconnectattachments$Delete extends StandardParameters { /** - * Name of the instance scoping this request. + * Name of the interconnect attachment to delete. */ - instance?: string; + interconnectAttachment?: string; /** * Project ID for this request. */ project?: string; /** - * 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. - * - * 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; - /** - * The name of the zone for this request. - */ - zone?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$InstancesSetMinCpuPlatformRequest; - } - export interface Params$Resource$Instances$Setscheduling - extends StandardParameters { - /** - * Instance name for this request. - */ - instance?: string; - /** - * Project ID for this request. + * Name of the region for this request. */ - project?: string; + region?: string; /** * 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. * @@ -55802,82 +59994,32 @@ export namespace compute_v1 { * The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). */ requestId?: string; - /** - * The name of the zone for this request. - */ - zone?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$Scheduling; } - export interface Params$Resource$Instances$Setserviceaccount + export interface Params$Resource$Interconnectattachments$Get extends StandardParameters { /** - * Name of the instance resource to start. + * Name of the interconnect attachment to return. */ - instance?: string; + interconnectAttachment?: string; /** * Project ID for this request. */ project?: string; /** - * 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. - * - * 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; - /** - * The name of the zone for this request. - */ - zone?: string; - - /** - * Request body metadata + * Name of the region for this request. */ - requestBody?: Schema$InstancesSetServiceAccountRequest; + region?: string; } - export interface Params$Resource$Instances$Setshieldedinstanceintegritypolicy + export interface Params$Resource$Interconnectattachments$Insert extends StandardParameters { - /** - * Name or id of the instance scoping this request. - */ - instance?: string; /** * Project ID for this request. */ project?: string; /** - * 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. - * - * 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; - /** - * The name of the zone for this request. - */ - zone?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$ShieldedInstanceIntegrityPolicy; - } - export interface Params$Resource$Instances$Settags - extends StandardParameters { - /** - * Name of the instance scoping this request. - */ - instance?: string; - /** - * Project ID for this request. + * Name of the region for this request. */ - project?: string; + region?: string; /** * 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. * @@ -55887,199 +60029,70 @@ export namespace compute_v1 { */ requestId?: string; /** - * The name of the zone for this request. + * If true, the request will not be committed. */ - zone?: string; + validateOnly?: boolean; /** * Request body metadata */ - requestBody?: Schema$Tags; - } - export interface Params$Resource$Instances$Simulatemaintenanceevent - extends StandardParameters { - /** - * Name of the instance scoping this request. - */ - instance?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * The name of the zone for this request. - */ - zone?: string; - } - export interface Params$Resource$Instances$Start extends StandardParameters { - /** - * Name of the instance resource to start. - */ - instance?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * 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. - * - * 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; - /** - * The name of the zone for this request. - */ - zone?: string; + requestBody?: Schema$InterconnectAttachment; } - export interface Params$Resource$Instances$Startwithencryptionkey + export interface Params$Resource$Interconnectattachments$List extends StandardParameters { /** - * Name of the instance resource to start. - */ - instance?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * 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. - * - * 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; - /** - * The name of the zone for this request. - */ - zone?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$InstancesStartWithEncryptionKeyRequest; - } - export interface Params$Resource$Instances$Stop extends StandardParameters { - /** - * Name of the instance resource to stop. - */ - instance?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * 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. - * - * 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. + * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `\>`, or `<`. * - * The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). - */ - requestId?: string; - /** - * The name of the zone for this request. - */ - zone?: string; - } - export interface Params$Resource$Instances$Testiampermissions - extends StandardParameters { - /** - * Project ID for this request. - */ - project?: string; - /** - * Name or id of the resource for this request. - */ - resource?: string; - /** - * The name of the zone for this request. - */ - zone?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$TestPermissionsRequest; - } - export interface Params$Resource$Instances$Update extends StandardParameters { - /** - * Name of the instance resource to update. - */ - instance?: string; - /** - * Specifies the action to take when updating an instance even if the updated properties do not require it. If not specified, then Compute Engine acts based on the minimum action that the updated properties require. - */ - minimalAction?: string; - /** - * Specifies the most disruptive action that can be taken on the instance as part of the update. Compute Engine returns an error if the instance properties require a more disruptive action as part of the instance update. Valid options from lowest to highest are NO_EFFECT, REFRESH, and RESTART. - */ - mostDisruptiveAllowedAction?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * 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. + * For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. * - * 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. + * 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. * - * The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). - */ - requestId?: string; - /** - * The name of the zone for this request. + * 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) ``` */ - zone?: string; - + filter?: string; /** - * Request body metadata + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) */ - requestBody?: Schema$Instance; - } - export interface Params$Resource$Instances$Updateaccessconfig - extends StandardParameters { + maxResults?: number; /** - * The instance name for this request. + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. + * + * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ - instance?: string; + orderBy?: string; /** - * The name of the network interface where the access config is attached. + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ - networkInterface?: string; + pageToken?: string; /** * Project ID for this request. */ project?: string; /** - * 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. - * - * 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; - /** - * The name of the zone for this request. + * Name of the region for this request. */ - zone?: string; - + region?: string; /** - * Request body metadata + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. */ - requestBody?: Schema$AccessConfig; + returnPartialSuccess?: boolean; } - export interface Params$Resource$Instances$Updatedisplaydevice + export interface Params$Resource$Interconnectattachments$Patch extends StandardParameters { /** - * Name of the instance scoping this request. + * Name of the interconnect attachment to patch. */ - instance?: string; + interconnectAttachment?: string; /** * Project ID for this request. */ project?: string; + /** + * Name of the region scoping this request. + */ + region?: string; /** * 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. * @@ -56088,85 +60101,396 @@ export namespace compute_v1 { * The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). */ requestId?: string; - /** - * The name of the zone for this request. - */ - zone?: string; /** * Request body metadata */ - requestBody?: Schema$DisplayDevice; + requestBody?: Schema$InterconnectAttachment; } - export interface Params$Resource$Instances$Updatenetworkinterface - extends StandardParameters { - /** - * The instance name for this request. - */ - instance?: string; - /** - * The name of the network interface to update. - */ - networkInterface?: string; + + export class Resource$Interconnectlocations { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + /** - * Project ID for this request. + * Returns the details for the specified interconnect location. Gets a list of available interconnect locations by making a list() request. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.interconnectLocations.get({ + * // Name of the interconnect location to return. + * interconnectLocation: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "address": "my_address", + * // "availabilityZone": "my_availabilityZone", + * // "city": "my_city", + * // "continent": "my_continent", + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "facilityProvider": "my_facilityProvider", + * // "facilityProviderFacilityId": "my_facilityProviderFacilityId", + * // "id": "my_id", + * // "kind": "my_kind", + * // "name": "my_name", + * // "peeringdbFacilityId": "my_peeringdbFacilityId", + * // "regionInfos": [], + * // "selfLink": "my_selfLink", + * // "status": "my_status" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. */ - project?: string; + get( + params: Params$Resource$Interconnectlocations$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Interconnectlocations$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Interconnectlocations$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Interconnectlocations$Get, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Interconnectlocations$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Interconnectlocations$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Interconnectlocations$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Interconnectlocations$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/v1/projects/{project}/global/interconnectLocations/{interconnectLocation}' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['project', 'interconnectLocation'], + pathParams: ['interconnectLocation', 'project'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + /** - * 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. + * Retrieves the list of interconnect locations available to the specified project. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` * - * 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. + * const {google} = require('googleapis'); + * const compute = google.compute('v1'); * - * The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.interconnectLocations.list({ + * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. + * // + * // 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) ``` + * filter: 'placeholder-value', + * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * maxResults: 'placeholder-value', + * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * // + * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. + * // + * // Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * orderBy: 'placeholder-value', + * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * pageToken: 'placeholder-value', + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + * returnPartialSuccess: 'placeholder-value', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "id": "my_id", + * // "items": [], + * // "kind": "my_kind", + * // "nextPageToken": "my_nextPageToken", + * // "selfLink": "my_selfLink", + * // "warning": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. */ - requestId?: string; + list( + params: Params$Resource$Interconnectlocations$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Interconnectlocations$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Interconnectlocations$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Interconnectlocations$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Interconnectlocations$List, + callback: BodyResponseCallback + ): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: + | Params$Resource$Interconnectlocations$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Interconnectlocations$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Interconnectlocations$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/v1/projects/{project}/global/interconnectLocations' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['project'], + pathParams: ['project'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Interconnectlocations$Get + extends StandardParameters { /** - * The name of the zone for this request. + * Name of the interconnect location to return. */ - zone?: string; - + interconnectLocation?: string; /** - * Request body metadata + * Project ID for this request. */ - requestBody?: Schema$NetworkInterface; + project?: string; } - export interface Params$Resource$Instances$Updateshieldedinstanceconfig + export interface Params$Resource$Interconnectlocations$List extends StandardParameters { /** - * Name or id of the instance scoping this request. + * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. + * + * 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) ``` */ - instance?: string; + filter?: string; /** - * Project ID for this request. + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) */ - project?: string; + maxResults?: number; /** - * 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. + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. * - * 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. + * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. * - * The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ - requestId?: string; + orderBy?: string; /** - * The name of the zone for this request. + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ - zone?: string; - + pageToken?: string; /** - * Request body metadata + * Project ID for this request. */ - requestBody?: Schema$ShieldedInstanceConfig; + project?: string; + /** + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + */ + returnPartialSuccess?: boolean; } - export class Resource$Instancetemplates { + export class Resource$Interconnects { context: APIRequestContext; constructor(context: APIRequestContext) { this.context = context; } /** - * Deletes the specified instance template. Deleting an instance template is permanent and cannot be undone. It is not possible to delete templates that are already in use by a managed instance group. + * Deletes the specified interconnect. * @example * ```js * // Before running the sample: @@ -56194,9 +60518,9 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.instanceTemplates.delete({ - * // The name of the instance template to delete. - * instanceTemplate: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * const res = await compute.interconnects.delete({ + * // Name of the interconnect to delete. + * interconnect: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', @@ -56251,31 +60575,31 @@ export namespace compute_v1 { * @returns A promise if used with async/await, or void if used with a callback. */ delete( - params: Params$Resource$Instancetemplates$Delete, + params: Params$Resource$Interconnects$Delete, options: StreamMethodOptions ): GaxiosPromise; delete( - params?: Params$Resource$Instancetemplates$Delete, + params?: Params$Resource$Interconnects$Delete, options?: MethodOptions ): GaxiosPromise; delete( - params: Params$Resource$Instancetemplates$Delete, + params: Params$Resource$Interconnects$Delete, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; delete( - params: Params$Resource$Instancetemplates$Delete, + params: Params$Resource$Interconnects$Delete, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; delete( - params: Params$Resource$Instancetemplates$Delete, + params: Params$Resource$Interconnects$Delete, callback: BodyResponseCallback ): void; delete(callback: BodyResponseCallback): void; delete( paramsOrCallback?: - | Params$Resource$Instancetemplates$Delete + | Params$Resource$Interconnects$Delete | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -56288,12 +60612,12 @@ export namespace compute_v1 { | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Instancetemplates$Delete; + {}) as Params$Resource$Interconnects$Delete; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Instancetemplates$Delete; + params = {} as Params$Resource$Interconnects$Delete; options = {}; } @@ -56308,15 +60632,15 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/global/instanceTemplates/{instanceTemplate}' + '/compute/v1/projects/{project}/global/interconnects/{interconnect}' ).replace(/([^:]\/)\/+/g, '$1'), method: 'DELETE', }, options ), params, - requiredParams: ['project', 'instanceTemplate'], - pathParams: ['instanceTemplate', 'project'], + requiredParams: ['project', 'interconnect'], + pathParams: ['interconnect', 'project'], context: this.context, }; if (callback) { @@ -56330,7 +60654,7 @@ export namespace compute_v1 { } /** - * Returns the specified instance template. Gets a list of available instance templates by making a list() request. + * Returns the specified interconnect. Get a list of available interconnects by making a list() request. * @example * ```js * // Before running the sample: @@ -56359,9 +60683,9 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.instanceTemplates.get({ - * // The name of the instance template. - * instanceTemplate: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * const res = await compute.interconnects.get({ + * // Name of the interconnect to return. + * interconnect: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', @@ -56370,15 +60694,28 @@ export namespace compute_v1 { * * // Example response * // { + * // "adminEnabled": false, + * // "circuitInfos": [], * // "creationTimestamp": "my_creationTimestamp", + * // "customerName": "my_customerName", * // "description": "my_description", + * // "expectedOutages": [], + * // "googleIpAddress": "my_googleIpAddress", + * // "googleReferenceId": "my_googleReferenceId", * // "id": "my_id", + * // "interconnectAttachments": [], + * // "interconnectType": "my_interconnectType", * // "kind": "my_kind", + * // "linkType": "my_linkType", + * // "location": "my_location", * // "name": "my_name", - * // "properties": {}, + * // "nocContactEmail": "my_nocContactEmail", + * // "operationalStatus": "my_operationalStatus", + * // "peerIpAddress": "my_peerIpAddress", + * // "provisionedLinkCount": 0, + * // "requestedLinkCount": 0, * // "selfLink": "my_selfLink", - * // "sourceInstance": "my_sourceInstance", - * // "sourceInstanceParams": {} + * // "state": "my_state" * // } * } * @@ -56395,49 +60732,49 @@ export namespace compute_v1 { * @returns A promise if used with async/await, or void if used with a callback. */ get( - params: Params$Resource$Instancetemplates$Get, + params: Params$Resource$Interconnects$Get, options: StreamMethodOptions ): GaxiosPromise; get( - params?: Params$Resource$Instancetemplates$Get, + params?: Params$Resource$Interconnects$Get, options?: MethodOptions - ): GaxiosPromise; + ): GaxiosPromise; get( - params: Params$Resource$Instancetemplates$Get, + params: Params$Resource$Interconnects$Get, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; get( - params: Params$Resource$Instancetemplates$Get, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + params: Params$Resource$Interconnects$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; get( - params: Params$Resource$Instancetemplates$Get, - callback: BodyResponseCallback + params: Params$Resource$Interconnects$Get, + callback: BodyResponseCallback ): void; - get(callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; get( paramsOrCallback?: - | Params$Resource$Instancetemplates$Get - | BodyResponseCallback + | Params$Resource$Interconnects$Get + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { + ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Instancetemplates$Get; + {}) as Params$Resource$Interconnects$Get; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Instancetemplates$Get; + params = {} as Params$Resource$Interconnects$Get; options = {}; } @@ -56452,29 +60789,29 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/global/instanceTemplates/{instanceTemplate}' + '/compute/v1/projects/{project}/global/interconnects/{interconnect}' ).replace(/([^:]\/)\/+/g, '$1'), method: 'GET', }, options ), params, - requiredParams: ['project', 'instanceTemplate'], - pathParams: ['instanceTemplate', 'project'], + requiredParams: ['project', 'interconnect'], + pathParams: ['interconnect', 'project'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Gets the access control policy for a resource. May be empty if no such policy or resource exists. + * Returns the interconnectDiagnostics for the specified interconnect. * @example * ```js * // Before running the sample: @@ -56503,25 +60840,18 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.instanceTemplates.getIamPolicy({ - * // Requested IAM Policy version. - * optionsRequestedPolicyVersion: 'placeholder-value', + * const res = await compute.interconnects.getDiagnostics({ + * // Name of the interconnect resource to query. + * interconnect: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // Name or id of the resource for this request. - * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * }); * console.log(res.data); * * // Example response * // { - * // "auditConfigs": [], - * // "bindings": [], - * // "etag": "my_etag", - * // "iamOwned": false, - * // "rules": [], - * // "version": 0 + * // "result": {} * // } * } * @@ -56537,50 +60867,57 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - getIamPolicy( - params: Params$Resource$Instancetemplates$Getiampolicy, + getDiagnostics( + params: Params$Resource$Interconnects$Getdiagnostics, options: StreamMethodOptions ): GaxiosPromise; - getIamPolicy( - params?: Params$Resource$Instancetemplates$Getiampolicy, + getDiagnostics( + params?: Params$Resource$Interconnects$Getdiagnostics, options?: MethodOptions - ): GaxiosPromise; - getIamPolicy( - params: Params$Resource$Instancetemplates$Getiampolicy, + ): GaxiosPromise; + getDiagnostics( + params: Params$Resource$Interconnects$Getdiagnostics, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - getIamPolicy( - params: Params$Resource$Instancetemplates$Getiampolicy, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + getDiagnostics( + params: Params$Resource$Interconnects$Getdiagnostics, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - getIamPolicy( - params: Params$Resource$Instancetemplates$Getiampolicy, - callback: BodyResponseCallback + getDiagnostics( + params: Params$Resource$Interconnects$Getdiagnostics, + callback: BodyResponseCallback ): void; - getIamPolicy(callback: BodyResponseCallback): void; - getIamPolicy( + getDiagnostics( + callback: BodyResponseCallback + ): void; + getDiagnostics( paramsOrCallback?: - | Params$Resource$Instancetemplates$Getiampolicy - | BodyResponseCallback + | Params$Resource$Interconnects$Getdiagnostics + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { + ): + | void + | GaxiosPromise + | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Instancetemplates$Getiampolicy; + {}) as Params$Resource$Interconnects$Getdiagnostics; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Instancetemplates$Getiampolicy; + params = {} as Params$Resource$Interconnects$Getdiagnostics; options = {}; } @@ -56595,29 +60932,31 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/global/instanceTemplates/{resource}/getIamPolicy' + '/compute/v1/projects/{project}/global/interconnects/{interconnect}/getDiagnostics' ).replace(/([^:]\/)\/+/g, '$1'), method: 'GET', }, options ), params, - requiredParams: ['project', 'resource'], - pathParams: ['project', 'resource'], + requiredParams: ['project', 'interconnect'], + pathParams: ['interconnect', 'project'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest( + parameters + ); } } /** - * Creates an instance template in the specified project using the data that is included in the request. If you are creating a new template to update an existing instance group, your new instance template must use the same network or, if applicable, the same subnetwork as the original template. + * Creates a Interconnect in the specified project using the data included in the request. * @example * ```js * // Before running the sample: @@ -56645,7 +60984,7 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.instanceTemplates.insert({ + * const res = await compute.interconnects.insert({ * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', @@ -56660,15 +60999,28 @@ export namespace compute_v1 { * requestBody: { * // request body parameters * // { + * // "adminEnabled": false, + * // "circuitInfos": [], * // "creationTimestamp": "my_creationTimestamp", + * // "customerName": "my_customerName", * // "description": "my_description", + * // "expectedOutages": [], + * // "googleIpAddress": "my_googleIpAddress", + * // "googleReferenceId": "my_googleReferenceId", * // "id": "my_id", + * // "interconnectAttachments": [], + * // "interconnectType": "my_interconnectType", * // "kind": "my_kind", + * // "linkType": "my_linkType", + * // "location": "my_location", * // "name": "my_name", - * // "properties": {}, + * // "nocContactEmail": "my_nocContactEmail", + * // "operationalStatus": "my_operationalStatus", + * // "peerIpAddress": "my_peerIpAddress", + * // "provisionedLinkCount": 0, + * // "requestedLinkCount": 0, * // "selfLink": "my_selfLink", - * // "sourceInstance": "my_sourceInstance", - * // "sourceInstanceParams": {} + * // "state": "my_state" * // } * }, * }); @@ -56716,31 +61068,31 @@ export namespace compute_v1 { * @returns A promise if used with async/await, or void if used with a callback. */ insert( - params: Params$Resource$Instancetemplates$Insert, + params: Params$Resource$Interconnects$Insert, options: StreamMethodOptions ): GaxiosPromise; insert( - params?: Params$Resource$Instancetemplates$Insert, + params?: Params$Resource$Interconnects$Insert, options?: MethodOptions ): GaxiosPromise; insert( - params: Params$Resource$Instancetemplates$Insert, + params: Params$Resource$Interconnects$Insert, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; insert( - params: Params$Resource$Instancetemplates$Insert, + params: Params$Resource$Interconnects$Insert, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; insert( - params: Params$Resource$Instancetemplates$Insert, + params: Params$Resource$Interconnects$Insert, callback: BodyResponseCallback ): void; insert(callback: BodyResponseCallback): void; insert( paramsOrCallback?: - | Params$Resource$Instancetemplates$Insert + | Params$Resource$Interconnects$Insert | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -56753,12 +61105,12 @@ export namespace compute_v1 { | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Instancetemplates$Insert; + {}) as Params$Resource$Interconnects$Insert; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Instancetemplates$Insert; + params = {} as Params$Resource$Interconnects$Insert; options = {}; } @@ -56772,8 +61124,7 @@ export namespace compute_v1 { options: Object.assign( { url: ( - rootUrl + - '/compute/v1/projects/{project}/global/instanceTemplates' + rootUrl + '/compute/v1/projects/{project}/global/interconnects' ).replace(/([^:]\/)\/+/g, '$1'), method: 'POST', }, @@ -56795,7 +61146,7 @@ export namespace compute_v1 { } /** - * Retrieves a list of instance templates that are contained within the specified project. + * Retrieves the list of interconnect available to the specified project. * @example * ```js * // Before running the sample: @@ -56824,7 +61175,7 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.instanceTemplates.list({ + * const res = await compute.interconnects.list({ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. @@ -56875,54 +61226,49 @@ export namespace compute_v1 { * @returns A promise if used with async/await, or void if used with a callback. */ list( - params: Params$Resource$Instancetemplates$List, + params: Params$Resource$Interconnects$List, options: StreamMethodOptions ): GaxiosPromise; list( - params?: Params$Resource$Instancetemplates$List, + params?: Params$Resource$Interconnects$List, options?: MethodOptions - ): GaxiosPromise; + ): GaxiosPromise; list( - params: Params$Resource$Instancetemplates$List, + params: Params$Resource$Interconnects$List, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; list( - params: Params$Resource$Instancetemplates$List, - options: - | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + params: Params$Resource$Interconnects$List, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; list( - params: Params$Resource$Instancetemplates$List, - callback: BodyResponseCallback + params: Params$Resource$Interconnects$List, + callback: BodyResponseCallback ): void; - list(callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; list( paramsOrCallback?: - | Params$Resource$Instancetemplates$List - | BodyResponseCallback + | Params$Resource$Interconnects$List + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): - | void - | GaxiosPromise - | GaxiosPromise { + ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Instancetemplates$List; + {}) as Params$Resource$Interconnects$List; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Instancetemplates$List; + params = {} as Params$Resource$Interconnects$List; options = {}; } @@ -56936,8 +61282,7 @@ export namespace compute_v1 { options: Object.assign( { url: ( - rootUrl + - '/compute/v1/projects/{project}/global/instanceTemplates' + rootUrl + '/compute/v1/projects/{project}/global/interconnects' ).replace(/([^:]\/)\/+/g, '$1'), method: 'GET', }, @@ -56949,17 +61294,340 @@ export namespace compute_v1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); + } + } + + /** + * Updates the specified interconnect with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.interconnects.patch({ + * // Name of the interconnect to update. + * interconnect: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // 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. + * // + * // 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: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "adminEnabled": false, + * // "circuitInfos": [], + * // "creationTimestamp": "my_creationTimestamp", + * // "customerName": "my_customerName", + * // "description": "my_description", + * // "expectedOutages": [], + * // "googleIpAddress": "my_googleIpAddress", + * // "googleReferenceId": "my_googleReferenceId", + * // "id": "my_id", + * // "interconnectAttachments": [], + * // "interconnectType": "my_interconnectType", + * // "kind": "my_kind", + * // "linkType": "my_linkType", + * // "location": "my_location", + * // "name": "my_name", + * // "nocContactEmail": "my_nocContactEmail", + * // "operationalStatus": "my_operationalStatus", + * // "peerIpAddress": "my_peerIpAddress", + * // "provisionedLinkCount": 0, + * // "requestedLinkCount": 0, + * // "selfLink": "my_selfLink", + * // "state": "my_state" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "clientOperationId": "my_clientOperationId", + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "endTime": "my_endTime", + * // "error": {}, + * // "httpErrorMessage": "my_httpErrorMessage", + * // "httpErrorStatusCode": 0, + * // "id": "my_id", + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "name": "my_name", + * // "operationGroupId": "my_operationGroupId", + * // "operationType": "my_operationType", + * // "progress": 0, + * // "region": "my_region", + * // "selfLink": "my_selfLink", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "statusMessage": "my_statusMessage", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "user": "my_user", + * // "warnings": [], + * // "zone": "my_zone" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + patch( + params: Params$Resource$Interconnects$Patch, + options: StreamMethodOptions + ): GaxiosPromise; + patch( + params?: Params$Resource$Interconnects$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Interconnects$Patch, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Interconnects$Patch, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Interconnects$Patch, + callback: BodyResponseCallback + ): void; + patch(callback: BodyResponseCallback): void; + patch( + paramsOrCallback?: + | Params$Resource$Interconnects$Patch + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Interconnects$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Interconnects$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/v1/projects/{project}/global/interconnects/{interconnect}' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', + }, + options + ), + params, + requiredParams: ['project', 'interconnect'], + pathParams: ['interconnect', 'project'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); } } + } + + export interface Params$Resource$Interconnects$Delete + extends StandardParameters { + /** + * Name of the interconnect to delete. + */ + interconnect?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + } + export interface Params$Resource$Interconnects$Get + extends StandardParameters { + /** + * Name of the interconnect to return. + */ + interconnect?: string; + /** + * Project ID for this request. + */ + project?: string; + } + export interface Params$Resource$Interconnects$Getdiagnostics + extends StandardParameters { + /** + * Name of the interconnect resource to query. + */ + interconnect?: string; + /** + * Project ID for this request. + */ + project?: string; + } + export interface Params$Resource$Interconnects$Insert + extends StandardParameters { + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + + /** + * Request body metadata + */ + requestBody?: Schema$Interconnect; + } + export interface Params$Resource$Interconnects$List + extends StandardParameters { + /** + * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. + * + * 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) ``` + */ + filter?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + */ + maxResults?: number; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. + * + * Currently, only sorting by `name` or `creationTimestamp desc` is supported. + */ + orderBy?: string; + /** + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + */ + pageToken?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + */ + returnPartialSuccess?: boolean; + } + export interface Params$Resource$Interconnects$Patch + extends StandardParameters { + /** + * Name of the interconnect to update. + */ + interconnect?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + + /** + * Request body metadata + */ + requestBody?: Schema$Interconnect; + } + + export class Resource$Licensecodes { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } /** - * Sets the access control policy on the specified resource. Replaces any existing policy. + * Return a specified license code. License codes are mirrored across all projects that have permissions to read the License Code. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images. * @example * ```js * // Before running the sample: @@ -56979,6 +61647,7 @@ export namespace compute_v1 { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', * ], * }); * @@ -56987,33 +61656,26 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.instanceTemplates.setIamPolicy({ + * const res = await compute.licenseCodes.get({ + * // Number corresponding to the License code resource to return. + * licenseCode: '[0-9]{0,61}?', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // Name or id of the resource for this request. - * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "bindings": [], - * // "etag": "my_etag", - * // "policy": {} - * // } - * }, * }); * console.log(res.data); * * // Example response * // { - * // "auditConfigs": [], - * // "bindings": [], - * // "etag": "my_etag", - * // "iamOwned": false, - * // "rules": [], - * // "version": 0 + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "id": "my_id", + * // "kind": "my_kind", + * // "licenseAlias": [], + * // "name": "my_name", + * // "selfLink": "my_selfLink", + * // "state": "my_state", + * // "transferable": false * // } * } * @@ -57029,50 +61691,49 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - setIamPolicy( - params: Params$Resource$Instancetemplates$Setiampolicy, + get( + params: Params$Resource$Licensecodes$Get, options: StreamMethodOptions ): GaxiosPromise; - setIamPolicy( - params?: Params$Resource$Instancetemplates$Setiampolicy, + get( + params?: Params$Resource$Licensecodes$Get, options?: MethodOptions - ): GaxiosPromise; - setIamPolicy( - params: Params$Resource$Instancetemplates$Setiampolicy, + ): GaxiosPromise; + get( + params: Params$Resource$Licensecodes$Get, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - setIamPolicy( - params: Params$Resource$Instancetemplates$Setiampolicy, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + get( + params: Params$Resource$Licensecodes$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - setIamPolicy( - params: Params$Resource$Instancetemplates$Setiampolicy, - callback: BodyResponseCallback + get( + params: Params$Resource$Licensecodes$Get, + callback: BodyResponseCallback ): void; - setIamPolicy(callback: BodyResponseCallback): void; - setIamPolicy( + get(callback: BodyResponseCallback): void; + get( paramsOrCallback?: - | Params$Resource$Instancetemplates$Setiampolicy - | BodyResponseCallback + | Params$Resource$Licensecodes$Get + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { - let params = (paramsOrCallback || - {}) as Params$Resource$Instancetemplates$Setiampolicy; + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Licensecodes$Get; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Instancetemplates$Setiampolicy; + params = {} as Params$Resource$Licensecodes$Get; options = {}; } @@ -57087,29 +61748,29 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/global/instanceTemplates/{resource}/setIamPolicy' + '/compute/v1/projects/{project}/global/licenseCodes/{licenseCode}' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'POST', + method: 'GET', }, options ), params, - requiredParams: ['project', 'resource'], - pathParams: ['project', 'resource'], + requiredParams: ['project', 'licenseCode'], + pathParams: ['licenseCode', 'project'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Returns permissions that a caller has on the specified resource. + * Returns permissions that a caller has on the specified resource. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images. * @example * ```js * // Before running the sample: @@ -57138,7 +61799,7 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.instanceTemplates.testIamPermissions({ + * const res = await compute.licenseCodes.testIamPermissions({ * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', @@ -57174,27 +61835,27 @@ export namespace compute_v1 { * @returns A promise if used with async/await, or void if used with a callback. */ testIamPermissions( - params: Params$Resource$Instancetemplates$Testiampermissions, + params: Params$Resource$Licensecodes$Testiampermissions, options: StreamMethodOptions ): GaxiosPromise; testIamPermissions( - params?: Params$Resource$Instancetemplates$Testiampermissions, + params?: Params$Resource$Licensecodes$Testiampermissions, options?: MethodOptions ): GaxiosPromise; testIamPermissions( - params: Params$Resource$Instancetemplates$Testiampermissions, + params: Params$Resource$Licensecodes$Testiampermissions, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; testIamPermissions( - params: Params$Resource$Instancetemplates$Testiampermissions, + params: Params$Resource$Licensecodes$Testiampermissions, options: | MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; testIamPermissions( - params: Params$Resource$Instancetemplates$Testiampermissions, + params: Params$Resource$Licensecodes$Testiampermissions, callback: BodyResponseCallback ): void; testIamPermissions( @@ -57202,7 +61863,7 @@ export namespace compute_v1 { ): void; testIamPermissions( paramsOrCallback?: - | Params$Resource$Instancetemplates$Testiampermissions + | Params$Resource$Licensecodes$Testiampermissions | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -57218,12 +61879,12 @@ export namespace compute_v1 { | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Instancetemplates$Testiampermissions; + {}) as Params$Resource$Licensecodes$Testiampermissions; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Instancetemplates$Testiampermissions; + params = {} as Params$Resource$Licensecodes$Testiampermissions; options = {}; } @@ -57238,7 +61899,7 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/global/instanceTemplates/{resource}/testIamPermissions' + '/compute/v1/projects/{project}/global/licenseCodes/{resource}/testIamPermissions' ).replace(/([^:]\/)\/+/g, '$1'), method: 'POST', }, @@ -57260,125 +61921,17 @@ export namespace compute_v1 { } } - export interface Params$Resource$Instancetemplates$Delete - extends StandardParameters { - /** - * The name of the instance template to delete. - */ - instanceTemplate?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * 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. - * - * 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; - } - export interface Params$Resource$Instancetemplates$Get - extends StandardParameters { - /** - * The name of the instance template. - */ - instanceTemplate?: string; - /** - * Project ID for this request. - */ - project?: string; - } - export interface Params$Resource$Instancetemplates$Getiampolicy - extends StandardParameters { - /** - * Requested IAM Policy version. - */ - optionsRequestedPolicyVersion?: number; - /** - * Project ID for this request. - */ - project?: string; - /** - * Name or id of the resource for this request. - */ - resource?: string; - } - export interface Params$Resource$Instancetemplates$Insert - extends StandardParameters { - /** - * Project ID for this request. - */ - project?: string; - /** - * 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. - * - * 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; - - /** - * Request body metadata - */ - requestBody?: Schema$InstanceTemplate; - } - export interface Params$Resource$Instancetemplates$List - extends StandardParameters { - /** - * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. - * - * 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) ``` - */ - filter?: string; - /** - * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) - */ - maxResults?: number; - /** - * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. - * - * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. - * - * Currently, only sorting by `name` or `creationTimestamp desc` is supported. - */ - orderBy?: string; - /** - * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. - */ - pageToken?: string; - /** - * Project ID for this request. - */ - project?: string; + export interface Params$Resource$Licensecodes$Get extends StandardParameters { /** - * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + * Number corresponding to the License code resource to return. */ - returnPartialSuccess?: boolean; - } - export interface Params$Resource$Instancetemplates$Setiampolicy - extends StandardParameters { + licenseCode?: string; /** * Project ID for this request. */ project?: string; - /** - * Name or id of the resource for this request. - */ - resource?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$GlobalSetPolicyRequest; } - export interface Params$Resource$Instancetemplates$Testiampermissions + export interface Params$Resource$Licensecodes$Testiampermissions extends StandardParameters { /** * Project ID for this request. @@ -57395,14 +61948,14 @@ export namespace compute_v1 { requestBody?: Schema$TestPermissionsRequest; } - export class Resource$Interconnectattachments { + export class Resource$Licenses { context: APIRequestContext; constructor(context: APIRequestContext) { this.context = context; } /** - * Retrieves an aggregated list of interconnect attachments. + * Deletes the specified license. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images. * @example * ```js * // Before running the sample: @@ -57422,7 +61975,6 @@ export namespace compute_v1 { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', - * 'https://www.googleapis.com/auth/compute.readonly', * ], * }); * @@ -57431,44 +61983,47 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.interconnectAttachments.aggregatedList({ - * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. - * // - * // 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) ``` - * filter: 'placeholder-value', - * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. - * includeAllScopes: 'placeholder-value', - * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) - * maxResults: 'placeholder-value', - * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. - * // - * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. - * // - * // Currently, only sorting by `name` or `creationTimestamp desc` is supported. - * orderBy: 'placeholder-value', - * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. - * pageToken: 'placeholder-value', + * const res = await compute.licenses.delete({ + * // Name of the license resource to delete. + * license: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. - * returnPartialSuccess: 'placeholder-value', + * // 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. + * // + * // 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: 'placeholder-value', * }); * console.log(res.data); * * // Example response * // { + * // "clientOperationId": "my_clientOperationId", + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "endTime": "my_endTime", + * // "error": {}, + * // "httpErrorMessage": "my_httpErrorMessage", + * // "httpErrorStatusCode": 0, * // "id": "my_id", - * // "items": {}, + * // "insertTime": "my_insertTime", * // "kind": "my_kind", - * // "nextPageToken": "my_nextPageToken", + * // "name": "my_name", + * // "operationGroupId": "my_operationGroupId", + * // "operationType": "my_operationType", + * // "progress": 0, + * // "region": "my_region", * // "selfLink": "my_selfLink", - * // "unreachables": [], - * // "warning": {} + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "statusMessage": "my_statusMessage", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "user": "my_user", + * // "warnings": [], + * // "zone": "my_zone" * // } * } * @@ -57484,57 +62039,49 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - aggregatedList( - params: Params$Resource$Interconnectattachments$Aggregatedlist, + delete( + params: Params$Resource$Licenses$Delete, options: StreamMethodOptions ): GaxiosPromise; - aggregatedList( - params?: Params$Resource$Interconnectattachments$Aggregatedlist, + delete( + params?: Params$Resource$Licenses$Delete, options?: MethodOptions - ): GaxiosPromise; - aggregatedList( - params: Params$Resource$Interconnectattachments$Aggregatedlist, + ): GaxiosPromise; + delete( + params: Params$Resource$Licenses$Delete, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - aggregatedList( - params: Params$Resource$Interconnectattachments$Aggregatedlist, - options: - | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - aggregatedList( - params: Params$Resource$Interconnectattachments$Aggregatedlist, - callback: BodyResponseCallback + delete( + params: Params$Resource$Licenses$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - aggregatedList( - callback: BodyResponseCallback + delete( + params: Params$Resource$Licenses$Delete, + callback: BodyResponseCallback ): void; - aggregatedList( + delete(callback: BodyResponseCallback): void; + delete( paramsOrCallback?: - | Params$Resource$Interconnectattachments$Aggregatedlist - | BodyResponseCallback + | Params$Resource$Licenses$Delete + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): - | void - | GaxiosPromise - | GaxiosPromise { - let params = (paramsOrCallback || - {}) as Params$Resource$Interconnectattachments$Aggregatedlist; + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Licenses$Delete; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Interconnectattachments$Aggregatedlist; + params = {} as Params$Resource$Licenses$Delete; options = {}; } @@ -57549,31 +62096,29 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/aggregated/interconnectAttachments' + '/compute/v1/projects/{project}/global/licenses/{license}' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'GET', + method: 'DELETE', }, options ), params, - requiredParams: ['project'], - pathParams: ['project'], + requiredParams: ['project', 'license'], + pathParams: ['license', 'project'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest( - parameters - ); + return createAPIRequest(parameters); } } /** - * Deletes the specified interconnect attachment. + * Returns the specified License resource. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images. * @example * ```js * // Before running the sample: @@ -57593,6 +62138,7 @@ export namespace compute_v1 { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', * ], * }); * @@ -57601,50 +62147,27 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.interconnectAttachments.delete({ - * // Name of the interconnect attachment to delete. - * interconnectAttachment: - * '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * const res = await compute.licenses.get({ + * // Name of the License resource to return. + * license: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // Name of the region for this request. - * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', - * // 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. - * // - * // 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: 'placeholder-value', * }); * console.log(res.data); * * // Example response * // { - * // "clientOperationId": "my_clientOperationId", + * // "chargesUseFee": false, * // "creationTimestamp": "my_creationTimestamp", * // "description": "my_description", - * // "endTime": "my_endTime", - * // "error": {}, - * // "httpErrorMessage": "my_httpErrorMessage", - * // "httpErrorStatusCode": 0, * // "id": "my_id", - * // "insertTime": "my_insertTime", * // "kind": "my_kind", + * // "licenseCode": "my_licenseCode", * // "name": "my_name", - * // "operationGroupId": "my_operationGroupId", - * // "operationType": "my_operationType", - * // "progress": 0, - * // "region": "my_region", + * // "resourceRequirements": {}, * // "selfLink": "my_selfLink", - * // "startTime": "my_startTime", - * // "status": "my_status", - * // "statusMessage": "my_statusMessage", - * // "targetId": "my_targetId", - * // "targetLink": "my_targetLink", - * // "user": "my_user", - * // "warnings": [], - * // "zone": "my_zone" + * // "transferable": false * // } * } * @@ -57660,50 +62183,49 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - delete( - params: Params$Resource$Interconnectattachments$Delete, + get( + params: Params$Resource$Licenses$Get, options: StreamMethodOptions ): GaxiosPromise; - delete( - params?: Params$Resource$Interconnectattachments$Delete, + get( + params?: Params$Resource$Licenses$Get, options?: MethodOptions - ): GaxiosPromise; - delete( - params: Params$Resource$Interconnectattachments$Delete, + ): GaxiosPromise; + get( + params: Params$Resource$Licenses$Get, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - delete( - params: Params$Resource$Interconnectattachments$Delete, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + get( + params: Params$Resource$Licenses$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - delete( - params: Params$Resource$Interconnectattachments$Delete, - callback: BodyResponseCallback + get( + params: Params$Resource$Licenses$Get, + callback: BodyResponseCallback ): void; - delete(callback: BodyResponseCallback): void; - delete( + get(callback: BodyResponseCallback): void; + get( paramsOrCallback?: - | Params$Resource$Interconnectattachments$Delete - | BodyResponseCallback + | Params$Resource$Licenses$Get + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { - let params = (paramsOrCallback || - {}) as Params$Resource$Interconnectattachments$Delete; + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Licenses$Get; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Interconnectattachments$Delete; + params = {} as Params$Resource$Licenses$Get; options = {}; } @@ -57718,29 +62240,29 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}' + '/compute/v1/projects/{project}/global/licenses/{license}' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'DELETE', + method: 'GET', }, options ), params, - requiredParams: ['project', 'region', 'interconnectAttachment'], - pathParams: ['interconnectAttachment', 'project', 'region'], + requiredParams: ['project', 'license'], + pathParams: ['license', 'project'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Returns the specified interconnect attachment. + * Gets the access control policy for a resource. May be empty if no such policy or resource exists. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images. * @example * ```js * // Before running the sample: @@ -57769,46 +62291,25 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.interconnectAttachments.get({ - * // Name of the interconnect attachment to return. - * interconnectAttachment: - * '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * const res = await compute.licenses.getIamPolicy({ + * // Requested IAM Policy version. + * optionsRequestedPolicyVersion: 'placeholder-value', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // Name of the region for this request. - * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * // Name or id of the resource for this request. + * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * }); * console.log(res.data); * * // Example response * // { - * // "adminEnabled": false, - * // "bandwidth": "my_bandwidth", - * // "candidateSubnets": [], - * // "cloudRouterIpAddress": "my_cloudRouterIpAddress", - * // "creationTimestamp": "my_creationTimestamp", - * // "customerRouterIpAddress": "my_customerRouterIpAddress", - * // "dataplaneVersion": 0, - * // "description": "my_description", - * // "edgeAvailabilityDomain": "my_edgeAvailabilityDomain", - * // "googleReferenceId": "my_googleReferenceId", - * // "id": "my_id", - * // "interconnect": "my_interconnect", - * // "kind": "my_kind", - * // "mtu": 0, - * // "name": "my_name", - * // "operationalStatus": "my_operationalStatus", - * // "pairingKey": "my_pairingKey", - * // "partnerAsn": "my_partnerAsn", - * // "partnerMetadata": {}, - * // "privateInterconnectInfo": {}, - * // "region": "my_region", - * // "router": "my_router", - * // "selfLink": "my_selfLink", - * // "state": "my_state", - * // "type": "my_type", - * // "vlanTag8021q": 0 + * // "auditConfigs": [], + * // "bindings": [], + * // "etag": "my_etag", + * // "iamOwned": false, + * // "rules": [], + * // "version": 0 * // } * } * @@ -57824,55 +62325,50 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - get( - params: Params$Resource$Interconnectattachments$Get, + getIamPolicy( + params: Params$Resource$Licenses$Getiampolicy, options: StreamMethodOptions ): GaxiosPromise; - get( - params?: Params$Resource$Interconnectattachments$Get, + getIamPolicy( + params?: Params$Resource$Licenses$Getiampolicy, options?: MethodOptions - ): GaxiosPromise; - get( - params: Params$Resource$Interconnectattachments$Get, + ): GaxiosPromise; + getIamPolicy( + params: Params$Resource$Licenses$Getiampolicy, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - get( - params: Params$Resource$Interconnectattachments$Get, - options: - | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + getIamPolicy( + params: Params$Resource$Licenses$Getiampolicy, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - get( - params: Params$Resource$Interconnectattachments$Get, - callback: BodyResponseCallback + getIamPolicy( + params: Params$Resource$Licenses$Getiampolicy, + callback: BodyResponseCallback ): void; - get(callback: BodyResponseCallback): void; - get( + getIamPolicy(callback: BodyResponseCallback): void; + getIamPolicy( paramsOrCallback?: - | Params$Resource$Interconnectattachments$Get - | BodyResponseCallback + | Params$Resource$Licenses$Getiampolicy + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): - | void - | GaxiosPromise - | GaxiosPromise { + ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Interconnectattachments$Get; + {}) as Params$Resource$Licenses$Getiampolicy; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Interconnectattachments$Get; + params = {} as Params$Resource$Licenses$Getiampolicy; options = {}; } @@ -57887,29 +62383,29 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}' + '/compute/v1/projects/{project}/global/licenses/{resource}/getIamPolicy' ).replace(/([^:]\/)\/+/g, '$1'), method: 'GET', }, options ), params, - requiredParams: ['project', 'region', 'interconnectAttachment'], - pathParams: ['interconnectAttachment', 'project', 'region'], + requiredParams: ['project', 'resource'], + pathParams: ['project', 'resource'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Creates an InterconnectAttachment in the specified project using the data included in the request. + * Create a License resource in the specified project. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images. * @example * ```js * // Before running the sample: @@ -57929,6 +62425,9 @@ export namespace compute_v1 { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/devstorage.full_control', + * 'https://www.googleapis.com/auth/devstorage.read_only', + * 'https://www.googleapis.com/auth/devstorage.read_write', * ], * }); * @@ -57937,51 +62436,31 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.interconnectAttachments.insert({ + * const res = await compute.licenses.insert({ * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // Name of the region for this request. - * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', * // 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. * // * // 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: 'placeholder-value', - * // If true, the request will not be committed. - * validateOnly: 'placeholder-value', * * // Request body metadata * requestBody: { * // request body parameters * // { - * // "adminEnabled": false, - * // "bandwidth": "my_bandwidth", - * // "candidateSubnets": [], - * // "cloudRouterIpAddress": "my_cloudRouterIpAddress", + * // "chargesUseFee": false, * // "creationTimestamp": "my_creationTimestamp", - * // "customerRouterIpAddress": "my_customerRouterIpAddress", - * // "dataplaneVersion": 0, * // "description": "my_description", - * // "edgeAvailabilityDomain": "my_edgeAvailabilityDomain", - * // "googleReferenceId": "my_googleReferenceId", * // "id": "my_id", - * // "interconnect": "my_interconnect", * // "kind": "my_kind", - * // "mtu": 0, + * // "licenseCode": "my_licenseCode", * // "name": "my_name", - * // "operationalStatus": "my_operationalStatus", - * // "pairingKey": "my_pairingKey", - * // "partnerAsn": "my_partnerAsn", - * // "partnerMetadata": {}, - * // "privateInterconnectInfo": {}, - * // "region": "my_region", - * // "router": "my_router", + * // "resourceRequirements": {}, * // "selfLink": "my_selfLink", - * // "state": "my_state", - * // "type": "my_type", - * // "vlanTag8021q": 0 + * // "transferable": false * // } * }, * }); @@ -58029,31 +62508,31 @@ export namespace compute_v1 { * @returns A promise if used with async/await, or void if used with a callback. */ insert( - params: Params$Resource$Interconnectattachments$Insert, + params: Params$Resource$Licenses$Insert, options: StreamMethodOptions ): GaxiosPromise; insert( - params?: Params$Resource$Interconnectattachments$Insert, + params?: Params$Resource$Licenses$Insert, options?: MethodOptions ): GaxiosPromise; insert( - params: Params$Resource$Interconnectattachments$Insert, + params: Params$Resource$Licenses$Insert, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; insert( - params: Params$Resource$Interconnectattachments$Insert, + params: Params$Resource$Licenses$Insert, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; insert( - params: Params$Resource$Interconnectattachments$Insert, + params: Params$Resource$Licenses$Insert, callback: BodyResponseCallback ): void; insert(callback: BodyResponseCallback): void; insert( paramsOrCallback?: - | Params$Resource$Interconnectattachments$Insert + | Params$Resource$Licenses$Insert | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -58065,13 +62544,12 @@ export namespace compute_v1 { | BodyResponseCallback | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { - let params = (paramsOrCallback || - {}) as Params$Resource$Interconnectattachments$Insert; + let params = (paramsOrCallback || {}) as Params$Resource$Licenses$Insert; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Interconnectattachments$Insert; + params = {} as Params$Resource$Licenses$Insert; options = {}; } @@ -58085,16 +62563,15 @@ export namespace compute_v1 { options: Object.assign( { url: ( - rootUrl + - '/compute/v1/projects/{project}/regions/{region}/interconnectAttachments' + rootUrl + '/compute/v1/projects/{project}/global/licenses' ).replace(/([^:]\/)\/+/g, '$1'), method: 'POST', }, options ), params, - requiredParams: ['project', 'region'], - pathParams: ['project', 'region'], + requiredParams: ['project'], + pathParams: ['project'], context: this.context, }; if (callback) { @@ -58108,7 +62585,7 @@ export namespace compute_v1 { } /** - * Retrieves the list of interconnect attachments contained within the specified region. + * Retrieves the list of licenses available in the specified project. This method does not get any licenses that belong to other projects, including licenses attached to publicly-available images, like Debian 9. If you want to get a list of publicly-available licenses, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images. * @example * ```js * // Before running the sample: @@ -58137,7 +62614,7 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.interconnectAttachments.list({ + * const res = await compute.licenses.list({ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. @@ -58159,8 +62636,6 @@ export namespace compute_v1 { * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // Name of the region for this request. - * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. * returnPartialSuccess: 'placeholder-value', * }); @@ -58170,7 +62645,6 @@ export namespace compute_v1 { * // { * // "id": "my_id", * // "items": [], - * // "kind": "my_kind", * // "nextPageToken": "my_nextPageToken", * // "selfLink": "my_selfLink", * // "warning": {} @@ -58190,56 +62664,53 @@ export namespace compute_v1 { * @returns A promise if used with async/await, or void if used with a callback. */ list( - params: Params$Resource$Interconnectattachments$List, + params: Params$Resource$Licenses$List, options: StreamMethodOptions ): GaxiosPromise; list( - params?: Params$Resource$Interconnectattachments$List, + params?: Params$Resource$Licenses$List, options?: MethodOptions - ): GaxiosPromise; + ): GaxiosPromise; list( - params: Params$Resource$Interconnectattachments$List, + params: Params$Resource$Licenses$List, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; list( - params: Params$Resource$Interconnectattachments$List, + params: Params$Resource$Licenses$List, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - list( - params: Params$Resource$Interconnectattachments$List, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; list( - callback: BodyResponseCallback + params: Params$Resource$Licenses$List, + callback: BodyResponseCallback ): void; + list(callback: BodyResponseCallback): void; list( paramsOrCallback?: - | Params$Resource$Interconnectattachments$List - | BodyResponseCallback + | Params$Resource$Licenses$List + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { - let params = (paramsOrCallback || - {}) as Params$Resource$Interconnectattachments$List; + let params = (paramsOrCallback || {}) as Params$Resource$Licenses$List; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Interconnectattachments$List; + params = {} as Params$Resource$Licenses$List; options = {}; } @@ -58253,30 +62724,29 @@ export namespace compute_v1 { options: Object.assign( { url: ( - rootUrl + - '/compute/v1/projects/{project}/regions/{region}/interconnectAttachments' + rootUrl + '/compute/v1/projects/{project}/global/licenses' ).replace(/([^:]\/)\/+/g, '$1'), method: 'GET', }, options ), params, - requiredParams: ['project', 'region'], - pathParams: ['project', 'region'], + requiredParams: ['project'], + pathParams: ['project'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Updates the specified interconnect attachment with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. + * Sets the access control policy on the specified resource. Replaces any existing policy. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images. * @example * ```js * // Before running the sample: @@ -58304,52 +62774,20 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.interconnectAttachments.patch({ - * // Name of the interconnect attachment to patch. - * interconnectAttachment: - * '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * const res = await compute.licenses.setIamPolicy({ * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // Name of the region scoping this request. - * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', - * // 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. - * // - * // 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: 'placeholder-value', + * // Name or id of the resource for this request. + * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * * // Request body metadata * requestBody: { * // request body parameters * // { - * // "adminEnabled": false, - * // "bandwidth": "my_bandwidth", - * // "candidateSubnets": [], - * // "cloudRouterIpAddress": "my_cloudRouterIpAddress", - * // "creationTimestamp": "my_creationTimestamp", - * // "customerRouterIpAddress": "my_customerRouterIpAddress", - * // "dataplaneVersion": 0, - * // "description": "my_description", - * // "edgeAvailabilityDomain": "my_edgeAvailabilityDomain", - * // "googleReferenceId": "my_googleReferenceId", - * // "id": "my_id", - * // "interconnect": "my_interconnect", - * // "kind": "my_kind", - * // "mtu": 0, - * // "name": "my_name", - * // "operationalStatus": "my_operationalStatus", - * // "pairingKey": "my_pairingKey", - * // "partnerAsn": "my_partnerAsn", - * // "partnerMetadata": {}, - * // "privateInterconnectInfo": {}, - * // "region": "my_region", - * // "router": "my_router", - * // "selfLink": "my_selfLink", - * // "state": "my_state", - * // "type": "my_type", - * // "vlanTag8021q": 0 + * // "bindings": [], + * // "etag": "my_etag", + * // "policy": {} * // } * }, * }); @@ -58357,30 +62795,12 @@ export namespace compute_v1 { * * // Example response * // { - * // "clientOperationId": "my_clientOperationId", - * // "creationTimestamp": "my_creationTimestamp", - * // "description": "my_description", - * // "endTime": "my_endTime", - * // "error": {}, - * // "httpErrorMessage": "my_httpErrorMessage", - * // "httpErrorStatusCode": 0, - * // "id": "my_id", - * // "insertTime": "my_insertTime", - * // "kind": "my_kind", - * // "name": "my_name", - * // "operationGroupId": "my_operationGroupId", - * // "operationType": "my_operationType", - * // "progress": 0, - * // "region": "my_region", - * // "selfLink": "my_selfLink", - * // "startTime": "my_startTime", - * // "status": "my_status", - * // "statusMessage": "my_statusMessage", - * // "targetId": "my_targetId", - * // "targetLink": "my_targetLink", - * // "user": "my_user", - * // "warnings": [], - * // "zone": "my_zone" + * // "auditConfigs": [], + * // "bindings": [], + * // "etag": "my_etag", + * // "iamOwned": false, + * // "rules": [], + * // "version": 0 * // } * } * @@ -58396,271 +62816,87 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - patch( - params: Params$Resource$Interconnectattachments$Patch, + setIamPolicy( + params: Params$Resource$Licenses$Setiampolicy, options: StreamMethodOptions ): GaxiosPromise; - patch( - params?: Params$Resource$Interconnectattachments$Patch, + setIamPolicy( + params?: Params$Resource$Licenses$Setiampolicy, options?: MethodOptions - ): GaxiosPromise; - patch( - params: Params$Resource$Interconnectattachments$Patch, + ): GaxiosPromise; + setIamPolicy( + params: Params$Resource$Licenses$Setiampolicy, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - patch( - params: Params$Resource$Interconnectattachments$Patch, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + setIamPolicy( + params: Params$Resource$Licenses$Setiampolicy, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - patch( - params: Params$Resource$Interconnectattachments$Patch, - callback: BodyResponseCallback + setIamPolicy( + params: Params$Resource$Licenses$Setiampolicy, + callback: BodyResponseCallback ): void; - patch(callback: BodyResponseCallback): void; - patch( + setIamPolicy(callback: BodyResponseCallback): void; + setIamPolicy( paramsOrCallback?: - | Params$Resource$Interconnectattachments$Patch - | BodyResponseCallback + | Params$Resource$Licenses$Setiampolicy + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { + ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Interconnectattachments$Patch; + {}) as Params$Resource$Licenses$Setiampolicy; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Interconnectattachments$Patch; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; + params = {} as Params$Resource$Licenses$Setiampolicy; options = {}; - } - - const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: ( - rootUrl + - '/compute/v1/projects/{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}' - ).replace(/([^:]\/)\/+/g, '$1'), - method: 'PATCH', - }, - options - ), - params, - requiredParams: ['project', 'region', 'interconnectAttachment'], - pathParams: ['interconnectAttachment', 'project', 'region'], - context: this.context, - }; - if (callback) { - createAPIRequest( - parameters, - callback as BodyResponseCallback - ); - } else { - return createAPIRequest(parameters); - } - } - } - - export interface Params$Resource$Interconnectattachments$Aggregatedlist - extends StandardParameters { - /** - * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. - * - * 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) ``` - */ - filter?: string; - /** - * Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. - */ - includeAllScopes?: boolean; - /** - * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) - */ - maxResults?: number; - /** - * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. - * - * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. - * - * Currently, only sorting by `name` or `creationTimestamp desc` is supported. - */ - orderBy?: string; - /** - * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. - */ - pageToken?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. - */ - returnPartialSuccess?: boolean; - } - export interface Params$Resource$Interconnectattachments$Delete - extends StandardParameters { - /** - * Name of the interconnect attachment to delete. - */ - interconnectAttachment?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * Name of the region for this request. - */ - region?: string; - /** - * 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. - * - * 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; - } - export interface Params$Resource$Interconnectattachments$Get - extends StandardParameters { - /** - * Name of the interconnect attachment to return. - */ - interconnectAttachment?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * Name of the region for this request. - */ - region?: string; - } - export interface Params$Resource$Interconnectattachments$Insert - extends StandardParameters { - /** - * Project ID for this request. - */ - project?: string; - /** - * Name of the region for this request. - */ - region?: string; - /** - * 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. - * - * 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; - /** - * If true, the request will not be committed. - */ - validateOnly?: boolean; - - /** - * Request body metadata - */ - requestBody?: Schema$InterconnectAttachment; - } - export interface Params$Resource$Interconnectattachments$List - extends StandardParameters { - /** - * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. - * - * 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) ``` - */ - filter?: string; - /** - * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) - */ - maxResults?: number; - /** - * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. - * - * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. - * - * Currently, only sorting by `name` or `creationTimestamp desc` is supported. - */ - orderBy?: string; - /** - * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. - */ - pageToken?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * Name of the region for this request. - */ - region?: string; - /** - * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. - */ - returnPartialSuccess?: boolean; - } - export interface Params$Resource$Interconnectattachments$Patch - extends StandardParameters { - /** - * Name of the interconnect attachment to patch. - */ - interconnectAttachment?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * Name of the region scoping this request. - */ - region?: string; - /** - * 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. - * - * 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; - - /** - * Request body metadata - */ - requestBody?: Schema$InterconnectAttachment; - } + } - export class Resource$Interconnectlocations { - context: APIRequestContext; - constructor(context: APIRequestContext) { - this.context = context; + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/v1/projects/{project}/global/licenses/{resource}/setIamPolicy' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'resource'], + pathParams: ['project', 'resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } } /** - * Returns the details for the specified interconnect location. Gets a list of available interconnect locations by making a list() request. + * Returns permissions that a caller has on the specified resource. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images. * @example * ```js * // Before running the sample: @@ -58689,32 +62925,26 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.interconnectLocations.get({ - * // Name of the interconnect location to return. - * interconnectLocation: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * const res = await compute.licenses.testIamPermissions({ * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // Name or id of the resource for this request. + * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "permissions": [] + * // } + * }, * }); * console.log(res.data); * * // Example response * // { - * // "address": "my_address", - * // "availabilityZone": "my_availabilityZone", - * // "city": "my_city", - * // "continent": "my_continent", - * // "creationTimestamp": "my_creationTimestamp", - * // "description": "my_description", - * // "facilityProvider": "my_facilityProvider", - * // "facilityProviderFacilityId": "my_facilityProviderFacilityId", - * // "id": "my_id", - * // "kind": "my_kind", - * // "name": "my_name", - * // "peeringdbFacilityId": "my_peeringdbFacilityId", - * // "regionInfos": [], - * // "selfLink": "my_selfLink", - * // "status": "my_status" + * // "permissions": [] * // } * } * @@ -58730,55 +62960,57 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - get( - params: Params$Resource$Interconnectlocations$Get, + testIamPermissions( + params: Params$Resource$Licenses$Testiampermissions, options: StreamMethodOptions ): GaxiosPromise; - get( - params?: Params$Resource$Interconnectlocations$Get, + testIamPermissions( + params?: Params$Resource$Licenses$Testiampermissions, options?: MethodOptions - ): GaxiosPromise; - get( - params: Params$Resource$Interconnectlocations$Get, + ): GaxiosPromise; + testIamPermissions( + params: Params$Resource$Licenses$Testiampermissions, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - get( - params: Params$Resource$Interconnectlocations$Get, + testIamPermissions( + params: Params$Resource$Licenses$Testiampermissions, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - get( - params: Params$Resource$Interconnectlocations$Get, - callback: BodyResponseCallback + testIamPermissions( + params: Params$Resource$Licenses$Testiampermissions, + callback: BodyResponseCallback ): void; - get(callback: BodyResponseCallback): void; - get( + testIamPermissions( + callback: BodyResponseCallback + ): void; + testIamPermissions( paramsOrCallback?: - | Params$Resource$Interconnectlocations$Get - | BodyResponseCallback + | Params$Resource$Licenses$Testiampermissions + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Interconnectlocations$Get; + {}) as Params$Resource$Licenses$Testiampermissions; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Interconnectlocations$Get; + params = {} as Params$Resource$Licenses$Testiampermissions; options = {}; } @@ -58793,29 +63025,167 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/global/interconnectLocations/{interconnectLocation}' + '/compute/v1/projects/{project}/global/licenses/{resource}/testIamPermissions' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'GET', + method: 'POST', }, options ), params, - requiredParams: ['project', 'interconnectLocation'], - pathParams: ['interconnectLocation', 'project'], + requiredParams: ['project', 'resource'], + pathParams: ['project', 'resource'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } + } + export interface Params$Resource$Licenses$Delete extends StandardParameters { /** - * Retrieves the list of interconnect locations available to the specified project. + * Name of the license resource to delete. + */ + license?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + } + export interface Params$Resource$Licenses$Get extends StandardParameters { + /** + * Name of the License resource to return. + */ + license?: string; + /** + * Project ID for this request. + */ + project?: string; + } + export interface Params$Resource$Licenses$Getiampolicy + extends StandardParameters { + /** + * Requested IAM Policy version. + */ + optionsRequestedPolicyVersion?: number; + /** + * Project ID for this request. + */ + project?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + } + export interface Params$Resource$Licenses$Insert extends StandardParameters { + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + + /** + * Request body metadata + */ + requestBody?: Schema$License; + } + export interface Params$Resource$Licenses$List extends StandardParameters { + /** + * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. + * + * 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) ``` + */ + filter?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + */ + maxResults?: number; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. + * + * Currently, only sorting by `name` or `creationTimestamp desc` is supported. + */ + orderBy?: string; + /** + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + */ + pageToken?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + */ + returnPartialSuccess?: boolean; + } + export interface Params$Resource$Licenses$Setiampolicy + extends StandardParameters { + /** + * Project ID for this request. + */ + project?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GlobalSetPolicyRequest; + } + export interface Params$Resource$Licenses$Testiampermissions + extends StandardParameters { + /** + * Project ID for this request. + */ + project?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$TestPermissionsRequest; + } + + export class Resource$Machinetypes { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Retrieves an aggregated list of machine types. * @example * ```js * // Before running the sample: @@ -58844,7 +63214,7 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.interconnectLocations.list({ + * const res = await compute.machineTypes.aggregatedList({ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. @@ -58853,6 +63223,8 @@ export namespace compute_v1 { * // * // 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) ``` * filter: 'placeholder-value', + * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. + * includeAllScopes: 'placeholder-value', * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) * maxResults: 'placeholder-value', * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. @@ -58874,10 +63246,11 @@ export namespace compute_v1 { * // Example response * // { * // "id": "my_id", - * // "items": [], + * // "items": {}, * // "kind": "my_kind", * // "nextPageToken": "my_nextPageToken", * // "selfLink": "my_selfLink", + * // "unreachables": [], * // "warning": {} * // } * } @@ -58894,55 +63267,57 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - list( - params: Params$Resource$Interconnectlocations$List, + aggregatedList( + params: Params$Resource$Machinetypes$Aggregatedlist, options: StreamMethodOptions ): GaxiosPromise; - list( - params?: Params$Resource$Interconnectlocations$List, + aggregatedList( + params?: Params$Resource$Machinetypes$Aggregatedlist, options?: MethodOptions - ): GaxiosPromise; - list( - params: Params$Resource$Interconnectlocations$List, + ): GaxiosPromise; + aggregatedList( + params: Params$Resource$Machinetypes$Aggregatedlist, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Interconnectlocations$List, + aggregatedList( + params: Params$Resource$Machinetypes$Aggregatedlist, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Interconnectlocations$List, - callback: BodyResponseCallback + aggregatedList( + params: Params$Resource$Machinetypes$Aggregatedlist, + callback: BodyResponseCallback ): void; - list(callback: BodyResponseCallback): void; - list( + aggregatedList( + callback: BodyResponseCallback + ): void; + aggregatedList( paramsOrCallback?: - | Params$Resource$Interconnectlocations$List - | BodyResponseCallback + | Params$Resource$Machinetypes$Aggregatedlist + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Interconnectlocations$List; + {}) as Params$Resource$Machinetypes$Aggregatedlist; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Interconnectlocations$List; + params = {} as Params$Resource$Machinetypes$Aggregatedlist; options = {}; } @@ -58956,8 +63331,7 @@ export namespace compute_v1 { options: Object.assign( { url: ( - rootUrl + - '/compute/v1/projects/{project}/global/interconnectLocations' + rootUrl + '/compute/v1/projects/{project}/aggregated/machineTypes' ).replace(/([^:]\/)\/+/g, '$1'), method: 'GET', }, @@ -58969,73 +63343,17 @@ export namespace compute_v1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } - } - - export interface Params$Resource$Interconnectlocations$Get - extends StandardParameters { - /** - * Name of the interconnect location to return. - */ - interconnectLocation?: string; - /** - * Project ID for this request. - */ - project?: string; - } - export interface Params$Resource$Interconnectlocations$List - extends StandardParameters { - /** - * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. - * - * 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) ``` - */ - filter?: string; - /** - * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) - */ - maxResults?: number; - /** - * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. - * - * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. - * - * Currently, only sorting by `name` or `creationTimestamp desc` is supported. - */ - orderBy?: string; - /** - * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. - */ - pageToken?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. - */ - returnPartialSuccess?: boolean; - } - - export class Resource$Interconnects { - context: APIRequestContext; - constructor(context: APIRequestContext) { - this.context = context; - } /** - * Deletes the specified interconnect. + * Returns the specified machine type. Gets a list of available machine types by making a list() request. * @example * ```js * // Before running the sample: @@ -59055,6 +63373,7 @@ export namespace compute_v1 { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', * ], * }); * @@ -59063,46 +63382,34 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.interconnects.delete({ - * // Name of the interconnect to delete. - * interconnect: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * const res = await compute.machineTypes.get({ + * // Name of the machine type to return. + * machineType: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // 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. - * // - * // 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: 'placeholder-value', + * // The name of the zone for this request. + * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', * }); * console.log(res.data); * * // Example response * // { - * // "clientOperationId": "my_clientOperationId", + * // "accelerators": [], * // "creationTimestamp": "my_creationTimestamp", + * // "deprecated": {}, * // "description": "my_description", - * // "endTime": "my_endTime", - * // "error": {}, - * // "httpErrorMessage": "my_httpErrorMessage", - * // "httpErrorStatusCode": 0, + * // "guestCpus": 0, * // "id": "my_id", - * // "insertTime": "my_insertTime", + * // "imageSpaceGb": 0, + * // "isSharedCpu": false, * // "kind": "my_kind", + * // "maximumPersistentDisks": 0, + * // "maximumPersistentDisksSizeGb": "my_maximumPersistentDisksSizeGb", + * // "memoryMb": 0, * // "name": "my_name", - * // "operationGroupId": "my_operationGroupId", - * // "operationType": "my_operationType", - * // "progress": 0, - * // "region": "my_region", + * // "scratchDisks": [], * // "selfLink": "my_selfLink", - * // "startTime": "my_startTime", - * // "status": "my_status", - * // "statusMessage": "my_statusMessage", - * // "targetId": "my_targetId", - * // "targetLink": "my_targetLink", - * // "user": "my_user", - * // "warnings": [], * // "zone": "my_zone" * // } * } @@ -59119,50 +63426,49 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - delete( - params: Params$Resource$Interconnects$Delete, + get( + params: Params$Resource$Machinetypes$Get, options: StreamMethodOptions ): GaxiosPromise; - delete( - params?: Params$Resource$Interconnects$Delete, + get( + params?: Params$Resource$Machinetypes$Get, options?: MethodOptions - ): GaxiosPromise; - delete( - params: Params$Resource$Interconnects$Delete, + ): GaxiosPromise; + get( + params: Params$Resource$Machinetypes$Get, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - delete( - params: Params$Resource$Interconnects$Delete, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + get( + params: Params$Resource$Machinetypes$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - delete( - params: Params$Resource$Interconnects$Delete, - callback: BodyResponseCallback + get( + params: Params$Resource$Machinetypes$Get, + callback: BodyResponseCallback ): void; - delete(callback: BodyResponseCallback): void; - delete( + get(callback: BodyResponseCallback): void; + get( paramsOrCallback?: - | Params$Resource$Interconnects$Delete - | BodyResponseCallback + | Params$Resource$Machinetypes$Get + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { - let params = (paramsOrCallback || - {}) as Params$Resource$Interconnects$Delete; + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Machinetypes$Get; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Interconnects$Delete; + params = {} as Params$Resource$Machinetypes$Get; options = {}; } @@ -59177,29 +63483,29 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/global/interconnects/{interconnect}' + '/compute/v1/projects/{project}/zones/{zone}/machineTypes/{machineType}' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'DELETE', + method: 'GET', }, options ), params, - requiredParams: ['project', 'interconnect'], - pathParams: ['interconnect', 'project'], + requiredParams: ['project', 'zone', 'machineType'], + pathParams: ['machineType', 'project', 'zone'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Returns the specified interconnect. Get a list of available interconnects by making a list() request. + * Retrieves a list of machine types available to the specified project. * @example * ```js * // Before running the sample: @@ -59228,39 +63534,43 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.interconnects.get({ - * // Name of the interconnect to return. - * interconnect: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * const res = await compute.machineTypes.list({ + * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. + * // + * // 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) ``` + * filter: 'placeholder-value', + * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * maxResults: 'placeholder-value', + * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * // + * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. + * // + * // Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * orderBy: 'placeholder-value', + * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * pageToken: 'placeholder-value', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + * returnPartialSuccess: 'placeholder-value', + * // The name of the zone for this request. + * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', * }); * console.log(res.data); * * // Example response * // { - * // "adminEnabled": false, - * // "circuitInfos": [], - * // "creationTimestamp": "my_creationTimestamp", - * // "customerName": "my_customerName", - * // "description": "my_description", - * // "expectedOutages": [], - * // "googleIpAddress": "my_googleIpAddress", - * // "googleReferenceId": "my_googleReferenceId", * // "id": "my_id", - * // "interconnectAttachments": [], - * // "interconnectType": "my_interconnectType", + * // "items": [], * // "kind": "my_kind", - * // "linkType": "my_linkType", - * // "location": "my_location", - * // "name": "my_name", - * // "nocContactEmail": "my_nocContactEmail", - * // "operationalStatus": "my_operationalStatus", - * // "peerIpAddress": "my_peerIpAddress", - * // "provisionedLinkCount": 0, - * // "requestedLinkCount": 0, + * // "nextPageToken": "my_nextPageToken", * // "selfLink": "my_selfLink", - * // "state": "my_state" + * // "warning": {} * // } * } * @@ -59276,50 +63586,50 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - get( - params: Params$Resource$Interconnects$Get, + list( + params: Params$Resource$Machinetypes$List, options: StreamMethodOptions ): GaxiosPromise; - get( - params?: Params$Resource$Interconnects$Get, + list( + params?: Params$Resource$Machinetypes$List, options?: MethodOptions - ): GaxiosPromise; - get( - params: Params$Resource$Interconnects$Get, + ): GaxiosPromise; + list( + params: Params$Resource$Machinetypes$List, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - get( - params: Params$Resource$Interconnects$Get, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + list( + params: Params$Resource$Machinetypes$List, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - get( - params: Params$Resource$Interconnects$Get, - callback: BodyResponseCallback + list( + params: Params$Resource$Machinetypes$List, + callback: BodyResponseCallback ): void; - get(callback: BodyResponseCallback): void; - get( + list(callback: BodyResponseCallback): void; + list( paramsOrCallback?: - | Params$Resource$Interconnects$Get - | BodyResponseCallback + | Params$Resource$Machinetypes$List + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { + ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Interconnects$Get; + {}) as Params$Resource$Machinetypes$List; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Interconnects$Get; + params = {} as Params$Resource$Machinetypes$List; options = {}; } @@ -59334,29 +63644,133 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/global/interconnects/{interconnect}' + '/compute/v1/projects/{project}/zones/{zone}/machineTypes' ).replace(/([^:]\/)\/+/g, '$1'), method: 'GET', }, options ), params, - requiredParams: ['project', 'interconnect'], - pathParams: ['interconnect', 'project'], + requiredParams: ['project', 'zone'], + pathParams: ['project', 'zone'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } + } + export interface Params$Resource$Machinetypes$Aggregatedlist + extends StandardParameters { /** - * Returns the interconnectDiagnostics for the specified interconnect. + * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. + * + * 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) ``` + */ + filter?: string; + /** + * Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. + */ + includeAllScopes?: boolean; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + */ + maxResults?: number; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. + * + * Currently, only sorting by `name` or `creationTimestamp desc` is supported. + */ + orderBy?: string; + /** + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + */ + pageToken?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + */ + returnPartialSuccess?: boolean; + } + export interface Params$Resource$Machinetypes$Get extends StandardParameters { + /** + * Name of the machine type to return. + */ + machineType?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * The name of the zone for this request. + */ + zone?: string; + } + export interface Params$Resource$Machinetypes$List + extends StandardParameters { + /** + * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. + * + * 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) ``` + */ + filter?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + */ + maxResults?: number; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. + * + * Currently, only sorting by `name` or `creationTimestamp desc` is supported. + */ + orderBy?: string; + /** + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + */ + pageToken?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + */ + returnPartialSuccess?: boolean; + /** + * The name of the zone for this request. + */ + zone?: string; + } + + export class Resource$Networkendpointgroups { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Retrieves the list of network endpoint groups and sorts them by zone. * @example * ```js * // Before running the sample: @@ -59385,18 +63799,44 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.interconnects.getDiagnostics({ - * // Name of the interconnect resource to query. - * interconnect: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * const res = await compute.networkEndpointGroups.aggregatedList({ + * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. + * // + * // 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) ``` + * filter: 'placeholder-value', + * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. + * includeAllScopes: 'placeholder-value', + * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * maxResults: 'placeholder-value', + * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * // + * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. + * // + * // Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * orderBy: 'placeholder-value', + * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * pageToken: 'placeholder-value', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + * returnPartialSuccess: 'placeholder-value', * }); * console.log(res.data); * * // Example response * // { - * // "result": {} + * // "id": "my_id", + * // "items": {}, + * // "kind": "my_kind", + * // "nextPageToken": "my_nextPageToken", + * // "selfLink": "my_selfLink", + * // "unreachables": [], + * // "warning": {} * // } * } * @@ -59412,57 +63852,57 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - getDiagnostics( - params: Params$Resource$Interconnects$Getdiagnostics, + aggregatedList( + params: Params$Resource$Networkendpointgroups$Aggregatedlist, options: StreamMethodOptions ): GaxiosPromise; - getDiagnostics( - params?: Params$Resource$Interconnects$Getdiagnostics, + aggregatedList( + params?: Params$Resource$Networkendpointgroups$Aggregatedlist, options?: MethodOptions - ): GaxiosPromise; - getDiagnostics( - params: Params$Resource$Interconnects$Getdiagnostics, + ): GaxiosPromise; + aggregatedList( + params: Params$Resource$Networkendpointgroups$Aggregatedlist, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - getDiagnostics( - params: Params$Resource$Interconnects$Getdiagnostics, + aggregatedList( + params: Params$Resource$Networkendpointgroups$Aggregatedlist, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - getDiagnostics( - params: Params$Resource$Interconnects$Getdiagnostics, - callback: BodyResponseCallback + aggregatedList( + params: Params$Resource$Networkendpointgroups$Aggregatedlist, + callback: BodyResponseCallback ): void; - getDiagnostics( - callback: BodyResponseCallback + aggregatedList( + callback: BodyResponseCallback ): void; - getDiagnostics( + aggregatedList( paramsOrCallback?: - | Params$Resource$Interconnects$Getdiagnostics - | BodyResponseCallback + | Params$Resource$Networkendpointgroups$Aggregatedlist + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Interconnects$Getdiagnostics; + {}) as Params$Resource$Networkendpointgroups$Aggregatedlist; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Interconnects$Getdiagnostics; + params = {} as Params$Resource$Networkendpointgroups$Aggregatedlist; options = {}; } @@ -59477,31 +63917,31 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/global/interconnects/{interconnect}/getDiagnostics' + '/compute/v1/projects/{project}/aggregated/networkEndpointGroups' ).replace(/([^:]\/)\/+/g, '$1'), method: 'GET', }, options ), params, - requiredParams: ['project', 'interconnect'], - pathParams: ['interconnect', 'project'], + requiredParams: ['project'], + pathParams: ['project'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest( + return createAPIRequest( parameters ); } } /** - * Creates a Interconnect in the specified project using the data included in the request. + * Attach a list of network endpoints to the specified network endpoint group. * @example * ```js * // Before running the sample: @@ -59529,7 +63969,9 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.interconnects.insert({ + * const res = await compute.networkEndpointGroups.attachNetworkEndpoints({ + * // The name of the network endpoint group where you are attaching network endpoints to. It should comply with RFC1035. + * networkEndpointGroup: 'placeholder-value', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', @@ -59539,33 +63981,14 @@ export namespace compute_v1 { * // * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). * requestId: 'placeholder-value', + * // The name of the zone where the network endpoint group is located. It should comply with RFC1035. + * zone: 'placeholder-value', * * // Request body metadata * requestBody: { * // request body parameters * // { - * // "adminEnabled": false, - * // "circuitInfos": [], - * // "creationTimestamp": "my_creationTimestamp", - * // "customerName": "my_customerName", - * // "description": "my_description", - * // "expectedOutages": [], - * // "googleIpAddress": "my_googleIpAddress", - * // "googleReferenceId": "my_googleReferenceId", - * // "id": "my_id", - * // "interconnectAttachments": [], - * // "interconnectType": "my_interconnectType", - * // "kind": "my_kind", - * // "linkType": "my_linkType", - * // "location": "my_location", - * // "name": "my_name", - * // "nocContactEmail": "my_nocContactEmail", - * // "operationalStatus": "my_operationalStatus", - * // "peerIpAddress": "my_peerIpAddress", - * // "provisionedLinkCount": 0, - * // "requestedLinkCount": 0, - * // "selfLink": "my_selfLink", - * // "state": "my_state" + * // "networkEndpoints": [] * // } * }, * }); @@ -59612,32 +64035,34 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - insert( - params: Params$Resource$Interconnects$Insert, + attachNetworkEndpoints( + params: Params$Resource$Networkendpointgroups$Attachnetworkendpoints, options: StreamMethodOptions ): GaxiosPromise; - insert( - params?: Params$Resource$Interconnects$Insert, + attachNetworkEndpoints( + params?: Params$Resource$Networkendpointgroups$Attachnetworkendpoints, options?: MethodOptions ): GaxiosPromise; - insert( - params: Params$Resource$Interconnects$Insert, + attachNetworkEndpoints( + params: Params$Resource$Networkendpointgroups$Attachnetworkendpoints, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - insert( - params: Params$Resource$Interconnects$Insert, + attachNetworkEndpoints( + params: Params$Resource$Networkendpointgroups$Attachnetworkendpoints, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - insert( - params: Params$Resource$Interconnects$Insert, + attachNetworkEndpoints( + params: Params$Resource$Networkendpointgroups$Attachnetworkendpoints, callback: BodyResponseCallback ): void; - insert(callback: BodyResponseCallback): void; - insert( + attachNetworkEndpoints( + callback: BodyResponseCallback + ): void; + attachNetworkEndpoints( paramsOrCallback?: - | Params$Resource$Interconnects$Insert + | Params$Resource$Networkendpointgroups$Attachnetworkendpoints | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -59650,12 +64075,12 @@ export namespace compute_v1 { | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Interconnects$Insert; + {}) as Params$Resource$Networkendpointgroups$Attachnetworkendpoints; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Interconnects$Insert; + params = {} as Params$Resource$Networkendpointgroups$Attachnetworkendpoints; options = {}; } @@ -59669,15 +64094,16 @@ export namespace compute_v1 { options: Object.assign( { url: ( - rootUrl + '/compute/v1/projects/{project}/global/interconnects' + rootUrl + + '/compute/v1/projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/attachNetworkEndpoints' ).replace(/([^:]\/)\/+/g, '$1'), method: 'POST', }, options ), params, - requiredParams: ['project'], - pathParams: ['project'], + requiredParams: ['project', 'zone', 'networkEndpointGroup'], + pathParams: ['networkEndpointGroup', 'project', 'zone'], context: this.context, }; if (callback) { @@ -59691,7 +64117,7 @@ export namespace compute_v1 { } /** - * Retrieves the list of interconnect available to the specified project. + * Deletes the specified network endpoint group. The network endpoints in the NEG and the VM instances they belong to are not terminated when the NEG is deleted. Note that the NEG cannot be deleted if there are backend services referencing it. * @example * ```js * // Before running the sample: @@ -59711,7 +64137,6 @@ export namespace compute_v1 { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', - * 'https://www.googleapis.com/auth/compute.readonly', * ], * }); * @@ -59720,41 +64145,49 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.interconnects.list({ - * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. - * // - * // 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) ``` - * filter: 'placeholder-value', - * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) - * maxResults: 'placeholder-value', - * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. - * // - * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. - * // - * // Currently, only sorting by `name` or `creationTimestamp desc` is supported. - * orderBy: 'placeholder-value', - * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. - * pageToken: 'placeholder-value', + * const res = await compute.networkEndpointGroups.delete({ + * // The name of the network endpoint group to delete. It should comply with RFC1035. + * networkEndpointGroup: 'placeholder-value', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. - * returnPartialSuccess: 'placeholder-value', + * // 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. + * // + * // 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: 'placeholder-value', + * // The name of the zone where the network endpoint group is located. It should comply with RFC1035. + * zone: 'placeholder-value', * }); * console.log(res.data); * * // Example response * // { + * // "clientOperationId": "my_clientOperationId", + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "endTime": "my_endTime", + * // "error": {}, + * // "httpErrorMessage": "my_httpErrorMessage", + * // "httpErrorStatusCode": 0, * // "id": "my_id", - * // "items": [], + * // "insertTime": "my_insertTime", * // "kind": "my_kind", - * // "nextPageToken": "my_nextPageToken", + * // "name": "my_name", + * // "operationGroupId": "my_operationGroupId", + * // "operationType": "my_operationType", + * // "progress": 0, + * // "region": "my_region", * // "selfLink": "my_selfLink", - * // "warning": {} + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "statusMessage": "my_statusMessage", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "user": "my_user", + * // "warnings": [], + * // "zone": "my_zone" * // } * } * @@ -59770,50 +64203,50 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - list( - params: Params$Resource$Interconnects$List, + delete( + params: Params$Resource$Networkendpointgroups$Delete, options: StreamMethodOptions ): GaxiosPromise; - list( - params?: Params$Resource$Interconnects$List, + delete( + params?: Params$Resource$Networkendpointgroups$Delete, options?: MethodOptions - ): GaxiosPromise; - list( - params: Params$Resource$Interconnects$List, + ): GaxiosPromise; + delete( + params: Params$Resource$Networkendpointgroups$Delete, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Interconnects$List, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + delete( + params: Params$Resource$Networkendpointgroups$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Interconnects$List, - callback: BodyResponseCallback + delete( + params: Params$Resource$Networkendpointgroups$Delete, + callback: BodyResponseCallback ): void; - list(callback: BodyResponseCallback): void; - list( + delete(callback: BodyResponseCallback): void; + delete( paramsOrCallback?: - | Params$Resource$Interconnects$List - | BodyResponseCallback + | Params$Resource$Networkendpointgroups$Delete + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { + ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Interconnects$List; + {}) as Params$Resource$Networkendpointgroups$Delete; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Interconnects$List; + params = {} as Params$Resource$Networkendpointgroups$Delete; options = {}; } @@ -59827,29 +64260,30 @@ export namespace compute_v1 { options: Object.assign( { url: ( - rootUrl + '/compute/v1/projects/{project}/global/interconnects' + rootUrl + + '/compute/v1/projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'GET', + method: 'DELETE', }, options ), params, - requiredParams: ['project'], - pathParams: ['project'], + requiredParams: ['project', 'zone', 'networkEndpointGroup'], + pathParams: ['networkEndpointGroup', 'project', 'zone'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Updates the specified interconnect with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. + * Detach a list of network endpoints from the specified network endpoint group. * @example * ```js * // Before running the sample: @@ -59877,9 +64311,9 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.interconnects.patch({ - * // Name of the interconnect to update. - * interconnect: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * const res = await compute.networkEndpointGroups.detachNetworkEndpoints({ + * // The name of the network endpoint group where you are removing network endpoints. It should comply with RFC1035. + * networkEndpointGroup: 'placeholder-value', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', @@ -59889,33 +64323,14 @@ export namespace compute_v1 { * // * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). * requestId: 'placeholder-value', + * // The name of the zone where the network endpoint group is located. It should comply with RFC1035. + * zone: 'placeholder-value', * * // Request body metadata * requestBody: { * // request body parameters * // { - * // "adminEnabled": false, - * // "circuitInfos": [], - * // "creationTimestamp": "my_creationTimestamp", - * // "customerName": "my_customerName", - * // "description": "my_description", - * // "expectedOutages": [], - * // "googleIpAddress": "my_googleIpAddress", - * // "googleReferenceId": "my_googleReferenceId", - * // "id": "my_id", - * // "interconnectAttachments": [], - * // "interconnectType": "my_interconnectType", - * // "kind": "my_kind", - * // "linkType": "my_linkType", - * // "location": "my_location", - * // "name": "my_name", - * // "nocContactEmail": "my_nocContactEmail", - * // "operationalStatus": "my_operationalStatus", - * // "peerIpAddress": "my_peerIpAddress", - * // "provisionedLinkCount": 0, - * // "requestedLinkCount": 0, - * // "selfLink": "my_selfLink", - * // "state": "my_state" + * // "networkEndpoints": [] * // } * }, * }); @@ -59962,32 +64377,34 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - patch( - params: Params$Resource$Interconnects$Patch, + detachNetworkEndpoints( + params: Params$Resource$Networkendpointgroups$Detachnetworkendpoints, options: StreamMethodOptions ): GaxiosPromise; - patch( - params?: Params$Resource$Interconnects$Patch, + detachNetworkEndpoints( + params?: Params$Resource$Networkendpointgroups$Detachnetworkendpoints, options?: MethodOptions ): GaxiosPromise; - patch( - params: Params$Resource$Interconnects$Patch, + detachNetworkEndpoints( + params: Params$Resource$Networkendpointgroups$Detachnetworkendpoints, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - patch( - params: Params$Resource$Interconnects$Patch, + detachNetworkEndpoints( + params: Params$Resource$Networkendpointgroups$Detachnetworkendpoints, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - patch( - params: Params$Resource$Interconnects$Patch, + detachNetworkEndpoints( + params: Params$Resource$Networkendpointgroups$Detachnetworkendpoints, callback: BodyResponseCallback ): void; - patch(callback: BodyResponseCallback): void; - patch( + detachNetworkEndpoints( + callback: BodyResponseCallback + ): void; + detachNetworkEndpoints( paramsOrCallback?: - | Params$Resource$Interconnects$Patch + | Params$Resource$Networkendpointgroups$Detachnetworkendpoints | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -60000,12 +64417,12 @@ export namespace compute_v1 { | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Interconnects$Patch; + {}) as Params$Resource$Networkendpointgroups$Detachnetworkendpoints; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Interconnects$Patch; + params = {} as Params$Resource$Networkendpointgroups$Detachnetworkendpoints; options = {}; } @@ -60020,15 +64437,15 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/global/interconnects/{interconnect}' + '/compute/v1/projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/detachNetworkEndpoints' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'PATCH', + method: 'POST', }, options ), params, - requiredParams: ['project', 'interconnect'], - pathParams: ['interconnect', 'project'], + requiredParams: ['project', 'zone', 'networkEndpointGroup'], + pathParams: ['networkEndpointGroup', 'project', 'zone'], context: this.context, }; if (callback) { @@ -60040,139 +64457,9 @@ export namespace compute_v1 { return createAPIRequest(parameters); } } - } - - export interface Params$Resource$Interconnects$Delete - extends StandardParameters { - /** - * Name of the interconnect to delete. - */ - interconnect?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * 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. - * - * 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; - } - export interface Params$Resource$Interconnects$Get - extends StandardParameters { - /** - * Name of the interconnect to return. - */ - interconnect?: string; - /** - * Project ID for this request. - */ - project?: string; - } - export interface Params$Resource$Interconnects$Getdiagnostics - extends StandardParameters { - /** - * Name of the interconnect resource to query. - */ - interconnect?: string; - /** - * Project ID for this request. - */ - project?: string; - } - export interface Params$Resource$Interconnects$Insert - extends StandardParameters { - /** - * Project ID for this request. - */ - project?: string; - /** - * 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. - * - * 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; - - /** - * Request body metadata - */ - requestBody?: Schema$Interconnect; - } - export interface Params$Resource$Interconnects$List - extends StandardParameters { - /** - * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. - * - * 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) ``` - */ - filter?: string; - /** - * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) - */ - maxResults?: number; - /** - * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. - * - * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. - * - * Currently, only sorting by `name` or `creationTimestamp desc` is supported. - */ - orderBy?: string; - /** - * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. - */ - pageToken?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. - */ - returnPartialSuccess?: boolean; - } - export interface Params$Resource$Interconnects$Patch - extends StandardParameters { - /** - * Name of the interconnect to update. - */ - interconnect?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * 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. - * - * 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; - - /** - * Request body metadata - */ - requestBody?: Schema$Interconnect; - } - - export class Resource$Licensecodes { - context: APIRequestContext; - constructor(context: APIRequestContext) { - this.context = context; - } /** - * Return a specified license code. License codes are mirrored across all projects that have permissions to read the License Code. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images. + * Returns the specified network endpoint group. Gets a list of available network endpoint groups by making a list() request. * @example * ```js * // Before running the sample: @@ -60201,26 +64488,36 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.licenseCodes.get({ - * // Number corresponding to the License code resource to return. - * licenseCode: '[0-9]{0,61}?', + * const res = await compute.networkEndpointGroups.get({ + * // The name of the network endpoint group. It should comply with RFC1035. + * networkEndpointGroup: 'placeholder-value', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // The name of the zone where the network endpoint group is located. It should comply with RFC1035. + * zone: 'placeholder-value', * }); * console.log(res.data); * * // Example response * // { + * // "annotations": {}, + * // "appEngine": {}, + * // "cloudFunction": {}, + * // "cloudRun": {}, * // "creationTimestamp": "my_creationTimestamp", + * // "defaultPort": 0, * // "description": "my_description", * // "id": "my_id", * // "kind": "my_kind", - * // "licenseAlias": [], * // "name": "my_name", + * // "network": "my_network", + * // "networkEndpointType": "my_networkEndpointType", + * // "region": "my_region", * // "selfLink": "my_selfLink", - * // "state": "my_state", - * // "transferable": false + * // "size": 0, + * // "subnetwork": "my_subnetwork", + * // "zone": "my_zone" * // } * } * @@ -60237,48 +64534,54 @@ export namespace compute_v1 { * @returns A promise if used with async/await, or void if used with a callback. */ get( - params: Params$Resource$Licensecodes$Get, + params: Params$Resource$Networkendpointgroups$Get, options: StreamMethodOptions ): GaxiosPromise; get( - params?: Params$Resource$Licensecodes$Get, + params?: Params$Resource$Networkendpointgroups$Get, options?: MethodOptions - ): GaxiosPromise; + ): GaxiosPromise; get( - params: Params$Resource$Licensecodes$Get, + params: Params$Resource$Networkendpointgroups$Get, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; get( - params: Params$Resource$Licensecodes$Get, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + params: Params$Resource$Networkendpointgroups$Get, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback ): void; get( - params: Params$Resource$Licensecodes$Get, - callback: BodyResponseCallback + params: Params$Resource$Networkendpointgroups$Get, + callback: BodyResponseCallback ): void; - get(callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; get( paramsOrCallback?: - | Params$Resource$Licensecodes$Get - | BodyResponseCallback + | Params$Resource$Networkendpointgroups$Get + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Licensecodes$Get; + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Networkendpointgroups$Get; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Licensecodes$Get; + params = {} as Params$Resource$Networkendpointgroups$Get; options = {}; } @@ -60293,29 +64596,29 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/global/licenseCodes/{licenseCode}' + '/compute/v1/projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}' ).replace(/([^:]\/)\/+/g, '$1'), method: 'GET', }, options ), params, - requiredParams: ['project', 'licenseCode'], - pathParams: ['licenseCode', 'project'], + requiredParams: ['project', 'zone', 'networkEndpointGroup'], + pathParams: ['networkEndpointGroup', 'project', 'zone'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Returns permissions that a caller has on the specified resource. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images. + * Creates a network endpoint group in the specified project using the parameters that are included in the request. * @example * ```js * // Before running the sample: @@ -60335,7 +64638,6 @@ export namespace compute_v1 { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', - * 'https://www.googleapis.com/auth/compute.readonly', * ], * }); * @@ -60344,18 +64646,40 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.licenseCodes.testIamPermissions({ + * const res = await compute.networkEndpointGroups.insert({ * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // Name or id of the resource for this request. - * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * // 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. + * // + * // 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: 'placeholder-value', + * // The name of the zone where you want to create the network endpoint group. It should comply with RFC1035. + * zone: 'placeholder-value', * * // Request body metadata * requestBody: { * // request body parameters * // { - * // "permissions": [] + * // "annotations": {}, + * // "appEngine": {}, + * // "cloudFunction": {}, + * // "cloudRun": {}, + * // "creationTimestamp": "my_creationTimestamp", + * // "defaultPort": 0, + * // "description": "my_description", + * // "id": "my_id", + * // "kind": "my_kind", + * // "name": "my_name", + * // "network": "my_network", + * // "networkEndpointType": "my_networkEndpointType", + * // "region": "my_region", + * // "selfLink": "my_selfLink", + * // "size": 0, + * // "subnetwork": "my_subnetwork", + * // "zone": "my_zone" * // } * }, * }); @@ -60363,7 +64687,30 @@ export namespace compute_v1 { * * // Example response * // { - * // "permissions": [] + * // "clientOperationId": "my_clientOperationId", + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "endTime": "my_endTime", + * // "error": {}, + * // "httpErrorMessage": "my_httpErrorMessage", + * // "httpErrorStatusCode": 0, + * // "id": "my_id", + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "name": "my_name", + * // "operationGroupId": "my_operationGroupId", + * // "operationType": "my_operationType", + * // "progress": 0, + * // "region": "my_region", + * // "selfLink": "my_selfLink", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "statusMessage": "my_statusMessage", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "user": "my_user", + * // "warnings": [], + * // "zone": "my_zone" * // } * } * @@ -60379,57 +64726,50 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - testIamPermissions( - params: Params$Resource$Licensecodes$Testiampermissions, + insert( + params: Params$Resource$Networkendpointgroups$Insert, options: StreamMethodOptions ): GaxiosPromise; - testIamPermissions( - params?: Params$Resource$Licensecodes$Testiampermissions, + insert( + params?: Params$Resource$Networkendpointgroups$Insert, options?: MethodOptions - ): GaxiosPromise; - testIamPermissions( - params: Params$Resource$Licensecodes$Testiampermissions, + ): GaxiosPromise; + insert( + params: Params$Resource$Networkendpointgroups$Insert, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - testIamPermissions( - params: Params$Resource$Licensecodes$Testiampermissions, - options: - | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - testIamPermissions( - params: Params$Resource$Licensecodes$Testiampermissions, - callback: BodyResponseCallback + insert( + params: Params$Resource$Networkendpointgroups$Insert, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - testIamPermissions( - callback: BodyResponseCallback + insert( + params: Params$Resource$Networkendpointgroups$Insert, + callback: BodyResponseCallback ): void; - testIamPermissions( + insert(callback: BodyResponseCallback): void; + insert( paramsOrCallback?: - | Params$Resource$Licensecodes$Testiampermissions - | BodyResponseCallback + | Params$Resource$Networkendpointgroups$Insert + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): - | void - | GaxiosPromise - | GaxiosPromise { + ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Licensecodes$Testiampermissions; + {}) as Params$Resource$Networkendpointgroups$Insert; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Licensecodes$Testiampermissions; + params = {} as Params$Resource$Networkendpointgroups$Insert; options = {}; } @@ -60444,63 +64784,29 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/global/licenseCodes/{resource}/testIamPermissions' + '/compute/v1/projects/{project}/zones/{zone}/networkEndpointGroups' ).replace(/([^:]\/)\/+/g, '$1'), method: 'POST', }, options ), params, - requiredParams: ['project', 'resource'], - pathParams: ['project', 'resource'], + requiredParams: ['project', 'zone'], + pathParams: ['project', 'zone'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } - } - - export interface Params$Resource$Licensecodes$Get extends StandardParameters { - /** - * Number corresponding to the License code resource to return. - */ - licenseCode?: string; - /** - * Project ID for this request. - */ - project?: string; - } - export interface Params$Resource$Licensecodes$Testiampermissions - extends StandardParameters { - /** - * Project ID for this request. - */ - project?: string; - /** - * Name or id of the resource for this request. - */ - resource?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$TestPermissionsRequest; - } - - export class Resource$Licenses { - context: APIRequestContext; - constructor(context: APIRequestContext) { - this.context = context; - } /** - * Deletes the specified license. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images. + * Retrieves the list of network endpoint groups that are located in the specified project and zone. * @example * ```js * // Before running the sample: @@ -60520,6 +64826,7 @@ export namespace compute_v1 { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', * ], * }); * @@ -60528,47 +64835,43 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.licenses.delete({ - * // Name of the license resource to delete. - * license: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * const res = await compute.networkEndpointGroups.list({ + * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. + * // + * // 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) ``` + * filter: 'placeholder-value', + * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * maxResults: 'placeholder-value', + * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * // + * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. + * // + * // Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * orderBy: 'placeholder-value', + * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * pageToken: 'placeholder-value', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // 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. - * // - * // 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: 'placeholder-value', + * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + * returnPartialSuccess: 'placeholder-value', + * // The name of the zone where the network endpoint group is located. It should comply with RFC1035. + * zone: 'placeholder-value', * }); * console.log(res.data); * * // Example response * // { - * // "clientOperationId": "my_clientOperationId", - * // "creationTimestamp": "my_creationTimestamp", - * // "description": "my_description", - * // "endTime": "my_endTime", - * // "error": {}, - * // "httpErrorMessage": "my_httpErrorMessage", - * // "httpErrorStatusCode": 0, * // "id": "my_id", - * // "insertTime": "my_insertTime", + * // "items": [], * // "kind": "my_kind", - * // "name": "my_name", - * // "operationGroupId": "my_operationGroupId", - * // "operationType": "my_operationType", - * // "progress": 0, - * // "region": "my_region", + * // "nextPageToken": "my_nextPageToken", * // "selfLink": "my_selfLink", - * // "startTime": "my_startTime", - * // "status": "my_status", - * // "statusMessage": "my_statusMessage", - * // "targetId": "my_targetId", - * // "targetLink": "my_targetLink", - * // "user": "my_user", - * // "warnings": [], - * // "zone": "my_zone" + * // "warning": {} * // } * } * @@ -60584,49 +64887,55 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - delete( - params: Params$Resource$Licenses$Delete, + list( + params: Params$Resource$Networkendpointgroups$List, options: StreamMethodOptions ): GaxiosPromise; - delete( - params?: Params$Resource$Licenses$Delete, + list( + params?: Params$Resource$Networkendpointgroups$List, options?: MethodOptions - ): GaxiosPromise; - delete( - params: Params$Resource$Licenses$Delete, + ): GaxiosPromise; + list( + params: Params$Resource$Networkendpointgroups$List, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - delete( - params: Params$Resource$Licenses$Delete, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + list( + params: Params$Resource$Networkendpointgroups$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - delete( - params: Params$Resource$Licenses$Delete, - callback: BodyResponseCallback + list( + params: Params$Resource$Networkendpointgroups$List, + callback: BodyResponseCallback ): void; - delete(callback: BodyResponseCallback): void; - delete( + list(callback: BodyResponseCallback): void; + list( paramsOrCallback?: - | Params$Resource$Licenses$Delete - | BodyResponseCallback + | Params$Resource$Networkendpointgroups$List + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Licenses$Delete; + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Networkendpointgroups$List; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Licenses$Delete; + params = {} as Params$Resource$Networkendpointgroups$List; options = {}; } @@ -60641,29 +64950,29 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/global/licenses/{license}' + '/compute/v1/projects/{project}/zones/{zone}/networkEndpointGroups' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'DELETE', + method: 'GET', }, options ), params, - requiredParams: ['project', 'license'], - pathParams: ['license', 'project'], + requiredParams: ['project', 'zone'], + pathParams: ['project', 'zone'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Returns the specified License resource. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images. + * Lists the network endpoints in the specified network endpoint group. * @example * ```js * // Before running the sample: @@ -60692,27 +65001,52 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.licenses.get({ - * // Name of the License resource to return. - * license: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * const res = await compute.networkEndpointGroups.listNetworkEndpoints({ + * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. + * // + * // 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) ``` + * filter: 'placeholder-value', + * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * maxResults: 'placeholder-value', + * // The name of the network endpoint group from which you want to generate a list of included network endpoints. It should comply with RFC1035. + * networkEndpointGroup: 'placeholder-value', + * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * // + * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. + * // + * // Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * orderBy: 'placeholder-value', + * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * pageToken: 'placeholder-value', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + * returnPartialSuccess: 'placeholder-value', + * // The name of the zone where the network endpoint group is located. It should comply with RFC1035. + * zone: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "healthStatus": "my_healthStatus" + * // } + * }, * }); * console.log(res.data); * * // Example response * // { - * // "chargesUseFee": false, - * // "creationTimestamp": "my_creationTimestamp", - * // "description": "my_description", * // "id": "my_id", + * // "items": [], * // "kind": "my_kind", - * // "licenseCode": "my_licenseCode", - * // "name": "my_name", - * // "resourceRequirements": {}, - * // "selfLink": "my_selfLink", - * // "transferable": false + * // "nextPageToken": "my_nextPageToken", + * // "warning": {} * // } * } * @@ -60728,49 +65062,57 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - get( - params: Params$Resource$Licenses$Get, + listNetworkEndpoints( + params: Params$Resource$Networkendpointgroups$Listnetworkendpoints, options: StreamMethodOptions ): GaxiosPromise; - get( - params?: Params$Resource$Licenses$Get, + listNetworkEndpoints( + params?: Params$Resource$Networkendpointgroups$Listnetworkendpoints, options?: MethodOptions - ): GaxiosPromise; - get( - params: Params$Resource$Licenses$Get, + ): GaxiosPromise; + listNetworkEndpoints( + params: Params$Resource$Networkendpointgroups$Listnetworkendpoints, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - get( - params: Params$Resource$Licenses$Get, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + listNetworkEndpoints( + params: Params$Resource$Networkendpointgroups$Listnetworkendpoints, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - get( - params: Params$Resource$Licenses$Get, - callback: BodyResponseCallback + listNetworkEndpoints( + params: Params$Resource$Networkendpointgroups$Listnetworkendpoints, + callback: BodyResponseCallback ): void; - get(callback: BodyResponseCallback): void; - get( + listNetworkEndpoints( + callback: BodyResponseCallback + ): void; + listNetworkEndpoints( paramsOrCallback?: - | Params$Resource$Licenses$Get - | BodyResponseCallback + | Params$Resource$Networkendpointgroups$Listnetworkendpoints + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Licenses$Get; + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Networkendpointgroups$Listnetworkendpoints; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Licenses$Get; + params = {} as Params$Resource$Networkendpointgroups$Listnetworkendpoints; options = {}; } @@ -60785,29 +65127,31 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/global/licenses/{license}' + '/compute/v1/projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/listNetworkEndpoints' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'GET', + method: 'POST', }, options ), params, - requiredParams: ['project', 'license'], - pathParams: ['license', 'project'], + requiredParams: ['project', 'zone', 'networkEndpointGroup'], + pathParams: ['networkEndpointGroup', 'project', 'zone'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest( + parameters + ); } } /** - * Gets the access control policy for a resource. May be empty if no such policy or resource exists. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images. + * Returns permissions that a caller has on the specified resource. * @example * ```js * // Before running the sample: @@ -60836,25 +65180,28 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.licenses.getIamPolicy({ - * // Requested IAM Policy version. - * optionsRequestedPolicyVersion: 'placeholder-value', + * const res = await compute.networkEndpointGroups.testIamPermissions({ * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', * // Name or id of the resource for this request. - * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * // The name of the zone for this request. + * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "permissions": [] + * // } + * }, * }); * console.log(res.data); * * // Example response * // { - * // "auditConfigs": [], - * // "bindings": [], - * // "etag": "my_etag", - * // "iamOwned": false, - * // "rules": [], - * // "version": 0 + * // "permissions": [] * // } * } * @@ -60870,50 +65217,57 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - getIamPolicy( - params: Params$Resource$Licenses$Getiampolicy, + testIamPermissions( + params: Params$Resource$Networkendpointgroups$Testiampermissions, options: StreamMethodOptions ): GaxiosPromise; - getIamPolicy( - params?: Params$Resource$Licenses$Getiampolicy, + testIamPermissions( + params?: Params$Resource$Networkendpointgroups$Testiampermissions, options?: MethodOptions - ): GaxiosPromise; - getIamPolicy( - params: Params$Resource$Licenses$Getiampolicy, + ): GaxiosPromise; + testIamPermissions( + params: Params$Resource$Networkendpointgroups$Testiampermissions, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - getIamPolicy( - params: Params$Resource$Licenses$Getiampolicy, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + testIamPermissions( + params: Params$Resource$Networkendpointgroups$Testiampermissions, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - getIamPolicy( - params: Params$Resource$Licenses$Getiampolicy, - callback: BodyResponseCallback + testIamPermissions( + params: Params$Resource$Networkendpointgroups$Testiampermissions, + callback: BodyResponseCallback ): void; - getIamPolicy(callback: BodyResponseCallback): void; - getIamPolicy( + testIamPermissions( + callback: BodyResponseCallback + ): void; + testIamPermissions( paramsOrCallback?: - | Params$Resource$Licenses$Getiampolicy - | BodyResponseCallback + | Params$Resource$Networkendpointgroups$Testiampermissions + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { + ): + | void + | GaxiosPromise + | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Licenses$Getiampolicy; + {}) as Params$Resource$Networkendpointgroups$Testiampermissions; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Licenses$Getiampolicy; + params = {} as Params$Resource$Networkendpointgroups$Testiampermissions; options = {}; } @@ -60928,29 +65282,307 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/global/licenses/{resource}/getIamPolicy' + '/compute/v1/projects/{project}/zones/{zone}/networkEndpointGroups/{resource}/testIamPermissions' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'GET', + method: 'POST', }, options ), params, - requiredParams: ['project', 'resource'], - pathParams: ['project', 'resource'], + requiredParams: ['project', 'zone', 'resource'], + pathParams: ['project', 'resource', 'zone'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } + } + export interface Params$Resource$Networkendpointgroups$Aggregatedlist + extends StandardParameters { /** - * Create a License resource in the specified project. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images. + * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. + * + * 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) ``` + */ + filter?: string; + /** + * Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. + */ + includeAllScopes?: boolean; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + */ + maxResults?: number; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. + * + * Currently, only sorting by `name` or `creationTimestamp desc` is supported. + */ + orderBy?: string; + /** + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + */ + pageToken?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + */ + returnPartialSuccess?: boolean; + } + export interface Params$Resource$Networkendpointgroups$Attachnetworkendpoints + extends StandardParameters { + /** + * The name of the network endpoint group where you are attaching network endpoints to. It should comply with RFC1035. + */ + networkEndpointGroup?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + /** + * The name of the zone where the network endpoint group is located. It should comply with RFC1035. + */ + zone?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$NetworkEndpointGroupsAttachEndpointsRequest; + } + export interface Params$Resource$Networkendpointgroups$Delete + extends StandardParameters { + /** + * The name of the network endpoint group to delete. It should comply with RFC1035. + */ + networkEndpointGroup?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + /** + * The name of the zone where the network endpoint group is located. It should comply with RFC1035. + */ + zone?: string; + } + export interface Params$Resource$Networkendpointgroups$Detachnetworkendpoints + extends StandardParameters { + /** + * The name of the network endpoint group where you are removing network endpoints. It should comply with RFC1035. + */ + networkEndpointGroup?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + /** + * The name of the zone where the network endpoint group is located. It should comply with RFC1035. + */ + zone?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$NetworkEndpointGroupsDetachEndpointsRequest; + } + export interface Params$Resource$Networkendpointgroups$Get + extends StandardParameters { + /** + * The name of the network endpoint group. It should comply with RFC1035. + */ + networkEndpointGroup?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * The name of the zone where the network endpoint group is located. It should comply with RFC1035. + */ + zone?: string; + } + export interface Params$Resource$Networkendpointgroups$Insert + extends StandardParameters { + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + /** + * The name of the zone where you want to create the network endpoint group. It should comply with RFC1035. + */ + zone?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$NetworkEndpointGroup; + } + export interface Params$Resource$Networkendpointgroups$List + extends StandardParameters { + /** + * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. + * + * 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) ``` + */ + filter?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + */ + maxResults?: number; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. + * + * Currently, only sorting by `name` or `creationTimestamp desc` is supported. + */ + orderBy?: string; + /** + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + */ + pageToken?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + */ + returnPartialSuccess?: boolean; + /** + * The name of the zone where the network endpoint group is located. It should comply with RFC1035. + */ + zone?: string; + } + export interface Params$Resource$Networkendpointgroups$Listnetworkendpoints + extends StandardParameters { + /** + * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. + * + * 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) ``` + */ + filter?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + */ + maxResults?: number; + /** + * The name of the network endpoint group from which you want to generate a list of included network endpoints. It should comply with RFC1035. + */ + networkEndpointGroup?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. + * + * Currently, only sorting by `name` or `creationTimestamp desc` is supported. + */ + orderBy?: string; + /** + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + */ + pageToken?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + */ + returnPartialSuccess?: boolean; + /** + * The name of the zone where the network endpoint group is located. It should comply with RFC1035. + */ + zone?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$NetworkEndpointGroupsListEndpointsRequest; + } + export interface Params$Resource$Networkendpointgroups$Testiampermissions + extends StandardParameters { + /** + * Project ID for this request. + */ + project?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + /** + * The name of the zone for this request. + */ + zone?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$TestPermissionsRequest; + } + + export class Resource$Networks { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Adds a peering to the specified network. * @example * ```js * // Before running the sample: @@ -60970,9 +65602,6 @@ export namespace compute_v1 { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', - * 'https://www.googleapis.com/auth/devstorage.full_control', - * 'https://www.googleapis.com/auth/devstorage.read_only', - * 'https://www.googleapis.com/auth/devstorage.read_write', * ], * }); * @@ -60981,7 +65610,9 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.licenses.insert({ + * const res = await compute.networks.addPeering({ + * // Name of the network resource to add peering to. + * network: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', @@ -60996,16 +65627,10 @@ export namespace compute_v1 { * requestBody: { * // request body parameters * // { - * // "chargesUseFee": false, - * // "creationTimestamp": "my_creationTimestamp", - * // "description": "my_description", - * // "id": "my_id", - * // "kind": "my_kind", - * // "licenseCode": "my_licenseCode", + * // "autoCreateRoutes": false, * // "name": "my_name", - * // "resourceRequirements": {}, - * // "selfLink": "my_selfLink", - * // "transferable": false + * // "networkPeering": {}, + * // "peerNetwork": "my_peerNetwork" * // } * }, * }); @@ -61052,32 +65677,32 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - insert( - params: Params$Resource$Licenses$Insert, + addPeering( + params: Params$Resource$Networks$Addpeering, options: StreamMethodOptions ): GaxiosPromise; - insert( - params?: Params$Resource$Licenses$Insert, + addPeering( + params?: Params$Resource$Networks$Addpeering, options?: MethodOptions ): GaxiosPromise; - insert( - params: Params$Resource$Licenses$Insert, + addPeering( + params: Params$Resource$Networks$Addpeering, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - insert( - params: Params$Resource$Licenses$Insert, + addPeering( + params: Params$Resource$Networks$Addpeering, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - insert( - params: Params$Resource$Licenses$Insert, + addPeering( + params: Params$Resource$Networks$Addpeering, callback: BodyResponseCallback ): void; - insert(callback: BodyResponseCallback): void; - insert( + addPeering(callback: BodyResponseCallback): void; + addPeering( paramsOrCallback?: - | Params$Resource$Licenses$Insert + | Params$Resource$Networks$Addpeering | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -61089,12 +65714,13 @@ export namespace compute_v1 { | BodyResponseCallback | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Licenses$Insert; + let params = (paramsOrCallback || + {}) as Params$Resource$Networks$Addpeering; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Licenses$Insert; + params = {} as Params$Resource$Networks$Addpeering; options = {}; } @@ -61108,15 +65734,16 @@ export namespace compute_v1 { options: Object.assign( { url: ( - rootUrl + '/compute/v1/projects/{project}/global/licenses' + rootUrl + + '/compute/v1/projects/{project}/global/networks/{network}/addPeering' ).replace(/([^:]\/)\/+/g, '$1'), method: 'POST', }, options ), params, - requiredParams: ['project'], - pathParams: ['project'], + requiredParams: ['project', 'network'], + pathParams: ['network', 'project'], context: this.context, }; if (callback) { @@ -61130,7 +65757,7 @@ export namespace compute_v1 { } /** - * Retrieves the list of licenses available in the specified project. This method does not get any licenses that belong to other projects, including licenses attached to publicly-available images, like Debian 9. If you want to get a list of publicly-available licenses, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images. + * Deletes the specified network. * @example * ```js * // Before running the sample: @@ -61150,7 +65777,6 @@ export namespace compute_v1 { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', - * 'https://www.googleapis.com/auth/compute.readonly', * ], * }); * @@ -61159,40 +65785,47 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.licenses.list({ - * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. - * // - * // 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) ``` - * filter: 'placeholder-value', - * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) - * maxResults: 'placeholder-value', - * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. - * // - * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. - * // - * // Currently, only sorting by `name` or `creationTimestamp desc` is supported. - * orderBy: 'placeholder-value', - * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. - * pageToken: 'placeholder-value', + * const res = await compute.networks.delete({ + * // Name of the network to delete. + * network: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. - * returnPartialSuccess: 'placeholder-value', + * // 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. + * // + * // 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: 'placeholder-value', * }); * console.log(res.data); * * // Example response * // { + * // "clientOperationId": "my_clientOperationId", + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "endTime": "my_endTime", + * // "error": {}, + * // "httpErrorMessage": "my_httpErrorMessage", + * // "httpErrorStatusCode": 0, * // "id": "my_id", - * // "items": [], - * // "nextPageToken": "my_nextPageToken", + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "name": "my_name", + * // "operationGroupId": "my_operationGroupId", + * // "operationType": "my_operationType", + * // "progress": 0, + * // "region": "my_region", * // "selfLink": "my_selfLink", - * // "warning": {} + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "statusMessage": "my_statusMessage", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "user": "my_user", + * // "warnings": [], + * // "zone": "my_zone" * // } * } * @@ -61208,54 +65841,49 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - list( - params: Params$Resource$Licenses$List, + delete( + params: Params$Resource$Networks$Delete, options: StreamMethodOptions ): GaxiosPromise; - list( - params?: Params$Resource$Licenses$List, + delete( + params?: Params$Resource$Networks$Delete, options?: MethodOptions - ): GaxiosPromise; - list( - params: Params$Resource$Licenses$List, + ): GaxiosPromise; + delete( + params: Params$Resource$Networks$Delete, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Licenses$List, - options: - | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + delete( + params: Params$Resource$Networks$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Licenses$List, - callback: BodyResponseCallback + delete( + params: Params$Resource$Networks$Delete, + callback: BodyResponseCallback ): void; - list(callback: BodyResponseCallback): void; - list( + delete(callback: BodyResponseCallback): void; + delete( paramsOrCallback?: - | Params$Resource$Licenses$List - | BodyResponseCallback + | Params$Resource$Networks$Delete + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): - | void - | GaxiosPromise - | GaxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Licenses$List; + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Networks$Delete; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Licenses$List; + params = {} as Params$Resource$Networks$Delete; options = {}; } @@ -61269,29 +65897,30 @@ export namespace compute_v1 { options: Object.assign( { url: ( - rootUrl + '/compute/v1/projects/{project}/global/licenses' + rootUrl + + '/compute/v1/projects/{project}/global/networks/{network}' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'GET', + method: 'DELETE', }, options ), params, - requiredParams: ['project'], - pathParams: ['project'], + requiredParams: ['project', 'network'], + pathParams: ['network', 'project'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Sets the access control policy on the specified resource. Replaces any existing policy. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images. + * Returns the specified network. Gets a list of available networks by making a list() request. * @example * ```js * // Before running the sample: @@ -61311,6 +65940,7 @@ export namespace compute_v1 { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', * ], * }); * @@ -61319,33 +65949,30 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.licenses.setIamPolicy({ + * const res = await compute.networks.get({ + * // Name of the network to return. + * network: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // Name or id of the resource for this request. - * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "bindings": [], - * // "etag": "my_etag", - * // "policy": {} - * // } - * }, * }); * console.log(res.data); * * // Example response * // { - * // "auditConfigs": [], - * // "bindings": [], - * // "etag": "my_etag", - * // "iamOwned": false, - * // "rules": [], - * // "version": 0 + * // "IPv4Range": "my_IPv4Range", + * // "autoCreateSubnetworks": false, + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "gatewayIPv4": "my_gatewayIPv4", + * // "id": "my_id", + * // "kind": "my_kind", + * // "mtu": 0, + * // "name": "my_name", + * // "peerings": [], + * // "routingConfig": {}, + * // "selfLink": "my_selfLink", + * // "subnetworks": [] * // } * } * @@ -61361,50 +65988,49 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - setIamPolicy( - params: Params$Resource$Licenses$Setiampolicy, + get( + params: Params$Resource$Networks$Get, options: StreamMethodOptions ): GaxiosPromise; - setIamPolicy( - params?: Params$Resource$Licenses$Setiampolicy, + get( + params?: Params$Resource$Networks$Get, options?: MethodOptions - ): GaxiosPromise; - setIamPolicy( - params: Params$Resource$Licenses$Setiampolicy, + ): GaxiosPromise; + get( + params: Params$Resource$Networks$Get, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - setIamPolicy( - params: Params$Resource$Licenses$Setiampolicy, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + get( + params: Params$Resource$Networks$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - setIamPolicy( - params: Params$Resource$Licenses$Setiampolicy, - callback: BodyResponseCallback + get( + params: Params$Resource$Networks$Get, + callback: BodyResponseCallback ): void; - setIamPolicy(callback: BodyResponseCallback): void; - setIamPolicy( + get(callback: BodyResponseCallback): void; + get( paramsOrCallback?: - | Params$Resource$Licenses$Setiampolicy - | BodyResponseCallback + | Params$Resource$Networks$Get + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { - let params = (paramsOrCallback || - {}) as Params$Resource$Licenses$Setiampolicy; + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Networks$Get; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Licenses$Setiampolicy; + params = {} as Params$Resource$Networks$Get; options = {}; } @@ -61419,29 +66045,29 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/global/licenses/{resource}/setIamPolicy' + '/compute/v1/projects/{project}/global/networks/{network}' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'POST', + method: 'GET', }, options ), params, - requiredParams: ['project', 'resource'], - pathParams: ['project', 'resource'], + requiredParams: ['project', 'network'], + pathParams: ['network', 'project'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Returns permissions that a caller has on the specified resource. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images. + * Returns the effective firewalls on a given network. * @example * ```js * // Before running the sample: @@ -61470,26 +66096,19 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.licenses.testIamPermissions({ + * const res = await compute.networks.getEffectiveFirewalls({ + * // Name of the network for this request. + * network: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // Name or id of the resource for this request. - * resource: '[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "permissions": [] - * // } - * }, * }); * console.log(res.data); * * // Example response * // { - * // "permissions": [] + * // "firewallPolicys": [], + * // "firewalls": [] * // } * } * @@ -61505,57 +66124,57 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - testIamPermissions( - params: Params$Resource$Licenses$Testiampermissions, + getEffectiveFirewalls( + params: Params$Resource$Networks$Geteffectivefirewalls, options: StreamMethodOptions ): GaxiosPromise; - testIamPermissions( - params?: Params$Resource$Licenses$Testiampermissions, + getEffectiveFirewalls( + params?: Params$Resource$Networks$Geteffectivefirewalls, options?: MethodOptions - ): GaxiosPromise; - testIamPermissions( - params: Params$Resource$Licenses$Testiampermissions, + ): GaxiosPromise; + getEffectiveFirewalls( + params: Params$Resource$Networks$Geteffectivefirewalls, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - testIamPermissions( - params: Params$Resource$Licenses$Testiampermissions, + getEffectiveFirewalls( + params: Params$Resource$Networks$Geteffectivefirewalls, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - testIamPermissions( - params: Params$Resource$Licenses$Testiampermissions, - callback: BodyResponseCallback + getEffectiveFirewalls( + params: Params$Resource$Networks$Geteffectivefirewalls, + callback: BodyResponseCallback ): void; - testIamPermissions( - callback: BodyResponseCallback + getEffectiveFirewalls( + callback: BodyResponseCallback ): void; - testIamPermissions( + getEffectiveFirewalls( paramsOrCallback?: - | Params$Resource$Licenses$Testiampermissions - | BodyResponseCallback + | Params$Resource$Networks$Geteffectivefirewalls + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Licenses$Testiampermissions; + {}) as Params$Resource$Networks$Geteffectivefirewalls; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Licenses$Testiampermissions; + params = {} as Params$Resource$Networks$Geteffectivefirewalls; options = {}; } @@ -61570,167 +66189,31 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/global/licenses/{resource}/testIamPermissions' + '/compute/v1/projects/{project}/global/networks/{network}/getEffectiveFirewalls' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'POST', + method: 'GET', }, options ), params, - requiredParams: ['project', 'resource'], - pathParams: ['project', 'resource'], + requiredParams: ['project', 'network'], + pathParams: ['network', 'project'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest( + parameters + ); } } - } - - export interface Params$Resource$Licenses$Delete extends StandardParameters { - /** - * Name of the license resource to delete. - */ - license?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * 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. - * - * 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; - } - export interface Params$Resource$Licenses$Get extends StandardParameters { - /** - * Name of the License resource to return. - */ - license?: string; - /** - * Project ID for this request. - */ - project?: string; - } - export interface Params$Resource$Licenses$Getiampolicy - extends StandardParameters { - /** - * Requested IAM Policy version. - */ - optionsRequestedPolicyVersion?: number; - /** - * Project ID for this request. - */ - project?: string; - /** - * Name or id of the resource for this request. - */ - resource?: string; - } - export interface Params$Resource$Licenses$Insert extends StandardParameters { - /** - * Project ID for this request. - */ - project?: string; - /** - * 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. - * - * 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; - - /** - * Request body metadata - */ - requestBody?: Schema$License; - } - export interface Params$Resource$Licenses$List extends StandardParameters { - /** - * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. - * - * 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) ``` - */ - filter?: string; - /** - * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) - */ - maxResults?: number; - /** - * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. - * - * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. - * - * Currently, only sorting by `name` or `creationTimestamp desc` is supported. - */ - orderBy?: string; - /** - * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. - */ - pageToken?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. - */ - returnPartialSuccess?: boolean; - } - export interface Params$Resource$Licenses$Setiampolicy - extends StandardParameters { - /** - * Project ID for this request. - */ - project?: string; - /** - * Name or id of the resource for this request. - */ - resource?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$GlobalSetPolicyRequest; - } - export interface Params$Resource$Licenses$Testiampermissions - extends StandardParameters { - /** - * Project ID for this request. - */ - project?: string; - /** - * Name or id of the resource for this request. - */ - resource?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$TestPermissionsRequest; - } - - export class Resource$Machinetypes { - context: APIRequestContext; - constructor(context: APIRequestContext) { - this.context = context; - } /** - * Retrieves an aggregated list of machine types. + * Creates a network in the specified project using the data included in the request. * @example * ```js * // Before running the sample: @@ -61738,65 +66221,85 @@ export namespace compute_v1 { * // https://console.developers.google.com/apis/api/compute.googleapis.com * // - Login into gcloud by running: * // `$ gcloud auth application-default login` - * // - Install the npm module by running: - * // `$ npm install googleapis` - * - * const {google} = require('googleapis'); - * const compute = google.compute('v1'); - * - * async function main() { - * const auth = new google.auth.GoogleAuth({ - * // Scopes can be specified either as an array or as a single, space-delimited string. - * scopes: [ - * 'https://www.googleapis.com/auth/cloud-platform', - * 'https://www.googleapis.com/auth/compute', - * 'https://www.googleapis.com/auth/compute.readonly', - * ], - * }); - * - * // Acquire an auth client, and bind it to all future calls - * const authClient = await auth.getClient(); - * google.options({auth: authClient}); - * - * // Do the magic - * const res = await compute.machineTypes.aggregatedList({ - * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. - * // - * // 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) ``` - * filter: 'placeholder-value', - * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. - * includeAllScopes: 'placeholder-value', - * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) - * maxResults: 'placeholder-value', - * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. - * // - * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. - * // - * // Currently, only sorting by `name` or `creationTimestamp desc` is supported. - * orderBy: 'placeholder-value', - * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. - * pageToken: 'placeholder-value', + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.networks.insert({ * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. - * returnPartialSuccess: 'placeholder-value', + * // 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. + * // + * // 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: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "IPv4Range": "my_IPv4Range", + * // "autoCreateSubnetworks": false, + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "gatewayIPv4": "my_gatewayIPv4", + * // "id": "my_id", + * // "kind": "my_kind", + * // "mtu": 0, + * // "name": "my_name", + * // "peerings": [], + * // "routingConfig": {}, + * // "selfLink": "my_selfLink", + * // "subnetworks": [] + * // } + * }, * }); * console.log(res.data); * * // Example response * // { + * // "clientOperationId": "my_clientOperationId", + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "endTime": "my_endTime", + * // "error": {}, + * // "httpErrorMessage": "my_httpErrorMessage", + * // "httpErrorStatusCode": 0, * // "id": "my_id", - * // "items": {}, + * // "insertTime": "my_insertTime", * // "kind": "my_kind", - * // "nextPageToken": "my_nextPageToken", + * // "name": "my_name", + * // "operationGroupId": "my_operationGroupId", + * // "operationType": "my_operationType", + * // "progress": 0, + * // "region": "my_region", * // "selfLink": "my_selfLink", - * // "unreachables": [], - * // "warning": {} + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "statusMessage": "my_statusMessage", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "user": "my_user", + * // "warnings": [], + * // "zone": "my_zone" * // } * } * @@ -61812,57 +66315,49 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - aggregatedList( - params: Params$Resource$Machinetypes$Aggregatedlist, + insert( + params: Params$Resource$Networks$Insert, options: StreamMethodOptions ): GaxiosPromise; - aggregatedList( - params?: Params$Resource$Machinetypes$Aggregatedlist, + insert( + params?: Params$Resource$Networks$Insert, options?: MethodOptions - ): GaxiosPromise; - aggregatedList( - params: Params$Resource$Machinetypes$Aggregatedlist, + ): GaxiosPromise; + insert( + params: Params$Resource$Networks$Insert, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - aggregatedList( - params: Params$Resource$Machinetypes$Aggregatedlist, - options: - | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - aggregatedList( - params: Params$Resource$Machinetypes$Aggregatedlist, - callback: BodyResponseCallback + insert( + params: Params$Resource$Networks$Insert, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - aggregatedList( - callback: BodyResponseCallback + insert( + params: Params$Resource$Networks$Insert, + callback: BodyResponseCallback ): void; - aggregatedList( + insert(callback: BodyResponseCallback): void; + insert( paramsOrCallback?: - | Params$Resource$Machinetypes$Aggregatedlist - | BodyResponseCallback + | Params$Resource$Networks$Insert + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): - | void - | GaxiosPromise - | GaxiosPromise { - let params = (paramsOrCallback || - {}) as Params$Resource$Machinetypes$Aggregatedlist; + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Networks$Insert; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Machinetypes$Aggregatedlist; + params = {} as Params$Resource$Networks$Insert; options = {}; } @@ -61876,9 +66371,9 @@ export namespace compute_v1 { options: Object.assign( { url: ( - rootUrl + '/compute/v1/projects/{project}/aggregated/machineTypes' + rootUrl + '/compute/v1/projects/{project}/global/networks' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'GET', + method: 'POST', }, options ), @@ -61888,17 +66383,17 @@ export namespace compute_v1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Returns the specified machine type. Gets a list of available machine types by making a list() request. + * Retrieves the list of networks available to the specified project. * @example * ```js * // Before running the sample: @@ -61927,35 +66422,41 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.machineTypes.get({ - * // Name of the machine type to return. - * machineType: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * const res = await compute.networks.list({ + * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. + * // + * // 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) ``` + * filter: 'placeholder-value', + * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * maxResults: 'placeholder-value', + * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * // + * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. + * // + * // Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * orderBy: 'placeholder-value', + * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * pageToken: 'placeholder-value', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // The name of the zone for this request. - * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + * returnPartialSuccess: 'placeholder-value', * }); * console.log(res.data); * * // Example response * // { - * // "accelerators": [], - * // "creationTimestamp": "my_creationTimestamp", - * // "deprecated": {}, - * // "description": "my_description", - * // "guestCpus": 0, * // "id": "my_id", - * // "imageSpaceGb": 0, - * // "isSharedCpu": false, + * // "items": [], * // "kind": "my_kind", - * // "maximumPersistentDisks": 0, - * // "maximumPersistentDisksSizeGb": "my_maximumPersistentDisksSizeGb", - * // "memoryMb": 0, - * // "name": "my_name", - * // "scratchDisks": [], + * // "nextPageToken": "my_nextPageToken", * // "selfLink": "my_selfLink", - * // "zone": "my_zone" + * // "warning": {} * // } * } * @@ -61971,49 +66472,49 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - get( - params: Params$Resource$Machinetypes$Get, + list( + params: Params$Resource$Networks$List, options: StreamMethodOptions ): GaxiosPromise; - get( - params?: Params$Resource$Machinetypes$Get, + list( + params?: Params$Resource$Networks$List, options?: MethodOptions - ): GaxiosPromise; - get( - params: Params$Resource$Machinetypes$Get, + ): GaxiosPromise; + list( + params: Params$Resource$Networks$List, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - get( - params: Params$Resource$Machinetypes$Get, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + list( + params: Params$Resource$Networks$List, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - get( - params: Params$Resource$Machinetypes$Get, - callback: BodyResponseCallback + list( + params: Params$Resource$Networks$List, + callback: BodyResponseCallback ): void; - get(callback: BodyResponseCallback): void; - get( + list(callback: BodyResponseCallback): void; + list( paramsOrCallback?: - | Params$Resource$Machinetypes$Get - | BodyResponseCallback + | Params$Resource$Networks$List + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Machinetypes$Get; + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Networks$List; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Machinetypes$Get; + params = {} as Params$Resource$Networks$List; options = {}; } @@ -62027,30 +66528,29 @@ export namespace compute_v1 { options: Object.assign( { url: ( - rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/machineTypes/{machineType}' + rootUrl + '/compute/v1/projects/{project}/global/networks' ).replace(/([^:]\/)\/+/g, '$1'), method: 'GET', }, options ), params, - requiredParams: ['project', 'zone', 'machineType'], - pathParams: ['machineType', 'project', 'zone'], + requiredParams: ['project'], + pathParams: ['project'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Retrieves a list of machine types available to the specified project. + * Lists the peering routes exchanged over peering connection. * @example * ```js * // Before running the sample: @@ -62079,7 +66579,9 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.machineTypes.list({ + * const res = await compute.networks.listPeeringRoutes({ + * // The direction of the exchanged routes. + * direction: 'placeholder-value', * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. @@ -62090,6 +66592,8 @@ export namespace compute_v1 { * filter: 'placeholder-value', * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) * maxResults: 'placeholder-value', + * // Name of the network for this request. + * network: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. * // * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. @@ -62098,13 +66602,15 @@ export namespace compute_v1 { * orderBy: 'placeholder-value', * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. * pageToken: 'placeholder-value', + * // The response will show routes exchanged over the given peering connection. + * peeringName: 'placeholder-value', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // The region of the request. The response will include all subnet routes, static routes and dynamic routes in the region. + * region: 'placeholder-value', * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. * returnPartialSuccess: 'placeholder-value', - * // The name of the zone for this request. - * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', * }); * console.log(res.data); * @@ -62131,50 +66637,57 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - list( - params: Params$Resource$Machinetypes$List, + listPeeringRoutes( + params: Params$Resource$Networks$Listpeeringroutes, options: StreamMethodOptions ): GaxiosPromise; - list( - params?: Params$Resource$Machinetypes$List, + listPeeringRoutes( + params?: Params$Resource$Networks$Listpeeringroutes, options?: MethodOptions - ): GaxiosPromise; - list( - params: Params$Resource$Machinetypes$List, + ): GaxiosPromise; + listPeeringRoutes( + params: Params$Resource$Networks$Listpeeringroutes, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Machinetypes$List, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + listPeeringRoutes( + params: Params$Resource$Networks$Listpeeringroutes, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Machinetypes$List, - callback: BodyResponseCallback + listPeeringRoutes( + params: Params$Resource$Networks$Listpeeringroutes, + callback: BodyResponseCallback ): void; - list(callback: BodyResponseCallback): void; - list( + listPeeringRoutes( + callback: BodyResponseCallback + ): void; + listPeeringRoutes( paramsOrCallback?: - | Params$Resource$Machinetypes$List - | BodyResponseCallback + | Params$Resource$Networks$Listpeeringroutes + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { + ): + | void + | GaxiosPromise + | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Machinetypes$List; + {}) as Params$Resource$Networks$Listpeeringroutes; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Machinetypes$List; + params = {} as Params$Resource$Networks$Listpeeringroutes; options = {}; } @@ -62189,133 +66702,29 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/machineTypes' + '/compute/v1/projects/{project}/global/networks/{network}/listPeeringRoutes' ).replace(/([^:]\/)\/+/g, '$1'), method: 'GET', }, options ), params, - requiredParams: ['project', 'zone'], - pathParams: ['project', 'zone'], + requiredParams: ['project', 'network'], + pathParams: ['network', 'project'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } - } - - export interface Params$Resource$Machinetypes$Aggregatedlist - extends StandardParameters { - /** - * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. - * - * 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) ``` - */ - filter?: string; - /** - * Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. - */ - includeAllScopes?: boolean; - /** - * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) - */ - maxResults?: number; - /** - * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. - * - * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. - * - * Currently, only sorting by `name` or `creationTimestamp desc` is supported. - */ - orderBy?: string; - /** - * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. - */ - pageToken?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. - */ - returnPartialSuccess?: boolean; - } - export interface Params$Resource$Machinetypes$Get extends StandardParameters { - /** - * Name of the machine type to return. - */ - machineType?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * The name of the zone for this request. - */ - zone?: string; - } - export interface Params$Resource$Machinetypes$List - extends StandardParameters { - /** - * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. - * - * 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) ``` - */ - filter?: string; - /** - * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) - */ - maxResults?: number; - /** - * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. - * - * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. - * - * Currently, only sorting by `name` or `creationTimestamp desc` is supported. - */ - orderBy?: string; - /** - * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. - */ - pageToken?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. - */ - returnPartialSuccess?: boolean; - /** - * The name of the zone for this request. - */ - zone?: string; - } - - export class Resource$Networkendpointgroups { - context: APIRequestContext; - constructor(context: APIRequestContext) { - this.context = context; - } /** - * Retrieves the list of network endpoint groups and sorts them by zone. + * Patches the specified network with the data included in the request. Only the following fields can be modified: routingConfig.routingMode. * @example * ```js * // Before running the sample: @@ -62335,7 +66744,6 @@ export namespace compute_v1 { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', - * 'https://www.googleapis.com/auth/compute.readonly', * ], * }); * @@ -62344,44 +66752,67 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.networkEndpointGroups.aggregatedList({ - * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. - * // - * // 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) ``` - * filter: 'placeholder-value', - * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. - * includeAllScopes: 'placeholder-value', - * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) - * maxResults: 'placeholder-value', - * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. - * // - * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. - * // - * // Currently, only sorting by `name` or `creationTimestamp desc` is supported. - * orderBy: 'placeholder-value', - * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. - * pageToken: 'placeholder-value', + * const res = await compute.networks.patch({ + * // Name of the network to update. + * network: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. - * returnPartialSuccess: 'placeholder-value', + * // 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. + * // + * // 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: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "IPv4Range": "my_IPv4Range", + * // "autoCreateSubnetworks": false, + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "gatewayIPv4": "my_gatewayIPv4", + * // "id": "my_id", + * // "kind": "my_kind", + * // "mtu": 0, + * // "name": "my_name", + * // "peerings": [], + * // "routingConfig": {}, + * // "selfLink": "my_selfLink", + * // "subnetworks": [] + * // } + * }, * }); * console.log(res.data); * * // Example response * // { + * // "clientOperationId": "my_clientOperationId", + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "endTime": "my_endTime", + * // "error": {}, + * // "httpErrorMessage": "my_httpErrorMessage", + * // "httpErrorStatusCode": 0, * // "id": "my_id", - * // "items": {}, + * // "insertTime": "my_insertTime", * // "kind": "my_kind", - * // "nextPageToken": "my_nextPageToken", + * // "name": "my_name", + * // "operationGroupId": "my_operationGroupId", + * // "operationType": "my_operationType", + * // "progress": 0, + * // "region": "my_region", * // "selfLink": "my_selfLink", - * // "unreachables": [], - * // "warning": {} + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "statusMessage": "my_statusMessage", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "user": "my_user", + * // "warnings": [], + * // "zone": "my_zone" * // } * } * @@ -62397,57 +66828,49 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - aggregatedList( - params: Params$Resource$Networkendpointgroups$Aggregatedlist, + patch( + params: Params$Resource$Networks$Patch, options: StreamMethodOptions ): GaxiosPromise; - aggregatedList( - params?: Params$Resource$Networkendpointgroups$Aggregatedlist, + patch( + params?: Params$Resource$Networks$Patch, options?: MethodOptions - ): GaxiosPromise; - aggregatedList( - params: Params$Resource$Networkendpointgroups$Aggregatedlist, + ): GaxiosPromise; + patch( + params: Params$Resource$Networks$Patch, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - aggregatedList( - params: Params$Resource$Networkendpointgroups$Aggregatedlist, - options: - | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - aggregatedList( - params: Params$Resource$Networkendpointgroups$Aggregatedlist, - callback: BodyResponseCallback + patch( + params: Params$Resource$Networks$Patch, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - aggregatedList( - callback: BodyResponseCallback + patch( + params: Params$Resource$Networks$Patch, + callback: BodyResponseCallback ): void; - aggregatedList( + patch(callback: BodyResponseCallback): void; + patch( paramsOrCallback?: - | Params$Resource$Networkendpointgroups$Aggregatedlist - | BodyResponseCallback + | Params$Resource$Networks$Patch + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): - | void - | GaxiosPromise - | GaxiosPromise { - let params = (paramsOrCallback || - {}) as Params$Resource$Networkendpointgroups$Aggregatedlist; + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Networks$Patch; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Networkendpointgroups$Aggregatedlist; + params = {} as Params$Resource$Networks$Patch; options = {}; } @@ -62462,31 +66885,29 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/aggregated/networkEndpointGroups' + '/compute/v1/projects/{project}/global/networks/{network}' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'GET', + method: 'PATCH', }, options ), params, - requiredParams: ['project'], - pathParams: ['project'], + requiredParams: ['project', 'network'], + pathParams: ['network', 'project'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest( - parameters - ); + return createAPIRequest(parameters); } } /** - * Attach a list of network endpoints to the specified network endpoint group. + * Removes a peering from the specified network. * @example * ```js * // Before running the sample: @@ -62514,9 +66935,9 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.networkEndpointGroups.attachNetworkEndpoints({ - * // The name of the network endpoint group where you are attaching network endpoints to. It should comply with RFC1035. - * networkEndpointGroup: 'placeholder-value', + * const res = await compute.networks.removePeering({ + * // Name of the network resource to remove peering from. + * network: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', @@ -62526,14 +66947,12 @@ export namespace compute_v1 { * // * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). * requestId: 'placeholder-value', - * // The name of the zone where the network endpoint group is located. It should comply with RFC1035. - * zone: 'placeholder-value', * * // Request body metadata * requestBody: { * // request body parameters * // { - * // "networkEndpoints": [] + * // "name": "my_name" * // } * }, * }); @@ -62580,34 +66999,32 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - attachNetworkEndpoints( - params: Params$Resource$Networkendpointgroups$Attachnetworkendpoints, + removePeering( + params: Params$Resource$Networks$Removepeering, options: StreamMethodOptions ): GaxiosPromise; - attachNetworkEndpoints( - params?: Params$Resource$Networkendpointgroups$Attachnetworkendpoints, + removePeering( + params?: Params$Resource$Networks$Removepeering, options?: MethodOptions ): GaxiosPromise; - attachNetworkEndpoints( - params: Params$Resource$Networkendpointgroups$Attachnetworkendpoints, + removePeering( + params: Params$Resource$Networks$Removepeering, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - attachNetworkEndpoints( - params: Params$Resource$Networkendpointgroups$Attachnetworkendpoints, + removePeering( + params: Params$Resource$Networks$Removepeering, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - attachNetworkEndpoints( - params: Params$Resource$Networkendpointgroups$Attachnetworkendpoints, - callback: BodyResponseCallback - ): void; - attachNetworkEndpoints( + removePeering( + params: Params$Resource$Networks$Removepeering, callback: BodyResponseCallback ): void; - attachNetworkEndpoints( + removePeering(callback: BodyResponseCallback): void; + removePeering( paramsOrCallback?: - | Params$Resource$Networkendpointgroups$Attachnetworkendpoints + | Params$Resource$Networks$Removepeering | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -62620,12 +67037,12 @@ export namespace compute_v1 { | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Networkendpointgroups$Attachnetworkendpoints; + {}) as Params$Resource$Networks$Removepeering; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Networkendpointgroups$Attachnetworkendpoints; + params = {} as Params$Resource$Networks$Removepeering; options = {}; } @@ -62640,15 +67057,15 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/attachNetworkEndpoints' + '/compute/v1/projects/{project}/global/networks/{network}/removePeering' ).replace(/([^:]\/)\/+/g, '$1'), method: 'POST', }, options ), params, - requiredParams: ['project', 'zone', 'networkEndpointGroup'], - pathParams: ['networkEndpointGroup', 'project', 'zone'], + requiredParams: ['project', 'network'], + pathParams: ['network', 'project'], context: this.context, }; if (callback) { @@ -62662,7 +67079,7 @@ export namespace compute_v1 { } /** - * Deletes the specified network endpoint group. The network endpoints in the NEG and the VM instances they belong to are not terminated when the NEG is deleted. Note that the NEG cannot be deleted if there are backend services referencing it. + * Switches the network mode from auto subnet mode to custom subnet mode. * @example * ```js * // Before running the sample: @@ -62690,9 +67107,9 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.networkEndpointGroups.delete({ - * // The name of the network endpoint group to delete. It should comply with RFC1035. - * networkEndpointGroup: 'placeholder-value', + * const res = await compute.networks.switchToCustomMode({ + * // Name of the network to be updated. + * network: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', @@ -62702,8 +67119,6 @@ export namespace compute_v1 { * // * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). * requestId: 'placeholder-value', - * // The name of the zone where the network endpoint group is located. It should comply with RFC1035. - * zone: 'placeholder-value', * }); * console.log(res.data); * @@ -62748,32 +67163,32 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - delete( - params: Params$Resource$Networkendpointgroups$Delete, + switchToCustomMode( + params: Params$Resource$Networks$Switchtocustommode, options: StreamMethodOptions ): GaxiosPromise; - delete( - params?: Params$Resource$Networkendpointgroups$Delete, + switchToCustomMode( + params?: Params$Resource$Networks$Switchtocustommode, options?: MethodOptions ): GaxiosPromise; - delete( - params: Params$Resource$Networkendpointgroups$Delete, + switchToCustomMode( + params: Params$Resource$Networks$Switchtocustommode, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - delete( - params: Params$Resource$Networkendpointgroups$Delete, + switchToCustomMode( + params: Params$Resource$Networks$Switchtocustommode, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - delete( - params: Params$Resource$Networkendpointgroups$Delete, + switchToCustomMode( + params: Params$Resource$Networks$Switchtocustommode, callback: BodyResponseCallback ): void; - delete(callback: BodyResponseCallback): void; - delete( + switchToCustomMode(callback: BodyResponseCallback): void; + switchToCustomMode( paramsOrCallback?: - | Params$Resource$Networkendpointgroups$Delete + | Params$Resource$Networks$Switchtocustommode | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -62786,12 +67201,12 @@ export namespace compute_v1 { | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Networkendpointgroups$Delete; + {}) as Params$Resource$Networks$Switchtocustommode; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Networkendpointgroups$Delete; + params = {} as Params$Resource$Networks$Switchtocustommode; options = {}; } @@ -62806,15 +67221,15 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}' + '/compute/v1/projects/{project}/global/networks/{network}/switchToCustomMode' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'DELETE', + method: 'POST', }, options ), params, - requiredParams: ['project', 'zone', 'networkEndpointGroup'], - pathParams: ['networkEndpointGroup', 'project', 'zone'], + requiredParams: ['project', 'network'], + pathParams: ['network', 'project'], context: this.context, }; if (callback) { @@ -62828,7 +67243,7 @@ export namespace compute_v1 { } /** - * Detach a list of network endpoints from the specified network endpoint group. + * Updates the specified network peering with the data included in the request Only the following fields can be modified: NetworkPeering.export_custom_routes, and NetworkPeering.import_custom_routes * @example * ```js * // Before running the sample: @@ -62856,9 +67271,9 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.networkEndpointGroups.detachNetworkEndpoints({ - * // The name of the network endpoint group where you are removing network endpoints. It should comply with RFC1035. - * networkEndpointGroup: 'placeholder-value', + * const res = await compute.networks.updatePeering({ + * // Name of the network resource which the updated peering is belonging to. + * network: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', @@ -62868,14 +67283,12 @@ export namespace compute_v1 { * // * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). * requestId: 'placeholder-value', - * // The name of the zone where the network endpoint group is located. It should comply with RFC1035. - * zone: 'placeholder-value', * * // Request body metadata * requestBody: { * // request body parameters * // { - * // "networkEndpoints": [] + * // "networkPeering": {} * // } * }, * }); @@ -62922,34 +67335,32 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - detachNetworkEndpoints( - params: Params$Resource$Networkendpointgroups$Detachnetworkendpoints, + updatePeering( + params: Params$Resource$Networks$Updatepeering, options: StreamMethodOptions ): GaxiosPromise; - detachNetworkEndpoints( - params?: Params$Resource$Networkendpointgroups$Detachnetworkendpoints, + updatePeering( + params?: Params$Resource$Networks$Updatepeering, options?: MethodOptions ): GaxiosPromise; - detachNetworkEndpoints( - params: Params$Resource$Networkendpointgroups$Detachnetworkendpoints, + updatePeering( + params: Params$Resource$Networks$Updatepeering, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - detachNetworkEndpoints( - params: Params$Resource$Networkendpointgroups$Detachnetworkendpoints, + updatePeering( + params: Params$Resource$Networks$Updatepeering, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - detachNetworkEndpoints( - params: Params$Resource$Networkendpointgroups$Detachnetworkendpoints, - callback: BodyResponseCallback - ): void; - detachNetworkEndpoints( + updatePeering( + params: Params$Resource$Networks$Updatepeering, callback: BodyResponseCallback ): void; - detachNetworkEndpoints( + updatePeering(callback: BodyResponseCallback): void; + updatePeering( paramsOrCallback?: - | Params$Resource$Networkendpointgroups$Detachnetworkendpoints + | Params$Resource$Networks$Updatepeering | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -62962,12 +67373,12 @@ export namespace compute_v1 { | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Networkendpointgroups$Detachnetworkendpoints; + {}) as Params$Resource$Networks$Updatepeering; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Networkendpointgroups$Detachnetworkendpoints; + params = {} as Params$Resource$Networks$Updatepeering; options = {}; } @@ -62982,15 +67393,15 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/detachNetworkEndpoints' + '/compute/v1/projects/{project}/global/networks/{network}/updatePeering' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'POST', + method: 'PATCH', }, options ), params, - requiredParams: ['project', 'zone', 'networkEndpointGroup'], - pathParams: ['networkEndpointGroup', 'project', 'zone'], + requiredParams: ['project', 'network'], + pathParams: ['network', 'project'], context: this.context, }; if (callback) { @@ -63002,168 +67413,278 @@ export namespace compute_v1 { return createAPIRequest(parameters); } } + } + export interface Params$Resource$Networks$Addpeering + extends StandardParameters { /** - * Returns the specified network endpoint group. Gets a list of available network endpoint groups by making a list() request. - * @example - * ```js - * // Before running the sample: - * // - Enable the API at: - * // https://console.developers.google.com/apis/api/compute.googleapis.com - * // - Login into gcloud by running: - * // `$ gcloud auth application-default login` - * // - Install the npm module by running: - * // `$ npm install googleapis` + * Name of the network resource to add peering to. + */ + network?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. * - * const {google} = require('googleapis'); - * const compute = google.compute('v1'); + * 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. * - * async function main() { - * const auth = new google.auth.GoogleAuth({ - * // Scopes can be specified either as an array or as a single, space-delimited string. - * scopes: [ - * 'https://www.googleapis.com/auth/cloud-platform', - * 'https://www.googleapis.com/auth/compute', - * 'https://www.googleapis.com/auth/compute.readonly', - * ], - * }); + * The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + */ + requestId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$NetworksAddPeeringRequest; + } + export interface Params$Resource$Networks$Delete extends StandardParameters { + /** + * Name of the network to delete. + */ + network?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. * - * // Acquire an auth client, and bind it to all future calls - * const authClient = await auth.getClient(); - * google.options({auth: authClient}); + * 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. * - * // Do the magic - * const res = await compute.networkEndpointGroups.get({ - * // The name of the network endpoint group. It should comply with RFC1035. - * networkEndpointGroup: 'placeholder-value', - * // Project ID for this request. - * project: - * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // The name of the zone where the network endpoint group is located. It should comply with RFC1035. - * zone: 'placeholder-value', - * }); - * console.log(res.data); + * The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + */ + requestId?: string; + } + export interface Params$Resource$Networks$Get extends StandardParameters { + /** + * Name of the network to return. + */ + network?: string; + /** + * Project ID for this request. + */ + project?: string; + } + export interface Params$Resource$Networks$Geteffectivefirewalls + extends StandardParameters { + /** + * Name of the network for this request. + */ + network?: string; + /** + * Project ID for this request. + */ + project?: string; + } + export interface Params$Resource$Networks$Insert extends StandardParameters { + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. * - * // Example response - * // { - * // "annotations": {}, - * // "appEngine": {}, - * // "cloudFunction": {}, - * // "cloudRun": {}, - * // "creationTimestamp": "my_creationTimestamp", - * // "defaultPort": 0, - * // "description": "my_description", - * // "id": "my_id", - * // "kind": "my_kind", - * // "name": "my_name", - * // "network": "my_network", - * // "networkEndpointType": "my_networkEndpointType", - * // "region": "my_region", - * // "selfLink": "my_selfLink", - * // "size": 0, - * // "subnetwork": "my_subnetwork", - * // "zone": "my_zone" - * // } - * } + * 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. * - * main().catch(e => { - * console.error(e); - * throw e; - * }); + * The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + */ + requestId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Network; + } + export interface Params$Resource$Networks$List extends StandardParameters { + /** + * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. * - * @param params - Parameters for request - * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. - * @param callback - Optional callback that handles the response. - * @returns A promise if used with async/await, or void if used with a callback. + * 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) ``` */ - get( - params: Params$Resource$Networkendpointgroups$Get, - options: StreamMethodOptions - ): GaxiosPromise; - get( - params?: Params$Resource$Networkendpointgroups$Get, - options?: MethodOptions - ): GaxiosPromise; - get( - params: Params$Resource$Networkendpointgroups$Get, - options: StreamMethodOptions | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - get( - params: Params$Resource$Networkendpointgroups$Get, - options: - | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - get( - params: Params$Resource$Networkendpointgroups$Get, - callback: BodyResponseCallback - ): void; - get(callback: BodyResponseCallback): void; - get( - paramsOrCallback?: - | Params$Resource$Networkendpointgroups$Get - | BodyResponseCallback - | BodyResponseCallback, - optionsOrCallback?: - | MethodOptions - | StreamMethodOptions - | BodyResponseCallback - | BodyResponseCallback, - callback?: - | BodyResponseCallback - | BodyResponseCallback - ): - | void - | GaxiosPromise - | GaxiosPromise { - let params = (paramsOrCallback || - {}) as Params$Resource$Networkendpointgroups$Get; - let options = (optionsOrCallback || {}) as MethodOptions; + filter?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + */ + maxResults?: number; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. + * + * Currently, only sorting by `name` or `creationTimestamp desc` is supported. + */ + orderBy?: string; + /** + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + */ + pageToken?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + */ + returnPartialSuccess?: boolean; + } + export interface Params$Resource$Networks$Listpeeringroutes + extends StandardParameters { + /** + * The direction of the exchanged routes. + */ + direction?: string; + /** + * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. + * + * 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) ``` + */ + filter?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + */ + maxResults?: number; + /** + * Name of the network for this request. + */ + network?: string; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. + * + * Currently, only sorting by `name` or `creationTimestamp desc` is supported. + */ + orderBy?: string; + /** + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + */ + pageToken?: string; + /** + * The response will show routes exchanged over the given peering connection. + */ + peeringName?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * The region of the request. The response will include all subnet routes, static routes and dynamic routes in the region. + */ + region?: string; + /** + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + */ + returnPartialSuccess?: boolean; + } + export interface Params$Resource$Networks$Patch extends StandardParameters { + /** + * Name of the network to update. + */ + network?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + + /** + * Request body metadata + */ + requestBody?: Schema$Network; + } + export interface Params$Resource$Networks$Removepeering + extends StandardParameters { + /** + * Name of the network resource to remove peering from. + */ + network?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Networkendpointgroups$Get; - options = {}; - } + /** + * Request body metadata + */ + requestBody?: Schema$NetworksRemovePeeringRequest; + } + export interface Params$Resource$Networks$Switchtocustommode + extends StandardParameters { + /** + * Name of the network to be updated. + */ + network?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + } + export interface Params$Resource$Networks$Updatepeering + extends StandardParameters { + /** + * Name of the network resource which the updated peering is belonging to. + */ + network?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } + /** + * Request body metadata + */ + requestBody?: Schema$NetworksUpdatePeeringRequest; + } - const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: ( - rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}' - ).replace(/([^:]\/)\/+/g, '$1'), - method: 'GET', - }, - options - ), - params, - requiredParams: ['project', 'zone', 'networkEndpointGroup'], - pathParams: ['networkEndpointGroup', 'project', 'zone'], - context: this.context, - }; - if (callback) { - createAPIRequest( - parameters, - callback as BodyResponseCallback - ); - } else { - return createAPIRequest(parameters); - } + export class Resource$Nodegroups { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; } /** - * Creates a network endpoint group in the specified project using the parameters that are included in the request. + * Adds specified number of nodes to the node group. * @example * ```js * // Before running the sample: @@ -63191,7 +67712,9 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.networkEndpointGroups.insert({ + * const res = await compute.nodeGroups.addNodes({ + * // Name of the NodeGroup resource. + * nodeGroup: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', @@ -63201,30 +67724,14 @@ export namespace compute_v1 { * // * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). * requestId: 'placeholder-value', - * // The name of the zone where you want to create the network endpoint group. It should comply with RFC1035. - * zone: 'placeholder-value', + * // The name of the zone for this request. + * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', * * // Request body metadata * requestBody: { * // request body parameters * // { - * // "annotations": {}, - * // "appEngine": {}, - * // "cloudFunction": {}, - * // "cloudRun": {}, - * // "creationTimestamp": "my_creationTimestamp", - * // "defaultPort": 0, - * // "description": "my_description", - * // "id": "my_id", - * // "kind": "my_kind", - * // "name": "my_name", - * // "network": "my_network", - * // "networkEndpointType": "my_networkEndpointType", - * // "region": "my_region", - * // "selfLink": "my_selfLink", - * // "size": 0, - * // "subnetwork": "my_subnetwork", - * // "zone": "my_zone" + * // "additionalNodeCount": 0 * // } * }, * }); @@ -63271,32 +67778,32 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - insert( - params: Params$Resource$Networkendpointgroups$Insert, + addNodes( + params: Params$Resource$Nodegroups$Addnodes, options: StreamMethodOptions ): GaxiosPromise; - insert( - params?: Params$Resource$Networkendpointgroups$Insert, + addNodes( + params?: Params$Resource$Nodegroups$Addnodes, options?: MethodOptions ): GaxiosPromise; - insert( - params: Params$Resource$Networkendpointgroups$Insert, + addNodes( + params: Params$Resource$Nodegroups$Addnodes, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - insert( - params: Params$Resource$Networkendpointgroups$Insert, + addNodes( + params: Params$Resource$Nodegroups$Addnodes, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - insert( - params: Params$Resource$Networkendpointgroups$Insert, + addNodes( + params: Params$Resource$Nodegroups$Addnodes, callback: BodyResponseCallback ): void; - insert(callback: BodyResponseCallback): void; - insert( + addNodes(callback: BodyResponseCallback): void; + addNodes( paramsOrCallback?: - | Params$Resource$Networkendpointgroups$Insert + | Params$Resource$Nodegroups$Addnodes | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -63309,12 +67816,12 @@ export namespace compute_v1 { | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Networkendpointgroups$Insert; + {}) as Params$Resource$Nodegroups$Addnodes; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Networkendpointgroups$Insert; + params = {} as Params$Resource$Nodegroups$Addnodes; options = {}; } @@ -63329,15 +67836,15 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/networkEndpointGroups' + '/compute/v1/projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/addNodes' ).replace(/([^:]\/)\/+/g, '$1'), method: 'POST', }, options ), params, - requiredParams: ['project', 'zone'], - pathParams: ['project', 'zone'], + requiredParams: ['project', 'zone', 'nodeGroup'], + pathParams: ['nodeGroup', 'project', 'zone'], context: this.context, }; if (callback) { @@ -63351,7 +67858,7 @@ export namespace compute_v1 { } /** - * Retrieves the list of network endpoint groups that are located in the specified project and zone. + * Retrieves an aggregated list of node groups. Note: use nodeGroups.listNodes for more details about each group. * @example * ```js * // Before running the sample: @@ -63380,7 +67887,7 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.networkEndpointGroups.list({ + * const res = await compute.nodeGroups.aggregatedList({ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. @@ -63389,6 +67896,8 @@ export namespace compute_v1 { * // * // 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) ``` * filter: 'placeholder-value', + * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. + * includeAllScopes: 'placeholder-value', * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) * maxResults: 'placeholder-value', * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. @@ -63404,18 +67913,17 @@ export namespace compute_v1 { * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. * returnPartialSuccess: 'placeholder-value', - * // The name of the zone where the network endpoint group is located. It should comply with RFC1035. - * zone: 'placeholder-value', * }); * console.log(res.data); * * // Example response * // { * // "id": "my_id", - * // "items": [], + * // "items": {}, * // "kind": "my_kind", * // "nextPageToken": "my_nextPageToken", * // "selfLink": "my_selfLink", + * // "unreachables": [], * // "warning": {} * // } * } @@ -63432,387 +67940,57 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - list( - params: Params$Resource$Networkendpointgroups$List, - options: StreamMethodOptions - ): GaxiosPromise; - list( - params?: Params$Resource$Networkendpointgroups$List, - options?: MethodOptions - ): GaxiosPromise; - list( - params: Params$Resource$Networkendpointgroups$List, - options: StreamMethodOptions | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - list( - params: Params$Resource$Networkendpointgroups$List, - options: - | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - list( - params: Params$Resource$Networkendpointgroups$List, - callback: BodyResponseCallback - ): void; - list(callback: BodyResponseCallback): void; - list( - paramsOrCallback?: - | Params$Resource$Networkendpointgroups$List - | BodyResponseCallback - | BodyResponseCallback, - optionsOrCallback?: - | MethodOptions - | StreamMethodOptions - | BodyResponseCallback - | BodyResponseCallback, - callback?: - | BodyResponseCallback - | BodyResponseCallback - ): - | void - | GaxiosPromise - | GaxiosPromise { - let params = (paramsOrCallback || - {}) as Params$Resource$Networkendpointgroups$List; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Networkendpointgroups$List; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: ( - rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/networkEndpointGroups' - ).replace(/([^:]\/)\/+/g, '$1'), - method: 'GET', - }, - options - ), - params, - requiredParams: ['project', 'zone'], - pathParams: ['project', 'zone'], - context: this.context, - }; - if (callback) { - createAPIRequest( - parameters, - callback as BodyResponseCallback - ); - } else { - return createAPIRequest(parameters); - } - } - - /** - * Lists the network endpoints in the specified network endpoint group. - * @example - * ```js - * // Before running the sample: - * // - Enable the API at: - * // https://console.developers.google.com/apis/api/compute.googleapis.com - * // - Login into gcloud by running: - * // `$ gcloud auth application-default login` - * // - Install the npm module by running: - * // `$ npm install googleapis` - * - * const {google} = require('googleapis'); - * const compute = google.compute('v1'); - * - * async function main() { - * const auth = new google.auth.GoogleAuth({ - * // Scopes can be specified either as an array or as a single, space-delimited string. - * scopes: [ - * 'https://www.googleapis.com/auth/cloud-platform', - * 'https://www.googleapis.com/auth/compute', - * 'https://www.googleapis.com/auth/compute.readonly', - * ], - * }); - * - * // Acquire an auth client, and bind it to all future calls - * const authClient = await auth.getClient(); - * google.options({auth: authClient}); - * - * // Do the magic - * const res = await compute.networkEndpointGroups.listNetworkEndpoints({ - * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. - * // - * // 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) ``` - * filter: 'placeholder-value', - * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) - * maxResults: 'placeholder-value', - * // The name of the network endpoint group from which you want to generate a list of included network endpoints. It should comply with RFC1035. - * networkEndpointGroup: 'placeholder-value', - * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. - * // - * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. - * // - * // Currently, only sorting by `name` or `creationTimestamp desc` is supported. - * orderBy: 'placeholder-value', - * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. - * pageToken: 'placeholder-value', - * // Project ID for this request. - * project: - * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. - * returnPartialSuccess: 'placeholder-value', - * // The name of the zone where the network endpoint group is located. It should comply with RFC1035. - * zone: 'placeholder-value', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "healthStatus": "my_healthStatus" - * // } - * }, - * }); - * console.log(res.data); - * - * // Example response - * // { - * // "id": "my_id", - * // "items": [], - * // "kind": "my_kind", - * // "nextPageToken": "my_nextPageToken", - * // "warning": {} - * // } - * } - * - * main().catch(e => { - * console.error(e); - * throw e; - * }); - * - * ``` - * - * @param params - Parameters for request - * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. - * @param callback - Optional callback that handles the response. - * @returns A promise if used with async/await, or void if used with a callback. - */ - listNetworkEndpoints( - params: Params$Resource$Networkendpointgroups$Listnetworkendpoints, - options: StreamMethodOptions - ): GaxiosPromise; - listNetworkEndpoints( - params?: Params$Resource$Networkendpointgroups$Listnetworkendpoints, - options?: MethodOptions - ): GaxiosPromise; - listNetworkEndpoints( - params: Params$Resource$Networkendpointgroups$Listnetworkendpoints, - options: StreamMethodOptions | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - listNetworkEndpoints( - params: Params$Resource$Networkendpointgroups$Listnetworkendpoints, - options: - | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - listNetworkEndpoints( - params: Params$Resource$Networkendpointgroups$Listnetworkendpoints, - callback: BodyResponseCallback - ): void; - listNetworkEndpoints( - callback: BodyResponseCallback - ): void; - listNetworkEndpoints( - paramsOrCallback?: - | Params$Resource$Networkendpointgroups$Listnetworkendpoints - | BodyResponseCallback - | BodyResponseCallback, - optionsOrCallback?: - | MethodOptions - | StreamMethodOptions - | BodyResponseCallback - | BodyResponseCallback, - callback?: - | BodyResponseCallback - | BodyResponseCallback - ): - | void - | GaxiosPromise - | GaxiosPromise { - let params = (paramsOrCallback || - {}) as Params$Resource$Networkendpointgroups$Listnetworkendpoints; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Networkendpointgroups$Listnetworkendpoints; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: ( - rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/listNetworkEndpoints' - ).replace(/([^:]\/)\/+/g, '$1'), - method: 'POST', - }, - options - ), - params, - requiredParams: ['project', 'zone', 'networkEndpointGroup'], - pathParams: ['networkEndpointGroup', 'project', 'zone'], - context: this.context, - }; - if (callback) { - createAPIRequest( - parameters, - callback as BodyResponseCallback - ); - } else { - return createAPIRequest( - parameters - ); - } - } - - /** - * Returns permissions that a caller has on the specified resource. - * @example - * ```js - * // Before running the sample: - * // - Enable the API at: - * // https://console.developers.google.com/apis/api/compute.googleapis.com - * // - Login into gcloud by running: - * // `$ gcloud auth application-default login` - * // - Install the npm module by running: - * // `$ npm install googleapis` - * - * const {google} = require('googleapis'); - * const compute = google.compute('v1'); - * - * async function main() { - * const auth = new google.auth.GoogleAuth({ - * // Scopes can be specified either as an array or as a single, space-delimited string. - * scopes: [ - * 'https://www.googleapis.com/auth/cloud-platform', - * 'https://www.googleapis.com/auth/compute', - * 'https://www.googleapis.com/auth/compute.readonly', - * ], - * }); - * - * // Acquire an auth client, and bind it to all future calls - * const authClient = await auth.getClient(); - * google.options({auth: authClient}); - * - * // Do the magic - * const res = await compute.networkEndpointGroups.testIamPermissions({ - * // Project ID for this request. - * project: - * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // Name or id of the resource for this request. - * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', - * // The name of the zone for this request. - * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "permissions": [] - * // } - * }, - * }); - * console.log(res.data); - * - * // Example response - * // { - * // "permissions": [] - * // } - * } - * - * main().catch(e => { - * console.error(e); - * throw e; - * }); - * - * ``` - * - * @param params - Parameters for request - * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. - * @param callback - Optional callback that handles the response. - * @returns A promise if used with async/await, or void if used with a callback. - */ - testIamPermissions( - params: Params$Resource$Networkendpointgroups$Testiampermissions, + aggregatedList( + params: Params$Resource$Nodegroups$Aggregatedlist, options: StreamMethodOptions ): GaxiosPromise; - testIamPermissions( - params?: Params$Resource$Networkendpointgroups$Testiampermissions, + aggregatedList( + params?: Params$Resource$Nodegroups$Aggregatedlist, options?: MethodOptions - ): GaxiosPromise; - testIamPermissions( - params: Params$Resource$Networkendpointgroups$Testiampermissions, + ): GaxiosPromise; + aggregatedList( + params: Params$Resource$Nodegroups$Aggregatedlist, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback - ): void; - testIamPermissions( - params: Params$Resource$Networkendpointgroups$Testiampermissions, + ): void; + aggregatedList( + params: Params$Resource$Nodegroups$Aggregatedlist, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - testIamPermissions( - params: Params$Resource$Networkendpointgroups$Testiampermissions, - callback: BodyResponseCallback + aggregatedList( + params: Params$Resource$Nodegroups$Aggregatedlist, + callback: BodyResponseCallback ): void; - testIamPermissions( - callback: BodyResponseCallback + aggregatedList( + callback: BodyResponseCallback ): void; - testIamPermissions( + aggregatedList( paramsOrCallback?: - | Params$Resource$Networkendpointgroups$Testiampermissions - | BodyResponseCallback + | Params$Resource$Nodegroups$Aggregatedlist + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Networkendpointgroups$Testiampermissions; + {}) as Params$Resource$Nodegroups$Aggregatedlist; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Networkendpointgroups$Testiampermissions; + params = {} as Params$Resource$Nodegroups$Aggregatedlist; options = {}; } @@ -63826,308 +68004,29 @@ export namespace compute_v1 { options: Object.assign( { url: ( - rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/networkEndpointGroups/{resource}/testIamPermissions' + rootUrl + '/compute/v1/projects/{project}/aggregated/nodeGroups' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'POST', + method: 'GET', }, options ), params, - requiredParams: ['project', 'zone', 'resource'], - pathParams: ['project', 'resource', 'zone'], + requiredParams: ['project'], + pathParams: ['project'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } - } - - export interface Params$Resource$Networkendpointgroups$Aggregatedlist - extends StandardParameters { - /** - * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. - * - * 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) ``` - */ - filter?: string; - /** - * Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. - */ - includeAllScopes?: boolean; - /** - * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) - */ - maxResults?: number; - /** - * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. - * - * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. - * - * Currently, only sorting by `name` or `creationTimestamp desc` is supported. - */ - orderBy?: string; - /** - * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. - */ - pageToken?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. - */ - returnPartialSuccess?: boolean; - } - export interface Params$Resource$Networkendpointgroups$Attachnetworkendpoints - extends StandardParameters { - /** - * The name of the network endpoint group where you are attaching network endpoints to. It should comply with RFC1035. - */ - networkEndpointGroup?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * 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. - * - * 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; - /** - * The name of the zone where the network endpoint group is located. It should comply with RFC1035. - */ - zone?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$NetworkEndpointGroupsAttachEndpointsRequest; - } - export interface Params$Resource$Networkendpointgroups$Delete - extends StandardParameters { - /** - * The name of the network endpoint group to delete. It should comply with RFC1035. - */ - networkEndpointGroup?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * 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. - * - * 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; - /** - * The name of the zone where the network endpoint group is located. It should comply with RFC1035. - */ - zone?: string; - } - export interface Params$Resource$Networkendpointgroups$Detachnetworkendpoints - extends StandardParameters { - /** - * The name of the network endpoint group where you are removing network endpoints. It should comply with RFC1035. - */ - networkEndpointGroup?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * 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. - * - * 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; - /** - * The name of the zone where the network endpoint group is located. It should comply with RFC1035. - */ - zone?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$NetworkEndpointGroupsDetachEndpointsRequest; - } - export interface Params$Resource$Networkendpointgroups$Get - extends StandardParameters { - /** - * The name of the network endpoint group. It should comply with RFC1035. - */ - networkEndpointGroup?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * The name of the zone where the network endpoint group is located. It should comply with RFC1035. - */ - zone?: string; - } - export interface Params$Resource$Networkendpointgroups$Insert - extends StandardParameters { - /** - * Project ID for this request. - */ - project?: string; - /** - * 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. - * - * 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; - /** - * The name of the zone where you want to create the network endpoint group. It should comply with RFC1035. - */ - zone?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$NetworkEndpointGroup; - } - export interface Params$Resource$Networkendpointgroups$List - extends StandardParameters { - /** - * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. - * - * 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) ``` - */ - filter?: string; - /** - * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) - */ - maxResults?: number; - /** - * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. - * - * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. - * - * Currently, only sorting by `name` or `creationTimestamp desc` is supported. - */ - orderBy?: string; - /** - * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. - */ - pageToken?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. - */ - returnPartialSuccess?: boolean; - /** - * The name of the zone where the network endpoint group is located. It should comply with RFC1035. - */ - zone?: string; - } - export interface Params$Resource$Networkendpointgroups$Listnetworkendpoints - extends StandardParameters { - /** - * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. - * - * 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) ``` - */ - filter?: string; - /** - * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) - */ - maxResults?: number; - /** - * The name of the network endpoint group from which you want to generate a list of included network endpoints. It should comply with RFC1035. - */ - networkEndpointGroup?: string; - /** - * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. - * - * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. - * - * Currently, only sorting by `name` or `creationTimestamp desc` is supported. - */ - orderBy?: string; - /** - * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. - */ - pageToken?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. - */ - returnPartialSuccess?: boolean; - /** - * The name of the zone where the network endpoint group is located. It should comply with RFC1035. - */ - zone?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$NetworkEndpointGroupsListEndpointsRequest; - } - export interface Params$Resource$Networkendpointgroups$Testiampermissions - extends StandardParameters { - /** - * Project ID for this request. - */ - project?: string; - /** - * Name or id of the resource for this request. - */ - resource?: string; - /** - * The name of the zone for this request. - */ - zone?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$TestPermissionsRequest; - } - - export class Resource$Networks { - context: APIRequestContext; - constructor(context: APIRequestContext) { - this.context = context; - } /** - * Adds a peering to the specified network. + * Deletes the specified NodeGroup resource. * @example * ```js * // Before running the sample: @@ -64155,9 +68054,9 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.networks.addPeering({ - * // Name of the network resource to add peering to. - * network: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * const res = await compute.nodeGroups.delete({ + * // Name of the NodeGroup resource to delete. + * nodeGroup: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', @@ -64167,17 +68066,8 @@ export namespace compute_v1 { * // * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). * requestId: 'placeholder-value', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "autoCreateRoutes": false, - * // "name": "my_name", - * // "networkPeering": {}, - * // "peerNetwork": "my_peerNetwork" - * // } - * }, + * // The name of the zone for this request. + * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', * }); * console.log(res.data); * @@ -64222,32 +68112,32 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - addPeering( - params: Params$Resource$Networks$Addpeering, + delete( + params: Params$Resource$Nodegroups$Delete, options: StreamMethodOptions ): GaxiosPromise; - addPeering( - params?: Params$Resource$Networks$Addpeering, + delete( + params?: Params$Resource$Nodegroups$Delete, options?: MethodOptions ): GaxiosPromise; - addPeering( - params: Params$Resource$Networks$Addpeering, + delete( + params: Params$Resource$Nodegroups$Delete, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - addPeering( - params: Params$Resource$Networks$Addpeering, + delete( + params: Params$Resource$Nodegroups$Delete, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - addPeering( - params: Params$Resource$Networks$Addpeering, + delete( + params: Params$Resource$Nodegroups$Delete, callback: BodyResponseCallback ): void; - addPeering(callback: BodyResponseCallback): void; - addPeering( + delete(callback: BodyResponseCallback): void; + delete( paramsOrCallback?: - | Params$Resource$Networks$Addpeering + | Params$Resource$Nodegroups$Delete | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -64260,12 +68150,12 @@ export namespace compute_v1 { | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Networks$Addpeering; + {}) as Params$Resource$Nodegroups$Delete; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Networks$Addpeering; + params = {} as Params$Resource$Nodegroups$Delete; options = {}; } @@ -64280,15 +68170,15 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/global/networks/{network}/addPeering' + '/compute/v1/projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'POST', + method: 'DELETE', }, options ), params, - requiredParams: ['project', 'network'], - pathParams: ['network', 'project'], + requiredParams: ['project', 'zone', 'nodeGroup'], + pathParams: ['nodeGroup', 'project', 'zone'], context: this.context, }; if (callback) { @@ -64302,7 +68192,7 @@ export namespace compute_v1 { } /** - * Deletes the specified network. + * Deletes specified nodes from the node group. * @example * ```js * // Before running the sample: @@ -64330,9 +68220,9 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.networks.delete({ - * // Name of the network to delete. - * network: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * const res = await compute.nodeGroups.deleteNodes({ + * // Name of the NodeGroup resource whose nodes will be deleted. + * nodeGroup: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', @@ -64342,6 +68232,16 @@ export namespace compute_v1 { * // * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). * requestId: 'placeholder-value', + * // The name of the zone for this request. + * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "nodes": [] + * // } + * }, * }); * console.log(res.data); * @@ -64386,32 +68286,32 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - delete( - params: Params$Resource$Networks$Delete, + deleteNodes( + params: Params$Resource$Nodegroups$Deletenodes, options: StreamMethodOptions ): GaxiosPromise; - delete( - params?: Params$Resource$Networks$Delete, + deleteNodes( + params?: Params$Resource$Nodegroups$Deletenodes, options?: MethodOptions ): GaxiosPromise; - delete( - params: Params$Resource$Networks$Delete, + deleteNodes( + params: Params$Resource$Nodegroups$Deletenodes, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - delete( - params: Params$Resource$Networks$Delete, + deleteNodes( + params: Params$Resource$Nodegroups$Deletenodes, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - delete( - params: Params$Resource$Networks$Delete, + deleteNodes( + params: Params$Resource$Nodegroups$Deletenodes, callback: BodyResponseCallback ): void; - delete(callback: BodyResponseCallback): void; - delete( + deleteNodes(callback: BodyResponseCallback): void; + deleteNodes( paramsOrCallback?: - | Params$Resource$Networks$Delete + | Params$Resource$Nodegroups$Deletenodes | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -64423,12 +68323,13 @@ export namespace compute_v1 { | BodyResponseCallback | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Networks$Delete; + let params = (paramsOrCallback || + {}) as Params$Resource$Nodegroups$Deletenodes; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Networks$Delete; + params = {} as Params$Resource$Nodegroups$Deletenodes; options = {}; } @@ -64443,15 +68344,15 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/global/networks/{network}' + '/compute/v1/projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/deleteNodes' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'DELETE', + method: 'POST', }, options ), params, - requiredParams: ['project', 'network'], - pathParams: ['network', 'project'], + requiredParams: ['project', 'zone', 'nodeGroup'], + pathParams: ['nodeGroup', 'project', 'zone'], context: this.context, }; if (callback) { @@ -64465,7 +68366,7 @@ export namespace compute_v1 { } /** - * Returns the specified network. Gets a list of available networks by making a list() request. + * Returns the specified NodeGroup. Get a list of available NodeGroups by making a list() request. Note: the "nodes" field should not be used. Use nodeGroups.listNodes instead. * @example * ```js * // Before running the sample: @@ -64494,30 +68395,34 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.networks.get({ - * // Name of the network to return. - * network: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * const res = await compute.nodeGroups.get({ + * // Name of the node group to return. + * nodeGroup: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // The name of the zone for this request. + * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', * }); * console.log(res.data); * * // Example response * // { - * // "IPv4Range": "my_IPv4Range", - * // "autoCreateSubnetworks": false, + * // "autoscalingPolicy": {}, * // "creationTimestamp": "my_creationTimestamp", * // "description": "my_description", - * // "gatewayIPv4": "my_gatewayIPv4", + * // "fingerprint": "my_fingerprint", * // "id": "my_id", * // "kind": "my_kind", - * // "mtu": 0, + * // "locationHint": "my_locationHint", + * // "maintenancePolicy": "my_maintenancePolicy", + * // "maintenanceWindow": {}, * // "name": "my_name", - * // "peerings": [], - * // "routingConfig": {}, + * // "nodeTemplate": "my_nodeTemplate", * // "selfLink": "my_selfLink", - * // "subnetworks": [] + * // "size": 0, + * // "status": "my_status", + * // "zone": "my_zone" * // } * } * @@ -64534,48 +68439,48 @@ export namespace compute_v1 { * @returns A promise if used with async/await, or void if used with a callback. */ get( - params: Params$Resource$Networks$Get, + params: Params$Resource$Nodegroups$Get, options: StreamMethodOptions ): GaxiosPromise; get( - params?: Params$Resource$Networks$Get, + params?: Params$Resource$Nodegroups$Get, options?: MethodOptions - ): GaxiosPromise; + ): GaxiosPromise; get( - params: Params$Resource$Networks$Get, + params: Params$Resource$Nodegroups$Get, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; get( - params: Params$Resource$Networks$Get, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + params: Params$Resource$Nodegroups$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; get( - params: Params$Resource$Networks$Get, - callback: BodyResponseCallback + params: Params$Resource$Nodegroups$Get, + callback: BodyResponseCallback ): void; - get(callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; get( paramsOrCallback?: - | Params$Resource$Networks$Get - | BodyResponseCallback + | Params$Resource$Nodegroups$Get + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Networks$Get; + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Nodegroups$Get; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Networks$Get; + params = {} as Params$Resource$Nodegroups$Get; options = {}; } @@ -64590,29 +68495,29 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/global/networks/{network}' + '/compute/v1/projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}' ).replace(/([^:]\/)\/+/g, '$1'), method: 'GET', }, options ), params, - requiredParams: ['project', 'network'], - pathParams: ['network', 'project'], + requiredParams: ['project', 'zone', 'nodeGroup'], + pathParams: ['nodeGroup', 'project', 'zone'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Returns the effective firewalls on a given network. + * Gets the access control policy for a resource. May be empty if no such policy or resource exists. * @example * ```js * // Before running the sample: @@ -64641,19 +68546,27 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.networks.getEffectiveFirewalls({ - * // Name of the network for this request. - * network: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * const res = await compute.nodeGroups.getIamPolicy({ + * // Requested IAM Policy version. + * optionsRequestedPolicyVersion: 'placeholder-value', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // Name or id of the resource for this request. + * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * // The name of the zone for this request. + * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', * }); * console.log(res.data); * * // Example response * // { - * // "firewallPolicys": [], - * // "firewalls": [] + * // "auditConfigs": [], + * // "bindings": [], + * // "etag": "my_etag", + * // "iamOwned": false, + * // "rules": [], + * // "version": 0 * // } * } * @@ -64669,57 +68582,50 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - getEffectiveFirewalls( - params: Params$Resource$Networks$Geteffectivefirewalls, + getIamPolicy( + params: Params$Resource$Nodegroups$Getiampolicy, options: StreamMethodOptions ): GaxiosPromise; - getEffectiveFirewalls( - params?: Params$Resource$Networks$Geteffectivefirewalls, + getIamPolicy( + params?: Params$Resource$Nodegroups$Getiampolicy, options?: MethodOptions - ): GaxiosPromise; - getEffectiveFirewalls( - params: Params$Resource$Networks$Geteffectivefirewalls, + ): GaxiosPromise; + getIamPolicy( + params: Params$Resource$Nodegroups$Getiampolicy, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - getEffectiveFirewalls( - params: Params$Resource$Networks$Geteffectivefirewalls, - options: - | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - getEffectiveFirewalls( - params: Params$Resource$Networks$Geteffectivefirewalls, - callback: BodyResponseCallback + getIamPolicy( + params: Params$Resource$Nodegroups$Getiampolicy, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - getEffectiveFirewalls( - callback: BodyResponseCallback + getIamPolicy( + params: Params$Resource$Nodegroups$Getiampolicy, + callback: BodyResponseCallback ): void; - getEffectiveFirewalls( + getIamPolicy(callback: BodyResponseCallback): void; + getIamPolicy( paramsOrCallback?: - | Params$Resource$Networks$Geteffectivefirewalls - | BodyResponseCallback + | Params$Resource$Nodegroups$Getiampolicy + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): - | void - | GaxiosPromise - | GaxiosPromise { + ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Networks$Geteffectivefirewalls; + {}) as Params$Resource$Nodegroups$Getiampolicy; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Networks$Geteffectivefirewalls; + params = {} as Params$Resource$Nodegroups$Getiampolicy; options = {}; } @@ -64734,31 +68640,29 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/global/networks/{network}/getEffectiveFirewalls' + '/compute/v1/projects/{project}/zones/{zone}/nodeGroups/{resource}/getIamPolicy' ).replace(/([^:]\/)\/+/g, '$1'), method: 'GET', }, options ), params, - requiredParams: ['project', 'network'], - pathParams: ['network', 'project'], + requiredParams: ['project', 'zone', 'resource'], + pathParams: ['project', 'resource', 'zone'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest( - parameters - ); + return createAPIRequest(parameters); } } /** - * Creates a network in the specified project using the data included in the request. + * Creates a NodeGroup resource in the specified project using the data included in the request. * @example * ```js * // Before running the sample: @@ -64786,7 +68690,9 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.networks.insert({ + * const res = await compute.nodeGroups.insert({ + * // Initial count of nodes in the node group. + * initialNodeCount: 'placeholder-value', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', @@ -64796,24 +68702,28 @@ export namespace compute_v1 { * // * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). * requestId: 'placeholder-value', + * // The name of the zone for this request. + * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', * * // Request body metadata * requestBody: { * // request body parameters * // { - * // "IPv4Range": "my_IPv4Range", - * // "autoCreateSubnetworks": false, + * // "autoscalingPolicy": {}, * // "creationTimestamp": "my_creationTimestamp", * // "description": "my_description", - * // "gatewayIPv4": "my_gatewayIPv4", + * // "fingerprint": "my_fingerprint", * // "id": "my_id", * // "kind": "my_kind", - * // "mtu": 0, + * // "locationHint": "my_locationHint", + * // "maintenancePolicy": "my_maintenancePolicy", + * // "maintenanceWindow": {}, * // "name": "my_name", - * // "peerings": [], - * // "routingConfig": {}, + * // "nodeTemplate": "my_nodeTemplate", * // "selfLink": "my_selfLink", - * // "subnetworks": [] + * // "size": 0, + * // "status": "my_status", + * // "zone": "my_zone" * // } * }, * }); @@ -64861,31 +68771,31 @@ export namespace compute_v1 { * @returns A promise if used with async/await, or void if used with a callback. */ insert( - params: Params$Resource$Networks$Insert, + params: Params$Resource$Nodegroups$Insert, options: StreamMethodOptions ): GaxiosPromise; insert( - params?: Params$Resource$Networks$Insert, + params?: Params$Resource$Nodegroups$Insert, options?: MethodOptions ): GaxiosPromise; insert( - params: Params$Resource$Networks$Insert, + params: Params$Resource$Nodegroups$Insert, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; insert( - params: Params$Resource$Networks$Insert, + params: Params$Resource$Nodegroups$Insert, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; insert( - params: Params$Resource$Networks$Insert, + params: Params$Resource$Nodegroups$Insert, callback: BodyResponseCallback ): void; insert(callback: BodyResponseCallback): void; insert( paramsOrCallback?: - | Params$Resource$Networks$Insert + | Params$Resource$Nodegroups$Insert | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -64897,12 +68807,13 @@ export namespace compute_v1 { | BodyResponseCallback | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Networks$Insert; + let params = (paramsOrCallback || + {}) as Params$Resource$Nodegroups$Insert; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Networks$Insert; + params = {} as Params$Resource$Nodegroups$Insert; options = {}; } @@ -64916,15 +68827,15 @@ export namespace compute_v1 { options: Object.assign( { url: ( - rootUrl + '/compute/v1/projects/{project}/global/networks' + rootUrl + '/compute/v1/projects/{project}/zones/{zone}/nodeGroups' ).replace(/([^:]\/)\/+/g, '$1'), method: 'POST', }, options ), params, - requiredParams: ['project'], - pathParams: ['project'], + requiredParams: ['project', 'zone', 'initialNodeCount'], + pathParams: ['project', 'zone'], context: this.context, }; if (callback) { @@ -64938,7 +68849,7 @@ export namespace compute_v1 { } /** - * Retrieves the list of networks available to the specified project. + * Retrieves a list of node groups available to the specified project. Note: use nodeGroups.listNodes for more details about each group. * @example * ```js * // Before running the sample: @@ -64967,7 +68878,7 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.networks.list({ + * const res = await compute.nodeGroups.list({ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. @@ -64991,6 +68902,8 @@ export namespace compute_v1 { * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. * returnPartialSuccess: 'placeholder-value', + * // The name of the zone for this request. + * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', * }); * console.log(res.data); * @@ -65018,48 +68931,48 @@ export namespace compute_v1 { * @returns A promise if used with async/await, or void if used with a callback. */ list( - params: Params$Resource$Networks$List, + params: Params$Resource$Nodegroups$List, options: StreamMethodOptions ): GaxiosPromise; list( - params?: Params$Resource$Networks$List, + params?: Params$Resource$Nodegroups$List, options?: MethodOptions - ): GaxiosPromise; + ): GaxiosPromise; list( - params: Params$Resource$Networks$List, + params: Params$Resource$Nodegroups$List, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; list( - params: Params$Resource$Networks$List, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + params: Params$Resource$Nodegroups$List, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; list( - params: Params$Resource$Networks$List, - callback: BodyResponseCallback + params: Params$Resource$Nodegroups$List, + callback: BodyResponseCallback ): void; - list(callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; list( paramsOrCallback?: - | Params$Resource$Networks$List - | BodyResponseCallback + | Params$Resource$Nodegroups$List + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Networks$List; + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Nodegroups$List; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Networks$List; + params = {} as Params$Resource$Nodegroups$List; options = {}; } @@ -65073,29 +68986,29 @@ export namespace compute_v1 { options: Object.assign( { url: ( - rootUrl + '/compute/v1/projects/{project}/global/networks' + rootUrl + '/compute/v1/projects/{project}/zones/{zone}/nodeGroups' ).replace(/([^:]\/)\/+/g, '$1'), method: 'GET', }, options ), params, - requiredParams: ['project'], - pathParams: ['project'], + requiredParams: ['project', 'zone'], + pathParams: ['project', 'zone'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Lists the peering routes exchanged over peering connection. + * Lists nodes in the node group. * @example * ```js * // Before running the sample: @@ -65124,9 +69037,7 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.networks.listPeeringRoutes({ - * // The direction of the exchanged routes. - * direction: 'placeholder-value', + * const res = await compute.nodeGroups.listNodes({ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. @@ -65137,8 +69048,8 @@ export namespace compute_v1 { * filter: 'placeholder-value', * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) * maxResults: 'placeholder-value', - * // Name of the network for this request. - * network: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * // Name of the NodeGroup resource whose nodes you want to list. + * nodeGroup: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. * // * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. @@ -65147,15 +69058,13 @@ export namespace compute_v1 { * orderBy: 'placeholder-value', * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. * pageToken: 'placeholder-value', - * // The response will show routes exchanged over the given peering connection. - * peeringName: 'placeholder-value', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // The region of the request. The response will include all subnet routes, static routes and dynamic routes in the region. - * region: 'placeholder-value', * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. * returnPartialSuccess: 'placeholder-value', + * // The name of the zone for this request. + * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', * }); * console.log(res.data); * @@ -65182,57 +69091,53 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - listPeeringRoutes( - params: Params$Resource$Networks$Listpeeringroutes, + listNodes( + params: Params$Resource$Nodegroups$Listnodes, options: StreamMethodOptions ): GaxiosPromise; - listPeeringRoutes( - params?: Params$Resource$Networks$Listpeeringroutes, + listNodes( + params?: Params$Resource$Nodegroups$Listnodes, options?: MethodOptions - ): GaxiosPromise; - listPeeringRoutes( - params: Params$Resource$Networks$Listpeeringroutes, + ): GaxiosPromise; + listNodes( + params: Params$Resource$Nodegroups$Listnodes, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - listPeeringRoutes( - params: Params$Resource$Networks$Listpeeringroutes, - options: - | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - listPeeringRoutes( - params: Params$Resource$Networks$Listpeeringroutes, - callback: BodyResponseCallback + listNodes( + params: Params$Resource$Nodegroups$Listnodes, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - listPeeringRoutes( - callback: BodyResponseCallback + listNodes( + params: Params$Resource$Nodegroups$Listnodes, + callback: BodyResponseCallback ): void; - listPeeringRoutes( + listNodes(callback: BodyResponseCallback): void; + listNodes( paramsOrCallback?: - | Params$Resource$Networks$Listpeeringroutes - | BodyResponseCallback + | Params$Resource$Nodegroups$Listnodes + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Networks$Listpeeringroutes; + {}) as Params$Resource$Nodegroups$Listnodes; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Networks$Listpeeringroutes; + params = {} as Params$Resource$Nodegroups$Listnodes; options = {}; } @@ -65247,29 +69152,29 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/global/networks/{network}/listPeeringRoutes' + '/compute/v1/projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/listNodes' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'GET', + method: 'POST', }, options ), params, - requiredParams: ['project', 'network'], - pathParams: ['network', 'project'], + requiredParams: ['project', 'zone', 'nodeGroup'], + pathParams: ['nodeGroup', 'project', 'zone'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Patches the specified network with the data included in the request. Only the following fields can be modified: routingConfig.routingMode. + * Updates the specified node group. * @example * ```js * // Before running the sample: @@ -65297,9 +69202,9 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.networks.patch({ - * // Name of the network to update. - * network: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * const res = await compute.nodeGroups.patch({ + * // Name of the NodeGroup resource to update. + * nodeGroup: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', @@ -65309,24 +69214,28 @@ export namespace compute_v1 { * // * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). * requestId: 'placeholder-value', + * // The name of the zone for this request. + * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', * * // Request body metadata * requestBody: { * // request body parameters * // { - * // "IPv4Range": "my_IPv4Range", - * // "autoCreateSubnetworks": false, + * // "autoscalingPolicy": {}, * // "creationTimestamp": "my_creationTimestamp", * // "description": "my_description", - * // "gatewayIPv4": "my_gatewayIPv4", + * // "fingerprint": "my_fingerprint", * // "id": "my_id", * // "kind": "my_kind", - * // "mtu": 0, + * // "locationHint": "my_locationHint", + * // "maintenancePolicy": "my_maintenancePolicy", + * // "maintenanceWindow": {}, * // "name": "my_name", - * // "peerings": [], - * // "routingConfig": {}, + * // "nodeTemplate": "my_nodeTemplate", * // "selfLink": "my_selfLink", - * // "subnetworks": [] + * // "size": 0, + * // "status": "my_status", + * // "zone": "my_zone" * // } * }, * }); @@ -65374,31 +69283,31 @@ export namespace compute_v1 { * @returns A promise if used with async/await, or void if used with a callback. */ patch( - params: Params$Resource$Networks$Patch, + params: Params$Resource$Nodegroups$Patch, options: StreamMethodOptions ): GaxiosPromise; patch( - params?: Params$Resource$Networks$Patch, + params?: Params$Resource$Nodegroups$Patch, options?: MethodOptions ): GaxiosPromise; patch( - params: Params$Resource$Networks$Patch, + params: Params$Resource$Nodegroups$Patch, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; patch( - params: Params$Resource$Networks$Patch, + params: Params$Resource$Nodegroups$Patch, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; patch( - params: Params$Resource$Networks$Patch, + params: Params$Resource$Nodegroups$Patch, callback: BodyResponseCallback ): void; patch(callback: BodyResponseCallback): void; patch( paramsOrCallback?: - | Params$Resource$Networks$Patch + | Params$Resource$Nodegroups$Patch | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -65410,12 +69319,12 @@ export namespace compute_v1 { | BodyResponseCallback | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Networks$Patch; + let params = (paramsOrCallback || {}) as Params$Resource$Nodegroups$Patch; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Networks$Patch; + params = {} as Params$Resource$Nodegroups$Patch; options = {}; } @@ -65430,15 +69339,15 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/global/networks/{network}' + '/compute/v1/projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}' ).replace(/([^:]\/)\/+/g, '$1'), method: 'PATCH', }, options ), params, - requiredParams: ['project', 'network'], - pathParams: ['network', 'project'], + requiredParams: ['project', 'zone', 'nodeGroup'], + pathParams: ['nodeGroup', 'project', 'zone'], context: this.context, }; if (callback) { @@ -65452,7 +69361,7 @@ export namespace compute_v1 { } /** - * Removes a peering from the specified network. + * Sets the access control policy on the specified resource. Replaces any existing policy. * @example * ```js * // Before running the sample: @@ -65480,24 +69389,22 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.networks.removePeering({ - * // Name of the network resource to remove peering from. - * network: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * const res = await compute.nodeGroups.setIamPolicy({ * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // 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. - * // - * // 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: 'placeholder-value', + * // Name or id of the resource for this request. + * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * // The name of the zone for this request. + * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', * * // Request body metadata * requestBody: { * // request body parameters * // { - * // "name": "my_name" + * // "bindings": [], + * // "etag": "my_etag", + * // "policy": {} * // } * }, * }); @@ -65505,30 +69412,12 @@ export namespace compute_v1 { * * // Example response * // { - * // "clientOperationId": "my_clientOperationId", - * // "creationTimestamp": "my_creationTimestamp", - * // "description": "my_description", - * // "endTime": "my_endTime", - * // "error": {}, - * // "httpErrorMessage": "my_httpErrorMessage", - * // "httpErrorStatusCode": 0, - * // "id": "my_id", - * // "insertTime": "my_insertTime", - * // "kind": "my_kind", - * // "name": "my_name", - * // "operationGroupId": "my_operationGroupId", - * // "operationType": "my_operationType", - * // "progress": 0, - * // "region": "my_region", - * // "selfLink": "my_selfLink", - * // "startTime": "my_startTime", - * // "status": "my_status", - * // "statusMessage": "my_statusMessage", - * // "targetId": "my_targetId", - * // "targetLink": "my_targetLink", - * // "user": "my_user", - * // "warnings": [], - * // "zone": "my_zone" + * // "auditConfigs": [], + * // "bindings": [], + * // "etag": "my_etag", + * // "iamOwned": false, + * // "rules": [], + * // "version": 0 * // } * } * @@ -65544,50 +69433,50 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - removePeering( - params: Params$Resource$Networks$Removepeering, + setIamPolicy( + params: Params$Resource$Nodegroups$Setiampolicy, options: StreamMethodOptions ): GaxiosPromise; - removePeering( - params?: Params$Resource$Networks$Removepeering, + setIamPolicy( + params?: Params$Resource$Nodegroups$Setiampolicy, options?: MethodOptions - ): GaxiosPromise; - removePeering( - params: Params$Resource$Networks$Removepeering, + ): GaxiosPromise; + setIamPolicy( + params: Params$Resource$Nodegroups$Setiampolicy, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - removePeering( - params: Params$Resource$Networks$Removepeering, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + setIamPolicy( + params: Params$Resource$Nodegroups$Setiampolicy, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - removePeering( - params: Params$Resource$Networks$Removepeering, - callback: BodyResponseCallback + setIamPolicy( + params: Params$Resource$Nodegroups$Setiampolicy, + callback: BodyResponseCallback ): void; - removePeering(callback: BodyResponseCallback): void; - removePeering( + setIamPolicy(callback: BodyResponseCallback): void; + setIamPolicy( paramsOrCallback?: - | Params$Resource$Networks$Removepeering - | BodyResponseCallback + | Params$Resource$Nodegroups$Setiampolicy + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { + ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Networks$Removepeering; + {}) as Params$Resource$Nodegroups$Setiampolicy; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Networks$Removepeering; + params = {} as Params$Resource$Nodegroups$Setiampolicy; options = {}; } @@ -65602,29 +69491,29 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/global/networks/{network}/removePeering' + '/compute/v1/projects/{project}/zones/{zone}/nodeGroups/{resource}/setIamPolicy' ).replace(/([^:]\/)\/+/g, '$1'), method: 'POST', }, options ), params, - requiredParams: ['project', 'network'], - pathParams: ['network', 'project'], + requiredParams: ['project', 'zone', 'resource'], + pathParams: ['project', 'resource', 'zone'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Switches the network mode from auto subnet mode to custom subnet mode. + * Updates the node template of the node group. * @example * ```js * // Before running the sample: @@ -65652,9 +69541,9 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.networks.switchToCustomMode({ - * // Name of the network to be updated. - * network: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * const res = await compute.nodeGroups.setNodeTemplate({ + * // Name of the NodeGroup resource to update. + * nodeGroup: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', @@ -65664,6 +69553,16 @@ export namespace compute_v1 { * // * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). * requestId: 'placeholder-value', + * // The name of the zone for this request. + * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "nodeTemplate": "my_nodeTemplate" + * // } + * }, * }); * console.log(res.data); * @@ -65708,32 +69607,32 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - switchToCustomMode( - params: Params$Resource$Networks$Switchtocustommode, + setNodeTemplate( + params: Params$Resource$Nodegroups$Setnodetemplate, options: StreamMethodOptions ): GaxiosPromise; - switchToCustomMode( - params?: Params$Resource$Networks$Switchtocustommode, + setNodeTemplate( + params?: Params$Resource$Nodegroups$Setnodetemplate, options?: MethodOptions ): GaxiosPromise; - switchToCustomMode( - params: Params$Resource$Networks$Switchtocustommode, + setNodeTemplate( + params: Params$Resource$Nodegroups$Setnodetemplate, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - switchToCustomMode( - params: Params$Resource$Networks$Switchtocustommode, + setNodeTemplate( + params: Params$Resource$Nodegroups$Setnodetemplate, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - switchToCustomMode( - params: Params$Resource$Networks$Switchtocustommode, + setNodeTemplate( + params: Params$Resource$Nodegroups$Setnodetemplate, callback: BodyResponseCallback ): void; - switchToCustomMode(callback: BodyResponseCallback): void; - switchToCustomMode( + setNodeTemplate(callback: BodyResponseCallback): void; + setNodeTemplate( paramsOrCallback?: - | Params$Resource$Networks$Switchtocustommode + | Params$Resource$Nodegroups$Setnodetemplate | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -65746,12 +69645,12 @@ export namespace compute_v1 { | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Networks$Switchtocustommode; + {}) as Params$Resource$Nodegroups$Setnodetemplate; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Networks$Switchtocustommode; + params = {} as Params$Resource$Nodegroups$Setnodetemplate; options = {}; } @@ -65766,15 +69665,15 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/global/networks/{network}/switchToCustomMode' + '/compute/v1/projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/setNodeTemplate' ).replace(/([^:]\/)\/+/g, '$1'), method: 'POST', }, options ), params, - requiredParams: ['project', 'network'], - pathParams: ['network', 'project'], + requiredParams: ['project', 'zone', 'nodeGroup'], + pathParams: ['nodeGroup', 'project', 'zone'], context: this.context, }; if (callback) { @@ -65788,7 +69687,7 @@ export namespace compute_v1 { } /** - * Updates the specified network peering with the data included in the request Only the following fields can be modified: NetworkPeering.export_custom_routes, and NetworkPeering.import_custom_routes + * Returns permissions that a caller has on the specified resource. * @example * ```js * // Before running the sample: @@ -65808,6 +69707,7 @@ export namespace compute_v1 { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', * ], * }); * @@ -65816,24 +69716,20 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.networks.updatePeering({ - * // Name of the network resource which the updated peering is belonging to. - * network: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * const res = await compute.nodeGroups.testIamPermissions({ * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // 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. - * // - * // 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: 'placeholder-value', + * // Name or id of the resource for this request. + * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * // The name of the zone for this request. + * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', * * // Request body metadata * requestBody: { * // request body parameters * // { - * // "networkPeering": {} + * // "permissions": [] * // } * }, * }); @@ -65841,30 +69737,7 @@ export namespace compute_v1 { * * // Example response * // { - * // "clientOperationId": "my_clientOperationId", - * // "creationTimestamp": "my_creationTimestamp", - * // "description": "my_description", - * // "endTime": "my_endTime", - * // "error": {}, - * // "httpErrorMessage": "my_httpErrorMessage", - * // "httpErrorStatusCode": 0, - * // "id": "my_id", - * // "insertTime": "my_insertTime", - * // "kind": "my_kind", - * // "name": "my_name", - * // "operationGroupId": "my_operationGroupId", - * // "operationType": "my_operationType", - * // "progress": 0, - * // "region": "my_region", - * // "selfLink": "my_selfLink", - * // "startTime": "my_startTime", - * // "status": "my_status", - * // "statusMessage": "my_statusMessage", - * // "targetId": "my_targetId", - * // "targetLink": "my_targetLink", - * // "user": "my_user", - * // "warnings": [], - * // "zone": "my_zone" + * // "permissions": [] * // } * } * @@ -65880,50 +69753,57 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - updatePeering( - params: Params$Resource$Networks$Updatepeering, + testIamPermissions( + params: Params$Resource$Nodegroups$Testiampermissions, options: StreamMethodOptions ): GaxiosPromise; - updatePeering( - params?: Params$Resource$Networks$Updatepeering, + testIamPermissions( + params?: Params$Resource$Nodegroups$Testiampermissions, options?: MethodOptions - ): GaxiosPromise; - updatePeering( - params: Params$Resource$Networks$Updatepeering, + ): GaxiosPromise; + testIamPermissions( + params: Params$Resource$Nodegroups$Testiampermissions, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - updatePeering( - params: Params$Resource$Networks$Updatepeering, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + testIamPermissions( + params: Params$Resource$Nodegroups$Testiampermissions, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - updatePeering( - params: Params$Resource$Networks$Updatepeering, - callback: BodyResponseCallback + testIamPermissions( + params: Params$Resource$Nodegroups$Testiampermissions, + callback: BodyResponseCallback ): void; - updatePeering(callback: BodyResponseCallback): void; - updatePeering( + testIamPermissions( + callback: BodyResponseCallback + ): void; + testIamPermissions( paramsOrCallback?: - | Params$Resource$Networks$Updatepeering - | BodyResponseCallback + | Params$Resource$Nodegroups$Testiampermissions + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { + ): + | void + | GaxiosPromise + | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Networks$Updatepeering; + {}) as Params$Resource$Nodegroups$Testiampermissions; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Networks$Updatepeering; + params = {} as Params$Resource$Nodegroups$Testiampermissions; options = {}; } @@ -65938,34 +69818,34 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/global/networks/{network}/updatePeering' + '/compute/v1/projects/{project}/zones/{zone}/nodeGroups/{resource}/testIamPermissions' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'PATCH', + method: 'POST', }, options ), params, - requiredParams: ['project', 'network'], - pathParams: ['network', 'project'], + requiredParams: ['project', 'zone', 'resource'], + pathParams: ['project', 'resource', 'zone'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } } - export interface Params$Resource$Networks$Addpeering + export interface Params$Resource$Nodegroups$Addnodes extends StandardParameters { /** - * Name of the network resource to add peering to. + * Name of the NodeGroup resource. */ - network?: string; + nodeGroup?: string; /** * Project ID for this request. */ @@ -65978,17 +69858,63 @@ export namespace compute_v1 { * The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). */ requestId?: string; + /** + * The name of the zone for this request. + */ + zone?: string; /** * Request body metadata */ - requestBody?: Schema$NetworksAddPeeringRequest; + requestBody?: Schema$NodeGroupsAddNodesRequest; } - export interface Params$Resource$Networks$Delete extends StandardParameters { + export interface Params$Resource$Nodegroups$Aggregatedlist + extends StandardParameters { /** - * Name of the network to delete. + * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. + * + * 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) ``` */ - network?: string; + filter?: string; + /** + * Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. + */ + includeAllScopes?: boolean; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + */ + maxResults?: number; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. + * + * Currently, only sorting by `name` or `creationTimestamp desc` is supported. + */ + orderBy?: string; + /** + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + */ + pageToken?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + */ + returnPartialSuccess?: boolean; + } + export interface Params$Resource$Nodegroups$Delete + extends StandardParameters { + /** + * Name of the NodeGroup resource to delete. + */ + nodeGroup?: string; /** * Project ID for this request. */ @@ -66001,29 +69927,78 @@ export namespace compute_v1 { * The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). */ requestId?: string; + /** + * The name of the zone for this request. + */ + zone?: string; } - export interface Params$Resource$Networks$Get extends StandardParameters { + export interface Params$Resource$Nodegroups$Deletenodes + extends StandardParameters { /** - * Name of the network to return. + * Name of the NodeGroup resource whose nodes will be deleted. */ - network?: string; + nodeGroup?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + /** + * The name of the zone for this request. + */ + zone?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$NodeGroupsDeleteNodesRequest; + } + export interface Params$Resource$Nodegroups$Get extends StandardParameters { + /** + * Name of the node group to return. + */ + nodeGroup?: string; /** * Project ID for this request. */ project?: string; + /** + * The name of the zone for this request. + */ + zone?: string; } - export interface Params$Resource$Networks$Geteffectivefirewalls + export interface Params$Resource$Nodegroups$Getiampolicy extends StandardParameters { /** - * Name of the network for this request. + * Requested IAM Policy version. */ - network?: string; + optionsRequestedPolicyVersion?: number; /** * Project ID for this request. */ project?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + /** + * The name of the zone for this request. + */ + zone?: string; } - export interface Params$Resource$Networks$Insert extends StandardParameters { + export interface Params$Resource$Nodegroups$Insert + extends StandardParameters { + /** + * Initial count of nodes in the node group. + */ + initialNodeCount?: number; /** * Project ID for this request. */ @@ -66036,13 +70011,17 @@ export namespace compute_v1 { * The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). */ requestId?: string; + /** + * The name of the zone for this request. + */ + zone?: string; /** * Request body metadata */ - requestBody?: Schema$Network; + requestBody?: Schema$NodeGroup; } - export interface Params$Resource$Networks$List extends StandardParameters { + export interface Params$Resource$Nodegroups$List extends StandardParameters { /** * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `\>`, or `<`. * @@ -66077,13 +70056,13 @@ export namespace compute_v1 { * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. */ returnPartialSuccess?: boolean; - } - export interface Params$Resource$Networks$Listpeeringroutes - extends StandardParameters { /** - * The direction of the exchanged routes. + * The name of the zone for this request. */ - direction?: string; + zone?: string; + } + export interface Params$Resource$Nodegroups$Listnodes + extends StandardParameters { /** * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `\>`, or `<`. * @@ -66099,9 +70078,9 @@ export namespace compute_v1 { */ maxResults?: number; /** - * Name of the network for this request. + * Name of the NodeGroup resource whose nodes you want to list. */ - network?: string; + nodeGroup?: string; /** * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. * @@ -66114,28 +70093,24 @@ export namespace compute_v1 { * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ pageToken?: string; - /** - * The response will show routes exchanged over the given peering connection. - */ - peeringName?: string; /** * Project ID for this request. */ project?: string; - /** - * The region of the request. The response will include all subnet routes, static routes and dynamic routes in the region. - */ - region?: string; /** * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. */ returnPartialSuccess?: boolean; + /** + * The name of the zone for this request. + */ + zone?: string; } - export interface Params$Resource$Networks$Patch extends StandardParameters { + export interface Params$Resource$Nodegroups$Patch extends StandardParameters { /** - * Name of the network to update. + * Name of the NodeGroup resource to update. */ - network?: string; + nodeGroup?: string; /** * Project ID for this request. */ @@ -66148,42 +70123,42 @@ export namespace compute_v1 { * The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). */ requestId?: string; + /** + * The name of the zone for this request. + */ + zone?: string; /** * Request body metadata */ - requestBody?: Schema$Network; + requestBody?: Schema$NodeGroup; } - export interface Params$Resource$Networks$Removepeering + export interface Params$Resource$Nodegroups$Setiampolicy extends StandardParameters { - /** - * Name of the network resource to remove peering from. - */ - network?: string; /** * Project ID for this request. */ project?: string; /** - * 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. - * - * 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). + * Name or id of the resource for this request. */ - requestId?: string; + resource?: string; + /** + * The name of the zone for this request. + */ + zone?: string; /** * Request body metadata */ - requestBody?: Schema$NetworksRemovePeeringRequest; + requestBody?: Schema$ZoneSetPolicyRequest; } - export interface Params$Resource$Networks$Switchtocustommode + export interface Params$Resource$Nodegroups$Setnodetemplate extends StandardParameters { /** - * Name of the network to be updated. + * Name of the NodeGroup resource to update. */ - network?: string; + nodeGroup?: string; /** * Project ID for this request. */ @@ -66196,214 +70171,45 @@ export namespace compute_v1 { * The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). */ requestId?: string; + /** + * The name of the zone for this request. + */ + zone?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$NodeGroupsSetNodeTemplateRequest; } - export interface Params$Resource$Networks$Updatepeering + export interface Params$Resource$Nodegroups$Testiampermissions extends StandardParameters { /** - * Name of the network resource which the updated peering is belonging to. + * Project ID for this request. */ - network?: string; + project?: string; /** - * Project ID for this request. + * Name or id of the resource for this request. */ - project?: string; + resource?: string; /** - * 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. - * - * 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). + * The name of the zone for this request. */ - requestId?: string; + zone?: string; /** * Request body metadata */ - requestBody?: Schema$NetworksUpdatePeeringRequest; + requestBody?: Schema$TestPermissionsRequest; } - export class Resource$Nodegroups { + export class Resource$Nodetemplates { context: APIRequestContext; constructor(context: APIRequestContext) { this.context = context; } /** - * Adds specified number of nodes to the node group. - * @example - * ```js - * // Before running the sample: - * // - Enable the API at: - * // https://console.developers.google.com/apis/api/compute.googleapis.com - * // - Login into gcloud by running: - * // `$ gcloud auth application-default login` - * // - Install the npm module by running: - * // `$ npm install googleapis` - * - * const {google} = require('googleapis'); - * const compute = google.compute('v1'); - * - * async function main() { - * const auth = new google.auth.GoogleAuth({ - * // Scopes can be specified either as an array or as a single, space-delimited string. - * scopes: [ - * 'https://www.googleapis.com/auth/cloud-platform', - * 'https://www.googleapis.com/auth/compute', - * ], - * }); - * - * // Acquire an auth client, and bind it to all future calls - * const authClient = await auth.getClient(); - * google.options({auth: authClient}); - * - * // Do the magic - * const res = await compute.nodeGroups.addNodes({ - * // Name of the NodeGroup resource. - * nodeGroup: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', - * // Project ID for this request. - * project: - * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // 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. - * // - * // 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: 'placeholder-value', - * // The name of the zone for this request. - * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "additionalNodeCount": 0 - * // } - * }, - * }); - * console.log(res.data); - * - * // Example response - * // { - * // "clientOperationId": "my_clientOperationId", - * // "creationTimestamp": "my_creationTimestamp", - * // "description": "my_description", - * // "endTime": "my_endTime", - * // "error": {}, - * // "httpErrorMessage": "my_httpErrorMessage", - * // "httpErrorStatusCode": 0, - * // "id": "my_id", - * // "insertTime": "my_insertTime", - * // "kind": "my_kind", - * // "name": "my_name", - * // "operationGroupId": "my_operationGroupId", - * // "operationType": "my_operationType", - * // "progress": 0, - * // "region": "my_region", - * // "selfLink": "my_selfLink", - * // "startTime": "my_startTime", - * // "status": "my_status", - * // "statusMessage": "my_statusMessage", - * // "targetId": "my_targetId", - * // "targetLink": "my_targetLink", - * // "user": "my_user", - * // "warnings": [], - * // "zone": "my_zone" - * // } - * } - * - * main().catch(e => { - * console.error(e); - * throw e; - * }); - * - * ``` - * - * @param params - Parameters for request - * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. - * @param callback - Optional callback that handles the response. - * @returns A promise if used with async/await, or void if used with a callback. - */ - addNodes( - params: Params$Resource$Nodegroups$Addnodes, - options: StreamMethodOptions - ): GaxiosPromise; - addNodes( - params?: Params$Resource$Nodegroups$Addnodes, - options?: MethodOptions - ): GaxiosPromise; - addNodes( - params: Params$Resource$Nodegroups$Addnodes, - options: StreamMethodOptions | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - addNodes( - params: Params$Resource$Nodegroups$Addnodes, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - addNodes( - params: Params$Resource$Nodegroups$Addnodes, - callback: BodyResponseCallback - ): void; - addNodes(callback: BodyResponseCallback): void; - addNodes( - paramsOrCallback?: - | Params$Resource$Nodegroups$Addnodes - | BodyResponseCallback - | BodyResponseCallback, - optionsOrCallback?: - | MethodOptions - | StreamMethodOptions - | BodyResponseCallback - | BodyResponseCallback, - callback?: - | BodyResponseCallback - | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { - let params = (paramsOrCallback || - {}) as Params$Resource$Nodegroups$Addnodes; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Nodegroups$Addnodes; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: ( - rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/addNodes' - ).replace(/([^:]\/)\/+/g, '$1'), - method: 'POST', - }, - options - ), - params, - requiredParams: ['project', 'zone', 'nodeGroup'], - pathParams: ['nodeGroup', 'project', 'zone'], - context: this.context, - }; - if (callback) { - createAPIRequest( - parameters, - callback as BodyResponseCallback - ); - } else { - return createAPIRequest(parameters); - } - } - - /** - * Retrieves an aggregated list of node groups. Note: use nodeGroups.listNodes for more details about each group. + * Retrieves an aggregated list of node templates. * @example * ```js * // Before running the sample: @@ -66432,7 +70238,7 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.nodeGroups.aggregatedList({ + * const res = await compute.nodeTemplates.aggregatedList({ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. @@ -66486,56 +70292,56 @@ export namespace compute_v1 { * @returns A promise if used with async/await, or void if used with a callback. */ aggregatedList( - params: Params$Resource$Nodegroups$Aggregatedlist, + params: Params$Resource$Nodetemplates$Aggregatedlist, options: StreamMethodOptions ): GaxiosPromise; aggregatedList( - params?: Params$Resource$Nodegroups$Aggregatedlist, + params?: Params$Resource$Nodetemplates$Aggregatedlist, options?: MethodOptions - ): GaxiosPromise; + ): GaxiosPromise; aggregatedList( - params: Params$Resource$Nodegroups$Aggregatedlist, + params: Params$Resource$Nodetemplates$Aggregatedlist, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; aggregatedList( - params: Params$Resource$Nodegroups$Aggregatedlist, + params: Params$Resource$Nodetemplates$Aggregatedlist, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; aggregatedList( - params: Params$Resource$Nodegroups$Aggregatedlist, - callback: BodyResponseCallback + params: Params$Resource$Nodetemplates$Aggregatedlist, + callback: BodyResponseCallback ): void; aggregatedList( - callback: BodyResponseCallback + callback: BodyResponseCallback ): void; aggregatedList( paramsOrCallback?: - | Params$Resource$Nodegroups$Aggregatedlist - | BodyResponseCallback + | Params$Resource$Nodetemplates$Aggregatedlist + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Nodegroups$Aggregatedlist; + {}) as Params$Resource$Nodetemplates$Aggregatedlist; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Nodegroups$Aggregatedlist; + params = {} as Params$Resource$Nodetemplates$Aggregatedlist; options = {}; } @@ -66549,7 +70355,8 @@ export namespace compute_v1 { options: Object.assign( { url: ( - rootUrl + '/compute/v1/projects/{project}/aggregated/nodeGroups' + rootUrl + + '/compute/v1/projects/{project}/aggregated/nodeTemplates' ).replace(/([^:]\/)\/+/g, '$1'), method: 'GET', }, @@ -66561,17 +70368,17 @@ export namespace compute_v1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Deletes the specified NodeGroup resource. + * Deletes the specified NodeTemplate resource. * @example * ```js * // Before running the sample: @@ -66599,20 +70406,20 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.nodeGroups.delete({ - * // Name of the NodeGroup resource to delete. - * nodeGroup: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * const res = await compute.nodeTemplates.delete({ + * // Name of the NodeTemplate resource to delete. + * nodeTemplate: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // The name of the region for this request. + * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', * // 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. * // * // 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: 'placeholder-value', - * // The name of the zone for this request. - * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', * }); * console.log(res.data); * @@ -66658,31 +70465,31 @@ export namespace compute_v1 { * @returns A promise if used with async/await, or void if used with a callback. */ delete( - params: Params$Resource$Nodegroups$Delete, + params: Params$Resource$Nodetemplates$Delete, options: StreamMethodOptions ): GaxiosPromise; delete( - params?: Params$Resource$Nodegroups$Delete, + params?: Params$Resource$Nodetemplates$Delete, options?: MethodOptions ): GaxiosPromise; delete( - params: Params$Resource$Nodegroups$Delete, + params: Params$Resource$Nodetemplates$Delete, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; delete( - params: Params$Resource$Nodegroups$Delete, + params: Params$Resource$Nodetemplates$Delete, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; delete( - params: Params$Resource$Nodegroups$Delete, + params: Params$Resource$Nodetemplates$Delete, callback: BodyResponseCallback ): void; delete(callback: BodyResponseCallback): void; delete( paramsOrCallback?: - | Params$Resource$Nodegroups$Delete + | Params$Resource$Nodetemplates$Delete | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -66695,12 +70502,12 @@ export namespace compute_v1 { | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Nodegroups$Delete; + {}) as Params$Resource$Nodetemplates$Delete; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Nodegroups$Delete; + params = {} as Params$Resource$Nodetemplates$Delete; options = {}; } @@ -66715,189 +70522,15 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}' + '/compute/v1/projects/{project}/regions/{region}/nodeTemplates/{nodeTemplate}' ).replace(/([^:]\/)\/+/g, '$1'), method: 'DELETE', }, options ), params, - requiredParams: ['project', 'zone', 'nodeGroup'], - pathParams: ['nodeGroup', 'project', 'zone'], - context: this.context, - }; - if (callback) { - createAPIRequest( - parameters, - callback as BodyResponseCallback - ); - } else { - return createAPIRequest(parameters); - } - } - - /** - * Deletes specified nodes from the node group. - * @example - * ```js - * // Before running the sample: - * // - Enable the API at: - * // https://console.developers.google.com/apis/api/compute.googleapis.com - * // - Login into gcloud by running: - * // `$ gcloud auth application-default login` - * // - Install the npm module by running: - * // `$ npm install googleapis` - * - * const {google} = require('googleapis'); - * const compute = google.compute('v1'); - * - * async function main() { - * const auth = new google.auth.GoogleAuth({ - * // Scopes can be specified either as an array or as a single, space-delimited string. - * scopes: [ - * 'https://www.googleapis.com/auth/cloud-platform', - * 'https://www.googleapis.com/auth/compute', - * ], - * }); - * - * // Acquire an auth client, and bind it to all future calls - * const authClient = await auth.getClient(); - * google.options({auth: authClient}); - * - * // Do the magic - * const res = await compute.nodeGroups.deleteNodes({ - * // Name of the NodeGroup resource whose nodes will be deleted. - * nodeGroup: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', - * // Project ID for this request. - * project: - * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // 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. - * // - * // 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: 'placeholder-value', - * // The name of the zone for this request. - * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "nodes": [] - * // } - * }, - * }); - * console.log(res.data); - * - * // Example response - * // { - * // "clientOperationId": "my_clientOperationId", - * // "creationTimestamp": "my_creationTimestamp", - * // "description": "my_description", - * // "endTime": "my_endTime", - * // "error": {}, - * // "httpErrorMessage": "my_httpErrorMessage", - * // "httpErrorStatusCode": 0, - * // "id": "my_id", - * // "insertTime": "my_insertTime", - * // "kind": "my_kind", - * // "name": "my_name", - * // "operationGroupId": "my_operationGroupId", - * // "operationType": "my_operationType", - * // "progress": 0, - * // "region": "my_region", - * // "selfLink": "my_selfLink", - * // "startTime": "my_startTime", - * // "status": "my_status", - * // "statusMessage": "my_statusMessage", - * // "targetId": "my_targetId", - * // "targetLink": "my_targetLink", - * // "user": "my_user", - * // "warnings": [], - * // "zone": "my_zone" - * // } - * } - * - * main().catch(e => { - * console.error(e); - * throw e; - * }); - * - * ``` - * - * @param params - Parameters for request - * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. - * @param callback - Optional callback that handles the response. - * @returns A promise if used with async/await, or void if used with a callback. - */ - deleteNodes( - params: Params$Resource$Nodegroups$Deletenodes, - options: StreamMethodOptions - ): GaxiosPromise; - deleteNodes( - params?: Params$Resource$Nodegroups$Deletenodes, - options?: MethodOptions - ): GaxiosPromise; - deleteNodes( - params: Params$Resource$Nodegroups$Deletenodes, - options: StreamMethodOptions | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - deleteNodes( - params: Params$Resource$Nodegroups$Deletenodes, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - deleteNodes( - params: Params$Resource$Nodegroups$Deletenodes, - callback: BodyResponseCallback - ): void; - deleteNodes(callback: BodyResponseCallback): void; - deleteNodes( - paramsOrCallback?: - | Params$Resource$Nodegroups$Deletenodes - | BodyResponseCallback - | BodyResponseCallback, - optionsOrCallback?: - | MethodOptions - | StreamMethodOptions - | BodyResponseCallback - | BodyResponseCallback, - callback?: - | BodyResponseCallback - | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { - let params = (paramsOrCallback || - {}) as Params$Resource$Nodegroups$Deletenodes; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Nodegroups$Deletenodes; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: ( - rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/deleteNodes' - ).replace(/([^:]\/)\/+/g, '$1'), - method: 'POST', - }, - options - ), - params, - requiredParams: ['project', 'zone', 'nodeGroup'], - pathParams: ['nodeGroup', 'project', 'zone'], + requiredParams: ['project', 'region', 'nodeTemplate'], + pathParams: ['nodeTemplate', 'project', 'region'], context: this.context, }; if (callback) { @@ -66911,7 +70544,7 @@ export namespace compute_v1 { } /** - * Returns the specified NodeGroup. Get a list of available NodeGroups by making a list() request. Note: the "nodes" field should not be used. Use nodeGroups.listNodes instead. + * Returns the specified node template. Gets a list of available node templates by making a list() request. * @example * ```js * // Before running the sample: @@ -66940,34 +70573,35 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.nodeGroups.get({ - * // Name of the node group to return. - * nodeGroup: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * const res = await compute.nodeTemplates.get({ + * // Name of the node template to return. + * nodeTemplate: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // The name of the zone for this request. - * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * // The name of the region for this request. + * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', * }); * console.log(res.data); * * // Example response * // { - * // "autoscalingPolicy": {}, + * // "accelerators": [], + * // "cpuOvercommitType": "my_cpuOvercommitType", * // "creationTimestamp": "my_creationTimestamp", * // "description": "my_description", - * // "fingerprint": "my_fingerprint", + * // "disks": [], * // "id": "my_id", * // "kind": "my_kind", - * // "locationHint": "my_locationHint", - * // "maintenancePolicy": "my_maintenancePolicy", - * // "maintenanceWindow": {}, * // "name": "my_name", - * // "nodeTemplate": "my_nodeTemplate", + * // "nodeAffinityLabels": {}, + * // "nodeType": "my_nodeType", + * // "nodeTypeFlexibility": {}, + * // "region": "my_region", * // "selfLink": "my_selfLink", - * // "size": 0, + * // "serverBinding": {}, * // "status": "my_status", - * // "zone": "my_zone" + * // "statusMessage": "my_statusMessage" * // } * } * @@ -66984,48 +70618,49 @@ export namespace compute_v1 { * @returns A promise if used with async/await, or void if used with a callback. */ get( - params: Params$Resource$Nodegroups$Get, + params: Params$Resource$Nodetemplates$Get, options: StreamMethodOptions ): GaxiosPromise; get( - params?: Params$Resource$Nodegroups$Get, + params?: Params$Resource$Nodetemplates$Get, options?: MethodOptions - ): GaxiosPromise; + ): GaxiosPromise; get( - params: Params$Resource$Nodegroups$Get, + params: Params$Resource$Nodetemplates$Get, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; get( - params: Params$Resource$Nodegroups$Get, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + params: Params$Resource$Nodetemplates$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; get( - params: Params$Resource$Nodegroups$Get, - callback: BodyResponseCallback + params: Params$Resource$Nodetemplates$Get, + callback: BodyResponseCallback ): void; - get(callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; get( paramsOrCallback?: - | Params$Resource$Nodegroups$Get - | BodyResponseCallback + | Params$Resource$Nodetemplates$Get + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Nodegroups$Get; + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Nodetemplates$Get; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Nodegroups$Get; + params = {} as Params$Resource$Nodetemplates$Get; options = {}; } @@ -67040,24 +70675,24 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}' + '/compute/v1/projects/{project}/regions/{region}/nodeTemplates/{nodeTemplate}' ).replace(/([^:]\/)\/+/g, '$1'), method: 'GET', }, options ), params, - requiredParams: ['project', 'zone', 'nodeGroup'], - pathParams: ['nodeGroup', 'project', 'zone'], + requiredParams: ['project', 'region', 'nodeTemplate'], + pathParams: ['nodeTemplate', 'project', 'region'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } @@ -67091,16 +70726,16 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.nodeGroups.getIamPolicy({ + * const res = await compute.nodeTemplates.getIamPolicy({ * // Requested IAM Policy version. * optionsRequestedPolicyVersion: 'placeholder-value', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // The name of the region for this request. + * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', * // Name or id of the resource for this request. * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', - * // The name of the zone for this request. - * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', * }); * console.log(res.data); * @@ -67128,31 +70763,31 @@ export namespace compute_v1 { * @returns A promise if used with async/await, or void if used with a callback. */ getIamPolicy( - params: Params$Resource$Nodegroups$Getiampolicy, + params: Params$Resource$Nodetemplates$Getiampolicy, options: StreamMethodOptions ): GaxiosPromise; getIamPolicy( - params?: Params$Resource$Nodegroups$Getiampolicy, + params?: Params$Resource$Nodetemplates$Getiampolicy, options?: MethodOptions ): GaxiosPromise; getIamPolicy( - params: Params$Resource$Nodegroups$Getiampolicy, + params: Params$Resource$Nodetemplates$Getiampolicy, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; getIamPolicy( - params: Params$Resource$Nodegroups$Getiampolicy, + params: Params$Resource$Nodetemplates$Getiampolicy, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; getIamPolicy( - params: Params$Resource$Nodegroups$Getiampolicy, + params: Params$Resource$Nodetemplates$Getiampolicy, callback: BodyResponseCallback ): void; getIamPolicy(callback: BodyResponseCallback): void; getIamPolicy( paramsOrCallback?: - | Params$Resource$Nodegroups$Getiampolicy + | Params$Resource$Nodetemplates$Getiampolicy | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -67165,12 +70800,12 @@ export namespace compute_v1 { | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Nodegroups$Getiampolicy; + {}) as Params$Resource$Nodetemplates$Getiampolicy; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Nodegroups$Getiampolicy; + params = {} as Params$Resource$Nodetemplates$Getiampolicy; options = {}; } @@ -67185,15 +70820,15 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/nodeGroups/{resource}/getIamPolicy' + '/compute/v1/projects/{project}/regions/{region}/nodeTemplates/{resource}/getIamPolicy' ).replace(/([^:]\/)\/+/g, '$1'), method: 'GET', }, options ), params, - requiredParams: ['project', 'zone', 'resource'], - pathParams: ['project', 'resource', 'zone'], + requiredParams: ['project', 'region', 'resource'], + pathParams: ['project', 'region', 'resource'], context: this.context, }; if (callback) { @@ -67207,7 +70842,7 @@ export namespace compute_v1 { } /** - * Creates a NodeGroup resource in the specified project using the data included in the request. + * Creates a NodeTemplate resource in the specified project using the data included in the request. * @example * ```js * // Before running the sample: @@ -67235,40 +70870,39 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.nodeGroups.insert({ - * // Initial count of nodes in the node group. - * initialNodeCount: 'placeholder-value', + * const res = await compute.nodeTemplates.insert({ * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // The name of the region for this request. + * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', * // 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. * // * // 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: 'placeholder-value', - * // The name of the zone for this request. - * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', * * // Request body metadata * requestBody: { * // request body parameters * // { - * // "autoscalingPolicy": {}, + * // "accelerators": [], + * // "cpuOvercommitType": "my_cpuOvercommitType", * // "creationTimestamp": "my_creationTimestamp", * // "description": "my_description", - * // "fingerprint": "my_fingerprint", + * // "disks": [], * // "id": "my_id", * // "kind": "my_kind", - * // "locationHint": "my_locationHint", - * // "maintenancePolicy": "my_maintenancePolicy", - * // "maintenanceWindow": {}, * // "name": "my_name", - * // "nodeTemplate": "my_nodeTemplate", + * // "nodeAffinityLabels": {}, + * // "nodeType": "my_nodeType", + * // "nodeTypeFlexibility": {}, + * // "region": "my_region", * // "selfLink": "my_selfLink", - * // "size": 0, + * // "serverBinding": {}, * // "status": "my_status", - * // "zone": "my_zone" + * // "statusMessage": "my_statusMessage" * // } * }, * }); @@ -67316,31 +70950,31 @@ export namespace compute_v1 { * @returns A promise if used with async/await, or void if used with a callback. */ insert( - params: Params$Resource$Nodegroups$Insert, + params: Params$Resource$Nodetemplates$Insert, options: StreamMethodOptions ): GaxiosPromise; insert( - params?: Params$Resource$Nodegroups$Insert, + params?: Params$Resource$Nodetemplates$Insert, options?: MethodOptions ): GaxiosPromise; insert( - params: Params$Resource$Nodegroups$Insert, + params: Params$Resource$Nodetemplates$Insert, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; insert( - params: Params$Resource$Nodegroups$Insert, + params: Params$Resource$Nodetemplates$Insert, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; insert( - params: Params$Resource$Nodegroups$Insert, + params: Params$Resource$Nodetemplates$Insert, callback: BodyResponseCallback ): void; insert(callback: BodyResponseCallback): void; insert( paramsOrCallback?: - | Params$Resource$Nodegroups$Insert + | Params$Resource$Nodetemplates$Insert | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -67353,12 +70987,12 @@ export namespace compute_v1 { | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Nodegroups$Insert; + {}) as Params$Resource$Nodetemplates$Insert; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Nodegroups$Insert; + params = {} as Params$Resource$Nodetemplates$Insert; options = {}; } @@ -67372,15 +71006,16 @@ export namespace compute_v1 { options: Object.assign( { url: ( - rootUrl + '/compute/v1/projects/{project}/zones/{zone}/nodeGroups' + rootUrl + + '/compute/v1/projects/{project}/regions/{region}/nodeTemplates' ).replace(/([^:]\/)\/+/g, '$1'), method: 'POST', }, options ), params, - requiredParams: ['project', 'zone', 'initialNodeCount'], - pathParams: ['project', 'zone'], + requiredParams: ['project', 'region'], + pathParams: ['project', 'region'], context: this.context, }; if (callback) { @@ -67394,7 +71029,7 @@ export namespace compute_v1 { } /** - * Retrieves a list of node groups available to the specified project. Note: use nodeGroups.listNodes for more details about each group. + * Retrieves a list of node templates available to the specified project. * @example * ```js * // Before running the sample: @@ -67423,7 +71058,7 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.nodeGroups.list({ + * const res = await compute.nodeTemplates.list({ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. @@ -67445,10 +71080,10 @@ export namespace compute_v1 { * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // The name of the region for this request. + * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. * returnPartialSuccess: 'placeholder-value', - * // The name of the zone for this request. - * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', * }); * console.log(res.data); * @@ -67476,48 +71111,49 @@ export namespace compute_v1 { * @returns A promise if used with async/await, or void if used with a callback. */ list( - params: Params$Resource$Nodegroups$List, + params: Params$Resource$Nodetemplates$List, options: StreamMethodOptions ): GaxiosPromise; list( - params?: Params$Resource$Nodegroups$List, + params?: Params$Resource$Nodetemplates$List, options?: MethodOptions - ): GaxiosPromise; + ): GaxiosPromise; list( - params: Params$Resource$Nodegroups$List, + params: Params$Resource$Nodetemplates$List, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; list( - params: Params$Resource$Nodegroups$List, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + params: Params$Resource$Nodetemplates$List, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; list( - params: Params$Resource$Nodegroups$List, - callback: BodyResponseCallback + params: Params$Resource$Nodetemplates$List, + callback: BodyResponseCallback ): void; - list(callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; list( paramsOrCallback?: - | Params$Resource$Nodegroups$List - | BodyResponseCallback + | Params$Resource$Nodetemplates$List + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Nodegroups$List; + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Nodetemplates$List; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Nodegroups$List; + params = {} as Params$Resource$Nodetemplates$List; options = {}; } @@ -67531,29 +71167,30 @@ export namespace compute_v1 { options: Object.assign( { url: ( - rootUrl + '/compute/v1/projects/{project}/zones/{zone}/nodeGroups' + rootUrl + + '/compute/v1/projects/{project}/regions/{region}/nodeTemplates' ).replace(/([^:]\/)\/+/g, '$1'), method: 'GET', }, options ), params, - requiredParams: ['project', 'zone'], - pathParams: ['project', 'zone'], + requiredParams: ['project', 'region'], + pathParams: ['project', 'region'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Lists nodes in the node group. + * Sets the access control policy on the specified resource. Replaces any existing policy. * @example * ```js * // Before running the sample: @@ -67573,7 +71210,6 @@ export namespace compute_v1 { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', - * 'https://www.googleapis.com/auth/compute.readonly', * ], * }); * @@ -67582,45 +71218,35 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.nodeGroups.listNodes({ - * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. - * // - * // 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) ``` - * filter: 'placeholder-value', - * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) - * maxResults: 'placeholder-value', - * // Name of the NodeGroup resource whose nodes you want to list. - * nodeGroup: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', - * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. - * // - * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. - * // - * // Currently, only sorting by `name` or `creationTimestamp desc` is supported. - * orderBy: 'placeholder-value', - * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. - * pageToken: 'placeholder-value', + * const res = await compute.nodeTemplates.setIamPolicy({ * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. - * returnPartialSuccess: 'placeholder-value', - * // The name of the zone for this request. - * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * // The name of the region for this request. + * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * // Name or id of the resource for this request. + * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "bindings": [], + * // "etag": "my_etag", + * // "policy": {} + * // } + * }, * }); * console.log(res.data); * * // Example response * // { - * // "id": "my_id", - * // "items": [], - * // "kind": "my_kind", - * // "nextPageToken": "my_nextPageToken", - * // "selfLink": "my_selfLink", - * // "warning": {} + * // "auditConfigs": [], + * // "bindings": [], + * // "etag": "my_etag", + * // "iamOwned": false, + * // "rules": [], + * // "version": 0 * // } * } * @@ -67636,53 +71262,50 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - listNodes( - params: Params$Resource$Nodegroups$Listnodes, + setIamPolicy( + params: Params$Resource$Nodetemplates$Setiampolicy, options: StreamMethodOptions ): GaxiosPromise; - listNodes( - params?: Params$Resource$Nodegroups$Listnodes, + setIamPolicy( + params?: Params$Resource$Nodetemplates$Setiampolicy, options?: MethodOptions - ): GaxiosPromise; - listNodes( - params: Params$Resource$Nodegroups$Listnodes, + ): GaxiosPromise; + setIamPolicy( + params: Params$Resource$Nodetemplates$Setiampolicy, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - listNodes( - params: Params$Resource$Nodegroups$Listnodes, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + setIamPolicy( + params: Params$Resource$Nodetemplates$Setiampolicy, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - listNodes( - params: Params$Resource$Nodegroups$Listnodes, - callback: BodyResponseCallback + setIamPolicy( + params: Params$Resource$Nodetemplates$Setiampolicy, + callback: BodyResponseCallback ): void; - listNodes(callback: BodyResponseCallback): void; - listNodes( + setIamPolicy(callback: BodyResponseCallback): void; + setIamPolicy( paramsOrCallback?: - | Params$Resource$Nodegroups$Listnodes - | BodyResponseCallback + | Params$Resource$Nodetemplates$Setiampolicy + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): - | void - | GaxiosPromise - | GaxiosPromise { + ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Nodegroups$Listnodes; + {}) as Params$Resource$Nodetemplates$Setiampolicy; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Nodegroups$Listnodes; + params = {} as Params$Resource$Nodetemplates$Setiampolicy; options = {}; } @@ -67697,29 +71320,29 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/listNodes' + '/compute/v1/projects/{project}/regions/{region}/nodeTemplates/{resource}/setIamPolicy' ).replace(/([^:]\/)\/+/g, '$1'), method: 'POST', }, options ), params, - requiredParams: ['project', 'zone', 'nodeGroup'], - pathParams: ['nodeGroup', 'project', 'zone'], + requiredParams: ['project', 'region', 'resource'], + pathParams: ['project', 'region', 'resource'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Updates the specified node group. + * Returns permissions that a caller has on the specified resource. * @example * ```js * // Before running the sample: @@ -67739,6 +71362,7 @@ export namespace compute_v1 { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', * ], * }); * @@ -67747,166 +71371,342 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.nodeGroups.patch({ - * // Name of the NodeGroup resource to update. - * nodeGroup: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * const res = await compute.nodeTemplates.testIamPermissions({ * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // 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. - * // - * // 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: 'placeholder-value', - * // The name of the zone for this request. - * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * // The name of the region for this request. + * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * // Name or id of the resource for this request. + * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * * // Request body metadata * requestBody: { * // request body parameters * // { - * // "autoscalingPolicy": {}, - * // "creationTimestamp": "my_creationTimestamp", - * // "description": "my_description", - * // "fingerprint": "my_fingerprint", - * // "id": "my_id", - * // "kind": "my_kind", - * // "locationHint": "my_locationHint", - * // "maintenancePolicy": "my_maintenancePolicy", - * // "maintenanceWindow": {}, - * // "name": "my_name", - * // "nodeTemplate": "my_nodeTemplate", - * // "selfLink": "my_selfLink", - * // "size": 0, - * // "status": "my_status", - * // "zone": "my_zone" + * // "permissions": [] * // } * }, * }); * console.log(res.data); * - * // Example response - * // { - * // "clientOperationId": "my_clientOperationId", - * // "creationTimestamp": "my_creationTimestamp", - * // "description": "my_description", - * // "endTime": "my_endTime", - * // "error": {}, - * // "httpErrorMessage": "my_httpErrorMessage", - * // "httpErrorStatusCode": 0, - * // "id": "my_id", - * // "insertTime": "my_insertTime", - * // "kind": "my_kind", - * // "name": "my_name", - * // "operationGroupId": "my_operationGroupId", - * // "operationType": "my_operationType", - * // "progress": 0, - * // "region": "my_region", - * // "selfLink": "my_selfLink", - * // "startTime": "my_startTime", - * // "status": "my_status", - * // "statusMessage": "my_statusMessage", - * // "targetId": "my_targetId", - * // "targetLink": "my_targetLink", - * // "user": "my_user", - * // "warnings": [], - * // "zone": "my_zone" - * // } - * } + * // Example response + * // { + * // "permissions": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + testIamPermissions( + params: Params$Resource$Nodetemplates$Testiampermissions, + options: StreamMethodOptions + ): GaxiosPromise; + testIamPermissions( + params?: Params$Resource$Nodetemplates$Testiampermissions, + options?: MethodOptions + ): GaxiosPromise; + testIamPermissions( + params: Params$Resource$Nodetemplates$Testiampermissions, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + testIamPermissions( + params: Params$Resource$Nodetemplates$Testiampermissions, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + testIamPermissions( + params: Params$Resource$Nodetemplates$Testiampermissions, + callback: BodyResponseCallback + ): void; + testIamPermissions( + callback: BodyResponseCallback + ): void; + testIamPermissions( + paramsOrCallback?: + | Params$Resource$Nodetemplates$Testiampermissions + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Nodetemplates$Testiampermissions; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Nodetemplates$Testiampermissions; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/v1/projects/{project}/regions/{region}/nodeTemplates/{resource}/testIamPermissions' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project', 'region', 'resource'], + pathParams: ['project', 'region', 'resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Nodetemplates$Aggregatedlist + extends StandardParameters { + /** + * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. + * + * 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) ``` + */ + filter?: string; + /** + * Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. + */ + includeAllScopes?: boolean; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + */ + maxResults?: number; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. + * + * Currently, only sorting by `name` or `creationTimestamp desc` is supported. + */ + orderBy?: string; + /** + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + */ + pageToken?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + */ + returnPartialSuccess?: boolean; + } + export interface Params$Resource$Nodetemplates$Delete + extends StandardParameters { + /** + * Name of the NodeTemplate resource to delete. + */ + nodeTemplate?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * The name of the region for this request. + */ + region?: string; + /** + * 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. + * + * 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; + } + export interface Params$Resource$Nodetemplates$Get + extends StandardParameters { + /** + * Name of the node template to return. + */ + nodeTemplate?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * The name of the region for this request. + */ + region?: string; + } + export interface Params$Resource$Nodetemplates$Getiampolicy + extends StandardParameters { + /** + * Requested IAM Policy version. + */ + optionsRequestedPolicyVersion?: number; + /** + * Project ID for this request. + */ + project?: string; + /** + * The name of the region for this request. + */ + region?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; + } + export interface Params$Resource$Nodetemplates$Insert + extends StandardParameters { + /** + * Project ID for this request. + */ + project?: string; + /** + * The name of the region for this request. + */ + region?: string; + /** + * 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. + * + * 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; + + /** + * Request body metadata + */ + requestBody?: Schema$NodeTemplate; + } + export interface Params$Resource$Nodetemplates$List + extends StandardParameters { + /** + * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. * - * main().catch(e => { - * console.error(e); - * throw e; - * }); + * 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) ``` + */ + filter?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + */ + maxResults?: number; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. * - * @param params - Parameters for request - * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. - * @param callback - Optional callback that handles the response. - * @returns A promise if used with async/await, or void if used with a callback. + * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. + * + * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ - patch( - params: Params$Resource$Nodegroups$Patch, - options: StreamMethodOptions - ): GaxiosPromise; - patch( - params?: Params$Resource$Nodegroups$Patch, - options?: MethodOptions - ): GaxiosPromise; - patch( - params: Params$Resource$Nodegroups$Patch, - options: StreamMethodOptions | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - patch( - params: Params$Resource$Nodegroups$Patch, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - patch( - params: Params$Resource$Nodegroups$Patch, - callback: BodyResponseCallback - ): void; - patch(callback: BodyResponseCallback): void; - patch( - paramsOrCallback?: - | Params$Resource$Nodegroups$Patch - | BodyResponseCallback - | BodyResponseCallback, - optionsOrCallback?: - | MethodOptions - | StreamMethodOptions - | BodyResponseCallback - | BodyResponseCallback, - callback?: - | BodyResponseCallback - | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Nodegroups$Patch; - let options = (optionsOrCallback || {}) as MethodOptions; + orderBy?: string; + /** + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + */ + pageToken?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * The name of the region for this request. + */ + region?: string; + /** + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + */ + returnPartialSuccess?: boolean; + } + export interface Params$Resource$Nodetemplates$Setiampolicy + extends StandardParameters { + /** + * Project ID for this request. + */ + project?: string; + /** + * The name of the region for this request. + */ + region?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Nodegroups$Patch; - options = {}; - } + /** + * Request body metadata + */ + requestBody?: Schema$RegionSetPolicyRequest; + } + export interface Params$Resource$Nodetemplates$Testiampermissions + extends StandardParameters { + /** + * Project ID for this request. + */ + project?: string; + /** + * The name of the region for this request. + */ + region?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } + /** + * Request body metadata + */ + requestBody?: Schema$TestPermissionsRequest; + } - const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: ( - rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}' - ).replace(/([^:]\/)\/+/g, '$1'), - method: 'PATCH', - }, - options - ), - params, - requiredParams: ['project', 'zone', 'nodeGroup'], - pathParams: ['nodeGroup', 'project', 'zone'], - context: this.context, - }; - if (callback) { - createAPIRequest( - parameters, - callback as BodyResponseCallback - ); - } else { - return createAPIRequest(parameters); - } + export class Resource$Nodetypes { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; } /** - * Sets the access control policy on the specified resource. Replaces any existing policy. + * Retrieves an aggregated list of node types. * @example * ```js * // Before running the sample: @@ -67926,6 +71726,7 @@ export namespace compute_v1 { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', * ], * }); * @@ -67934,35 +71735,44 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.nodeGroups.setIamPolicy({ + * const res = await compute.nodeTypes.aggregatedList({ + * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. + * // + * // 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) ``` + * filter: 'placeholder-value', + * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. + * includeAllScopes: 'placeholder-value', + * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * maxResults: 'placeholder-value', + * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * // + * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. + * // + * // Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * orderBy: 'placeholder-value', + * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * pageToken: 'placeholder-value', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // Name or id of the resource for this request. - * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', - * // The name of the zone for this request. - * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "bindings": [], - * // "etag": "my_etag", - * // "policy": {} - * // } - * }, + * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + * returnPartialSuccess: 'placeholder-value', * }); * console.log(res.data); * * // Example response * // { - * // "auditConfigs": [], - * // "bindings": [], - * // "etag": "my_etag", - * // "iamOwned": false, - * // "rules": [], - * // "version": 0 + * // "id": "my_id", + * // "items": {}, + * // "kind": "my_kind", + * // "nextPageToken": "my_nextPageToken", + * // "selfLink": "my_selfLink", + * // "unreachables": [], + * // "warning": {} * // } * } * @@ -67978,50 +71788,57 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - setIamPolicy( - params: Params$Resource$Nodegroups$Setiampolicy, + aggregatedList( + params: Params$Resource$Nodetypes$Aggregatedlist, options: StreamMethodOptions ): GaxiosPromise; - setIamPolicy( - params?: Params$Resource$Nodegroups$Setiampolicy, + aggregatedList( + params?: Params$Resource$Nodetypes$Aggregatedlist, options?: MethodOptions - ): GaxiosPromise; - setIamPolicy( - params: Params$Resource$Nodegroups$Setiampolicy, + ): GaxiosPromise; + aggregatedList( + params: Params$Resource$Nodetypes$Aggregatedlist, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - setIamPolicy( - params: Params$Resource$Nodegroups$Setiampolicy, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + aggregatedList( + params: Params$Resource$Nodetypes$Aggregatedlist, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - setIamPolicy( - params: Params$Resource$Nodegroups$Setiampolicy, - callback: BodyResponseCallback + aggregatedList( + params: Params$Resource$Nodetypes$Aggregatedlist, + callback: BodyResponseCallback ): void; - setIamPolicy(callback: BodyResponseCallback): void; - setIamPolicy( + aggregatedList( + callback: BodyResponseCallback + ): void; + aggregatedList( paramsOrCallback?: - | Params$Resource$Nodegroups$Setiampolicy - | BodyResponseCallback + | Params$Resource$Nodetypes$Aggregatedlist + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { + ): + | void + | GaxiosPromise + | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Nodegroups$Setiampolicy; + {}) as Params$Resource$Nodetypes$Aggregatedlist; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Nodegroups$Setiampolicy; + params = {} as Params$Resource$Nodetypes$Aggregatedlist; options = {}; } @@ -68035,30 +71852,29 @@ export namespace compute_v1 { options: Object.assign( { url: ( - rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/nodeGroups/{resource}/setIamPolicy' + rootUrl + '/compute/v1/projects/{project}/aggregated/nodeTypes' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'POST', + method: 'GET', }, options ), params, - requiredParams: ['project', 'zone', 'resource'], - pathParams: ['project', 'resource', 'zone'], + requiredParams: ['project'], + pathParams: ['project'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Updates the node template of the node group. + * Returns the specified node type. Gets a list of available node types by making a list() request. * @example * ```js * // Before running the sample: @@ -68078,6 +71894,7 @@ export namespace compute_v1 { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', * ], * }); * @@ -68086,56 +71903,30 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.nodeGroups.setNodeTemplate({ - * // Name of the NodeGroup resource to update. - * nodeGroup: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * const res = await compute.nodeTypes.get({ + * // Name of the node type to return. + * nodeType: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // 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. - * // - * // 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: 'placeholder-value', * // The name of the zone for this request. * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "nodeTemplate": "my_nodeTemplate" - * // } - * }, * }); * console.log(res.data); * * // Example response * // { - * // "clientOperationId": "my_clientOperationId", + * // "cpuPlatform": "my_cpuPlatform", * // "creationTimestamp": "my_creationTimestamp", + * // "deprecated": {}, * // "description": "my_description", - * // "endTime": "my_endTime", - * // "error": {}, - * // "httpErrorMessage": "my_httpErrorMessage", - * // "httpErrorStatusCode": 0, + * // "guestCpus": 0, * // "id": "my_id", - * // "insertTime": "my_insertTime", * // "kind": "my_kind", + * // "localSsdGb": 0, + * // "memoryMb": 0, * // "name": "my_name", - * // "operationGroupId": "my_operationGroupId", - * // "operationType": "my_operationType", - * // "progress": 0, - * // "region": "my_region", * // "selfLink": "my_selfLink", - * // "startTime": "my_startTime", - * // "status": "my_status", - * // "statusMessage": "my_statusMessage", - * // "targetId": "my_targetId", - * // "targetLink": "my_targetLink", - * // "user": "my_user", - * // "warnings": [], * // "zone": "my_zone" * // } * } @@ -68152,50 +71943,49 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - setNodeTemplate( - params: Params$Resource$Nodegroups$Setnodetemplate, + get( + params: Params$Resource$Nodetypes$Get, options: StreamMethodOptions ): GaxiosPromise; - setNodeTemplate( - params?: Params$Resource$Nodegroups$Setnodetemplate, + get( + params?: Params$Resource$Nodetypes$Get, options?: MethodOptions - ): GaxiosPromise; - setNodeTemplate( - params: Params$Resource$Nodegroups$Setnodetemplate, + ): GaxiosPromise; + get( + params: Params$Resource$Nodetypes$Get, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - setNodeTemplate( - params: Params$Resource$Nodegroups$Setnodetemplate, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + get( + params: Params$Resource$Nodetypes$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - setNodeTemplate( - params: Params$Resource$Nodegroups$Setnodetemplate, - callback: BodyResponseCallback + get( + params: Params$Resource$Nodetypes$Get, + callback: BodyResponseCallback ): void; - setNodeTemplate(callback: BodyResponseCallback): void; - setNodeTemplate( + get(callback: BodyResponseCallback): void; + get( paramsOrCallback?: - | Params$Resource$Nodegroups$Setnodetemplate - | BodyResponseCallback + | Params$Resource$Nodetypes$Get + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { - let params = (paramsOrCallback || - {}) as Params$Resource$Nodegroups$Setnodetemplate; + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Nodetypes$Get; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Nodegroups$Setnodetemplate; + params = {} as Params$Resource$Nodetypes$Get; options = {}; } @@ -68210,29 +72000,29 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/setNodeTemplate' + '/compute/v1/projects/{project}/zones/{zone}/nodeTypes/{nodeType}' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'POST', + method: 'GET', }, options ), params, - requiredParams: ['project', 'zone', 'nodeGroup'], - pathParams: ['nodeGroup', 'project', 'zone'], + requiredParams: ['project', 'zone', 'nodeType'], + pathParams: ['nodeType', 'project', 'zone'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Returns permissions that a caller has on the specified resource. + * Retrieves a list of node types available to the specified project. * @example * ```js * // Before running the sample: @@ -68261,28 +72051,43 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.nodeGroups.testIamPermissions({ + * const res = await compute.nodeTypes.list({ + * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. + * // + * // 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) ``` + * filter: 'placeholder-value', + * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * maxResults: 'placeholder-value', + * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * // + * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. + * // + * // Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * orderBy: 'placeholder-value', + * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * pageToken: 'placeholder-value', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // Name or id of the resource for this request. - * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + * returnPartialSuccess: 'placeholder-value', * // The name of the zone for this request. * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "permissions": [] - * // } - * }, * }); * console.log(res.data); * * // Example response * // { - * // "permissions": [] + * // "id": "my_id", + * // "items": [], + * // "kind": "my_kind", + * // "nextPageToken": "my_nextPageToken", + * // "selfLink": "my_selfLink", + * // "warning": {} * // } * } * @@ -68298,57 +72103,49 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - testIamPermissions( - params: Params$Resource$Nodegroups$Testiampermissions, + list( + params: Params$Resource$Nodetypes$List, options: StreamMethodOptions ): GaxiosPromise; - testIamPermissions( - params?: Params$Resource$Nodegroups$Testiampermissions, + list( + params?: Params$Resource$Nodetypes$List, options?: MethodOptions - ): GaxiosPromise; - testIamPermissions( - params: Params$Resource$Nodegroups$Testiampermissions, + ): GaxiosPromise; + list( + params: Params$Resource$Nodetypes$List, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - testIamPermissions( - params: Params$Resource$Nodegroups$Testiampermissions, - options: - | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - testIamPermissions( - params: Params$Resource$Nodegroups$Testiampermissions, - callback: BodyResponseCallback + list( + params: Params$Resource$Nodetypes$List, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - testIamPermissions( - callback: BodyResponseCallback + list( + params: Params$Resource$Nodetypes$List, + callback: BodyResponseCallback ): void; - testIamPermissions( + list(callback: BodyResponseCallback): void; + list( paramsOrCallback?: - | Params$Resource$Nodegroups$Testiampermissions - | BodyResponseCallback + | Params$Resource$Nodetypes$List + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): - | void - | GaxiosPromise - | GaxiosPromise { - let params = (paramsOrCallback || - {}) as Params$Resource$Nodegroups$Testiampermissions; + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Nodetypes$List; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Nodegroups$Testiampermissions; + params = {} as Params$Resource$Nodetypes$List; options = {}; } @@ -68362,58 +72159,29 @@ export namespace compute_v1 { options: Object.assign( { url: ( - rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/nodeGroups/{resource}/testIamPermissions' + rootUrl + '/compute/v1/projects/{project}/zones/{zone}/nodeTypes' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'POST', + method: 'GET', }, options ), params, - requiredParams: ['project', 'zone', 'resource'], - pathParams: ['project', 'resource', 'zone'], + requiredParams: ['project', 'zone'], + pathParams: ['project', 'zone'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } } - export interface Params$Resource$Nodegroups$Addnodes - extends StandardParameters { - /** - * Name of the NodeGroup resource. - */ - nodeGroup?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * 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. - * - * 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; - /** - * The name of the zone for this request. - */ - zone?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$NodeGroupsAddNodesRequest; - } - export interface Params$Resource$Nodegroups$Aggregatedlist + export interface Params$Resource$Nodetypes$Aggregatedlist extends StandardParameters { /** * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `\>`, or `<`. @@ -68454,160 +72222,21 @@ export namespace compute_v1 { */ returnPartialSuccess?: boolean; } - export interface Params$Resource$Nodegroups$Delete - extends StandardParameters { - /** - * Name of the NodeGroup resource to delete. - */ - nodeGroup?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * 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. - * - * 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; - /** - * The name of the zone for this request. - */ - zone?: string; - } - export interface Params$Resource$Nodegroups$Deletenodes - extends StandardParameters { - /** - * Name of the NodeGroup resource whose nodes will be deleted. - */ - nodeGroup?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * 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. - * - * 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; - /** - * The name of the zone for this request. - */ - zone?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$NodeGroupsDeleteNodesRequest; - } - export interface Params$Resource$Nodegroups$Get extends StandardParameters { - /** - * Name of the node group to return. - */ - nodeGroup?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * The name of the zone for this request. - */ - zone?: string; - } - export interface Params$Resource$Nodegroups$Getiampolicy - extends StandardParameters { - /** - * Requested IAM Policy version. - */ - optionsRequestedPolicyVersion?: number; - /** - * Project ID for this request. - */ - project?: string; - /** - * Name or id of the resource for this request. - */ - resource?: string; - /** - * The name of the zone for this request. - */ - zone?: string; - } - export interface Params$Resource$Nodegroups$Insert - extends StandardParameters { - /** - * Initial count of nodes in the node group. - */ - initialNodeCount?: number; - /** - * Project ID for this request. - */ - project?: string; - /** - * 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. - * - * 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; - /** - * The name of the zone for this request. - */ - zone?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$NodeGroup; - } - export interface Params$Resource$Nodegroups$List extends StandardParameters { - /** - * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. - * - * 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) ``` - */ - filter?: string; - /** - * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) - */ - maxResults?: number; - /** - * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. - * - * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. - * - * Currently, only sorting by `name` or `creationTimestamp desc` is supported. - */ - orderBy?: string; + export interface Params$Resource$Nodetypes$Get extends StandardParameters { /** - * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * Name of the node type to return. */ - pageToken?: string; + nodeType?: string; /** * Project ID for this request. */ project?: string; - /** - * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. - */ - returnPartialSuccess?: boolean; /** * The name of the zone for this request. */ zone?: string; } - export interface Params$Resource$Nodegroups$Listnodes - extends StandardParameters { + export interface Params$Resource$Nodetypes$List extends StandardParameters { /** * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `\>`, or `<`. * @@ -68622,10 +72251,6 @@ export namespace compute_v1 { * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) */ maxResults?: number; - /** - * Name of the NodeGroup resource whose nodes you want to list. - */ - nodeGroup?: string; /** * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. * @@ -68651,110 +72276,15 @@ export namespace compute_v1 { */ zone?: string; } - export interface Params$Resource$Nodegroups$Patch extends StandardParameters { - /** - * Name of the NodeGroup resource to update. - */ - nodeGroup?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * 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. - * - * 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; - /** - * The name of the zone for this request. - */ - zone?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$NodeGroup; - } - export interface Params$Resource$Nodegroups$Setiampolicy - extends StandardParameters { - /** - * Project ID for this request. - */ - project?: string; - /** - * Name or id of the resource for this request. - */ - resource?: string; - /** - * The name of the zone for this request. - */ - zone?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$ZoneSetPolicyRequest; - } - export interface Params$Resource$Nodegroups$Setnodetemplate - extends StandardParameters { - /** - * Name of the NodeGroup resource to update. - */ - nodeGroup?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * 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. - * - * 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; - /** - * The name of the zone for this request. - */ - zone?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$NodeGroupsSetNodeTemplateRequest; - } - export interface Params$Resource$Nodegroups$Testiampermissions - extends StandardParameters { - /** - * Project ID for this request. - */ - project?: string; - /** - * Name or id of the resource for this request. - */ - resource?: string; - /** - * The name of the zone for this request. - */ - zone?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$TestPermissionsRequest; - } - export class Resource$Nodetemplates { + export class Resource$Packetmirrorings { context: APIRequestContext; constructor(context: APIRequestContext) { this.context = context; } /** - * Retrieves an aggregated list of node templates. + * Retrieves an aggregated list of packetMirrorings. * @example * ```js * // Before running the sample: @@ -68783,7 +72313,7 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.nodeTemplates.aggregatedList({ + * const res = await compute.packetMirrorings.aggregatedList({ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. @@ -68837,56 +72367,56 @@ export namespace compute_v1 { * @returns A promise if used with async/await, or void if used with a callback. */ aggregatedList( - params: Params$Resource$Nodetemplates$Aggregatedlist, + params: Params$Resource$Packetmirrorings$Aggregatedlist, options: StreamMethodOptions ): GaxiosPromise; aggregatedList( - params?: Params$Resource$Nodetemplates$Aggregatedlist, + params?: Params$Resource$Packetmirrorings$Aggregatedlist, options?: MethodOptions - ): GaxiosPromise; + ): GaxiosPromise; aggregatedList( - params: Params$Resource$Nodetemplates$Aggregatedlist, + params: Params$Resource$Packetmirrorings$Aggregatedlist, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; aggregatedList( - params: Params$Resource$Nodetemplates$Aggregatedlist, + params: Params$Resource$Packetmirrorings$Aggregatedlist, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; aggregatedList( - params: Params$Resource$Nodetemplates$Aggregatedlist, - callback: BodyResponseCallback + params: Params$Resource$Packetmirrorings$Aggregatedlist, + callback: BodyResponseCallback ): void; aggregatedList( - callback: BodyResponseCallback + callback: BodyResponseCallback ): void; aggregatedList( paramsOrCallback?: - | Params$Resource$Nodetemplates$Aggregatedlist - | BodyResponseCallback + | Params$Resource$Packetmirrorings$Aggregatedlist + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Nodetemplates$Aggregatedlist; + {}) as Params$Resource$Packetmirrorings$Aggregatedlist; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Nodetemplates$Aggregatedlist; + params = {} as Params$Resource$Packetmirrorings$Aggregatedlist; options = {}; } @@ -68901,7 +72431,7 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/aggregated/nodeTemplates' + '/compute/v1/projects/{project}/aggregated/packetMirrorings' ).replace(/([^:]\/)\/+/g, '$1'), method: 'GET', }, @@ -68913,17 +72443,19 @@ export namespace compute_v1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest( + parameters + ); } } /** - * Deletes the specified NodeTemplate resource. + * Deletes the specified PacketMirroring resource. * @example * ```js * // Before running the sample: @@ -68951,13 +72483,13 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.nodeTemplates.delete({ - * // Name of the NodeTemplate resource to delete. - * nodeTemplate: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * const res = await compute.packetMirrorings.delete({ + * // Name of the PacketMirroring resource to delete. + * packetMirroring: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // The name of the region for this request. + * // Name of the region for this request. * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', * // 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. * // @@ -69010,31 +72542,31 @@ export namespace compute_v1 { * @returns A promise if used with async/await, or void if used with a callback. */ delete( - params: Params$Resource$Nodetemplates$Delete, + params: Params$Resource$Packetmirrorings$Delete, options: StreamMethodOptions ): GaxiosPromise; delete( - params?: Params$Resource$Nodetemplates$Delete, + params?: Params$Resource$Packetmirrorings$Delete, options?: MethodOptions ): GaxiosPromise; delete( - params: Params$Resource$Nodetemplates$Delete, + params: Params$Resource$Packetmirrorings$Delete, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; delete( - params: Params$Resource$Nodetemplates$Delete, + params: Params$Resource$Packetmirrorings$Delete, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; delete( - params: Params$Resource$Nodetemplates$Delete, + params: Params$Resource$Packetmirrorings$Delete, callback: BodyResponseCallback ): void; delete(callback: BodyResponseCallback): void; delete( paramsOrCallback?: - | Params$Resource$Nodetemplates$Delete + | Params$Resource$Packetmirrorings$Delete | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -69047,165 +72579,12 @@ export namespace compute_v1 { | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Nodetemplates$Delete; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Nodetemplates$Delete; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: ( - rootUrl + - '/compute/v1/projects/{project}/regions/{region}/nodeTemplates/{nodeTemplate}' - ).replace(/([^:]\/)\/+/g, '$1'), - method: 'DELETE', - }, - options - ), - params, - requiredParams: ['project', 'region', 'nodeTemplate'], - pathParams: ['nodeTemplate', 'project', 'region'], - context: this.context, - }; - if (callback) { - createAPIRequest( - parameters, - callback as BodyResponseCallback - ); - } else { - return createAPIRequest(parameters); - } - } - - /** - * Returns the specified node template. Gets a list of available node templates by making a list() request. - * @example - * ```js - * // Before running the sample: - * // - Enable the API at: - * // https://console.developers.google.com/apis/api/compute.googleapis.com - * // - Login into gcloud by running: - * // `$ gcloud auth application-default login` - * // - Install the npm module by running: - * // `$ npm install googleapis` - * - * const {google} = require('googleapis'); - * const compute = google.compute('v1'); - * - * async function main() { - * const auth = new google.auth.GoogleAuth({ - * // Scopes can be specified either as an array or as a single, space-delimited string. - * scopes: [ - * 'https://www.googleapis.com/auth/cloud-platform', - * 'https://www.googleapis.com/auth/compute', - * 'https://www.googleapis.com/auth/compute.readonly', - * ], - * }); - * - * // Acquire an auth client, and bind it to all future calls - * const authClient = await auth.getClient(); - * google.options({auth: authClient}); - * - * // Do the magic - * const res = await compute.nodeTemplates.get({ - * // Name of the node template to return. - * nodeTemplate: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', - * // Project ID for this request. - * project: - * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // The name of the region for this request. - * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', - * }); - * console.log(res.data); - * - * // Example response - * // { - * // "accelerators": [], - * // "cpuOvercommitType": "my_cpuOvercommitType", - * // "creationTimestamp": "my_creationTimestamp", - * // "description": "my_description", - * // "disks": [], - * // "id": "my_id", - * // "kind": "my_kind", - * // "name": "my_name", - * // "nodeAffinityLabels": {}, - * // "nodeType": "my_nodeType", - * // "nodeTypeFlexibility": {}, - * // "region": "my_region", - * // "selfLink": "my_selfLink", - * // "serverBinding": {}, - * // "status": "my_status", - * // "statusMessage": "my_statusMessage" - * // } - * } - * - * main().catch(e => { - * console.error(e); - * throw e; - * }); - * - * ``` - * - * @param params - Parameters for request - * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. - * @param callback - Optional callback that handles the response. - * @returns A promise if used with async/await, or void if used with a callback. - */ - get( - params: Params$Resource$Nodetemplates$Get, - options: StreamMethodOptions - ): GaxiosPromise; - get( - params?: Params$Resource$Nodetemplates$Get, - options?: MethodOptions - ): GaxiosPromise; - get( - params: Params$Resource$Nodetemplates$Get, - options: StreamMethodOptions | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - get( - params: Params$Resource$Nodetemplates$Get, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - get( - params: Params$Resource$Nodetemplates$Get, - callback: BodyResponseCallback - ): void; - get(callback: BodyResponseCallback): void; - get( - paramsOrCallback?: - | Params$Resource$Nodetemplates$Get - | BodyResponseCallback - | BodyResponseCallback, - optionsOrCallback?: - | MethodOptions - | StreamMethodOptions - | BodyResponseCallback - | BodyResponseCallback, - callback?: - | BodyResponseCallback - | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { - let params = (paramsOrCallback || - {}) as Params$Resource$Nodetemplates$Get; + {}) as Params$Resource$Packetmirrorings$Delete; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Nodetemplates$Get; + params = {} as Params$Resource$Packetmirrorings$Delete; options = {}; } @@ -69220,29 +72599,29 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/regions/{region}/nodeTemplates/{nodeTemplate}' + '/compute/v1/projects/{project}/regions/{region}/packetMirrorings/{packetMirroring}' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'GET', + method: 'DELETE', }, options ), params, - requiredParams: ['project', 'region', 'nodeTemplate'], - pathParams: ['nodeTemplate', 'project', 'region'], + requiredParams: ['project', 'region', 'packetMirroring'], + pathParams: ['packetMirroring', 'project', 'region'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Gets the access control policy for a resource. May be empty if no such policy or resource exists. + * Returns the specified PacketMirroring resource. * @example * ```js * // Before running the sample: @@ -69271,27 +72650,32 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.nodeTemplates.getIamPolicy({ - * // Requested IAM Policy version. - * optionsRequestedPolicyVersion: 'placeholder-value', + * const res = await compute.packetMirrorings.get({ + * // Name of the PacketMirroring resource to return. + * packetMirroring: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // The name of the region for this request. + * // Name of the region for this request. * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', - * // Name or id of the resource for this request. - * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * }); * console.log(res.data); * * // Example response * // { - * // "auditConfigs": [], - * // "bindings": [], - * // "etag": "my_etag", - * // "iamOwned": false, - * // "rules": [], - * // "version": 0 + * // "collectorIlb": {}, + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "enable": "my_enable", + * // "filter": {}, + * // "id": "my_id", + * // "kind": "my_kind", + * // "mirroredResources": {}, + * // "name": "my_name", + * // "network": {}, + * // "priority": 0, + * // "region": "my_region", + * // "selfLink": "my_selfLink" * // } * } * @@ -69307,50 +72691,50 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - getIamPolicy( - params: Params$Resource$Nodetemplates$Getiampolicy, + get( + params: Params$Resource$Packetmirrorings$Get, options: StreamMethodOptions ): GaxiosPromise; - getIamPolicy( - params?: Params$Resource$Nodetemplates$Getiampolicy, + get( + params?: Params$Resource$Packetmirrorings$Get, options?: MethodOptions - ): GaxiosPromise; - getIamPolicy( - params: Params$Resource$Nodetemplates$Getiampolicy, + ): GaxiosPromise; + get( + params: Params$Resource$Packetmirrorings$Get, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - getIamPolicy( - params: Params$Resource$Nodetemplates$Getiampolicy, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + get( + params: Params$Resource$Packetmirrorings$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - getIamPolicy( - params: Params$Resource$Nodetemplates$Getiampolicy, - callback: BodyResponseCallback + get( + params: Params$Resource$Packetmirrorings$Get, + callback: BodyResponseCallback ): void; - getIamPolicy(callback: BodyResponseCallback): void; - getIamPolicy( + get(callback: BodyResponseCallback): void; + get( paramsOrCallback?: - | Params$Resource$Nodetemplates$Getiampolicy - | BodyResponseCallback + | Params$Resource$Packetmirrorings$Get + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { + ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Nodetemplates$Getiampolicy; + {}) as Params$Resource$Packetmirrorings$Get; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Nodetemplates$Getiampolicy; + params = {} as Params$Resource$Packetmirrorings$Get; options = {}; } @@ -69365,29 +72749,29 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/regions/{region}/nodeTemplates/{resource}/getIamPolicy' + '/compute/v1/projects/{project}/regions/{region}/packetMirrorings/{packetMirroring}' ).replace(/([^:]\/)\/+/g, '$1'), method: 'GET', }, options ), params, - requiredParams: ['project', 'region', 'resource'], - pathParams: ['project', 'region', 'resource'], + requiredParams: ['project', 'region', 'packetMirroring'], + pathParams: ['packetMirroring', 'project', 'region'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Creates a NodeTemplate resource in the specified project using the data included in the request. + * Creates a PacketMirroring resource in the specified project and region using the data included in the request. * @example * ```js * // Before running the sample: @@ -69415,11 +72799,11 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.nodeTemplates.insert({ + * const res = await compute.packetMirrorings.insert({ * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // The name of the region for this request. + * // Name of the region for this request. * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', * // 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. * // @@ -69432,22 +72816,19 @@ export namespace compute_v1 { * requestBody: { * // request body parameters * // { - * // "accelerators": [], - * // "cpuOvercommitType": "my_cpuOvercommitType", + * // "collectorIlb": {}, * // "creationTimestamp": "my_creationTimestamp", * // "description": "my_description", - * // "disks": [], + * // "enable": "my_enable", + * // "filter": {}, * // "id": "my_id", * // "kind": "my_kind", + * // "mirroredResources": {}, * // "name": "my_name", - * // "nodeAffinityLabels": {}, - * // "nodeType": "my_nodeType", - * // "nodeTypeFlexibility": {}, + * // "network": {}, + * // "priority": 0, * // "region": "my_region", - * // "selfLink": "my_selfLink", - * // "serverBinding": {}, - * // "status": "my_status", - * // "statusMessage": "my_statusMessage" + * // "selfLink": "my_selfLink" * // } * }, * }); @@ -69495,31 +72876,31 @@ export namespace compute_v1 { * @returns A promise if used with async/await, or void if used with a callback. */ insert( - params: Params$Resource$Nodetemplates$Insert, + params: Params$Resource$Packetmirrorings$Insert, options: StreamMethodOptions ): GaxiosPromise; insert( - params?: Params$Resource$Nodetemplates$Insert, + params?: Params$Resource$Packetmirrorings$Insert, options?: MethodOptions ): GaxiosPromise; insert( - params: Params$Resource$Nodetemplates$Insert, + params: Params$Resource$Packetmirrorings$Insert, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; insert( - params: Params$Resource$Nodetemplates$Insert, + params: Params$Resource$Packetmirrorings$Insert, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; insert( - params: Params$Resource$Nodetemplates$Insert, + params: Params$Resource$Packetmirrorings$Insert, callback: BodyResponseCallback ): void; insert(callback: BodyResponseCallback): void; insert( paramsOrCallback?: - | Params$Resource$Nodetemplates$Insert + | Params$Resource$Packetmirrorings$Insert | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -69532,12 +72913,12 @@ export namespace compute_v1 { | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Nodetemplates$Insert; + {}) as Params$Resource$Packetmirrorings$Insert; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Nodetemplates$Insert; + params = {} as Params$Resource$Packetmirrorings$Insert; options = {}; } @@ -69552,7 +72933,7 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/regions/{region}/nodeTemplates' + '/compute/v1/projects/{project}/regions/{region}/packetMirrorings' ).replace(/([^:]\/)\/+/g, '$1'), method: 'POST', }, @@ -69574,7 +72955,7 @@ export namespace compute_v1 { } /** - * Retrieves a list of node templates available to the specified project. + * Retrieves a list of PacketMirroring resources available to the specified project and region. * @example * ```js * // Before running the sample: @@ -69603,7 +72984,7 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.nodeTemplates.list({ + * const res = await compute.packetMirrorings.list({ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. @@ -69625,7 +73006,7 @@ export namespace compute_v1 { * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // The name of the region for this request. + * // Name of the region for this request. * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. * returnPartialSuccess: 'placeholder-value', @@ -69656,49 +73037,52 @@ export namespace compute_v1 { * @returns A promise if used with async/await, or void if used with a callback. */ list( - params: Params$Resource$Nodetemplates$List, + params: Params$Resource$Packetmirrorings$List, options: StreamMethodOptions ): GaxiosPromise; list( - params?: Params$Resource$Nodetemplates$List, + params?: Params$Resource$Packetmirrorings$List, options?: MethodOptions - ): GaxiosPromise; + ): GaxiosPromise; list( - params: Params$Resource$Nodetemplates$List, + params: Params$Resource$Packetmirrorings$List, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; list( - params: Params$Resource$Nodetemplates$List, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + params: Params$Resource$Packetmirrorings$List, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; list( - params: Params$Resource$Nodetemplates$List, - callback: BodyResponseCallback + params: Params$Resource$Packetmirrorings$List, + callback: BodyResponseCallback ): void; - list(callback: BodyResponseCallback): void; + list(callback: BodyResponseCallback): void; list( paramsOrCallback?: - | Params$Resource$Nodetemplates$List - | BodyResponseCallback + | Params$Resource$Packetmirrorings$List + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { + ): + | void + | GaxiosPromise + | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Nodetemplates$List; + {}) as Params$Resource$Packetmirrorings$List; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Nodetemplates$List; + params = {} as Params$Resource$Packetmirrorings$List; options = {}; } @@ -69713,7 +73097,7 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/regions/{region}/nodeTemplates' + '/compute/v1/projects/{project}/regions/{region}/packetMirrorings' ).replace(/([^:]\/)\/+/g, '$1'), method: 'GET', }, @@ -69725,17 +73109,17 @@ export namespace compute_v1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Sets the access control policy on the specified resource. Replaces any existing policy. + * Patches the specified PacketMirroring resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules. * @example * ```js * // Before running the sample: @@ -69763,22 +73147,38 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.nodeTemplates.setIamPolicy({ + * const res = await compute.packetMirrorings.patch({ + * // Name of the PacketMirroring resource to patch. + * packetMirroring: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // The name of the region for this request. + * // Name of the region for this request. * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', - * // Name or id of the resource for this request. - * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * // 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. + * // + * // 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: 'placeholder-value', * * // Request body metadata * requestBody: { * // request body parameters * // { - * // "bindings": [], - * // "etag": "my_etag", - * // "policy": {} + * // "collectorIlb": {}, + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "enable": "my_enable", + * // "filter": {}, + * // "id": "my_id", + * // "kind": "my_kind", + * // "mirroredResources": {}, + * // "name": "my_name", + * // "network": {}, + * // "priority": 0, + * // "region": "my_region", + * // "selfLink": "my_selfLink" * // } * }, * }); @@ -69786,12 +73186,30 @@ export namespace compute_v1 { * * // Example response * // { - * // "auditConfigs": [], - * // "bindings": [], - * // "etag": "my_etag", - * // "iamOwned": false, - * // "rules": [], - * // "version": 0 + * // "clientOperationId": "my_clientOperationId", + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "endTime": "my_endTime", + * // "error": {}, + * // "httpErrorMessage": "my_httpErrorMessage", + * // "httpErrorStatusCode": 0, + * // "id": "my_id", + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "name": "my_name", + * // "operationGroupId": "my_operationGroupId", + * // "operationType": "my_operationType", + * // "progress": 0, + * // "region": "my_region", + * // "selfLink": "my_selfLink", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "statusMessage": "my_statusMessage", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "user": "my_user", + * // "warnings": [], + * // "zone": "my_zone" * // } * } * @@ -69807,50 +73225,50 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - setIamPolicy( - params: Params$Resource$Nodetemplates$Setiampolicy, + patch( + params: Params$Resource$Packetmirrorings$Patch, options: StreamMethodOptions ): GaxiosPromise; - setIamPolicy( - params?: Params$Resource$Nodetemplates$Setiampolicy, + patch( + params?: Params$Resource$Packetmirrorings$Patch, options?: MethodOptions - ): GaxiosPromise; - setIamPolicy( - params: Params$Resource$Nodetemplates$Setiampolicy, + ): GaxiosPromise; + patch( + params: Params$Resource$Packetmirrorings$Patch, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - setIamPolicy( - params: Params$Resource$Nodetemplates$Setiampolicy, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + patch( + params: Params$Resource$Packetmirrorings$Patch, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - setIamPolicy( - params: Params$Resource$Nodetemplates$Setiampolicy, - callback: BodyResponseCallback + patch( + params: Params$Resource$Packetmirrorings$Patch, + callback: BodyResponseCallback ): void; - setIamPolicy(callback: BodyResponseCallback): void; - setIamPolicy( + patch(callback: BodyResponseCallback): void; + patch( paramsOrCallback?: - | Params$Resource$Nodetemplates$Setiampolicy - | BodyResponseCallback + | Params$Resource$Packetmirrorings$Patch + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { + ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Nodetemplates$Setiampolicy; + {}) as Params$Resource$Packetmirrorings$Patch; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Nodetemplates$Setiampolicy; + params = {} as Params$Resource$Packetmirrorings$Patch; options = {}; } @@ -69865,24 +73283,24 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/regions/{region}/nodeTemplates/{resource}/setIamPolicy' + '/compute/v1/projects/{project}/regions/{region}/packetMirrorings/{packetMirroring}' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'POST', + method: 'PATCH', }, options ), params, - requiredParams: ['project', 'region', 'resource'], - pathParams: ['project', 'region', 'resource'], + requiredParams: ['project', 'region', 'packetMirroring'], + pathParams: ['packetMirroring', 'project', 'region'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } @@ -69916,7 +73334,7 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.nodeTemplates.testIamPermissions({ + * const res = await compute.packetMirrorings.testIamPermissions({ * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', @@ -69954,27 +73372,27 @@ export namespace compute_v1 { * @returns A promise if used with async/await, or void if used with a callback. */ testIamPermissions( - params: Params$Resource$Nodetemplates$Testiampermissions, + params: Params$Resource$Packetmirrorings$Testiampermissions, options: StreamMethodOptions ): GaxiosPromise; testIamPermissions( - params?: Params$Resource$Nodetemplates$Testiampermissions, + params?: Params$Resource$Packetmirrorings$Testiampermissions, options?: MethodOptions ): GaxiosPromise; testIamPermissions( - params: Params$Resource$Nodetemplates$Testiampermissions, + params: Params$Resource$Packetmirrorings$Testiampermissions, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; testIamPermissions( - params: Params$Resource$Nodetemplates$Testiampermissions, + params: Params$Resource$Packetmirrorings$Testiampermissions, options: | MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; testIamPermissions( - params: Params$Resource$Nodetemplates$Testiampermissions, + params: Params$Resource$Packetmirrorings$Testiampermissions, callback: BodyResponseCallback ): void; testIamPermissions( @@ -69982,7 +73400,7 @@ export namespace compute_v1 { ): void; testIamPermissions( paramsOrCallback?: - | Params$Resource$Nodetemplates$Testiampermissions + | Params$Resource$Packetmirrorings$Testiampermissions | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -69998,12 +73416,12 @@ export namespace compute_v1 { | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Nodetemplates$Testiampermissions; + {}) as Params$Resource$Packetmirrorings$Testiampermissions; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Nodetemplates$Testiampermissions; + params = {} as Params$Resource$Packetmirrorings$Testiampermissions; options = {}; } @@ -70018,7 +73436,7 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/regions/{region}/nodeTemplates/{resource}/testIamPermissions' + '/compute/v1/projects/{project}/regions/{region}/packetMirrorings/{resource}/testIamPermissions' ).replace(/([^:]\/)\/+/g, '$1'), method: 'POST', }, @@ -70040,7 +73458,7 @@ export namespace compute_v1 { } } - export interface Params$Resource$Nodetemplates$Aggregatedlist + export interface Params$Resource$Packetmirrorings$Aggregatedlist extends StandardParameters { /** * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `\>`, or `<`. @@ -70081,18 +73499,18 @@ export namespace compute_v1 { */ returnPartialSuccess?: boolean; } - export interface Params$Resource$Nodetemplates$Delete + export interface Params$Resource$Packetmirrorings$Delete extends StandardParameters { /** - * Name of the NodeTemplate resource to delete. + * Name of the PacketMirroring resource to delete. */ - nodeTemplate?: string; + packetMirroring?: string; /** * Project ID for this request. */ project?: string; /** - * The name of the region for this request. + * Name of the region for this request. */ region?: string; /** @@ -70104,48 +73522,29 @@ export namespace compute_v1 { */ requestId?: string; } - export interface Params$Resource$Nodetemplates$Get - extends StandardParameters { - /** - * Name of the node template to return. - */ - nodeTemplate?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * The name of the region for this request. - */ - region?: string; - } - export interface Params$Resource$Nodetemplates$Getiampolicy + export interface Params$Resource$Packetmirrorings$Get extends StandardParameters { /** - * Requested IAM Policy version. + * Name of the PacketMirroring resource to return. */ - optionsRequestedPolicyVersion?: number; + packetMirroring?: string; /** * Project ID for this request. */ project?: string; /** - * The name of the region for this request. + * Name of the region for this request. */ region?: string; - /** - * Name or id of the resource for this request. - */ - resource?: string; } - export interface Params$Resource$Nodetemplates$Insert + export interface Params$Resource$Packetmirrorings$Insert extends StandardParameters { /** * Project ID for this request. */ project?: string; /** - * The name of the region for this request. + * Name of the region for this request. */ region?: string; /** @@ -70160,9 +73559,9 @@ export namespace compute_v1 { /** * Request body metadata */ - requestBody?: Schema$NodeTemplate; + requestBody?: Schema$PacketMirroring; } - export interface Params$Resource$Nodetemplates$List + export interface Params$Resource$Packetmirrorings$List extends StandardParameters { /** * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `\>`, or `<`. @@ -70186,240 +73585,80 @@ export namespace compute_v1 { * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ orderBy?: string; - /** - * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. - */ - pageToken?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * The name of the region for this request. - */ - region?: string; - /** - * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. - */ - returnPartialSuccess?: boolean; - } - export interface Params$Resource$Nodetemplates$Setiampolicy - extends StandardParameters { - /** - * Project ID for this request. - */ - project?: string; - /** - * The name of the region for this request. - */ - region?: string; - /** - * Name or id of the resource for this request. - */ - resource?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$RegionSetPolicyRequest; - } - export interface Params$Resource$Nodetemplates$Testiampermissions - extends StandardParameters { - /** - * Project ID for this request. - */ - project?: string; - /** - * The name of the region for this request. - */ - region?: string; - /** - * Name or id of the resource for this request. - */ - resource?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$TestPermissionsRequest; - } - - export class Resource$Nodetypes { - context: APIRequestContext; - constructor(context: APIRequestContext) { - this.context = context; - } - - /** - * Retrieves an aggregated list of node types. - * @example - * ```js - * // Before running the sample: - * // - Enable the API at: - * // https://console.developers.google.com/apis/api/compute.googleapis.com - * // - Login into gcloud by running: - * // `$ gcloud auth application-default login` - * // - Install the npm module by running: - * // `$ npm install googleapis` - * - * const {google} = require('googleapis'); - * const compute = google.compute('v1'); - * - * async function main() { - * const auth = new google.auth.GoogleAuth({ - * // Scopes can be specified either as an array or as a single, space-delimited string. - * scopes: [ - * 'https://www.googleapis.com/auth/cloud-platform', - * 'https://www.googleapis.com/auth/compute', - * 'https://www.googleapis.com/auth/compute.readonly', - * ], - * }); - * - * // Acquire an auth client, and bind it to all future calls - * const authClient = await auth.getClient(); - * google.options({auth: authClient}); - * - * // Do the magic - * const res = await compute.nodeTypes.aggregatedList({ - * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. - * // - * // 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) ``` - * filter: 'placeholder-value', - * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. - * includeAllScopes: 'placeholder-value', - * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) - * maxResults: 'placeholder-value', - * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. - * // - * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. - * // - * // Currently, only sorting by `name` or `creationTimestamp desc` is supported. - * orderBy: 'placeholder-value', - * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. - * pageToken: 'placeholder-value', - * // Project ID for this request. - * project: - * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. - * returnPartialSuccess: 'placeholder-value', - * }); - * console.log(res.data); - * - * // Example response - * // { - * // "id": "my_id", - * // "items": {}, - * // "kind": "my_kind", - * // "nextPageToken": "my_nextPageToken", - * // "selfLink": "my_selfLink", - * // "unreachables": [], - * // "warning": {} - * // } - * } - * - * main().catch(e => { - * console.error(e); - * throw e; - * }); + /** + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + */ + pageToken?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * Name of the region for this request. + */ + region?: string; + /** + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + */ + returnPartialSuccess?: boolean; + } + export interface Params$Resource$Packetmirrorings$Patch + extends StandardParameters { + /** + * Name of the PacketMirroring resource to patch. + */ + packetMirroring?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * Name of the region for this request. + */ + region?: string; + /** + * 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. * - * ``` + * 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. * - * @param params - Parameters for request - * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. - * @param callback - Optional callback that handles the response. - * @returns A promise if used with async/await, or void if used with a callback. + * The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). */ - aggregatedList( - params: Params$Resource$Nodetypes$Aggregatedlist, - options: StreamMethodOptions - ): GaxiosPromise; - aggregatedList( - params?: Params$Resource$Nodetypes$Aggregatedlist, - options?: MethodOptions - ): GaxiosPromise; - aggregatedList( - params: Params$Resource$Nodetypes$Aggregatedlist, - options: StreamMethodOptions | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - aggregatedList( - params: Params$Resource$Nodetypes$Aggregatedlist, - options: - | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - aggregatedList( - params: Params$Resource$Nodetypes$Aggregatedlist, - callback: BodyResponseCallback - ): void; - aggregatedList( - callback: BodyResponseCallback - ): void; - aggregatedList( - paramsOrCallback?: - | Params$Resource$Nodetypes$Aggregatedlist - | BodyResponseCallback - | BodyResponseCallback, - optionsOrCallback?: - | MethodOptions - | StreamMethodOptions - | BodyResponseCallback - | BodyResponseCallback, - callback?: - | BodyResponseCallback - | BodyResponseCallback - ): - | void - | GaxiosPromise - | GaxiosPromise { - let params = (paramsOrCallback || - {}) as Params$Resource$Nodetypes$Aggregatedlist; - let options = (optionsOrCallback || {}) as MethodOptions; + requestId?: string; - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Nodetypes$Aggregatedlist; - options = {}; - } + /** + * Request body metadata + */ + requestBody?: Schema$PacketMirroring; + } + export interface Params$Resource$Packetmirrorings$Testiampermissions + extends StandardParameters { + /** + * Project ID for this request. + */ + project?: string; + /** + * The name of the region for this request. + */ + region?: string; + /** + * Name or id of the resource for this request. + */ + resource?: string; - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } + /** + * Request body metadata + */ + requestBody?: Schema$TestPermissionsRequest; + } - const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: ( - rootUrl + '/compute/v1/projects/{project}/aggregated/nodeTypes' - ).replace(/([^:]\/)\/+/g, '$1'), - method: 'GET', - }, - options - ), - params, - requiredParams: ['project'], - pathParams: ['project'], - context: this.context, - }; - if (callback) { - createAPIRequest( - parameters, - callback as BodyResponseCallback - ); - } else { - return createAPIRequest(parameters); - } + export class Resource$Projects { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; } /** - * Returns the specified node type. Gets a list of available node types by making a list() request. + * Disable this project as a shared VPC host project. * @example * ```js * // Before running the sample: @@ -70439,7 +73678,6 @@ export namespace compute_v1 { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', - * 'https://www.googleapis.com/auth/compute.readonly', * ], * }); * @@ -70448,30 +73686,44 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.nodeTypes.get({ - * // Name of the node type to return. - * nodeType: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * const res = await compute.projects.disableXpnHost({ * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // The name of the zone for this request. - * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * // 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. + * // + * // 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: 'placeholder-value', * }); * console.log(res.data); * * // Example response * // { - * // "cpuPlatform": "my_cpuPlatform", + * // "clientOperationId": "my_clientOperationId", * // "creationTimestamp": "my_creationTimestamp", - * // "deprecated": {}, * // "description": "my_description", - * // "guestCpus": 0, + * // "endTime": "my_endTime", + * // "error": {}, + * // "httpErrorMessage": "my_httpErrorMessage", + * // "httpErrorStatusCode": 0, * // "id": "my_id", + * // "insertTime": "my_insertTime", * // "kind": "my_kind", - * // "localSsdGb": 0, - * // "memoryMb": 0, * // "name": "my_name", + * // "operationGroupId": "my_operationGroupId", + * // "operationType": "my_operationType", + * // "progress": 0, + * // "region": "my_region", * // "selfLink": "my_selfLink", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "statusMessage": "my_statusMessage", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "user": "my_user", + * // "warnings": [], * // "zone": "my_zone" * // } * } @@ -70488,49 +73740,50 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - get( - params: Params$Resource$Nodetypes$Get, + disableXpnHost( + params: Params$Resource$Projects$Disablexpnhost, options: StreamMethodOptions ): GaxiosPromise; - get( - params?: Params$Resource$Nodetypes$Get, + disableXpnHost( + params?: Params$Resource$Projects$Disablexpnhost, options?: MethodOptions - ): GaxiosPromise; - get( - params: Params$Resource$Nodetypes$Get, + ): GaxiosPromise; + disableXpnHost( + params: Params$Resource$Projects$Disablexpnhost, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - get( - params: Params$Resource$Nodetypes$Get, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + disableXpnHost( + params: Params$Resource$Projects$Disablexpnhost, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - get( - params: Params$Resource$Nodetypes$Get, - callback: BodyResponseCallback + disableXpnHost( + params: Params$Resource$Projects$Disablexpnhost, + callback: BodyResponseCallback ): void; - get(callback: BodyResponseCallback): void; - get( + disableXpnHost(callback: BodyResponseCallback): void; + disableXpnHost( paramsOrCallback?: - | Params$Resource$Nodetypes$Get - | BodyResponseCallback + | Params$Resource$Projects$Disablexpnhost + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Nodetypes$Get; + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Disablexpnhost; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Nodetypes$Get; + params = {} as Params$Resource$Projects$Disablexpnhost; options = {}; } @@ -70544,30 +73797,29 @@ export namespace compute_v1 { options: Object.assign( { url: ( - rootUrl + - '/compute/v1/projects/{project}/zones/{zone}/nodeTypes/{nodeType}' + rootUrl + '/compute/v1/projects/{project}/disableXpnHost' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'GET', + method: 'POST', }, options ), params, - requiredParams: ['project', 'zone', 'nodeType'], - pathParams: ['nodeType', 'project', 'zone'], + requiredParams: ['project'], + pathParams: ['project'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Retrieves a list of node types available to the specified project. + * Disable a service resource (also known as service project) associated with this host project. * @example * ```js * // Before running the sample: @@ -70587,7 +73839,6 @@ export namespace compute_v1 { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', - * 'https://www.googleapis.com/auth/compute.readonly', * ], * }); * @@ -70596,43 +73847,53 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.nodeTypes.list({ - * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. - * // - * // 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) ``` - * filter: 'placeholder-value', - * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) - * maxResults: 'placeholder-value', - * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. - * // - * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. - * // - * // Currently, only sorting by `name` or `creationTimestamp desc` is supported. - * orderBy: 'placeholder-value', - * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. - * pageToken: 'placeholder-value', + * const res = await compute.projects.disableXpnResource({ * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. - * returnPartialSuccess: 'placeholder-value', - * // The name of the zone for this request. - * zone: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * // 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. + * // + * // 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: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "xpnResource": {} + * // } + * }, * }); * console.log(res.data); * * // Example response * // { + * // "clientOperationId": "my_clientOperationId", + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "endTime": "my_endTime", + * // "error": {}, + * // "httpErrorMessage": "my_httpErrorMessage", + * // "httpErrorStatusCode": 0, * // "id": "my_id", - * // "items": [], + * // "insertTime": "my_insertTime", * // "kind": "my_kind", - * // "nextPageToken": "my_nextPageToken", + * // "name": "my_name", + * // "operationGroupId": "my_operationGroupId", + * // "operationType": "my_operationType", + * // "progress": 0, + * // "region": "my_region", * // "selfLink": "my_selfLink", - * // "warning": {} + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "statusMessage": "my_statusMessage", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "user": "my_user", + * // "warnings": [], + * // "zone": "my_zone" * // } * } * @@ -70648,49 +73909,50 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - list( - params: Params$Resource$Nodetypes$List, + disableXpnResource( + params: Params$Resource$Projects$Disablexpnresource, options: StreamMethodOptions ): GaxiosPromise; - list( - params?: Params$Resource$Nodetypes$List, + disableXpnResource( + params?: Params$Resource$Projects$Disablexpnresource, options?: MethodOptions - ): GaxiosPromise; - list( - params: Params$Resource$Nodetypes$List, + ): GaxiosPromise; + disableXpnResource( + params: Params$Resource$Projects$Disablexpnresource, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Nodetypes$List, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + disableXpnResource( + params: Params$Resource$Projects$Disablexpnresource, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Nodetypes$List, - callback: BodyResponseCallback + disableXpnResource( + params: Params$Resource$Projects$Disablexpnresource, + callback: BodyResponseCallback ): void; - list(callback: BodyResponseCallback): void; - list( + disableXpnResource(callback: BodyResponseCallback): void; + disableXpnResource( paramsOrCallback?: - | Params$Resource$Nodetypes$List - | BodyResponseCallback + | Params$Resource$Projects$Disablexpnresource + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Nodetypes$List; + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Disablexpnresource; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Nodetypes$List; + params = {} as Params$Resource$Projects$Disablexpnresource; options = {}; } @@ -70704,132 +73966,29 @@ export namespace compute_v1 { options: Object.assign( { url: ( - rootUrl + '/compute/v1/projects/{project}/zones/{zone}/nodeTypes' + rootUrl + '/compute/v1/projects/{project}/disableXpnResource' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'GET', + method: 'POST', }, options ), params, - requiredParams: ['project', 'zone'], - pathParams: ['project', 'zone'], + requiredParams: ['project'], + pathParams: ['project'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } - } - - export interface Params$Resource$Nodetypes$Aggregatedlist - extends StandardParameters { - /** - * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. - * - * 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) ``` - */ - filter?: string; - /** - * Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. - */ - includeAllScopes?: boolean; - /** - * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) - */ - maxResults?: number; - /** - * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. - * - * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. - * - * Currently, only sorting by `name` or `creationTimestamp desc` is supported. - */ - orderBy?: string; - /** - * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. - */ - pageToken?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. - */ - returnPartialSuccess?: boolean; - } - export interface Params$Resource$Nodetypes$Get extends StandardParameters { - /** - * Name of the node type to return. - */ - nodeType?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * The name of the zone for this request. - */ - zone?: string; - } - export interface Params$Resource$Nodetypes$List extends StandardParameters { - /** - * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. - * - * 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) ``` - */ - filter?: string; - /** - * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) - */ - maxResults?: number; - /** - * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. - * - * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. - * - * Currently, only sorting by `name` or `creationTimestamp desc` is supported. - */ - orderBy?: string; - /** - * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. - */ - pageToken?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. - */ - returnPartialSuccess?: boolean; - /** - * The name of the zone for this request. - */ - zone?: string; - } - - export class Resource$Packetmirrorings { - context: APIRequestContext; - constructor(context: APIRequestContext) { - this.context = context; - } /** - * Retrieves an aggregated list of packetMirrorings. + * Enable this project as a shared VPC host project. * @example * ```js * // Before running the sample: @@ -70849,7 +74008,6 @@ export namespace compute_v1 { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', - * 'https://www.googleapis.com/auth/compute.readonly', * ], * }); * @@ -70858,44 +74016,45 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.packetMirrorings.aggregatedList({ - * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. - * // - * // 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) ``` - * filter: 'placeholder-value', - * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. - * includeAllScopes: 'placeholder-value', - * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) - * maxResults: 'placeholder-value', - * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. - * // - * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. - * // - * // Currently, only sorting by `name` or `creationTimestamp desc` is supported. - * orderBy: 'placeholder-value', - * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. - * pageToken: 'placeholder-value', + * const res = await compute.projects.enableXpnHost({ * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. - * returnPartialSuccess: 'placeholder-value', + * // 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. + * // + * // 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: 'placeholder-value', * }); * console.log(res.data); * * // Example response * // { + * // "clientOperationId": "my_clientOperationId", + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "endTime": "my_endTime", + * // "error": {}, + * // "httpErrorMessage": "my_httpErrorMessage", + * // "httpErrorStatusCode": 0, * // "id": "my_id", - * // "items": {}, + * // "insertTime": "my_insertTime", * // "kind": "my_kind", - * // "nextPageToken": "my_nextPageToken", + * // "name": "my_name", + * // "operationGroupId": "my_operationGroupId", + * // "operationType": "my_operationType", + * // "progress": 0, + * // "region": "my_region", * // "selfLink": "my_selfLink", - * // "unreachables": [], - * // "warning": {} + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "statusMessage": "my_statusMessage", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "user": "my_user", + * // "warnings": [], + * // "zone": "my_zone" * // } * } * @@ -70911,57 +74070,50 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - aggregatedList( - params: Params$Resource$Packetmirrorings$Aggregatedlist, + enableXpnHost( + params: Params$Resource$Projects$Enablexpnhost, options: StreamMethodOptions ): GaxiosPromise; - aggregatedList( - params?: Params$Resource$Packetmirrorings$Aggregatedlist, + enableXpnHost( + params?: Params$Resource$Projects$Enablexpnhost, options?: MethodOptions - ): GaxiosPromise; - aggregatedList( - params: Params$Resource$Packetmirrorings$Aggregatedlist, + ): GaxiosPromise; + enableXpnHost( + params: Params$Resource$Projects$Enablexpnhost, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - aggregatedList( - params: Params$Resource$Packetmirrorings$Aggregatedlist, - options: - | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - aggregatedList( - params: Params$Resource$Packetmirrorings$Aggregatedlist, - callback: BodyResponseCallback + enableXpnHost( + params: Params$Resource$Projects$Enablexpnhost, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - aggregatedList( - callback: BodyResponseCallback + enableXpnHost( + params: Params$Resource$Projects$Enablexpnhost, + callback: BodyResponseCallback ): void; - aggregatedList( + enableXpnHost(callback: BodyResponseCallback): void; + enableXpnHost( paramsOrCallback?: - | Params$Resource$Packetmirrorings$Aggregatedlist - | BodyResponseCallback + | Params$Resource$Projects$Enablexpnhost + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): - | void - | GaxiosPromise - | GaxiosPromise { + ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Packetmirrorings$Aggregatedlist; + {}) as Params$Resource$Projects$Enablexpnhost; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Packetmirrorings$Aggregatedlist; + params = {} as Params$Resource$Projects$Enablexpnhost; options = {}; } @@ -70975,10 +74127,9 @@ export namespace compute_v1 { options: Object.assign( { url: ( - rootUrl + - '/compute/v1/projects/{project}/aggregated/packetMirrorings' + rootUrl + '/compute/v1/projects/{project}/enableXpnHost' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'GET', + method: 'POST', }, options ), @@ -70988,19 +74139,17 @@ export namespace compute_v1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest( - parameters - ); + return createAPIRequest(parameters); } } /** - * Deletes the specified PacketMirroring resource. + * Enable service resource (a.k.a service project) for a host project, so that subnets in the host project can be used by instances in the service project. * @example * ```js * // Before running the sample: @@ -71028,20 +74177,24 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.packetMirrorings.delete({ - * // Name of the PacketMirroring resource to delete. - * packetMirroring: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * const res = await compute.projects.enableXpnResource({ * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // Name of the region for this request. - * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', * // 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. * // * // 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: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "xpnResource": {} + * // } + * }, * }); * console.log(res.data); * @@ -71086,32 +74239,32 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - delete( - params: Params$Resource$Packetmirrorings$Delete, + enableXpnResource( + params: Params$Resource$Projects$Enablexpnresource, options: StreamMethodOptions ): GaxiosPromise; - delete( - params?: Params$Resource$Packetmirrorings$Delete, + enableXpnResource( + params?: Params$Resource$Projects$Enablexpnresource, options?: MethodOptions ): GaxiosPromise; - delete( - params: Params$Resource$Packetmirrorings$Delete, + enableXpnResource( + params: Params$Resource$Projects$Enablexpnresource, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - delete( - params: Params$Resource$Packetmirrorings$Delete, + enableXpnResource( + params: Params$Resource$Projects$Enablexpnresource, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - delete( - params: Params$Resource$Packetmirrorings$Delete, + enableXpnResource( + params: Params$Resource$Projects$Enablexpnresource, callback: BodyResponseCallback ): void; - delete(callback: BodyResponseCallback): void; - delete( + enableXpnResource(callback: BodyResponseCallback): void; + enableXpnResource( paramsOrCallback?: - | Params$Resource$Packetmirrorings$Delete + | Params$Resource$Projects$Enablexpnresource | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -71124,12 +74277,12 @@ export namespace compute_v1 { | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Packetmirrorings$Delete; + {}) as Params$Resource$Projects$Enablexpnresource; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Packetmirrorings$Delete; + params = {} as Params$Resource$Projects$Enablexpnresource; options = {}; } @@ -71143,16 +74296,15 @@ export namespace compute_v1 { options: Object.assign( { url: ( - rootUrl + - '/compute/v1/projects/{project}/regions/{region}/packetMirrorings/{packetMirroring}' + rootUrl + '/compute/v1/projects/{project}/enableXpnResource' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'DELETE', + method: 'POST', }, options ), params, - requiredParams: ['project', 'region', 'packetMirroring'], - pathParams: ['packetMirroring', 'project', 'region'], + requiredParams: ['project'], + pathParams: ['project'], context: this.context, }; if (callback) { @@ -71166,7 +74318,7 @@ export namespace compute_v1 { } /** - * Returns the specified PacketMirroring resource. + * Returns the specified Project resource. * @example * ```js * // Before running the sample: @@ -71195,32 +74347,28 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.packetMirrorings.get({ - * // Name of the PacketMirroring resource to return. - * packetMirroring: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * const res = await compute.projects.get({ * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // Name of the region for this request. - * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', * }); * console.log(res.data); * * // Example response * // { - * // "collectorIlb": {}, + * // "commonInstanceMetadata": {}, * // "creationTimestamp": "my_creationTimestamp", + * // "defaultNetworkTier": "my_defaultNetworkTier", + * // "defaultServiceAccount": "my_defaultServiceAccount", * // "description": "my_description", - * // "enable": "my_enable", - * // "filter": {}, + * // "enabledFeatures": [], * // "id": "my_id", * // "kind": "my_kind", - * // "mirroredResources": {}, * // "name": "my_name", - * // "network": {}, - * // "priority": 0, - * // "region": "my_region", - * // "selfLink": "my_selfLink" + * // "quotas": [], + * // "selfLink": "my_selfLink", + * // "usageExportLocation": {}, + * // "xpnProjectStatus": "my_xpnProjectStatus" * // } * } * @@ -71237,49 +74385,48 @@ export namespace compute_v1 { * @returns A promise if used with async/await, or void if used with a callback. */ get( - params: Params$Resource$Packetmirrorings$Get, + params: Params$Resource$Projects$Get, options: StreamMethodOptions ): GaxiosPromise; get( - params?: Params$Resource$Packetmirrorings$Get, + params?: Params$Resource$Projects$Get, options?: MethodOptions - ): GaxiosPromise; + ): GaxiosPromise; get( - params: Params$Resource$Packetmirrorings$Get, + params: Params$Resource$Projects$Get, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; get( - params: Params$Resource$Packetmirrorings$Get, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + params: Params$Resource$Projects$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; get( - params: Params$Resource$Packetmirrorings$Get, - callback: BodyResponseCallback + params: Params$Resource$Projects$Get, + callback: BodyResponseCallback ): void; - get(callback: BodyResponseCallback): void; + get(callback: BodyResponseCallback): void; get( paramsOrCallback?: - | Params$Resource$Packetmirrorings$Get - | BodyResponseCallback + | Params$Resource$Projects$Get + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { - let params = (paramsOrCallback || - {}) as Params$Resource$Packetmirrorings$Get; + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Projects$Get; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Packetmirrorings$Get; + params = {} as Params$Resource$Projects$Get; options = {}; } @@ -71292,31 +74439,31 @@ export namespace compute_v1 { const parameters = { options: Object.assign( { - url: ( - rootUrl + - '/compute/v1/projects/{project}/regions/{region}/packetMirrorings/{packetMirroring}' - ).replace(/([^:]\/)\/+/g, '$1'), + url: (rootUrl + '/compute/v1/projects/{project}').replace( + /([^:]\/)\/+/g, + '$1' + ), method: 'GET', }, options ), params, - requiredParams: ['project', 'region', 'packetMirroring'], - pathParams: ['packetMirroring', 'project', 'region'], + requiredParams: ['project'], + pathParams: ['project'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Creates a PacketMirroring resource in the specified project and region using the data included in the request. + * Gets the shared VPC host project that this project links to. May be empty if no link exists. * @example * ```js * // Before running the sample: @@ -71344,67 +74491,28 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.packetMirrorings.insert({ + * const res = await compute.projects.getXpnHost({ * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // Name of the region for this request. - * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', - * // 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. - * // - * // 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: 'placeholder-value', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "collectorIlb": {}, - * // "creationTimestamp": "my_creationTimestamp", - * // "description": "my_description", - * // "enable": "my_enable", - * // "filter": {}, - * // "id": "my_id", - * // "kind": "my_kind", - * // "mirroredResources": {}, - * // "name": "my_name", - * // "network": {}, - * // "priority": 0, - * // "region": "my_region", - * // "selfLink": "my_selfLink" - * // } - * }, * }); * console.log(res.data); * * // Example response * // { - * // "clientOperationId": "my_clientOperationId", + * // "commonInstanceMetadata": {}, * // "creationTimestamp": "my_creationTimestamp", + * // "defaultNetworkTier": "my_defaultNetworkTier", + * // "defaultServiceAccount": "my_defaultServiceAccount", * // "description": "my_description", - * // "endTime": "my_endTime", - * // "error": {}, - * // "httpErrorMessage": "my_httpErrorMessage", - * // "httpErrorStatusCode": 0, + * // "enabledFeatures": [], * // "id": "my_id", - * // "insertTime": "my_insertTime", * // "kind": "my_kind", * // "name": "my_name", - * // "operationGroupId": "my_operationGroupId", - * // "operationType": "my_operationType", - * // "progress": 0, - * // "region": "my_region", + * // "quotas": [], * // "selfLink": "my_selfLink", - * // "startTime": "my_startTime", - * // "status": "my_status", - * // "statusMessage": "my_statusMessage", - * // "targetId": "my_targetId", - * // "targetLink": "my_targetLink", - * // "user": "my_user", - * // "warnings": [], - * // "zone": "my_zone" + * // "usageExportLocation": {}, + * // "xpnProjectStatus": "my_xpnProjectStatus" * // } * } * @@ -71420,50 +74528,50 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - insert( - params: Params$Resource$Packetmirrorings$Insert, + getXpnHost( + params: Params$Resource$Projects$Getxpnhost, options: StreamMethodOptions ): GaxiosPromise; - insert( - params?: Params$Resource$Packetmirrorings$Insert, + getXpnHost( + params?: Params$Resource$Projects$Getxpnhost, options?: MethodOptions - ): GaxiosPromise; - insert( - params: Params$Resource$Packetmirrorings$Insert, + ): GaxiosPromise; + getXpnHost( + params: Params$Resource$Projects$Getxpnhost, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - insert( - params: Params$Resource$Packetmirrorings$Insert, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + getXpnHost( + params: Params$Resource$Projects$Getxpnhost, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - insert( - params: Params$Resource$Packetmirrorings$Insert, - callback: BodyResponseCallback + getXpnHost( + params: Params$Resource$Projects$Getxpnhost, + callback: BodyResponseCallback ): void; - insert(callback: BodyResponseCallback): void; - insert( + getXpnHost(callback: BodyResponseCallback): void; + getXpnHost( paramsOrCallback?: - | Params$Resource$Packetmirrorings$Insert - | BodyResponseCallback + | Params$Resource$Projects$Getxpnhost + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { + ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Packetmirrorings$Insert; + {}) as Params$Resource$Projects$Getxpnhost; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Packetmirrorings$Insert; + params = {} as Params$Resource$Projects$Getxpnhost; options = {}; } @@ -71477,30 +74585,29 @@ export namespace compute_v1 { options: Object.assign( { url: ( - rootUrl + - '/compute/v1/projects/{project}/regions/{region}/packetMirrorings' + rootUrl + '/compute/v1/projects/{project}/getXpnHost' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'POST', + method: 'GET', }, options ), params, - requiredParams: ['project', 'region'], - pathParams: ['project', 'region'], + requiredParams: ['project'], + pathParams: ['project'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Retrieves a list of PacketMirroring resources available to the specified project and region. + * Gets service resources (a.k.a service project) associated with this host project. * @example * ```js * // Before running the sample: @@ -71520,7 +74627,6 @@ export namespace compute_v1 { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', - * 'https://www.googleapis.com/auth/compute.readonly', * ], * }); * @@ -71529,7 +74635,168 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.packetMirrorings.list({ + * const res = await compute.projects.getXpnResources({ + * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. + * // + * // 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) ``` + * filter: 'placeholder-value', + * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * maxResults: 'placeholder-value', + * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * // + * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. + * // + * // Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * orderBy: 'placeholder-value', + * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * pageToken: 'placeholder-value', + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + * returnPartialSuccess: 'placeholder-value', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "kind": "my_kind", + * // "nextPageToken": "my_nextPageToken", + * // "resources": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + getXpnResources( + params: Params$Resource$Projects$Getxpnresources, + options: StreamMethodOptions + ): GaxiosPromise; + getXpnResources( + params?: Params$Resource$Projects$Getxpnresources, + options?: MethodOptions + ): GaxiosPromise; + getXpnResources( + params: Params$Resource$Projects$Getxpnresources, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getXpnResources( + params: Params$Resource$Projects$Getxpnresources, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getXpnResources( + params: Params$Resource$Projects$Getxpnresources, + callback: BodyResponseCallback + ): void; + getXpnResources( + callback: BodyResponseCallback + ): void; + getXpnResources( + paramsOrCallback?: + | Params$Resource$Projects$Getxpnresources + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Getxpnresources; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Getxpnresources; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + '/compute/v1/projects/{project}/getXpnResources' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['project'], + pathParams: ['project'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Lists all shared VPC host projects visible to the user in an organization. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const compute = google.compute('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await compute.projects.listXpnHosts({ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. @@ -71551,10 +74818,16 @@ export namespace compute_v1 { * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // Name of the region for this request. - * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. * returnPartialSuccess: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "organization": "my_organization" + * // } + * }, * }); * console.log(res.data); * @@ -71581,53 +74854,50 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - list( - params: Params$Resource$Packetmirrorings$List, + listXpnHosts( + params: Params$Resource$Projects$Listxpnhosts, options: StreamMethodOptions ): GaxiosPromise; - list( - params?: Params$Resource$Packetmirrorings$List, + listXpnHosts( + params?: Params$Resource$Projects$Listxpnhosts, options?: MethodOptions - ): GaxiosPromise; - list( - params: Params$Resource$Packetmirrorings$List, + ): GaxiosPromise; + listXpnHosts( + params: Params$Resource$Projects$Listxpnhosts, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Packetmirrorings$List, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + listXpnHosts( + params: Params$Resource$Projects$Listxpnhosts, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Packetmirrorings$List, - callback: BodyResponseCallback + listXpnHosts( + params: Params$Resource$Projects$Listxpnhosts, + callback: BodyResponseCallback ): void; - list(callback: BodyResponseCallback): void; - list( + listXpnHosts(callback: BodyResponseCallback): void; + listXpnHosts( paramsOrCallback?: - | Params$Resource$Packetmirrorings$List - | BodyResponseCallback + | Params$Resource$Projects$Listxpnhosts + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): - | void - | GaxiosPromise - | GaxiosPromise { + ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Packetmirrorings$List; + {}) as Params$Resource$Projects$Listxpnhosts; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Packetmirrorings$List; + params = {} as Params$Resource$Projects$Listxpnhosts; options = {}; } @@ -71641,30 +74911,29 @@ export namespace compute_v1 { options: Object.assign( { url: ( - rootUrl + - '/compute/v1/projects/{project}/regions/{region}/packetMirrorings' + rootUrl + '/compute/v1/projects/{project}/listXpnHosts' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'GET', + method: 'POST', }, options ), params, - requiredParams: ['project', 'region'], - pathParams: ['project', 'region'], + requiredParams: ['project'], + pathParams: ['project'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Patches the specified PacketMirroring resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules. + * Moves a persistent disk from one zone to another. * @example * ```js * // Before running the sample: @@ -71692,14 +74961,10 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.packetMirrorings.patch({ - * // Name of the PacketMirroring resource to patch. - * packetMirroring: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * const res = await compute.projects.moveDisk({ * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // Name of the region for this request. - * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', * // 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. * // * // 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. @@ -71711,19 +74976,8 @@ export namespace compute_v1 { * requestBody: { * // request body parameters * // { - * // "collectorIlb": {}, - * // "creationTimestamp": "my_creationTimestamp", - * // "description": "my_description", - * // "enable": "my_enable", - * // "filter": {}, - * // "id": "my_id", - * // "kind": "my_kind", - * // "mirroredResources": {}, - * // "name": "my_name", - * // "network": {}, - * // "priority": 0, - * // "region": "my_region", - * // "selfLink": "my_selfLink" + * // "destinationZone": "my_destinationZone", + * // "targetDisk": "my_targetDisk" * // } * }, * }); @@ -71770,32 +75024,32 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - patch( - params: Params$Resource$Packetmirrorings$Patch, + moveDisk( + params: Params$Resource$Projects$Movedisk, options: StreamMethodOptions ): GaxiosPromise; - patch( - params?: Params$Resource$Packetmirrorings$Patch, + moveDisk( + params?: Params$Resource$Projects$Movedisk, options?: MethodOptions ): GaxiosPromise; - patch( - params: Params$Resource$Packetmirrorings$Patch, + moveDisk( + params: Params$Resource$Projects$Movedisk, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - patch( - params: Params$Resource$Packetmirrorings$Patch, + moveDisk( + params: Params$Resource$Projects$Movedisk, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - patch( - params: Params$Resource$Packetmirrorings$Patch, + moveDisk( + params: Params$Resource$Projects$Movedisk, callback: BodyResponseCallback ): void; - patch(callback: BodyResponseCallback): void; - patch( + moveDisk(callback: BodyResponseCallback): void; + moveDisk( paramsOrCallback?: - | Params$Resource$Packetmirrorings$Patch + | Params$Resource$Projects$Movedisk | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -71808,12 +75062,12 @@ export namespace compute_v1 { | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Packetmirrorings$Patch; + {}) as Params$Resource$Projects$Movedisk; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Packetmirrorings$Patch; + params = {} as Params$Resource$Projects$Movedisk; options = {}; } @@ -71826,17 +75080,17 @@ export namespace compute_v1 { const parameters = { options: Object.assign( { - url: ( - rootUrl + - '/compute/v1/projects/{project}/regions/{region}/packetMirrorings/{packetMirroring}' - ).replace(/([^:]\/)\/+/g, '$1'), - method: 'PATCH', + url: (rootUrl + '/compute/v1/projects/{project}/moveDisk').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', }, options ), params, - requiredParams: ['project', 'region', 'packetMirroring'], - pathParams: ['packetMirroring', 'project', 'region'], + requiredParams: ['project'], + pathParams: ['project'], context: this.context, }; if (callback) { @@ -71850,7 +75104,7 @@ export namespace compute_v1 { } /** - * Returns permissions that a caller has on the specified resource. + * Moves an instance and its attached persistent disks from one zone to another. * @example * ```js * // Before running the sample: @@ -71870,7 +75124,6 @@ export namespace compute_v1 { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', - * 'https://www.googleapis.com/auth/compute.readonly', * ], * }); * @@ -71879,20 +75132,23 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.packetMirrorings.testIamPermissions({ + * const res = await compute.projects.moveInstance({ * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // The name of the region for this request. - * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', - * // Name or id of the resource for this request. - * resource: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * // 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. + * // + * // 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: 'placeholder-value', * * // Request body metadata * requestBody: { * // request body parameters * // { - * // "permissions": [] + * // "destinationZone": "my_destinationZone", + * // "targetInstance": "my_targetInstance" * // } * }, * }); @@ -71900,7 +75156,30 @@ export namespace compute_v1 { * * // Example response * // { - * // "permissions": [] + * // "clientOperationId": "my_clientOperationId", + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "endTime": "my_endTime", + * // "error": {}, + * // "httpErrorMessage": "my_httpErrorMessage", + * // "httpErrorStatusCode": 0, + * // "id": "my_id", + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "name": "my_name", + * // "operationGroupId": "my_operationGroupId", + * // "operationType": "my_operationType", + * // "progress": 0, + * // "region": "my_region", + * // "selfLink": "my_selfLink", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "statusMessage": "my_statusMessage", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "user": "my_user", + * // "warnings": [], + * // "zone": "my_zone" * // } * } * @@ -71916,57 +75195,50 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - testIamPermissions( - params: Params$Resource$Packetmirrorings$Testiampermissions, + moveInstance( + params: Params$Resource$Projects$Moveinstance, options: StreamMethodOptions ): GaxiosPromise; - testIamPermissions( - params?: Params$Resource$Packetmirrorings$Testiampermissions, + moveInstance( + params?: Params$Resource$Projects$Moveinstance, options?: MethodOptions - ): GaxiosPromise; - testIamPermissions( - params: Params$Resource$Packetmirrorings$Testiampermissions, + ): GaxiosPromise; + moveInstance( + params: Params$Resource$Projects$Moveinstance, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - testIamPermissions( - params: Params$Resource$Packetmirrorings$Testiampermissions, - options: - | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - testIamPermissions( - params: Params$Resource$Packetmirrorings$Testiampermissions, - callback: BodyResponseCallback + moveInstance( + params: Params$Resource$Projects$Moveinstance, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - testIamPermissions( - callback: BodyResponseCallback + moveInstance( + params: Params$Resource$Projects$Moveinstance, + callback: BodyResponseCallback ): void; - testIamPermissions( + moveInstance(callback: BodyResponseCallback): void; + moveInstance( paramsOrCallback?: - | Params$Resource$Packetmirrorings$Testiampermissions - | BodyResponseCallback + | Params$Resource$Projects$Moveinstance + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): - | void - | GaxiosPromise - | GaxiosPromise { + ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Packetmirrorings$Testiampermissions; + {}) as Params$Resource$Projects$Moveinstance; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Packetmirrorings$Testiampermissions; + params = {} as Params$Resource$Projects$Moveinstance; options = {}; } @@ -71980,230 +75252,203 @@ export namespace compute_v1 { options: Object.assign( { url: ( - rootUrl + - '/compute/v1/projects/{project}/regions/{region}/packetMirrorings/{resource}/testIamPermissions' + rootUrl + '/compute/v1/projects/{project}/moveInstance' ).replace(/([^:]\/)\/+/g, '$1'), method: 'POST', }, options ), params, - requiredParams: ['project', 'region', 'resource'], - pathParams: ['project', 'region', 'resource'], + requiredParams: ['project'], + pathParams: ['project'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } - } - export interface Params$Resource$Packetmirrorings$Aggregatedlist - extends StandardParameters { - /** - * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. - * - * 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) ``` - */ - filter?: string; - /** - * Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. - */ - includeAllScopes?: boolean; - /** - * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) - */ - maxResults?: number; - /** - * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. - * - * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. - * - * Currently, only sorting by `name` or `creationTimestamp desc` is supported. - */ - orderBy?: string; - /** - * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. - */ - pageToken?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. - */ - returnPartialSuccess?: boolean; - } - export interface Params$Resource$Packetmirrorings$Delete - extends StandardParameters { - /** - * Name of the PacketMirroring resource to delete. - */ - packetMirroring?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * Name of the region for this request. - */ - region?: string; - /** - * 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. - * - * 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; - } - export interface Params$Resource$Packetmirrorings$Get - extends StandardParameters { - /** - * Name of the PacketMirroring resource to return. - */ - packetMirroring?: string; - /** - * Project ID for this request. - */ - project?: string; /** - * Name of the region for this request. - */ - region?: string; - } - export interface Params$Resource$Packetmirrorings$Insert - extends StandardParameters { - /** - * Project ID for this request. - */ - project?: string; - /** - * Name of the region for this request. - */ - region?: string; - /** - * 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. + * Sets metadata common to all instances within the specified project using the data included in the request. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/compute.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` * - * 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. + * const {google} = require('googleapis'); + * const compute = google.compute('v1'); * - * The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). - */ - requestId?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$PacketMirroring; - } - export interface Params$Resource$Packetmirrorings$List - extends StandardParameters { - /** - * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `\>`, or `<`. + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * ], + * }); * - * For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); * - * 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. + * // Do the magic + * const res = await compute.projects.setCommonInstanceMetadata({ + * // Project ID for this request. + * project: + * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // 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. + * // + * // 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: 'placeholder-value', * - * 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) ``` - */ - filter?: string; - /** - * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) - */ - maxResults?: number; - /** - * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "fingerprint": "my_fingerprint", + * // "items": [], + * // "kind": "my_kind" + * // } + * }, + * }); + * console.log(res.data); * - * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. + * // Example response + * // { + * // "clientOperationId": "my_clientOperationId", + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "endTime": "my_endTime", + * // "error": {}, + * // "httpErrorMessage": "my_httpErrorMessage", + * // "httpErrorStatusCode": 0, + * // "id": "my_id", + * // "insertTime": "my_insertTime", + * // "kind": "my_kind", + * // "name": "my_name", + * // "operationGroupId": "my_operationGroupId", + * // "operationType": "my_operationType", + * // "progress": 0, + * // "region": "my_region", + * // "selfLink": "my_selfLink", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "statusMessage": "my_statusMessage", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "user": "my_user", + * // "warnings": [], + * // "zone": "my_zone" + * // } + * } * - * Currently, only sorting by `name` or `creationTimestamp desc` is supported. - */ - orderBy?: string; - /** - * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. - */ - pageToken?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * Name of the region for this request. - */ - region?: string; - /** - * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. - */ - returnPartialSuccess?: boolean; - } - export interface Params$Resource$Packetmirrorings$Patch - extends StandardParameters { - /** - * Name of the PacketMirroring resource to patch. - */ - packetMirroring?: string; - /** - * Project ID for this request. - */ - project?: string; - /** - * Name of the region for this request. - */ - region?: string; - /** - * 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. + * main().catch(e => { + * console.error(e); + * throw e; + * }); * - * 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; - - /** - * Request body metadata - */ - requestBody?: Schema$PacketMirroring; - } - export interface Params$Resource$Packetmirrorings$Testiampermissions - extends StandardParameters { - /** - * Project ID for this request. - */ - project?: string; - /** - * The name of the region for this request. - */ - region?: string; - /** - * Name or id of the resource for this request. + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. */ - resource?: string; + setCommonInstanceMetadata( + params: Params$Resource$Projects$Setcommoninstancemetadata, + options: StreamMethodOptions + ): GaxiosPromise; + setCommonInstanceMetadata( + params?: Params$Resource$Projects$Setcommoninstancemetadata, + options?: MethodOptions + ): GaxiosPromise; + setCommonInstanceMetadata( + params: Params$Resource$Projects$Setcommoninstancemetadata, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + setCommonInstanceMetadata( + params: Params$Resource$Projects$Setcommoninstancemetadata, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + setCommonInstanceMetadata( + params: Params$Resource$Projects$Setcommoninstancemetadata, + callback: BodyResponseCallback + ): void; + setCommonInstanceMetadata( + callback: BodyResponseCallback + ): void; + setCommonInstanceMetadata( + paramsOrCallback?: + | Params$Resource$Projects$Setcommoninstancemetadata + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Setcommoninstancemetadata; + let options = (optionsOrCallback || {}) as MethodOptions; - /** - * Request body metadata - */ - requestBody?: Schema$TestPermissionsRequest; - } + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Setcommoninstancemetadata; + options = {}; + } - export class Resource$Projects { - context: APIRequestContext; - constructor(context: APIRequestContext) { - this.context = context; + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://compute.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/compute/v1/projects/{project}/setCommonInstanceMetadata' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project'], + pathParams: ['project'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } } /** - * Disable this project as a shared VPC host project. + * Sets the default network tier of the project. The default network tier is used when an address/forwardingRule/instance is created without specifying the network tier field. * @example * ```js * // Before running the sample: @@ -72231,7 +75476,7 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.projects.disableXpnHost({ + * const res = await compute.projects.setDefaultNetworkTier({ * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', @@ -72241,6 +75486,14 @@ export namespace compute_v1 { * // * // The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). * requestId: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "networkTier": "my_networkTier" + * // } + * }, * }); * console.log(res.data); * @@ -72285,32 +75538,34 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - disableXpnHost( - params: Params$Resource$Projects$Disablexpnhost, + setDefaultNetworkTier( + params: Params$Resource$Projects$Setdefaultnetworktier, options: StreamMethodOptions ): GaxiosPromise; - disableXpnHost( - params?: Params$Resource$Projects$Disablexpnhost, + setDefaultNetworkTier( + params?: Params$Resource$Projects$Setdefaultnetworktier, options?: MethodOptions ): GaxiosPromise; - disableXpnHost( - params: Params$Resource$Projects$Disablexpnhost, + setDefaultNetworkTier( + params: Params$Resource$Projects$Setdefaultnetworktier, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - disableXpnHost( - params: Params$Resource$Projects$Disablexpnhost, + setDefaultNetworkTier( + params: Params$Resource$Projects$Setdefaultnetworktier, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - disableXpnHost( - params: Params$Resource$Projects$Disablexpnhost, + setDefaultNetworkTier( + params: Params$Resource$Projects$Setdefaultnetworktier, callback: BodyResponseCallback ): void; - disableXpnHost(callback: BodyResponseCallback): void; - disableXpnHost( + setDefaultNetworkTier( + callback: BodyResponseCallback + ): void; + setDefaultNetworkTier( paramsOrCallback?: - | Params$Resource$Projects$Disablexpnhost + | Params$Resource$Projects$Setdefaultnetworktier | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -72323,12 +75578,12 @@ export namespace compute_v1 { | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Disablexpnhost; + {}) as Params$Resource$Projects$Setdefaultnetworktier; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Disablexpnhost; + params = {} as Params$Resource$Projects$Setdefaultnetworktier; options = {}; } @@ -72342,7 +75597,7 @@ export namespace compute_v1 { options: Object.assign( { url: ( - rootUrl + '/compute/v1/projects/{project}/disableXpnHost' + rootUrl + '/compute/v1/projects/{project}/setDefaultNetworkTier' ).replace(/([^:]\/)\/+/g, '$1'), method: 'POST', }, @@ -72364,7 +75619,7 @@ export namespace compute_v1 { } /** - * Disable a service resource (also known as service project) associated with this host project. + * Enables the usage export feature and sets the usage export bucket where reports are stored. If you provide an empty request body using this method, the usage export feature will be disabled. * @example * ```js * // Before running the sample: @@ -72384,6 +75639,9 @@ export namespace compute_v1 { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/devstorage.full_control', + * 'https://www.googleapis.com/auth/devstorage.read_only', + * 'https://www.googleapis.com/auth/devstorage.read_write', * ], * }); * @@ -72392,7 +75650,7 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.projects.disableXpnResource({ + * const res = await compute.projects.setUsageExportBucket({ * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', @@ -72407,7 +75665,8 @@ export namespace compute_v1 { * requestBody: { * // request body parameters * // { - * // "xpnResource": {} + * // "bucketName": "my_bucketName", + * // "reportNamePrefix": "my_reportNamePrefix" * // } * }, * }); @@ -72454,32 +75713,34 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - disableXpnResource( - params: Params$Resource$Projects$Disablexpnresource, + setUsageExportBucket( + params: Params$Resource$Projects$Setusageexportbucket, options: StreamMethodOptions ): GaxiosPromise; - disableXpnResource( - params?: Params$Resource$Projects$Disablexpnresource, + setUsageExportBucket( + params?: Params$Resource$Projects$Setusageexportbucket, options?: MethodOptions ): GaxiosPromise; - disableXpnResource( - params: Params$Resource$Projects$Disablexpnresource, + setUsageExportBucket( + params: Params$Resource$Projects$Setusageexportbucket, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - disableXpnResource( - params: Params$Resource$Projects$Disablexpnresource, + setUsageExportBucket( + params: Params$Resource$Projects$Setusageexportbucket, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - disableXpnResource( - params: Params$Resource$Projects$Disablexpnresource, + setUsageExportBucket( + params: Params$Resource$Projects$Setusageexportbucket, callback: BodyResponseCallback ): void; - disableXpnResource(callback: BodyResponseCallback): void; - disableXpnResource( + setUsageExportBucket( + callback: BodyResponseCallback + ): void; + setUsageExportBucket( paramsOrCallback?: - | Params$Resource$Projects$Disablexpnresource + | Params$Resource$Projects$Setusageexportbucket | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -72492,12 +75753,12 @@ export namespace compute_v1 { | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Disablexpnresource; + {}) as Params$Resource$Projects$Setusageexportbucket; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Disablexpnresource; + params = {} as Params$Resource$Projects$Setusageexportbucket; options = {}; } @@ -72511,7 +75772,7 @@ export namespace compute_v1 { options: Object.assign( { url: ( - rootUrl + '/compute/v1/projects/{project}/disableXpnResource' + rootUrl + '/compute/v1/projects/{project}/setUsageExportBucket' ).replace(/([^:]\/)\/+/g, '$1'), method: 'POST', }, @@ -72531,9 +75792,279 @@ export namespace compute_v1 { return createAPIRequest(parameters); } } + } + export interface Params$Resource$Projects$Disablexpnhost + extends StandardParameters { /** - * Enable this project as a shared VPC host project. + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + } + export interface Params$Resource$Projects$Disablexpnresource + extends StandardParameters { + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + + /** + * Request body metadata + */ + requestBody?: Schema$ProjectsDisableXpnResourceRequest; + } + export interface Params$Resource$Projects$Enablexpnhost + extends StandardParameters { + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + } + export interface Params$Resource$Projects$Enablexpnresource + extends StandardParameters { + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + + /** + * Request body metadata + */ + requestBody?: Schema$ProjectsEnableXpnResourceRequest; + } + export interface Params$Resource$Projects$Get extends StandardParameters { + /** + * Project ID for this request. + */ + project?: string; + } + export interface Params$Resource$Projects$Getxpnhost + extends StandardParameters { + /** + * Project ID for this request. + */ + project?: string; + } + export interface Params$Resource$Projects$Getxpnresources + extends StandardParameters { + /** + * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. + * + * 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) ``` + */ + filter?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + */ + maxResults?: number; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. + * + * Currently, only sorting by `name` or `creationTimestamp desc` is supported. + */ + orderBy?: string; + /** + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + */ + pageToken?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + */ + returnPartialSuccess?: boolean; + } + export interface Params$Resource$Projects$Listxpnhosts + extends StandardParameters { + /** + * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. + * + * 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) ``` + */ + filter?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + */ + maxResults?: number; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. + * + * Currently, only sorting by `name` or `creationTimestamp desc` is supported. + */ + orderBy?: string; + /** + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + */ + pageToken?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + */ + returnPartialSuccess?: boolean; + + /** + * Request body metadata + */ + requestBody?: Schema$ProjectsListXpnHostsRequest; + } + export interface Params$Resource$Projects$Movedisk + extends StandardParameters { + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + + /** + * Request body metadata + */ + requestBody?: Schema$DiskMoveRequest; + } + export interface Params$Resource$Projects$Moveinstance + extends StandardParameters { + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + + /** + * Request body metadata + */ + requestBody?: Schema$InstanceMoveRequest; + } + export interface Params$Resource$Projects$Setcommoninstancemetadata + extends StandardParameters { + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + + /** + * Request body metadata + */ + requestBody?: Schema$Metadata; + } + export interface Params$Resource$Projects$Setdefaultnetworktier + extends StandardParameters { + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + + /** + * Request body metadata + */ + requestBody?: Schema$ProjectsSetDefaultNetworkTierRequest; + } + export interface Params$Resource$Projects$Setusageexportbucket + extends StandardParameters { + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + + /** + * Request body metadata + */ + requestBody?: Schema$UsageExportLocation; + } + + export class Resource$Publicadvertisedprefixes { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Deletes the specified PublicAdvertisedPrefix * @example * ```js * // Before running the sample: @@ -72561,10 +76092,13 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.projects.enableXpnHost({ + * const res = await compute.publicAdvertisedPrefixes.delete({ * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // Name of the PublicAdvertisedPrefix resource to delete. + * publicAdvertisedPrefix: + * '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * // 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. * // * // 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. @@ -72615,32 +76149,32 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - enableXpnHost( - params: Params$Resource$Projects$Enablexpnhost, + delete( + params: Params$Resource$Publicadvertisedprefixes$Delete, options: StreamMethodOptions ): GaxiosPromise; - enableXpnHost( - params?: Params$Resource$Projects$Enablexpnhost, + delete( + params?: Params$Resource$Publicadvertisedprefixes$Delete, options?: MethodOptions ): GaxiosPromise; - enableXpnHost( - params: Params$Resource$Projects$Enablexpnhost, + delete( + params: Params$Resource$Publicadvertisedprefixes$Delete, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - enableXpnHost( - params: Params$Resource$Projects$Enablexpnhost, + delete( + params: Params$Resource$Publicadvertisedprefixes$Delete, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - enableXpnHost( - params: Params$Resource$Projects$Enablexpnhost, + delete( + params: Params$Resource$Publicadvertisedprefixes$Delete, callback: BodyResponseCallback ): void; - enableXpnHost(callback: BodyResponseCallback): void; - enableXpnHost( + delete(callback: BodyResponseCallback): void; + delete( paramsOrCallback?: - | Params$Resource$Projects$Enablexpnhost + | Params$Resource$Publicadvertisedprefixes$Delete | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -72653,12 +76187,12 @@ export namespace compute_v1 { | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Enablexpnhost; + {}) as Params$Resource$Publicadvertisedprefixes$Delete; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Enablexpnhost; + params = {} as Params$Resource$Publicadvertisedprefixes$Delete; options = {}; } @@ -72672,15 +76206,16 @@ export namespace compute_v1 { options: Object.assign( { url: ( - rootUrl + '/compute/v1/projects/{project}/enableXpnHost' + rootUrl + + '/compute/v1/projects/{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'POST', + method: 'DELETE', }, options ), params, - requiredParams: ['project'], - pathParams: ['project'], + requiredParams: ['project', 'publicAdvertisedPrefix'], + pathParams: ['project', 'publicAdvertisedPrefix'], context: this.context, }; if (callback) { @@ -72694,7 +76229,7 @@ export namespace compute_v1 { } /** - * Enable service resource (a.k.a service project) for a host project, so that subnets in the host project can be used by instances in the service project. + * Returns the specified PublicAdvertisedPrefix resource. * @example * ```js * // Before running the sample: @@ -72714,6 +76249,7 @@ export namespace compute_v1 { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', * ], * }); * @@ -72722,53 +76258,30 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.projects.enableXpnResource({ + * const res = await compute.publicAdvertisedPrefixes.get({ * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // 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. - * // - * // 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: 'placeholder-value', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "xpnResource": {} - * // } - * }, + * // Name of the PublicAdvertisedPrefix resource to return. + * publicAdvertisedPrefix: + * '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', * }); * console.log(res.data); * * // Example response * // { - * // "clientOperationId": "my_clientOperationId", * // "creationTimestamp": "my_creationTimestamp", * // "description": "my_description", - * // "endTime": "my_endTime", - * // "error": {}, - * // "httpErrorMessage": "my_httpErrorMessage", - * // "httpErrorStatusCode": 0, + * // "dnsVerificationIp": "my_dnsVerificationIp", + * // "fingerprint": "my_fingerprint", * // "id": "my_id", - * // "insertTime": "my_insertTime", + * // "ipCidrRange": "my_ipCidrRange", * // "kind": "my_kind", * // "name": "my_name", - * // "operationGroupId": "my_operationGroupId", - * // "operationType": "my_operationType", - * // "progress": 0, - * // "region": "my_region", + * // "publicDelegatedPrefixs": [], * // "selfLink": "my_selfLink", - * // "startTime": "my_startTime", - * // "status": "my_status", - * // "statusMessage": "my_statusMessage", - * // "targetId": "my_targetId", - * // "targetLink": "my_targetLink", - * // "user": "my_user", - * // "warnings": [], - * // "zone": "my_zone" + * // "sharedSecret": "my_sharedSecret", + * // "status": "my_status" * // } * } * @@ -72784,50 +76297,55 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - enableXpnResource( - params: Params$Resource$Projects$Enablexpnresource, + get( + params: Params$Resource$Publicadvertisedprefixes$Get, options: StreamMethodOptions ): GaxiosPromise; - enableXpnResource( - params?: Params$Resource$Projects$Enablexpnresource, + get( + params?: Params$Resource$Publicadvertisedprefixes$Get, options?: MethodOptions - ): GaxiosPromise; - enableXpnResource( - params: Params$Resource$Projects$Enablexpnresource, + ): GaxiosPromise; + get( + params: Params$Resource$Publicadvertisedprefixes$Get, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - enableXpnResource( - params: Params$Resource$Projects$Enablexpnresource, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - enableXpnResource( - params: Params$Resource$Projects$Enablexpnresource, - callback: BodyResponseCallback + get( + params: Params$Resource$Publicadvertisedprefixes$Get, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - enableXpnResource(callback: BodyResponseCallback): void; - enableXpnResource( + get( + params: Params$Resource$Publicadvertisedprefixes$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( paramsOrCallback?: - | Params$Resource$Projects$Enablexpnresource - | BodyResponseCallback + | Params$Resource$Publicadvertisedprefixes$Get + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { + ): + | void + | GaxiosPromise + | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Enablexpnresource; + {}) as Params$Resource$Publicadvertisedprefixes$Get; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Enablexpnresource; + params = {} as Params$Resource$Publicadvertisedprefixes$Get; options = {}; } @@ -72841,29 +76359,30 @@ export namespace compute_v1 { options: Object.assign( { url: ( - rootUrl + '/compute/v1/projects/{project}/enableXpnResource' + rootUrl + + '/compute/v1/projects/{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'POST', + method: 'GET', }, options ), params, - requiredParams: ['project'], - pathParams: ['project'], + requiredParams: ['project', 'publicAdvertisedPrefix'], + pathParams: ['project', 'publicAdvertisedPrefix'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Returns the specified Project resource. + * Creates a PublicAdvertisedPrefix in the specified project using the parameters that are included in the request. * @example * ```js * // Before running the sample: @@ -72883,7 +76402,6 @@ export namespace compute_v1 { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', - * 'https://www.googleapis.com/auth/compute.readonly', * ], * }); * @@ -72892,28 +76410,64 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.projects.get({ + * const res = await compute.publicAdvertisedPrefixes.insert({ * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // 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. + * // + * // 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: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "dnsVerificationIp": "my_dnsVerificationIp", + * // "fingerprint": "my_fingerprint", + * // "id": "my_id", + * // "ipCidrRange": "my_ipCidrRange", + * // "kind": "my_kind", + * // "name": "my_name", + * // "publicDelegatedPrefixs": [], + * // "selfLink": "my_selfLink", + * // "sharedSecret": "my_sharedSecret", + * // "status": "my_status" + * // } + * }, * }); * console.log(res.data); * * // Example response * // { - * // "commonInstanceMetadata": {}, + * // "clientOperationId": "my_clientOperationId", * // "creationTimestamp": "my_creationTimestamp", - * // "defaultNetworkTier": "my_defaultNetworkTier", - * // "defaultServiceAccount": "my_defaultServiceAccount", * // "description": "my_description", - * // "enabledFeatures": [], + * // "endTime": "my_endTime", + * // "error": {}, + * // "httpErrorMessage": "my_httpErrorMessage", + * // "httpErrorStatusCode": 0, * // "id": "my_id", + * // "insertTime": "my_insertTime", * // "kind": "my_kind", * // "name": "my_name", - * // "quotas": [], + * // "operationGroupId": "my_operationGroupId", + * // "operationType": "my_operationType", + * // "progress": 0, + * // "region": "my_region", * // "selfLink": "my_selfLink", - * // "usageExportLocation": {}, - * // "xpnProjectStatus": "my_xpnProjectStatus" + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "statusMessage": "my_statusMessage", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "user": "my_user", + * // "warnings": [], + * // "zone": "my_zone" * // } * } * @@ -72929,49 +76483,50 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - get( - params: Params$Resource$Projects$Get, + insert( + params: Params$Resource$Publicadvertisedprefixes$Insert, options: StreamMethodOptions ): GaxiosPromise; - get( - params?: Params$Resource$Projects$Get, + insert( + params?: Params$Resource$Publicadvertisedprefixes$Insert, options?: MethodOptions - ): GaxiosPromise; - get( - params: Params$Resource$Projects$Get, + ): GaxiosPromise; + insert( + params: Params$Resource$Publicadvertisedprefixes$Insert, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - get( - params: Params$Resource$Projects$Get, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + insert( + params: Params$Resource$Publicadvertisedprefixes$Insert, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - get( - params: Params$Resource$Projects$Get, - callback: BodyResponseCallback + insert( + params: Params$Resource$Publicadvertisedprefixes$Insert, + callback: BodyResponseCallback ): void; - get(callback: BodyResponseCallback): void; - get( + insert(callback: BodyResponseCallback): void; + insert( paramsOrCallback?: - | Params$Resource$Projects$Get - | BodyResponseCallback + | Params$Resource$Publicadvertisedprefixes$Insert + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Projects$Get; + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Publicadvertisedprefixes$Insert; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Get; + params = {} as Params$Resource$Publicadvertisedprefixes$Insert; options = {}; } @@ -72984,11 +76539,11 @@ export namespace compute_v1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/compute/v1/projects/{project}').replace( - /([^:]\/)\/+/g, - '$1' - ), - method: 'GET', + url: ( + rootUrl + + '/compute/v1/projects/{project}/global/publicAdvertisedPrefixes' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', }, options ), @@ -72998,17 +76553,17 @@ export namespace compute_v1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Gets the shared VPC host project that this project links to. May be empty if no link exists. + * Lists the PublicAdvertisedPrefixes for a project. * @example * ```js * // Before running the sample: @@ -73028,6 +76583,7 @@ export namespace compute_v1 { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', * ], * }); * @@ -73036,28 +76592,41 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.projects.getXpnHost({ + * const res = await compute.publicAdvertisedPrefixes.list({ + * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. + * // + * // 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) ``` + * filter: 'placeholder-value', + * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * maxResults: 'placeholder-value', + * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * // + * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. + * // + * // Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * orderBy: 'placeholder-value', + * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * pageToken: 'placeholder-value', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + * returnPartialSuccess: 'placeholder-value', * }); * console.log(res.data); * * // Example response * // { - * // "commonInstanceMetadata": {}, - * // "creationTimestamp": "my_creationTimestamp", - * // "defaultNetworkTier": "my_defaultNetworkTier", - * // "defaultServiceAccount": "my_defaultServiceAccount", - * // "description": "my_description", - * // "enabledFeatures": [], * // "id": "my_id", + * // "items": [], * // "kind": "my_kind", - * // "name": "my_name", - * // "quotas": [], + * // "nextPageToken": "my_nextPageToken", * // "selfLink": "my_selfLink", - * // "usageExportLocation": {}, - * // "xpnProjectStatus": "my_xpnProjectStatus" + * // "warning": {} * // } * } * @@ -73073,50 +76642,57 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - getXpnHost( - params: Params$Resource$Projects$Getxpnhost, + list( + params: Params$Resource$Publicadvertisedprefixes$List, options: StreamMethodOptions ): GaxiosPromise; - getXpnHost( - params?: Params$Resource$Projects$Getxpnhost, + list( + params?: Params$Resource$Publicadvertisedprefixes$List, options?: MethodOptions - ): GaxiosPromise; - getXpnHost( - params: Params$Resource$Projects$Getxpnhost, + ): GaxiosPromise; + list( + params: Params$Resource$Publicadvertisedprefixes$List, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - getXpnHost( - params: Params$Resource$Projects$Getxpnhost, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + list( + params: Params$Resource$Publicadvertisedprefixes$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - getXpnHost( - params: Params$Resource$Projects$Getxpnhost, - callback: BodyResponseCallback + list( + params: Params$Resource$Publicadvertisedprefixes$List, + callback: BodyResponseCallback ): void; - getXpnHost(callback: BodyResponseCallback): void; - getXpnHost( + list( + callback: BodyResponseCallback + ): void; + list( paramsOrCallback?: - | Params$Resource$Projects$Getxpnhost - | BodyResponseCallback + | Params$Resource$Publicadvertisedprefixes$List + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { + ): + | void + | GaxiosPromise + | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Getxpnhost; + {}) as Params$Resource$Publicadvertisedprefixes$List; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Getxpnhost; + params = {} as Params$Resource$Publicadvertisedprefixes$List; options = {}; } @@ -73130,7 +76706,8 @@ export namespace compute_v1 { options: Object.assign( { url: ( - rootUrl + '/compute/v1/projects/{project}/getXpnHost' + rootUrl + + '/compute/v1/projects/{project}/global/publicAdvertisedPrefixes' ).replace(/([^:]\/)\/+/g, '$1'), method: 'GET', }, @@ -73142,17 +76719,17 @@ export namespace compute_v1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Gets service resources (a.k.a service project) associated with this host project. + * Patches the specified Router resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules. * @example * ```js * // Before running the sample: @@ -73180,38 +76757,67 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.projects.getXpnResources({ - * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. - * // - * // 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) ``` - * filter: 'placeholder-value', - * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) - * maxResults: 'placeholder-value', - * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. - * // - * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. - * // - * // Currently, only sorting by `name` or `creationTimestamp desc` is supported. - * orderBy: 'placeholder-value', - * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. - * pageToken: 'placeholder-value', + * const res = await compute.publicAdvertisedPrefixes.patch({ * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. - * returnPartialSuccess: 'placeholder-value', + * // Name of the PublicAdvertisedPrefix resource to patch. + * publicAdvertisedPrefix: + * '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * // 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. + * // + * // 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: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "dnsVerificationIp": "my_dnsVerificationIp", + * // "fingerprint": "my_fingerprint", + * // "id": "my_id", + * // "ipCidrRange": "my_ipCidrRange", + * // "kind": "my_kind", + * // "name": "my_name", + * // "publicDelegatedPrefixs": [], + * // "selfLink": "my_selfLink", + * // "sharedSecret": "my_sharedSecret", + * // "status": "my_status" + * // } + * }, * }); * console.log(res.data); * * // Example response * // { + * // "clientOperationId": "my_clientOperationId", + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "endTime": "my_endTime", + * // "error": {}, + * // "httpErrorMessage": "my_httpErrorMessage", + * // "httpErrorStatusCode": 0, + * // "id": "my_id", + * // "insertTime": "my_insertTime", * // "kind": "my_kind", - * // "nextPageToken": "my_nextPageToken", - * // "resources": [] + * // "name": "my_name", + * // "operationGroupId": "my_operationGroupId", + * // "operationType": "my_operationType", + * // "progress": 0, + * // "region": "my_region", + * // "selfLink": "my_selfLink", + * // "startTime": "my_startTime", + * // "status": "my_status", + * // "statusMessage": "my_statusMessage", + * // "targetId": "my_targetId", + * // "targetLink": "my_targetLink", + * // "user": "my_user", + * // "warnings": [], + * // "zone": "my_zone" * // } * } * @@ -73227,57 +76833,50 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - getXpnResources( - params: Params$Resource$Projects$Getxpnresources, + patch( + params: Params$Resource$Publicadvertisedprefixes$Patch, options: StreamMethodOptions ): GaxiosPromise; - getXpnResources( - params?: Params$Resource$Projects$Getxpnresources, + patch( + params?: Params$Resource$Publicadvertisedprefixes$Patch, options?: MethodOptions - ): GaxiosPromise; - getXpnResources( - params: Params$Resource$Projects$Getxpnresources, + ): GaxiosPromise; + patch( + params: Params$Resource$Publicadvertisedprefixes$Patch, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - getXpnResources( - params: Params$Resource$Projects$Getxpnresources, - options: - | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - getXpnResources( - params: Params$Resource$Projects$Getxpnresources, - callback: BodyResponseCallback + patch( + params: Params$Resource$Publicadvertisedprefixes$Patch, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - getXpnResources( - callback: BodyResponseCallback + patch( + params: Params$Resource$Publicadvertisedprefixes$Patch, + callback: BodyResponseCallback ): void; - getXpnResources( + patch(callback: BodyResponseCallback): void; + patch( paramsOrCallback?: - | Params$Resource$Projects$Getxpnresources - | BodyResponseCallback + | Params$Resource$Publicadvertisedprefixes$Patch + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): - | void - | GaxiosPromise - | GaxiosPromise { + ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Getxpnresources; + {}) as Params$Resource$Publicadvertisedprefixes$Patch; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Getxpnresources; + params = {} as Params$Resource$Publicadvertisedprefixes$Patch; options = {}; } @@ -73291,29 +76890,149 @@ export namespace compute_v1 { options: Object.assign( { url: ( - rootUrl + '/compute/v1/projects/{project}/getXpnResources' + rootUrl + + '/compute/v1/projects/{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'GET', + method: 'PATCH', }, options ), params, - requiredParams: ['project'], - pathParams: ['project'], + requiredParams: ['project', 'publicAdvertisedPrefix'], + pathParams: ['project', 'publicAdvertisedPrefix'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } + } + export interface Params$Resource$Publicadvertisedprefixes$Delete + extends StandardParameters { /** - * Lists all shared VPC host projects visible to the user in an organization. + * Project ID for this request. + */ + project?: string; + /** + * Name of the PublicAdvertisedPrefix resource to delete. + */ + publicAdvertisedPrefix?: string; + /** + * 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. + * + * 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; + } + export interface Params$Resource$Publicadvertisedprefixes$Get + extends StandardParameters { + /** + * Project ID for this request. + */ + project?: string; + /** + * Name of the PublicAdvertisedPrefix resource to return. + */ + publicAdvertisedPrefix?: string; + } + export interface Params$Resource$Publicadvertisedprefixes$Insert + extends StandardParameters { + /** + * Project ID for this request. + */ + project?: string; + /** + * 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. + * + * 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; + + /** + * Request body metadata + */ + requestBody?: Schema$PublicAdvertisedPrefix; + } + export interface Params$Resource$Publicadvertisedprefixes$List + extends StandardParameters { + /** + * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. + * + * 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) ``` + */ + filter?: string; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + */ + maxResults?: number; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * + * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. + * + * Currently, only sorting by `name` or `creationTimestamp desc` is supported. + */ + orderBy?: string; + /** + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + */ + pageToken?: string; + /** + * Project ID for this request. + */ + project?: string; + /** + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + */ + returnPartialSuccess?: boolean; + } + export interface Params$Resource$Publicadvertisedprefixes$Patch + extends StandardParameters { + /** + * Project ID for this request. + */ + project?: string; + /** + * Name of the PublicAdvertisedPrefix resource to patch. + */ + publicAdvertisedPrefix?: string; + /** + * 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. + * + * 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; + + /** + * Request body metadata + */ + requestBody?: Schema$PublicAdvertisedPrefix; + } + + export class Resource$Publicdelegatedprefixes { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Lists all PublicDelegatedPrefix resources owned by the specific project across all scopes. * @example * ```js * // Before running the sample: @@ -73333,6 +77052,7 @@ export namespace compute_v1 { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', * ], * }); * @@ -73341,7 +77061,7 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.projects.listXpnHosts({ + * const res = await compute.publicDelegatedPrefixes.aggregatedList({ * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. @@ -73350,6 +77070,8 @@ export namespace compute_v1 { * // * // 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) ``` * filter: 'placeholder-value', + * // Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. + * includeAllScopes: 'placeholder-value', * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) * maxResults: 'placeholder-value', * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. @@ -73360,29 +77082,22 @@ export namespace compute_v1 { * orderBy: 'placeholder-value', * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. * pageToken: 'placeholder-value', - * // Project ID for this request. + * // Name of the project scoping this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. * returnPartialSuccess: 'placeholder-value', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "organization": "my_organization" - * // } - * }, * }); * console.log(res.data); * * // Example response * // { * // "id": "my_id", - * // "items": [], + * // "items": {}, * // "kind": "my_kind", * // "nextPageToken": "my_nextPageToken", * // "selfLink": "my_selfLink", + * // "unreachables": [], * // "warning": {} * // } * } @@ -73399,50 +77114,57 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - listXpnHosts( - params: Params$Resource$Projects$Listxpnhosts, + aggregatedList( + params: Params$Resource$Publicdelegatedprefixes$Aggregatedlist, options: StreamMethodOptions ): GaxiosPromise; - listXpnHosts( - params?: Params$Resource$Projects$Listxpnhosts, + aggregatedList( + params?: Params$Resource$Publicdelegatedprefixes$Aggregatedlist, options?: MethodOptions - ): GaxiosPromise; - listXpnHosts( - params: Params$Resource$Projects$Listxpnhosts, + ): GaxiosPromise; + aggregatedList( + params: Params$Resource$Publicdelegatedprefixes$Aggregatedlist, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - listXpnHosts( - params: Params$Resource$Projects$Listxpnhosts, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + aggregatedList( + params: Params$Resource$Publicdelegatedprefixes$Aggregatedlist, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - listXpnHosts( - params: Params$Resource$Projects$Listxpnhosts, - callback: BodyResponseCallback + aggregatedList( + params: Params$Resource$Publicdelegatedprefixes$Aggregatedlist, + callback: BodyResponseCallback ): void; - listXpnHosts(callback: BodyResponseCallback): void; - listXpnHosts( + aggregatedList( + callback: BodyResponseCallback + ): void; + aggregatedList( paramsOrCallback?: - | Params$Resource$Projects$Listxpnhosts - | BodyResponseCallback + | Params$Resource$Publicdelegatedprefixes$Aggregatedlist + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { + ): + | void + | GaxiosPromise + | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Listxpnhosts; + {}) as Params$Resource$Publicdelegatedprefixes$Aggregatedlist; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Listxpnhosts; + params = {} as Params$Resource$Publicdelegatedprefixes$Aggregatedlist; options = {}; } @@ -73456,9 +77178,10 @@ export namespace compute_v1 { options: Object.assign( { url: ( - rootUrl + '/compute/v1/projects/{project}/listXpnHosts' + rootUrl + + '/compute/v1/projects/{project}/aggregated/publicDelegatedPrefixes' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'POST', + method: 'GET', }, options ), @@ -73468,17 +77191,19 @@ export namespace compute_v1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest( + parameters + ); } } /** - * Moves a persistent disk from one zone to another. + * Deletes the specified PublicDelegatedPrefix in the given region. * @example * ```js * // Before running the sample: @@ -73506,25 +77231,20 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.projects.moveDisk({ + * const res = await compute.publicDelegatedPrefixes.delete({ * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // Name of the PublicDelegatedPrefix resource to delete. + * publicDelegatedPrefix: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * // Name of the region of this request. + * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', * // 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. * // - * // 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: 'placeholder-value', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "destinationZone": "my_destinationZone", - * // "targetDisk": "my_targetDisk" - * // } - * }, + * // 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: 'placeholder-value', * }); * console.log(res.data); * @@ -73569,32 +77289,32 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - moveDisk( - params: Params$Resource$Projects$Movedisk, + delete( + params: Params$Resource$Publicdelegatedprefixes$Delete, options: StreamMethodOptions ): GaxiosPromise; - moveDisk( - params?: Params$Resource$Projects$Movedisk, + delete( + params?: Params$Resource$Publicdelegatedprefixes$Delete, options?: MethodOptions ): GaxiosPromise; - moveDisk( - params: Params$Resource$Projects$Movedisk, + delete( + params: Params$Resource$Publicdelegatedprefixes$Delete, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - moveDisk( - params: Params$Resource$Projects$Movedisk, + delete( + params: Params$Resource$Publicdelegatedprefixes$Delete, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - moveDisk( - params: Params$Resource$Projects$Movedisk, + delete( + params: Params$Resource$Publicdelegatedprefixes$Delete, callback: BodyResponseCallback ): void; - moveDisk(callback: BodyResponseCallback): void; - moveDisk( + delete(callback: BodyResponseCallback): void; + delete( paramsOrCallback?: - | Params$Resource$Projects$Movedisk + | Params$Resource$Publicdelegatedprefixes$Delete | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -73607,12 +77327,12 @@ export namespace compute_v1 { | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Movedisk; + {}) as Params$Resource$Publicdelegatedprefixes$Delete; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Movedisk; + params = {} as Params$Resource$Publicdelegatedprefixes$Delete; options = {}; } @@ -73625,17 +77345,17 @@ export namespace compute_v1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/compute/v1/projects/{project}/moveDisk').replace( - /([^:]\/)\/+/g, - '$1' - ), - method: 'POST', + url: ( + rootUrl + + '/compute/v1/projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', }, options ), params, - requiredParams: ['project'], - pathParams: ['project'], + requiredParams: ['project', 'region', 'publicDelegatedPrefix'], + pathParams: ['project', 'publicDelegatedPrefix', 'region'], context: this.context, }; if (callback) { @@ -73649,7 +77369,7 @@ export namespace compute_v1 { } /** - * Moves an instance and its attached persistent disks from one zone to another. + * Returns the specified PublicDelegatedPrefix resource in the given region. * @example * ```js * // Before running the sample: @@ -73669,6 +77389,7 @@ export namespace compute_v1 { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', * ], * }); * @@ -73677,54 +77398,32 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.projects.moveInstance({ + * const res = await compute.publicDelegatedPrefixes.get({ * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // 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. - * // - * // 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: 'placeholder-value', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "destinationZone": "my_destinationZone", - * // "targetInstance": "my_targetInstance" - * // } - * }, + * // Name of the PublicDelegatedPrefix resource to return. + * publicDelegatedPrefix: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * // Name of the region of this request. + * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', * }); * console.log(res.data); * * // Example response * // { - * // "clientOperationId": "my_clientOperationId", * // "creationTimestamp": "my_creationTimestamp", * // "description": "my_description", - * // "endTime": "my_endTime", - * // "error": {}, - * // "httpErrorMessage": "my_httpErrorMessage", - * // "httpErrorStatusCode": 0, + * // "fingerprint": "my_fingerprint", * // "id": "my_id", - * // "insertTime": "my_insertTime", + * // "ipCidrRange": "my_ipCidrRange", + * // "isLiveMigration": false, * // "kind": "my_kind", * // "name": "my_name", - * // "operationGroupId": "my_operationGroupId", - * // "operationType": "my_operationType", - * // "progress": 0, + * // "parentPrefix": "my_parentPrefix", + * // "publicDelegatedSubPrefixs": [], * // "region": "my_region", * // "selfLink": "my_selfLink", - * // "startTime": "my_startTime", - * // "status": "my_status", - * // "statusMessage": "my_statusMessage", - * // "targetId": "my_targetId", - * // "targetLink": "my_targetLink", - * // "user": "my_user", - * // "warnings": [], - * // "zone": "my_zone" + * // "status": "my_status" * // } * } * @@ -73740,50 +77439,55 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - moveInstance( - params: Params$Resource$Projects$Moveinstance, + get( + params: Params$Resource$Publicdelegatedprefixes$Get, options: StreamMethodOptions ): GaxiosPromise; - moveInstance( - params?: Params$Resource$Projects$Moveinstance, + get( + params?: Params$Resource$Publicdelegatedprefixes$Get, options?: MethodOptions - ): GaxiosPromise; - moveInstance( - params: Params$Resource$Projects$Moveinstance, + ): GaxiosPromise; + get( + params: Params$Resource$Publicdelegatedprefixes$Get, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - moveInstance( - params: Params$Resource$Projects$Moveinstance, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + get( + params: Params$Resource$Publicdelegatedprefixes$Get, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - moveInstance( - params: Params$Resource$Projects$Moveinstance, - callback: BodyResponseCallback + get( + params: Params$Resource$Publicdelegatedprefixes$Get, + callback: BodyResponseCallback ): void; - moveInstance(callback: BodyResponseCallback): void; - moveInstance( + get(callback: BodyResponseCallback): void; + get( paramsOrCallback?: - | Params$Resource$Projects$Moveinstance - | BodyResponseCallback + | Params$Resource$Publicdelegatedprefixes$Get + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { + ): + | void + | GaxiosPromise + | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Moveinstance; + {}) as Params$Resource$Publicdelegatedprefixes$Get; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Moveinstance; + params = {} as Params$Resource$Publicdelegatedprefixes$Get; options = {}; } @@ -73797,29 +77501,30 @@ export namespace compute_v1 { options: Object.assign( { url: ( - rootUrl + '/compute/v1/projects/{project}/moveInstance' + rootUrl + + '/compute/v1/projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'POST', + method: 'GET', }, options ), params, - requiredParams: ['project'], - pathParams: ['project'], + requiredParams: ['project', 'region', 'publicDelegatedPrefix'], + pathParams: ['project', 'publicDelegatedPrefix', 'region'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Sets metadata common to all instances within the specified project using the data included in the request. + * Creates a PublicDelegatedPrefix in the specified project in the given region using the parameters that are included in the request. * @example * ```js * // Before running the sample: @@ -73847,10 +77552,12 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.projects.setCommonInstanceMetadata({ + * const res = await compute.publicDelegatedPrefixes.insert({ * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // Name of the region of this request. + * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', * // 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. * // * // 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. @@ -73862,9 +77569,19 @@ export namespace compute_v1 { * requestBody: { * // request body parameters * // { + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", * // "fingerprint": "my_fingerprint", - * // "items": [], - * // "kind": "my_kind" + * // "id": "my_id", + * // "ipCidrRange": "my_ipCidrRange", + * // "isLiveMigration": false, + * // "kind": "my_kind", + * // "name": "my_name", + * // "parentPrefix": "my_parentPrefix", + * // "publicDelegatedSubPrefixs": [], + * // "region": "my_region", + * // "selfLink": "my_selfLink", + * // "status": "my_status" * // } * }, * }); @@ -73911,34 +77628,32 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - setCommonInstanceMetadata( - params: Params$Resource$Projects$Setcommoninstancemetadata, + insert( + params: Params$Resource$Publicdelegatedprefixes$Insert, options: StreamMethodOptions ): GaxiosPromise; - setCommonInstanceMetadata( - params?: Params$Resource$Projects$Setcommoninstancemetadata, + insert( + params?: Params$Resource$Publicdelegatedprefixes$Insert, options?: MethodOptions ): GaxiosPromise; - setCommonInstanceMetadata( - params: Params$Resource$Projects$Setcommoninstancemetadata, + insert( + params: Params$Resource$Publicdelegatedprefixes$Insert, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - setCommonInstanceMetadata( - params: Params$Resource$Projects$Setcommoninstancemetadata, + insert( + params: Params$Resource$Publicdelegatedprefixes$Insert, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - setCommonInstanceMetadata( - params: Params$Resource$Projects$Setcommoninstancemetadata, - callback: BodyResponseCallback - ): void; - setCommonInstanceMetadata( + insert( + params: Params$Resource$Publicdelegatedprefixes$Insert, callback: BodyResponseCallback ): void; - setCommonInstanceMetadata( + insert(callback: BodyResponseCallback): void; + insert( paramsOrCallback?: - | Params$Resource$Projects$Setcommoninstancemetadata + | Params$Resource$Publicdelegatedprefixes$Insert | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -73951,12 +77666,12 @@ export namespace compute_v1 { | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Setcommoninstancemetadata; + {}) as Params$Resource$Publicdelegatedprefixes$Insert; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Setcommoninstancemetadata; + params = {} as Params$Resource$Publicdelegatedprefixes$Insert; options = {}; } @@ -73971,15 +77686,15 @@ export namespace compute_v1 { { url: ( rootUrl + - '/compute/v1/projects/{project}/setCommonInstanceMetadata' + '/compute/v1/projects/{project}/regions/{region}/publicDelegatedPrefixes' ).replace(/([^:]\/)\/+/g, '$1'), method: 'POST', }, options ), params, - requiredParams: ['project'], - pathParams: ['project'], + requiredParams: ['project', 'region'], + pathParams: ['project', 'region'], context: this.context, }; if (callback) { @@ -73993,7 +77708,7 @@ export namespace compute_v1 { } /** - * Sets the default network tier of the project. The default network tier is used when an address/forwardingRule/instance is created without specifying the network tier field. + * Lists the PublicDelegatedPrefixes for a project in the given region. * @example * ```js * // Before running the sample: @@ -74013,6 +77728,7 @@ export namespace compute_v1 { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', * ], * }); * @@ -74021,53 +77737,43 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.projects.setDefaultNetworkTier({ + * const res = await compute.publicDelegatedPrefixes.list({ + * // A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. + * // + * // 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) ``` + * filter: 'placeholder-value', + * // The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * maxResults: 'placeholder-value', + * // Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. + * // + * // You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. + * // + * // Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * orderBy: 'placeholder-value', + * // Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * pageToken: 'placeholder-value', * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', - * // 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. - * // - * // 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: 'placeholder-value', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "networkTier": "my_networkTier" - * // } - * }, + * // Name of the region of this request. + * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', + * // Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + * returnPartialSuccess: 'placeholder-value', * }); * console.log(res.data); * * // Example response * // { - * // "clientOperationId": "my_clientOperationId", - * // "creationTimestamp": "my_creationTimestamp", - * // "description": "my_description", - * // "endTime": "my_endTime", - * // "error": {}, - * // "httpErrorMessage": "my_httpErrorMessage", - * // "httpErrorStatusCode": 0, * // "id": "my_id", - * // "insertTime": "my_insertTime", + * // "items": [], * // "kind": "my_kind", - * // "name": "my_name", - * // "operationGroupId": "my_operationGroupId", - * // "operationType": "my_operationType", - * // "progress": 0, - * // "region": "my_region", + * // "nextPageToken": "my_nextPageToken", * // "selfLink": "my_selfLink", - * // "startTime": "my_startTime", - * // "status": "my_status", - * // "statusMessage": "my_statusMessage", - * // "targetId": "my_targetId", - * // "targetLink": "my_targetLink", - * // "user": "my_user", - * // "warnings": [], - * // "zone": "my_zone" + * // "warning": {} * // } * } * @@ -74083,52 +77789,57 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - setDefaultNetworkTier( - params: Params$Resource$Projects$Setdefaultnetworktier, + list( + params: Params$Resource$Publicdelegatedprefixes$List, options: StreamMethodOptions ): GaxiosPromise; - setDefaultNetworkTier( - params?: Params$Resource$Projects$Setdefaultnetworktier, + list( + params?: Params$Resource$Publicdelegatedprefixes$List, options?: MethodOptions - ): GaxiosPromise; - setDefaultNetworkTier( - params: Params$Resource$Projects$Setdefaultnetworktier, + ): GaxiosPromise; + list( + params: Params$Resource$Publicdelegatedprefixes$List, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - setDefaultNetworkTier( - params: Params$Resource$Projects$Setdefaultnetworktier, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + list( + params: Params$Resource$Publicdelegatedprefixes$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - setDefaultNetworkTier( - params: Params$Resource$Projects$Setdefaultnetworktier, - callback: BodyResponseCallback + list( + params: Params$Resource$Publicdelegatedprefixes$List, + callback: BodyResponseCallback ): void; - setDefaultNetworkTier( - callback: BodyResponseCallback + list( + callback: BodyResponseCallback ): void; - setDefaultNetworkTier( + list( paramsOrCallback?: - | Params$Resource$Projects$Setdefaultnetworktier - | BodyResponseCallback + | Params$Resource$Publicdelegatedprefixes$List + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { + ): + | void + | GaxiosPromise + | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Setdefaultnetworktier; + {}) as Params$Resource$Publicdelegatedprefixes$List; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Setdefaultnetworktier; + params = {} as Params$Resource$Publicdelegatedprefixes$List; options = {}; } @@ -74142,29 +77853,30 @@ export namespace compute_v1 { options: Object.assign( { url: ( - rootUrl + '/compute/v1/projects/{project}/setDefaultNetworkTier' + rootUrl + + '/compute/v1/projects/{project}/regions/{region}/publicDelegatedPrefixes' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'POST', + method: 'GET', }, options ), params, - requiredParams: ['project'], - pathParams: ['project'], + requiredParams: ['project', 'region'], + pathParams: ['project', 'region'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Enables the usage export feature and sets the usage export bucket where reports are stored. If you provide an empty request body using this method, the usage export feature will be disabled. + * Patches the specified PublicDelegatedPrefix resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules. * @example * ```js * // Before running the sample: @@ -74184,9 +77896,6 @@ export namespace compute_v1 { * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/compute', - * 'https://www.googleapis.com/auth/devstorage.full_control', - * 'https://www.googleapis.com/auth/devstorage.read_only', - * 'https://www.googleapis.com/auth/devstorage.read_write', * ], * }); * @@ -74195,10 +77904,14 @@ export namespace compute_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await compute.projects.setUsageExportBucket({ + * const res = await compute.publicDelegatedPrefixes.patch({ * // Project ID for this request. * project: * '(?:(?:[-a-z0-9]{1,63}.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))', + * // Name of the PublicDelegatedPrefix resource to patch. + * publicDelegatedPrefix: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}', + * // Name of the region for this request. + * region: '[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?', * // 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. * // * // 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. @@ -74210,8 +77923,19 @@ export namespace compute_v1 { * requestBody: { * // request body parameters * // { - * // "bucketName": "my_bucketName", - * // "reportNamePrefix": "my_reportNamePrefix" + * // "creationTimestamp": "my_creationTimestamp", + * // "description": "my_description", + * // "fingerprint": "my_fingerprint", + * // "id": "my_id", + * // "ipCidrRange": "my_ipCidrRange", + * // "isLiveMigration": false, + * // "kind": "my_kind", + * // "name": "my_name", + * // "parentPrefix": "my_parentPrefix", + * // "publicDelegatedSubPrefixs": [], + * // "region": "my_region", + * // "selfLink": "my_selfLink", + * // "status": "my_status" * // } * }, * }); @@ -74258,34 +77982,32 @@ export namespace compute_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - setUsageExportBucket( - params: Params$Resource$Projects$Setusageexportbucket, + patch( + params: Params$Resource$Publicdelegatedprefixes$Patch, options: StreamMethodOptions ): GaxiosPromise; - setUsageExportBucket( - params?: Params$Resource$Projects$Setusageexportbucket, + patch( + params?: Params$Resource$Publicdelegatedprefixes$Patch, options?: MethodOptions ): GaxiosPromise; - setUsageExportBucket( - params: Params$Resource$Projects$Setusageexportbucket, + patch( + params: Params$Resource$Publicdelegatedprefixes$Patch, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - setUsageExportBucket( - params: Params$Resource$Projects$Setusageexportbucket, + patch( + params: Params$Resource$Publicdelegatedprefixes$Patch, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - setUsageExportBucket( - params: Params$Resource$Projects$Setusageexportbucket, - callback: BodyResponseCallback - ): void; - setUsageExportBucket( + patch( + params: Params$Resource$Publicdelegatedprefixes$Patch, callback: BodyResponseCallback ): void; - setUsageExportBucket( + patch(callback: BodyResponseCallback): void; + patch( paramsOrCallback?: - | Params$Resource$Projects$Setusageexportbucket + | Params$Resource$Publicdelegatedprefixes$Patch | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -74298,12 +78020,12 @@ export namespace compute_v1 { | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Setusageexportbucket; + {}) as Params$Resource$Publicdelegatedprefixes$Patch; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Setusageexportbucket; + params = {} as Params$Resource$Publicdelegatedprefixes$Patch; options = {}; } @@ -74317,15 +78039,16 @@ export namespace compute_v1 { options: Object.assign( { url: ( - rootUrl + '/compute/v1/projects/{project}/setUsageExportBucket' + rootUrl + + '/compute/v1/projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'POST', + method: 'PATCH', }, options ), params, - requiredParams: ['project'], - pathParams: ['project'], + requiredParams: ['project', 'region', 'publicDelegatedPrefix'], + pathParams: ['project', 'publicDelegatedPrefix', 'region'], context: this.context, }; if (callback) { @@ -74339,90 +78062,7 @@ export namespace compute_v1 { } } - export interface Params$Resource$Projects$Disablexpnhost - extends StandardParameters { - /** - * Project ID for this request. - */ - project?: string; - /** - * 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. - * - * 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; - } - export interface Params$Resource$Projects$Disablexpnresource - extends StandardParameters { - /** - * Project ID for this request. - */ - project?: string; - /** - * 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. - * - * 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; - - /** - * Request body metadata - */ - requestBody?: Schema$ProjectsDisableXpnResourceRequest; - } - export interface Params$Resource$Projects$Enablexpnhost - extends StandardParameters { - /** - * Project ID for this request. - */ - project?: string; - /** - * 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. - * - * 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; - } - export interface Params$Resource$Projects$Enablexpnresource - extends StandardParameters { - /** - * Project ID for this request. - */ - project?: string; - /** - * 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. - * - * 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; - - /** - * Request body metadata - */ - requestBody?: Schema$ProjectsEnableXpnResourceRequest; - } - export interface Params$Resource$Projects$Get extends StandardParameters { - /** - * Project ID for this request. - */ - project?: string; - } - export interface Params$Resource$Projects$Getxpnhost - extends StandardParameters { - /** - * Project ID for this request. - */ - project?: string; - } - export interface Params$Resource$Projects$Getxpnresources + export interface Params$Resource$Publicdelegatedprefixes$Aggregatedlist extends StandardParameters { /** * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `\>`, or `<`. @@ -74434,6 +78074,10 @@ export namespace compute_v1 { * 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) ``` */ filter?: string; + /** + * Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. + */ + includeAllScopes?: boolean; /** * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) */ @@ -74451,7 +78095,7 @@ export namespace compute_v1 { */ pageToken?: string; /** - * Project ID for this request. + * Name of the project scoping this request. */ project?: string; /** @@ -74459,54 +78103,54 @@ export namespace compute_v1 { */ returnPartialSuccess?: boolean; } - export interface Params$Resource$Projects$Listxpnhosts + export interface Params$Resource$Publicdelegatedprefixes$Delete extends StandardParameters { /** - * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison 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`. - * - * 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) ``` + * Project ID for this request. */ - filter?: string; + project?: string; /** - * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * Name of the PublicDelegatedPrefix resource to delete. */ - maxResults?: number; + publicDelegatedPrefix?: string; /** - * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. - * - * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. - * - * Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * Name of the region of this request. */ - orderBy?: string; + region?: string; /** - * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * 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. + * + * 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). */ - pageToken?: string; + requestId?: string; + } + export interface Params$Resource$Publicdelegatedprefixes$Get + extends StandardParameters { /** * Project ID for this request. */ project?: string; /** - * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. + * Name of the PublicDelegatedPrefix resource to return. */ - returnPartialSuccess?: boolean; - + publicDelegatedPrefix?: string; /** - * Request body metadata + * Name of the region of this request. */ - requestBody?: Schema$ProjectsListXpnHostsRequest; + region?: string; } - export interface Params$Resource$Projects$Movedisk + export interface Params$Resource$Publicdelegatedprefixes$Insert extends StandardParameters { /** * Project ID for this request. */ project?: string; + /** + * Name of the region of this request. + */ + region?: string; /** * 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. * @@ -74519,74 +78163,63 @@ export namespace compute_v1 { /** * Request body metadata */ - requestBody?: Schema$DiskMoveRequest; + requestBody?: Schema$PublicDelegatedPrefix; } - export interface Params$Resource$Projects$Moveinstance + export interface Params$Resource$Publicdelegatedprefixes$List extends StandardParameters { /** - * Project ID for this request. - */ - project?: string; - /** - * 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. + * A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `\>`, or `<`. * - * 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. + * For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. * - * The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). - */ - requestId?: string; - - /** - * Request body metadata + * 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) ``` */ - requestBody?: Schema$InstanceMoveRequest; - } - export interface Params$Resource$Projects$Setcommoninstancemetadata - extends StandardParameters { + filter?: string; /** - * Project ID for this request. + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) */ - project?: string; + maxResults?: number; /** - * 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. + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. * - * 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. + * You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. * - * The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). + * Currently, only sorting by `name` or `creationTimestamp desc` is supported. */ - requestId?: string; - + orderBy?: string; /** - * Request body metadata + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. */ - requestBody?: Schema$Metadata; - } - export interface Params$Resource$Projects$Setdefaultnetworktier - extends StandardParameters { + pageToken?: string; /** * Project ID for this request. */ project?: string; /** - * 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. - * - * 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). + * Name of the region of this request. */ - requestId?: string; - + region?: string; /** - * Request body metadata + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. */ - requestBody?: Schema$ProjectsSetDefaultNetworkTierRequest; + returnPartialSuccess?: boolean; } - export interface Params$Resource$Projects$Setusageexportbucket + export interface Params$Resource$Publicdelegatedprefixes$Patch extends StandardParameters { /** * Project ID for this request. */ project?: string; + /** + * Name of the PublicDelegatedPrefix resource to patch. + */ + publicDelegatedPrefix?: string; + /** + * Name of the region for this request. + */ + region?: string; /** * 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. * @@ -74599,7 +78232,7 @@ export namespace compute_v1 { /** * Request body metadata */ - requestBody?: Schema$UsageExportLocation; + requestBody?: Schema$PublicDelegatedPrefix; } export class Resource$Regionautoscalers { @@ -74825,6 +78458,7 @@ export namespace compute_v1 { * // "name": "my_name", * // "recommendedSize": 0, * // "region": "my_region", + * // "scalingScheduleStatus": {}, * // "selfLink": "my_selfLink", * // "status": "my_status", * // "statusDetails": [], @@ -74978,6 +78612,7 @@ export namespace compute_v1 { * // "name": "my_name", * // "recommendedSize": 0, * // "region": "my_region", + * // "scalingScheduleStatus": {}, * // "selfLink": "my_selfLink", * // "status": "my_status", * // "statusDetails": [], @@ -75330,6 +78965,7 @@ export namespace compute_v1 { * // "name": "my_name", * // "recommendedSize": 0, * // "region": "my_region", + * // "scalingScheduleStatus": {}, * // "selfLink": "my_selfLink", * // "status": "my_status", * // "statusDetails": [], @@ -75516,6 +79152,7 @@ export namespace compute_v1 { * // "name": "my_name", * // "recommendedSize": 0, * // "region": "my_region", + * // "scalingScheduleStatus": {}, * // "selfLink": "my_selfLink", * // "status": "my_status", * // "statusDetails": [], @@ -76042,6 +79679,7 @@ export namespace compute_v1 { * // "loadBalancingScheme": "my_loadBalancingScheme", * // "localityLbPolicy": "my_localityLbPolicy", * // "logConfig": {}, + * // "maxStreamDuration": {}, * // "name": "my_name", * // "network": "my_network", * // "outlierDetection": {}, @@ -76369,6 +80007,7 @@ export namespace compute_v1 { * // "loadBalancingScheme": "my_loadBalancingScheme", * // "localityLbPolicy": "my_localityLbPolicy", * // "logConfig": {}, + * // "maxStreamDuration": {}, * // "name": "my_name", * // "network": "my_network", * // "outlierDetection": {}, @@ -76738,6 +80377,7 @@ export namespace compute_v1 { * // "loadBalancingScheme": "my_loadBalancingScheme", * // "localityLbPolicy": "my_localityLbPolicy", * // "logConfig": {}, + * // "maxStreamDuration": {}, * // "name": "my_name", * // "network": "my_network", * // "outlierDetection": {}, @@ -76943,6 +80583,7 @@ export namespace compute_v1 { * // "loadBalancingScheme": "my_loadBalancingScheme", * // "localityLbPolicy": "my_localityLbPolicy", * // "logConfig": {}, + * // "maxStreamDuration": {}, * // "name": "my_name", * // "network": "my_network", * // "outlierDetection": {}, @@ -98409,6 +102050,7 @@ export namespace compute_v1 { * // "bgpPeers": [], * // "creationTimestamp": "my_creationTimestamp", * // "description": "my_description", + * // "encryptedInterconnectRouter": false, * // "id": "my_id", * // "interfaces": [], * // "kind": "my_kind", @@ -98876,6 +102518,7 @@ export namespace compute_v1 { * // "bgpPeers": [], * // "creationTimestamp": "my_creationTimestamp", * // "description": "my_description", + * // "encryptedInterconnectRouter": false, * // "id": "my_id", * // "interfaces": [], * // "kind": "my_kind", @@ -99220,6 +102863,7 @@ export namespace compute_v1 { * // "bgpPeers": [], * // "creationTimestamp": "my_creationTimestamp", * // "description": "my_description", + * // "encryptedInterconnectRouter": false, * // "id": "my_id", * // "interfaces": [], * // "kind": "my_kind", @@ -99399,6 +103043,7 @@ export namespace compute_v1 { * // "bgpPeers": [], * // "creationTimestamp": "my_creationTimestamp", * // "description": "my_description", + * // "encryptedInterconnectRouter": false, * // "id": "my_id", * // "interfaces": [], * // "kind": "my_kind", @@ -99567,6 +103212,7 @@ export namespace compute_v1 { * // "bgpPeers": [], * // "creationTimestamp": "my_creationTimestamp", * // "description": "my_description", + * // "encryptedInterconnectRouter": false, * // "id": "my_id", * // "interfaces": [], * // "kind": "my_kind", diff --git a/src/apis/container/v1.ts b/src/apis/container/v1.ts index 23dc4ba753e..681dfbcdb8d 100644 --- a/src/apis/container/v1.ts +++ b/src/apis/container/v1.ts @@ -189,7 +189,7 @@ export namespace container_v1 { securityGroup?: string | null; } /** - * Autopilot is the configuration for Autopilot settings on the cluster. It is the official product name of what is previously known as AutoGKE + * Autopilot is the configuration for Autopilot settings on the cluster. */ export interface Schema$Autopilot { /** @@ -338,7 +338,7 @@ export namespace container_v1 { */ authenticatorGroupsConfig?: Schema$AuthenticatorGroupsConfig; /** - * Autopilot configuration for the cluster. It has the same semantics as AutoGKE and overrides the setting in autogke. + * Autopilot configuration for the cluster. */ autopilot?: Schema$Autopilot; /** diff --git a/src/apis/container/v1beta1.ts b/src/apis/container/v1beta1.ts index ee022811f19..7377041e52d 100644 --- a/src/apis/container/v1beta1.ts +++ b/src/apis/container/v1beta1.ts @@ -197,7 +197,7 @@ export namespace container_v1beta1 { securityGroup?: string | null; } /** - * Autopilot is the configuration for Autopilot settings on the cluster. It is the official product name of what is previously known as AutoGKE + * Autopilot is the configuration for Autopilot settings on the cluster. */ export interface Schema$Autopilot { /** @@ -359,7 +359,7 @@ export namespace container_v1beta1 { */ authenticatorGroupsConfig?: Schema$AuthenticatorGroupsConfig; /** - * Autopilot configuration for the cluster. It has the same semantics as AutoGKE and overrides the setting in autogke. + * Autopilot configuration for the cluster. */ autopilot?: Schema$Autopilot; /** @@ -665,6 +665,10 @@ export namespace container_v1beta1 { * The desired config of Intra-node visibility. */ desiredIntraNodeVisibilityConfig?: Schema$IntraNodeVisibilityConfig; + /** + * The desired L4 Internal Load Balancer Subsetting configuration. + */ + desiredL4ilbSubsettingConfig?: Schema$ILBSubsettingConfig; /** * The desired list of Google Compute Engine [zones](https://cloud.google.com/compute/docs/zones#available) in which the cluster's nodes should be located. This list must always include the cluster's primary zone. Warning: changing cluster locations will update the locations of all node pools and will result in nodes being added and/or removed. */ @@ -987,6 +991,15 @@ export namespace container_v1beta1 { */ disabled?: boolean | null; } + /** + * ILBSubsettingConfig contains the desired config of L4 Internal LoadBalancer subsetting on this cluster. + */ + export interface Schema$ILBSubsettingConfig { + /** + * Enables l4 ILB subsetting for this cluster + */ + enabled?: boolean | null; + } /** * IntraNodeVisibilityConfig contains the desired config of the intra-node visibility on this cluster. */ @@ -1344,6 +1357,10 @@ export namespace container_v1beta1 { * Whether Intra-node visibility is enabled for this cluster. This makes same node pod to pod traffic visible for VPC network. */ enableIntraNodeVisibility?: boolean | null; + /** + * Whether L4ILB Subsetting is enabled for this cluster. + */ + enableL4ilbSubsetting?: boolean | null; /** * Output only. The relative name of the Google Compute Engine network(https://cloud.google.com/compute/docs/networks-and-firewalls#networks) to which the cluster is connected. Example: projects/my-project/global/networks/my-network */ @@ -1379,6 +1396,15 @@ export namespace container_v1beta1 { */ disabled?: boolean | null; } + /** + * Collection of Compute Engine network tags that can be applied to a node's underyling VM instance. (See `tags` field in [`NodeConfig`](/kubernetes-engine/docs/reference/rest/v1/NodeConfig)). + */ + export interface Schema$NetworkTags { + /** + * List of network tags. + */ + tags?: string[] | null; + } /** * Parameters that describe the nodes in a cluster. */ @@ -1493,6 +1519,15 @@ export namespace container_v1beta1 { */ cpuManagerPolicy?: string | null; } + /** + * Collection of node-level [Kubernetes labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels). + */ + export interface Schema$NodeLabels { + /** + * Map of node label keys and node label values. + */ + labels?: {[key: string]: string} | null; + } /** * NodeManagement defines the set of node management services turned on for the node pool. */ @@ -1634,6 +1669,15 @@ export namespace container_v1beta1 { */ value?: string | null; } + /** + * Collection of Kubernetes [node taints](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration). + */ + export interface Schema$NodeTaints { + /** + * List of node taints. + */ + taints?: Schema$NodeTaint[]; + } /** * NotificationConfig is the configuration of notifications. */ @@ -2451,6 +2495,10 @@ export namespace container_v1beta1 { * Node kubelet configs. */ kubeletConfig?: Schema$NodeKubeletConfig; + /** + * The desired node labels to be applied to all nodes in the node pool. If this field is not present, the labels will not be changed. Otherwise, the existing node labels will be *replaced* with the provided labels. + */ + labels?: Schema$NodeLabels; /** * Parameters that can be configured on Linux nodes. */ @@ -2475,6 +2523,14 @@ export namespace container_v1beta1 { * Required. Deprecated. The Google Developers Console [project ID or project number](https://support.google.com/cloud/answer/6158840). This field has been deprecated and replaced by the name field. */ projectId?: string | null; + /** + * The desired network tags to be applied to all nodes in the node pool. If this field is not present, the tags will not be changed. Otherwise, the existing network tags will be *replaced* with the provided tags. + */ + tags?: Schema$NetworkTags; + /** + * The desired node taints to be applied to all nodes in the node pool. If this field is not present, the taints will not be changed. Otherwise, the existing node taints will be *replaced* with the provided taints. + */ + taints?: Schema$NodeTaints; /** * Upgrade settings control disruption and speed of the upgrade. */ @@ -7432,12 +7488,15 @@ export namespace container_v1beta1 { * // "clusterId": "my_clusterId", * // "imageType": "my_imageType", * // "kubeletConfig": {}, + * // "labels": {}, * // "linuxNodeConfig": {}, * // "locations": [], * // "name": "my_name", * // "nodePoolId": "my_nodePoolId", * // "nodeVersion": "my_nodeVersion", * // "projectId": "my_projectId", + * // "tags": {}, + * // "taints": {}, * // "upgradeSettings": {}, * // "workloadMetadataConfig": {}, * // "zone": "my_zone" @@ -12840,12 +12899,15 @@ export namespace container_v1beta1 { * // "clusterId": "my_clusterId", * // "imageType": "my_imageType", * // "kubeletConfig": {}, + * // "labels": {}, * // "linuxNodeConfig": {}, * // "locations": [], * // "name": "my_name", * // "nodePoolId": "my_nodePoolId", * // "nodeVersion": "my_nodeVersion", * // "projectId": "my_projectId", + * // "tags": {}, + * // "taints": {}, * // "upgradeSettings": {}, * // "workloadMetadataConfig": {}, * // "zone": "my_zone" diff --git a/src/apis/content/v2.1.ts b/src/apis/content/v2.1.ts index 64145e835ba..c039ba8b6c9 100644 --- a/src/apis/content/v2.1.ts +++ b/src/apis/content/v2.1.ts @@ -6392,7 +6392,7 @@ export namespace content_v2_1 { export interface Schema$SettlementTransactionAmount { commission?: Schema$SettlementTransactionAmountCommission; /** - * The description of the event. Acceptable values are: - "`taxWithhold`" - "`principal`" - "`principalAdjustment`" - "`shippingFee`" - "`merchantRemittedSalesTax`" - "`googleRemittedSalesTax`" - "`merchantCoupon`" - "`merchantCouponTax`" - "`merchantRemittedDisposalTax`" - "`googleRemittedDisposalTax`" - "`merchantRemittedRedemptionFee`" - "`googleRemittedRedemptionFee`" - "`eeeEcoFee`" - "`furnitureEcoFee`" - "`copyPrivateFee`" - "`eeeEcoFeeCommission`" - "`furnitureEcoFeeCommission`" - "`copyPrivateFeeCommission`" - "`principalRefund`" - "`principalRefundTax`" - "`itemCommission`" - "`adjustmentCommission`" - "`shippingFeeCommission`" - "`commissionRefund`" - "`damaged`" - "`damagedOrDefectiveItem`" - "`expiredItem`" - "`faultyItem`" - "`incorrectItemReceived`" - "`itemMissing`" - "`qualityNotExpected`" - "`receivedTooLate`" - "`storePackageMissing`" - "`transitPackageMissing`" - "`unsuccessfulDeliveryUndeliverable`" - "`wrongChargeInStore`" - "`wrongItem`" - "`returns`" - "`undeliverable`" - "`refundFromMerchant`" - "`returnLabelShippingFee`" - "`pspFee`" + * The description of the event. Acceptable values are: - "`taxWithhold`" - "`principal`" - "`principalAdjustment`" - "`shippingFee`" - "`merchantRemittedSalesTax`" - "`googleRemittedSalesTax`" - "`merchantCoupon`" - "`merchantCouponTax`" - "`merchantRemittedDisposalTax`" - "`googleRemittedDisposalTax`" - "`merchantRemittedRedemptionFee`" - "`googleRemittedRedemptionFee`" - "`eeeEcoFee`" - "`furnitureEcoFee`" - "`copyPrivateFee`" - "`eeeEcoFeeCommission`" - "`furnitureEcoFeeCommission`" - "`copyPrivateFeeCommission`" - "`principalRefund`" - "`principalRefundTax`" - "`itemCommission`" - "`adjustmentCommission`" - "`shippingFeeCommission`" - "`commissionRefund`" - "`damaged`" - "`damagedOrDefectiveItem`" - "`expiredItem`" - "`faultyItem`" - "`incorrectItemReceived`" - "`itemMissing`" - "`qualityNotExpected`" - "`receivedTooLate`" - "`storePackageMissing`" - "`transitPackageMissing`" - "`unsuccessfulDeliveryUndeliverable`" - "`wrongChargeInStore`" - "`wrongItem`" - "`returns`" - "`undeliverable`" - "`issueRelatedRefundAndReplacementAmountDescription`" - "`refundFromMerchant`" - "`returnLabelShippingFee`" - "`lumpSumCorrection`" - "`pspFee`" */ description?: string | null; /** @@ -6400,7 +6400,7 @@ export namespace content_v2_1 { */ transactionAmount?: Schema$Price; /** - * The type of the amount. Acceptable values are: - "`itemPrice`" - "`orderPrice`" - "`refund`" - "`earlyRefund`" - "`courtesyRefund`" - "`returnRefund`" - "`returnLabelShippingFeeAmount`" + * The type of the amount. Acceptable values are: - "`itemPrice`" - "`orderPrice`" - "`refund`" - "`earlyRefund`" - "`courtesyRefund`" - "`returnRefund`" - "`returnLabelShippingFeeAmount`" - "`lumpSumCorrectionAmount`" */ type?: string | null; } diff --git a/src/apis/dataflow/v1b3.ts b/src/apis/dataflow/v1b3.ts index c58b040e1d5..cd1c68747b4 100644 --- a/src/apis/dataflow/v1b3.ts +++ b/src/apis/dataflow/v1b3.ts @@ -180,23 +180,6 @@ export namespace dataflow_v1b3 { */ position?: Schema$Position; } - /** - * Job information for templates. - */ - export interface Schema$Artifact { - /** - * Container image path set for flex Template. - */ - containerSpec?: Schema$ContainerSpec; - /** - * job_graph_gcs_path set for legacy Template. - */ - jobGraphGcsPath?: string | null; - /** - * Metadata set for legacy Template. - */ - metadata?: Schema$TemplateMetadata; - } /** * A structured message reporting an autoscaling decision made by the Dataflow service. */ @@ -277,15 +260,6 @@ export namespace dataflow_v1b3 { */ tableId?: string | null; } - /** - * Commit will add a new TemplateVersion to an existing template. - */ - export interface Schema$CommitTemplateVersionRequest { - /** - * TemplateVersion obejct to create. - */ - templateVersion?: Schema$TemplateVersion; - } /** * Description of an interstitial value between transforms in an execution stage. */ @@ -569,15 +543,6 @@ export namespace dataflow_v1b3 { */ parameters?: {[key: string]: string} | null; } - /** - * Creates a new Template with TemplateVersions. - */ - export interface Schema$CreateTemplateVersionRequest { - /** - * The TemplateVersion object to create. - */ - templateVersion?: Schema$TemplateVersion; - } /** * Identifies the location of a custom souce. */ @@ -613,6 +578,15 @@ export namespace dataflow_v1b3 { */ projectId?: string | null; } + /** + * Describes any options that have an effect on the debugging of pipelines. + */ + export interface Schema$DebugOptions { + /** + * When true, enables the logging of the literal hot key to the user's Cloud Logging. + */ + enableHotKeyLogging?: boolean | null; + } /** * Response from deleting a snapshot. */ @@ -742,10 +716,6 @@ export namespace dataflow_v1b3 { */ residual?: Schema$DerivedSource; } - /** - * 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); \} The JSON representation for `Empty` is empty JSON object `{\}`. - */ - export interface Schema$Empty {} /** * Describes the environment in which a Dataflow Job runs. */ @@ -758,6 +728,10 @@ export namespace dataflow_v1b3 { * The dataset for the current project where various workflow related tables are stored. The supported resource type is: Google BigQuery: bigquery.googleapis.com/{dataset\} */ dataset?: string | null; + /** + * Any debugging options to be supplied to the job. + */ + debugOptions?: Schema$DebugOptions; /** * The list of experiments to enable. This field should be used for SDK related experiments and not for service related experiments. The proper field for service related experiments is service_options. For more details see the rationale at go/user-specified-service-options. */ @@ -1568,19 +1542,6 @@ export namespace dataflow_v1b3 { */ snapshots?: Schema$Snapshot[]; } - /** - * Respond a list of TemplateVersions. - */ - export interface Schema$ListTemplateVersionsResponse { - /** - * A token that can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. - */ - nextPageToken?: string | null; - /** - * A list of TemplateVersions. - */ - templateVersions?: Schema$TemplateVersion[]; - } /** * MapTask consists of an ordered set of instructions, each of which describes one particular low-level operation for the worker to perform in order to accomplish the MapTask's WorkItem. Each instruction must appear in the list before any instructions which depends on its output. */ @@ -1702,54 +1663,6 @@ export namespace dataflow_v1b3 { */ updateTime?: string | null; } - /** - * Either add the label to TemplateVersion or remove it from the TemplateVersion. - */ - export interface Schema$ModifyTemplateVersionLabelRequest { - /** - * The label key for update. - */ - key?: string | null; - /** - * Requests for add label to TemplateVersion or remove label from TemplateVersion. - */ - op?: string | null; - /** - * The label value for update. - */ - value?: string | null; - } - /** - * Respond the labels in the TemplateVersion. - */ - export interface Schema$ModifyTemplateVersionLabelResponse { - /** - * All the label in the TemplateVersion. - */ - labels?: {[key: string]: string} | null; - } - /** - * Add a tag to the current TemplateVersion. If tag exist in another TemplateVersion in the Template, remove the tag before add it to the current TemplateVersion. If remove_only set, remove the tag from the current TemplateVersion. - */ - export interface Schema$ModifyTemplateVersionTagRequest { - /** - * The flag that indicates if the request is only for remove tag from TemplateVersion. - */ - removeOnly?: boolean | null; - /** - * The tag for update. - */ - tag?: string | null; - } - /** - * Respond the current tags in the TemplateVersion. - */ - export interface Schema$ModifyTemplateVersionTagResponse { - /** - * All the tags in the TemplateVersion. - */ - tags?: string[] | null; - } /** * Describes mounted data disk. */ @@ -3091,47 +3004,6 @@ export namespace dataflow_v1b3 { */ parameters?: Schema$ParameterMetadata[]; } - /** - * ///////////////////////////////////////////////////////////////////////////// //// Template Catalog is used to organize user TemplateVersions. //// TemplateVersions that have the same project_id and display_name are //// belong to the same Template. //// Templates with the same project_id belong to the same Project. //// TemplateVersion may have labels and multiple labels are allowed. //// Duplicated labels in the same `TemplateVersion` are not allowed. //// TemplateVersion may have tags and multiple tags are allowed. Duplicated //// tags in the same `Template` are not allowed! - */ - export interface Schema$TemplateVersion { - /** - * Job graph and metadata if it is a legacy Template. Container image path and metadata if it is flex Template. - */ - artifact?: Schema$Artifact; - /** - * Creation time of this TemplateVersion. - */ - createTime?: string | null; - /** - * Template description from the user. - */ - description?: string | null; - /** - * A customized name for Template. Multiple TemplateVersions per Template. - */ - displayName?: string | null; - /** - * Labels for the Template Version. Labels can be duplicate within Template. - */ - labels?: {[key: string]: string} | null; - /** - * A unique project_id. Multiple Templates per Project. - */ - projectId?: string | null; - /** - * Alias for version_id, helps locate a TemplateVersion. - */ - tags?: string[] | null; - /** - * Either LEGACY or FLEX. This should match with the type of artifact. - */ - type?: string | null; - /** - * An auto generated version_id for TemplateVersion. - */ - versionId?: string | null; - } /** * Global topology of the streaming Dataflow job, including all computations and their sharded locations. */ @@ -3685,24 +3557,16 @@ export namespace dataflow_v1b3 { export class Resource$Projects { context: APIRequestContext; - catalogTemplates: Resource$Projects$Catalogtemplates; jobs: Resource$Projects$Jobs; locations: Resource$Projects$Locations; snapshots: Resource$Projects$Snapshots; templates: Resource$Projects$Templates; - templateVersions: Resource$Projects$Templateversions; constructor(context: APIRequestContext) { this.context = context; - this.catalogTemplates = new Resource$Projects$Catalogtemplates( - this.context - ); this.jobs = new Resource$Projects$Jobs(this.context); this.locations = new Resource$Projects$Locations(this.context); this.snapshots = new Resource$Projects$Snapshots(this.context); this.templates = new Resource$Projects$Templates(this.context); - this.templateVersions = new Resource$Projects$Templateversions( - this.context - ); } /** @@ -3835,977 +3699,21 @@ export namespace dataflow_v1b3 { ), params, requiredParams: ['projectId'], - pathParams: ['projectId'], - context: this.context, - }; - if (callback) { - createAPIRequest( - parameters, - callback as BodyResponseCallback - ); - } else { - return createAPIRequest(parameters); - } - } - - /** - * Send a worker_message to the service. - * @example - * ```js - * // Before running the sample: - * // - Enable the API at: - * // https://console.developers.google.com/apis/api/dataflow.googleapis.com - * // - Login into gcloud by running: - * // `$ gcloud auth application-default login` - * // - Install the npm module by running: - * // `$ npm install googleapis` - * - * const {google} = require('googleapis'); - * const dataflow = google.dataflow('v1b3'); - * - * async function main() { - * const auth = new google.auth.GoogleAuth({ - * // Scopes can be specified either as an array or as a single, space-delimited string. - * scopes: [ - * 'https://www.googleapis.com/auth/cloud-platform', - * 'https://www.googleapis.com/auth/compute', - * 'https://www.googleapis.com/auth/compute.readonly', - * 'https://www.googleapis.com/auth/userinfo.email', - * ], - * }); - * - * // Acquire an auth client, and bind it to all future calls - * const authClient = await auth.getClient(); - * google.options({auth: authClient}); - * - * // Do the magic - * const res = await dataflow.projects.workerMessages({ - * // The project to send the WorkerMessages to. - * projectId: 'placeholder-value', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "location": "my_location", - * // "workerMessages": [] - * // } - * }, - * }); - * console.log(res.data); - * - * // Example response - * // { - * // "workerMessageResponses": [] - * // } - * } - * - * main().catch(e => { - * console.error(e); - * throw e; - * }); - * - * ``` - * - * @param params - Parameters for request - * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. - * @param callback - Optional callback that handles the response. - * @returns A promise if used with async/await, or void if used with a callback. - */ - workerMessages( - params: Params$Resource$Projects$Workermessages, - options: StreamMethodOptions - ): GaxiosPromise; - workerMessages( - params?: Params$Resource$Projects$Workermessages, - options?: MethodOptions - ): GaxiosPromise; - workerMessages( - params: Params$Resource$Projects$Workermessages, - options: StreamMethodOptions | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - workerMessages( - params: Params$Resource$Projects$Workermessages, - options: - | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - workerMessages( - params: Params$Resource$Projects$Workermessages, - callback: BodyResponseCallback - ): void; - workerMessages( - callback: BodyResponseCallback - ): void; - workerMessages( - paramsOrCallback?: - | Params$Resource$Projects$Workermessages - | BodyResponseCallback - | BodyResponseCallback, - optionsOrCallback?: - | MethodOptions - | StreamMethodOptions - | BodyResponseCallback - | BodyResponseCallback, - callback?: - | BodyResponseCallback - | BodyResponseCallback - ): - | void - | GaxiosPromise - | GaxiosPromise { - let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Workermessages; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Workermessages; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://dataflow.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: ( - rootUrl + '/v1b3/projects/{projectId}/WorkerMessages' - ).replace(/([^:]\/)\/+/g, '$1'), - method: 'POST', - }, - options - ), - params, - requiredParams: ['projectId'], - pathParams: ['projectId'], - context: this.context, - }; - if (callback) { - createAPIRequest( - parameters, - callback as BodyResponseCallback - ); - } else { - return createAPIRequest(parameters); - } - } - } - - export interface Params$Resource$Projects$Deletesnapshots - extends StandardParameters { - /** - * The location that contains this snapshot. - */ - location?: string; - /** - * The ID of the Cloud Platform project that the snapshot belongs to. - */ - projectId?: string; - /** - * The ID of the snapshot. - */ - snapshotId?: string; - } - export interface Params$Resource$Projects$Workermessages - extends StandardParameters { - /** - * The project to send the WorkerMessages to. - */ - projectId?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$SendWorkerMessagesRequest; - } - - export class Resource$Projects$Catalogtemplates { - context: APIRequestContext; - templateVersions: Resource$Projects$Catalogtemplates$Templateversions; - constructor(context: APIRequestContext) { - this.context = context; - this.templateVersions = new Resource$Projects$Catalogtemplates$Templateversions( - this.context - ); - } - - /** - * Creates a new TemplateVersion (Important: not new Template) entry in the spanner table. Requires project_id and display_name (template). - * @example - * ```js - * // Before running the sample: - * // - Enable the API at: - * // https://console.developers.google.com/apis/api/dataflow.googleapis.com - * // - Login into gcloud by running: - * // `$ gcloud auth application-default login` - * // - Install the npm module by running: - * // `$ npm install googleapis` - * - * const {google} = require('googleapis'); - * const dataflow = google.dataflow('v1b3'); - * - * async function main() { - * const auth = new google.auth.GoogleAuth({ - * // Scopes can be specified either as an array or as a single, space-delimited string. - * scopes: [ - * 'https://www.googleapis.com/auth/cloud-platform', - * 'https://www.googleapis.com/auth/userinfo.email', - * ], - * }); - * - * // Acquire an auth client, and bind it to all future calls - * const authClient = await auth.getClient(); - * google.options({auth: authClient}); - * - * // Do the magic - * const res = await dataflow.projects.catalogTemplates.commit({ - * // The location of the template, name includes project_id and display_name. Commit using project_id(pid1) and display_name(tid1). Format: projects/{pid1\}/catalogTemplates/{tid1\} - * name: 'projects/my-project/catalogTemplates/my-catalogTemplate', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "templateVersion": {} - * // } - * }, - * }); - * console.log(res.data); - * - * // Example response - * // { - * // "artifact": {}, - * // "createTime": "my_createTime", - * // "description": "my_description", - * // "displayName": "my_displayName", - * // "labels": {}, - * // "projectId": "my_projectId", - * // "tags": [], - * // "type": "my_type", - * // "versionId": "my_versionId" - * // } - * } - * - * main().catch(e => { - * console.error(e); - * throw e; - * }); - * - * ``` - * - * @param params - Parameters for request - * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. - * @param callback - Optional callback that handles the response. - * @returns A promise if used with async/await, or void if used with a callback. - */ - commit( - params: Params$Resource$Projects$Catalogtemplates$Commit, - options: StreamMethodOptions - ): GaxiosPromise; - commit( - params?: Params$Resource$Projects$Catalogtemplates$Commit, - options?: MethodOptions - ): GaxiosPromise; - commit( - params: Params$Resource$Projects$Catalogtemplates$Commit, - options: StreamMethodOptions | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - commit( - params: Params$Resource$Projects$Catalogtemplates$Commit, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - commit( - params: Params$Resource$Projects$Catalogtemplates$Commit, - callback: BodyResponseCallback - ): void; - commit(callback: BodyResponseCallback): void; - commit( - paramsOrCallback?: - | Params$Resource$Projects$Catalogtemplates$Commit - | BodyResponseCallback - | BodyResponseCallback, - optionsOrCallback?: - | MethodOptions - | StreamMethodOptions - | BodyResponseCallback - | BodyResponseCallback, - callback?: - | BodyResponseCallback - | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { - let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Catalogtemplates$Commit; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Catalogtemplates$Commit; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://dataflow.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: (rootUrl + '/v1b3/{+name}:commit').replace( - /([^:]\/)\/+/g, - '$1' - ), - method: 'POST', - }, - options - ), - params, - requiredParams: ['name'], - pathParams: ['name'], - context: this.context, - }; - if (callback) { - createAPIRequest( - parameters, - callback as BodyResponseCallback - ); - } else { - return createAPIRequest(parameters); - } - } - - /** - * Deletes an existing Template. Do nothing if Template does not exist. - * @example - * ```js - * // Before running the sample: - * // - Enable the API at: - * // https://console.developers.google.com/apis/api/dataflow.googleapis.com - * // - Login into gcloud by running: - * // `$ gcloud auth application-default login` - * // - Install the npm module by running: - * // `$ npm install googleapis` - * - * const {google} = require('googleapis'); - * const dataflow = google.dataflow('v1b3'); - * - * async function main() { - * const auth = new google.auth.GoogleAuth({ - * // Scopes can be specified either as an array or as a single, space-delimited string. - * scopes: [ - * 'https://www.googleapis.com/auth/cloud-platform', - * 'https://www.googleapis.com/auth/userinfo.email', - * ], - * }); - * - * // Acquire an auth client, and bind it to all future calls - * const authClient = await auth.getClient(); - * google.options({auth: authClient}); - * - * // Do the magic - * const res = await dataflow.projects.catalogTemplates.delete({ - * // name includes project_id and display_name. Delete by project_id(pid1) and display_name(tid1). Format: projects/{pid1\}/catalogTemplates/{tid1\} - * name: 'projects/my-project/catalogTemplates/my-catalogTemplate', - * }); - * console.log(res.data); - * - * // Example response - * // {} - * } - * - * main().catch(e => { - * console.error(e); - * throw e; - * }); - * - * ``` - * - * @param params - Parameters for request - * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. - * @param callback - Optional callback that handles the response. - * @returns A promise if used with async/await, or void if used with a callback. - */ - delete( - params: Params$Resource$Projects$Catalogtemplates$Delete, - options: StreamMethodOptions - ): GaxiosPromise; - delete( - params?: Params$Resource$Projects$Catalogtemplates$Delete, - options?: MethodOptions - ): GaxiosPromise; - delete( - params: Params$Resource$Projects$Catalogtemplates$Delete, - options: StreamMethodOptions | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - delete( - params: Params$Resource$Projects$Catalogtemplates$Delete, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - delete( - params: Params$Resource$Projects$Catalogtemplates$Delete, - callback: BodyResponseCallback - ): void; - delete(callback: BodyResponseCallback): void; - delete( - paramsOrCallback?: - | Params$Resource$Projects$Catalogtemplates$Delete - | BodyResponseCallback - | BodyResponseCallback, - optionsOrCallback?: - | MethodOptions - | StreamMethodOptions - | BodyResponseCallback - | BodyResponseCallback, - callback?: - | BodyResponseCallback - | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { - let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Catalogtemplates$Delete; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Catalogtemplates$Delete; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://dataflow.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: (rootUrl + '/v1b3/{+name}').replace(/([^:]\/)\/+/g, '$1'), - method: 'DELETE', - }, - options - ), - params, - requiredParams: ['name'], - pathParams: ['name'], - context: this.context, - }; - if (callback) { - createAPIRequest( - parameters, - callback as BodyResponseCallback - ); - } else { - return createAPIRequest(parameters); - } - } - - /** - * Get TemplateVersion using project_id and display_name with an optional version_id field. Get latest (has tag "latest") TemplateVersion if version_id not set. - * @example - * ```js - * // Before running the sample: - * // - Enable the API at: - * // https://console.developers.google.com/apis/api/dataflow.googleapis.com - * // - Login into gcloud by running: - * // `$ gcloud auth application-default login` - * // - Install the npm module by running: - * // `$ npm install googleapis` - * - * const {google} = require('googleapis'); - * const dataflow = google.dataflow('v1b3'); - * - * async function main() { - * const auth = new google.auth.GoogleAuth({ - * // Scopes can be specified either as an array or as a single, space-delimited string. - * scopes: [ - * 'https://www.googleapis.com/auth/cloud-platform', - * 'https://www.googleapis.com/auth/userinfo.email', - * ], - * }); - * - * // Acquire an auth client, and bind it to all future calls - * const authClient = await auth.getClient(); - * google.options({auth: authClient}); - * - * // Do the magic - * const res = await dataflow.projects.catalogTemplates.get({ - * // Resource name includes project_id and display_name. version_id is optional. Get the latest TemplateVersion if version_id not set. Get by project_id(pid1) and display_name(tid1): Format: projects/{pid1\}/catalogTemplates/{tid1\} Get by project_id(pid1), display_name(tid1), and version_id(vid1): Format: projects/{pid1\}/catalogTemplates/{tid1@vid\} - * name: 'projects/my-project/catalogTemplates/my-catalogTemplate', - * }); - * console.log(res.data); - * - * // Example response - * // { - * // "artifact": {}, - * // "createTime": "my_createTime", - * // "description": "my_description", - * // "displayName": "my_displayName", - * // "labels": {}, - * // "projectId": "my_projectId", - * // "tags": [], - * // "type": "my_type", - * // "versionId": "my_versionId" - * // } - * } - * - * main().catch(e => { - * console.error(e); - * throw e; - * }); - * - * ``` - * - * @param params - Parameters for request - * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. - * @param callback - Optional callback that handles the response. - * @returns A promise if used with async/await, or void if used with a callback. - */ - get( - params: Params$Resource$Projects$Catalogtemplates$Get, - options: StreamMethodOptions - ): GaxiosPromise; - get( - params?: Params$Resource$Projects$Catalogtemplates$Get, - options?: MethodOptions - ): GaxiosPromise; - get( - params: Params$Resource$Projects$Catalogtemplates$Get, - options: StreamMethodOptions | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - get( - params: Params$Resource$Projects$Catalogtemplates$Get, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - get( - params: Params$Resource$Projects$Catalogtemplates$Get, - callback: BodyResponseCallback - ): void; - get(callback: BodyResponseCallback): void; - get( - paramsOrCallback?: - | Params$Resource$Projects$Catalogtemplates$Get - | BodyResponseCallback - | BodyResponseCallback, - optionsOrCallback?: - | MethodOptions - | StreamMethodOptions - | BodyResponseCallback - | BodyResponseCallback, - callback?: - | BodyResponseCallback - | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { - let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Catalogtemplates$Get; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Catalogtemplates$Get; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://dataflow.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: (rootUrl + '/v1b3/{+name}').replace(/([^:]\/)\/+/g, '$1'), - method: 'GET', - }, - options - ), - params, - requiredParams: ['name'], - pathParams: ['name'], - context: this.context, - }; - if (callback) { - createAPIRequest( - parameters, - callback as BodyResponseCallback - ); - } else { - return createAPIRequest(parameters); - } - } - - /** - * Updates the label of the TemplateVersion. Label can be duplicated in Template, so either add or remove the label in the TemplateVersion. - * @example - * ```js - * // Before running the sample: - * // - Enable the API at: - * // https://console.developers.google.com/apis/api/dataflow.googleapis.com - * // - Login into gcloud by running: - * // `$ gcloud auth application-default login` - * // - Install the npm module by running: - * // `$ npm install googleapis` - * - * const {google} = require('googleapis'); - * const dataflow = google.dataflow('v1b3'); - * - * async function main() { - * const auth = new google.auth.GoogleAuth({ - * // Scopes can be specified either as an array or as a single, space-delimited string. - * scopes: [ - * 'https://www.googleapis.com/auth/cloud-platform', - * 'https://www.googleapis.com/auth/userinfo.email', - * ], - * }); - * - * // Acquire an auth client, and bind it to all future calls - * const authClient = await auth.getClient(); - * google.options({auth: authClient}); - * - * // Do the magic - * const res = await dataflow.projects.catalogTemplates.label({ - * // Resource name includes project_id, display_name, and version_id. Updates by project_id(pid1), display_name(tid1), and version_id(vid1): Format: projects/{pid1\}/catalogTemplates/{tid1@vid\} - * name: 'projects/my-project/catalogTemplates/my-catalogTemplate', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "key": "my_key", - * // "op": "my_op", - * // "value": "my_value" - * // } - * }, - * }); - * console.log(res.data); - * - * // Example response - * // { - * // "labels": {} - * // } - * } - * - * main().catch(e => { - * console.error(e); - * throw e; - * }); - * - * ``` - * - * @param params - Parameters for request - * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. - * @param callback - Optional callback that handles the response. - * @returns A promise if used with async/await, or void if used with a callback. - */ - label( - params: Params$Resource$Projects$Catalogtemplates$Label, - options: StreamMethodOptions - ): GaxiosPromise; - label( - params?: Params$Resource$Projects$Catalogtemplates$Label, - options?: MethodOptions - ): GaxiosPromise; - label( - params: Params$Resource$Projects$Catalogtemplates$Label, - options: StreamMethodOptions | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - label( - params: Params$Resource$Projects$Catalogtemplates$Label, - options: - | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - label( - params: Params$Resource$Projects$Catalogtemplates$Label, - callback: BodyResponseCallback - ): void; - label( - callback: BodyResponseCallback - ): void; - label( - paramsOrCallback?: - | Params$Resource$Projects$Catalogtemplates$Label - | BodyResponseCallback - | BodyResponseCallback, - optionsOrCallback?: - | MethodOptions - | StreamMethodOptions - | BodyResponseCallback - | BodyResponseCallback, - callback?: - | BodyResponseCallback - | BodyResponseCallback - ): - | void - | GaxiosPromise - | GaxiosPromise { - let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Catalogtemplates$Label; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Catalogtemplates$Label; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://dataflow.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: (rootUrl + '/v1b3/{+name}:label').replace( - /([^:]\/)\/+/g, - '$1' - ), - method: 'POST', - }, - options - ), - params, - requiredParams: ['name'], - pathParams: ['name'], - context: this.context, - }; - if (callback) { - createAPIRequest( - parameters, - callback as BodyResponseCallback - ); - } else { - return createAPIRequest( - parameters - ); - } - } - - /** - * Updates the tag of the TemplateVersion, and tag is unique in Template. If tag exists in another TemplateVersion in the Template, updates the tag to this TemplateVersion will remove it from the old TemplateVersion and add it to this TemplateVersion. If request is remove_only (remove_only = true), remove the tag from this TemplateVersion. - * @example - * ```js - * // Before running the sample: - * // - Enable the API at: - * // https://console.developers.google.com/apis/api/dataflow.googleapis.com - * // - Login into gcloud by running: - * // `$ gcloud auth application-default login` - * // - Install the npm module by running: - * // `$ npm install googleapis` - * - * const {google} = require('googleapis'); - * const dataflow = google.dataflow('v1b3'); - * - * async function main() { - * const auth = new google.auth.GoogleAuth({ - * // Scopes can be specified either as an array or as a single, space-delimited string. - * scopes: [ - * 'https://www.googleapis.com/auth/cloud-platform', - * 'https://www.googleapis.com/auth/userinfo.email', - * ], - * }); - * - * // Acquire an auth client, and bind it to all future calls - * const authClient = await auth.getClient(); - * google.options({auth: authClient}); - * - * // Do the magic - * const res = await dataflow.projects.catalogTemplates.tag({ - * // Resource name includes project_id, display_name, and version_id. Updates by project_id(pid1), display_name(tid1), and version_id(vid1): Format: projects/{pid1\}/catalogTemplates/{tid1@vid\} - * name: 'projects/my-project/catalogTemplates/my-catalogTemplate', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "removeOnly": false, - * // "tag": "my_tag" - * // } - * }, - * }); - * console.log(res.data); - * - * // Example response - * // { - * // "tags": [] - * // } - * } - * - * main().catch(e => { - * console.error(e); - * throw e; - * }); - * - * ``` - * - * @param params - Parameters for request - * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. - * @param callback - Optional callback that handles the response. - * @returns A promise if used with async/await, or void if used with a callback. - */ - tag( - params: Params$Resource$Projects$Catalogtemplates$Tag, - options: StreamMethodOptions - ): GaxiosPromise; - tag( - params?: Params$Resource$Projects$Catalogtemplates$Tag, - options?: MethodOptions - ): GaxiosPromise; - tag( - params: Params$Resource$Projects$Catalogtemplates$Tag, - options: StreamMethodOptions | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - tag( - params: Params$Resource$Projects$Catalogtemplates$Tag, - options: - | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - tag( - params: Params$Resource$Projects$Catalogtemplates$Tag, - callback: BodyResponseCallback - ): void; - tag( - callback: BodyResponseCallback - ): void; - tag( - paramsOrCallback?: - | Params$Resource$Projects$Catalogtemplates$Tag - | BodyResponseCallback - | BodyResponseCallback, - optionsOrCallback?: - | MethodOptions - | StreamMethodOptions - | BodyResponseCallback - | BodyResponseCallback, - callback?: - | BodyResponseCallback - | BodyResponseCallback - ): - | void - | GaxiosPromise - | GaxiosPromise { - let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Catalogtemplates$Tag; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Catalogtemplates$Tag; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://dataflow.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: (rootUrl + '/v1b3/{+name}:tag').replace(/([^:]\/)\/+/g, '$1'), - method: 'POST', - }, - options - ), - params, - requiredParams: ['name'], - pathParams: ['name'], + pathParams: ['projectId'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest( - parameters - ); + return createAPIRequest(parameters); } } - } - - export interface Params$Resource$Projects$Catalogtemplates$Commit - extends StandardParameters { - /** - * The location of the template, name includes project_id and display_name. Commit using project_id(pid1) and display_name(tid1). Format: projects/{pid1\}/catalogTemplates/{tid1\} - */ - name?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$CommitTemplateVersionRequest; - } - export interface Params$Resource$Projects$Catalogtemplates$Delete - extends StandardParameters { - /** - * name includes project_id and display_name. Delete by project_id(pid1) and display_name(tid1). Format: projects/{pid1\}/catalogTemplates/{tid1\} - */ - name?: string; - } - export interface Params$Resource$Projects$Catalogtemplates$Get - extends StandardParameters { - /** - * Resource name includes project_id and display_name. version_id is optional. Get the latest TemplateVersion if version_id not set. Get by project_id(pid1) and display_name(tid1): Format: projects/{pid1\}/catalogTemplates/{tid1\} Get by project_id(pid1), display_name(tid1), and version_id(vid1): Format: projects/{pid1\}/catalogTemplates/{tid1@vid\} - */ - name?: string; - } - export interface Params$Resource$Projects$Catalogtemplates$Label - extends StandardParameters { - /** - * Resource name includes project_id, display_name, and version_id. Updates by project_id(pid1), display_name(tid1), and version_id(vid1): Format: projects/{pid1\}/catalogTemplates/{tid1@vid\} - */ - name?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$ModifyTemplateVersionLabelRequest; - } - export interface Params$Resource$Projects$Catalogtemplates$Tag - extends StandardParameters { - /** - * Resource name includes project_id, display_name, and version_id. Updates by project_id(pid1), display_name(tid1), and version_id(vid1): Format: projects/{pid1\}/catalogTemplates/{tid1@vid\} - */ - name?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$ModifyTemplateVersionTagRequest; - } - - export class Resource$Projects$Catalogtemplates$Templateversions { - context: APIRequestContext; - constructor(context: APIRequestContext) { - this.context = context; - } /** - * Creates a new Template with TemplateVersion. Requires project_id(projects) and template display_name(catalogTemplates). The template display_name is set by the user. + * Send a worker_message to the service. * @example * ```js * // Before running the sample: @@ -4824,6 +3732,8 @@ export namespace dataflow_v1b3 { * // Scopes can be specified either as an array or as a single, space-delimited string. * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/compute', + * 'https://www.googleapis.com/auth/compute.readonly', * 'https://www.googleapis.com/auth/userinfo.email', * ], * }); @@ -4833,15 +3743,16 @@ export namespace dataflow_v1b3 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dataflow.projects.catalogTemplates.templateVersions.create({ - * // The parent project and template that the TemplateVersion will be created under. Create using project_id(pid1) and display_name(tid1). Format: projects/{pid1\}/catalogTemplates/{tid1\} - * parent: 'projects/my-project/catalogTemplates/my-catalogTemplate', + * const res = await dataflow.projects.workerMessages({ + * // The project to send the WorkerMessages to. + * projectId: 'placeholder-value', * * // Request body metadata * requestBody: { * // request body parameters * // { - * // "templateVersion": {} + * // "location": "my_location", + * // "workerMessages": [] * // } * }, * }); @@ -4849,15 +3760,7 @@ export namespace dataflow_v1b3 { * * // Example response * // { - * // "artifact": {}, - * // "createTime": "my_createTime", - * // "description": "my_description", - * // "displayName": "my_displayName", - * // "labels": {}, - * // "projectId": "my_projectId", - * // "tags": [], - * // "type": "my_type", - * // "versionId": "my_versionId" + * // "workerMessageResponses": [] * // } * } * @@ -4873,50 +3776,57 @@ export namespace dataflow_v1b3 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - create( - params: Params$Resource$Projects$Catalogtemplates$Templateversions$Create, + workerMessages( + params: Params$Resource$Projects$Workermessages, options: StreamMethodOptions ): GaxiosPromise; - create( - params?: Params$Resource$Projects$Catalogtemplates$Templateversions$Create, + workerMessages( + params?: Params$Resource$Projects$Workermessages, options?: MethodOptions - ): GaxiosPromise; - create( - params: Params$Resource$Projects$Catalogtemplates$Templateversions$Create, + ): GaxiosPromise; + workerMessages( + params: Params$Resource$Projects$Workermessages, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - create( - params: Params$Resource$Projects$Catalogtemplates$Templateversions$Create, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + workerMessages( + params: Params$Resource$Projects$Workermessages, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - create( - params: Params$Resource$Projects$Catalogtemplates$Templateversions$Create, - callback: BodyResponseCallback + workerMessages( + params: Params$Resource$Projects$Workermessages, + callback: BodyResponseCallback ): void; - create(callback: BodyResponseCallback): void; - create( + workerMessages( + callback: BodyResponseCallback + ): void; + workerMessages( paramsOrCallback?: - | Params$Resource$Projects$Catalogtemplates$Templateversions$Create - | BodyResponseCallback + | Params$Resource$Projects$Workermessages + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { + ): + | void + | GaxiosPromise + | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Catalogtemplates$Templateversions$Create; + {}) as Params$Resource$Projects$Workermessages; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Catalogtemplates$Templateversions$Create; + params = {} as Params$Resource$Projects$Workermessages; options = {}; } @@ -4929,41 +3839,55 @@ export namespace dataflow_v1b3 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v1b3/{+parent}/templateVersions').replace( - /([^:]\/)\/+/g, - '$1' - ), + url: ( + rootUrl + '/v1b3/projects/{projectId}/WorkerMessages' + ).replace(/([^:]\/)\/+/g, '$1'), method: 'POST', }, options ), params, - requiredParams: ['parent'], - pathParams: ['parent'], + requiredParams: ['projectId'], + pathParams: ['projectId'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } } - export interface Params$Resource$Projects$Catalogtemplates$Templateversions$Create + export interface Params$Resource$Projects$Deletesnapshots + extends StandardParameters { + /** + * The location that contains this snapshot. + */ + location?: string; + /** + * The ID of the Cloud Platform project that the snapshot belongs to. + */ + projectId?: string; + /** + * The ID of the snapshot. + */ + snapshotId?: string; + } + export interface Params$Resource$Projects$Workermessages extends StandardParameters { /** - * The parent project and template that the TemplateVersion will be created under. Create using project_id(pid1) and display_name(tid1). Format: projects/{pid1\}/catalogTemplates/{tid1\} + * The project to send the WorkerMessages to. */ - parent?: string; + projectId?: string; /** * Request body metadata */ - requestBody?: Schema$CreateTemplateVersionRequest; + requestBody?: Schema$SendWorkerMessagesRequest; } export class Resource$Projects$Jobs { @@ -12208,173 +11132,4 @@ export namespace dataflow_v1b3 { */ requestBody?: Schema$LaunchTemplateParameters; } - - export class Resource$Projects$Templateversions { - context: APIRequestContext; - constructor(context: APIRequestContext) { - this.context = context; - } - - /** - * List TemplateVersions using project_id and an optional display_name field. List all the TemplateVersions in the Template if display set. List all the TemplateVersions in the Project if display_name not set. - * @example - * ```js - * // Before running the sample: - * // - Enable the API at: - * // https://console.developers.google.com/apis/api/dataflow.googleapis.com - * // - Login into gcloud by running: - * // `$ gcloud auth application-default login` - * // - Install the npm module by running: - * // `$ npm install googleapis` - * - * const {google} = require('googleapis'); - * const dataflow = google.dataflow('v1b3'); - * - * async function main() { - * const auth = new google.auth.GoogleAuth({ - * // Scopes can be specified either as an array or as a single, space-delimited string. - * scopes: [ - * 'https://www.googleapis.com/auth/cloud-platform', - * 'https://www.googleapis.com/auth/userinfo.email', - * ], - * }); - * - * // Acquire an auth client, and bind it to all future calls - * const authClient = await auth.getClient(); - * google.options({auth: authClient}); - * - * // Do the magic - * const res = await dataflow.projects.templateVersions.list({ - * // The maximum number of TemplateVersions to return per page. - * pageSize: 'placeholder-value', - * // The page token, received from a previous ListTemplateVersions call. Provide this to retrieve the subsequent page. - * pageToken: 'placeholder-value', - * // parent includes project_id, and display_name is optional. List by project_id(pid1) and display_name(tid1). Format: projects/{pid1\}/catalogTemplates/{tid1\} List by project_id(pid1). Format: projects/{pid1\} - * parent: 'projects/my-project', - * }); - * console.log(res.data); - * - * // Example response - * // { - * // "nextPageToken": "my_nextPageToken", - * // "templateVersions": [] - * // } - * } - * - * main().catch(e => { - * console.error(e); - * throw e; - * }); - * - * ``` - * - * @param params - Parameters for request - * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. - * @param callback - Optional callback that handles the response. - * @returns A promise if used with async/await, or void if used with a callback. - */ - list( - params: Params$Resource$Projects$Templateversions$List, - options: StreamMethodOptions - ): GaxiosPromise; - list( - params?: Params$Resource$Projects$Templateversions$List, - options?: MethodOptions - ): GaxiosPromise; - list( - params: Params$Resource$Projects$Templateversions$List, - options: StreamMethodOptions | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - list( - params: Params$Resource$Projects$Templateversions$List, - options: - | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - list( - params: Params$Resource$Projects$Templateversions$List, - callback: BodyResponseCallback - ): void; - list( - callback: BodyResponseCallback - ): void; - list( - paramsOrCallback?: - | Params$Resource$Projects$Templateversions$List - | BodyResponseCallback - | BodyResponseCallback, - optionsOrCallback?: - | MethodOptions - | StreamMethodOptions - | BodyResponseCallback - | BodyResponseCallback, - callback?: - | BodyResponseCallback - | BodyResponseCallback - ): - | void - | GaxiosPromise - | GaxiosPromise { - let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Templateversions$List; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Templateversions$List; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = options.rootUrl || 'https://dataflow.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: (rootUrl + '/v1b3/{+parent}/templateVersions').replace( - /([^:]\/)\/+/g, - '$1' - ), - method: 'GET', - }, - options - ), - params, - requiredParams: ['parent'], - pathParams: ['parent'], - context: this.context, - }; - if (callback) { - createAPIRequest( - parameters, - callback as BodyResponseCallback - ); - } else { - return createAPIRequest( - parameters - ); - } - } - } - - export interface Params$Resource$Projects$Templateversions$List - extends StandardParameters { - /** - * The maximum number of TemplateVersions to return per page. - */ - pageSize?: number; - /** - * The page token, received from a previous ListTemplateVersions call. Provide this to retrieve the subsequent page. - */ - pageToken?: string; - /** - * parent includes project_id, and display_name is optional. List by project_id(pid1) and display_name(tid1). Format: projects/{pid1\}/catalogTemplates/{tid1\} List by project_id(pid1). Format: projects/{pid1\} - */ - parent?: string; - } } diff --git a/src/apis/datafusion/v1.ts b/src/apis/datafusion/v1.ts index c33e84cd161..27dc4107741 100644 --- a/src/apis/datafusion/v1.ts +++ b/src/apis/datafusion/v1.ts @@ -742,15 +742,15 @@ export namespace datafusion_v1 { * * // Do the magic * const res = await datafusion.projects.locations.list({ - * // The standard list 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). * filter: 'placeholder-value', * // If true, the returned list will include locations which are not yet revealed. * includeUnrevealedLocations: 'placeholder-value', * // The resource that owns the locations collection, if applicable. * name: 'projects/my-project', - * // The standard list page size. + * // The maximum number of results to return. If not set, the service will select a default. * pageSize: 'placeholder-value', - * // The standard list page token. + * // A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. * pageToken: 'placeholder-value', * }); * console.log(res.data); @@ -869,7 +869,7 @@ export namespace datafusion_v1 { export interface Params$Resource$Projects$Locations$List extends StandardParameters { /** - * The standard list 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). */ filter?: string; /** @@ -881,11 +881,11 @@ export namespace datafusion_v1 { */ name?: string; /** - * The standard list page size. + * The maximum number of results to return. If not set, the service will select a default. */ pageSize?: number; /** - * The standard list page token. + * A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. */ pageToken?: string; } diff --git a/src/apis/datafusion/v1beta1.ts b/src/apis/datafusion/v1beta1.ts index f175a90d2ec..d6d32d91e96 100644 --- a/src/apis/datafusion/v1beta1.ts +++ b/src/apis/datafusion/v1beta1.ts @@ -746,15 +746,15 @@ export namespace datafusion_v1beta1 { * * // Do the magic * const res = await datafusion.projects.locations.list({ - * // The standard list 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). * filter: 'placeholder-value', * // If true, the returned list will include locations which are not yet revealed. * includeUnrevealedLocations: 'placeholder-value', * // The resource that owns the locations collection, if applicable. * name: 'projects/my-project', - * // The standard list page size. + * // The maximum number of results to return. If not set, the service will select a default. * pageSize: 'placeholder-value', - * // The standard list page token. + * // A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. * pageToken: 'placeholder-value', * }); * console.log(res.data); @@ -1013,7 +1013,7 @@ export namespace datafusion_v1beta1 { export interface Params$Resource$Projects$Locations$List extends StandardParameters { /** - * The standard list 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). */ filter?: string; /** @@ -1025,11 +1025,11 @@ export namespace datafusion_v1beta1 { */ name?: string; /** - * The standard list page size. + * The maximum number of results to return. If not set, the service will select a default. */ pageSize?: number; /** - * The standard list page token. + * A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. */ pageToken?: string; } diff --git a/src/apis/datamigration/index.ts b/src/apis/datamigration/index.ts index 792607f43d6..c63747009ee 100644 --- a/src/apis/datamigration/index.ts +++ b/src/apis/datamigration/index.ts @@ -14,27 +14,40 @@ /*! THIS FILE IS AUTO-GENERATED */ import {AuthPlus, getAPI, GoogleConfigurable} from 'googleapis-common'; +import {datamigration_v1} from './v1'; import {datamigration_v1beta1} from './v1beta1'; export const VERSIONS = { + v1: datamigration_v1.Datamigration, v1beta1: datamigration_v1beta1.Datamigration, }; +export function datamigration(version: 'v1'): datamigration_v1.Datamigration; +export function datamigration( + options: datamigration_v1.Options +): datamigration_v1.Datamigration; export function datamigration( version: 'v1beta1' ): datamigration_v1beta1.Datamigration; export function datamigration( options: datamigration_v1beta1.Options ): datamigration_v1beta1.Datamigration; -export function datamigration( +export function datamigration< + T = datamigration_v1.Datamigration | datamigration_v1beta1.Datamigration +>( this: GoogleConfigurable, - versionOrOptions: 'v1beta1' | datamigration_v1beta1.Options + versionOrOptions: + | 'v1' + | datamigration_v1.Options + | 'v1beta1' + | datamigration_v1beta1.Options ) { return getAPI('datamigration', versionOrOptions, VERSIONS, this); } const auth = new AuthPlus(); export {auth}; +export {datamigration_v1}; export {datamigration_v1beta1}; export { AuthPlus, diff --git a/src/apis/datamigration/v1.ts b/src/apis/datamigration/v1.ts new file mode 100644 index 00000000000..ec8c2f0f7c0 --- /dev/null +++ b/src/apis/datamigration/v1.ts @@ -0,0 +1,5482 @@ +// Copyright 2020 Google LLC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/* eslint-disable @typescript-eslint/no-explicit-any */ +/* eslint-disable @typescript-eslint/class-name-casing */ +/* eslint-disable @typescript-eslint/no-unused-vars */ +/* eslint-disable @typescript-eslint/no-empty-interface */ +/* eslint-disable @typescript-eslint/no-namespace */ +/* eslint-disable no-irregular-whitespace */ + +import { + OAuth2Client, + JWT, + Compute, + UserRefreshClient, + BaseExternalAccountClient, + GaxiosPromise, + GoogleConfigurable, + createAPIRequest, + MethodOptions, + StreamMethodOptions, + GlobalOptions, + GoogleAuth, + BodyResponseCallback, + APIRequestContext, +} from 'googleapis-common'; +import {Readable} from 'stream'; + +export namespace datamigration_v1 { + export interface Options extends GlobalOptions { + version: 'v1'; + } + + interface StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: + | string + | OAuth2Client + | JWT + | Compute + | UserRefreshClient + | BaseExternalAccountClient + | GoogleAuth; + + /** + * V1 error format. + */ + '$.xgafv'?: string; + /** + * OAuth access token. + */ + access_token?: string; + /** + * Data format for response. + */ + alt?: string; + /** + * JSONP + */ + callback?: string; + /** + * Selector specifying which fields to include in a partial response. + */ + fields?: string; + /** + * 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. + */ + key?: string; + /** + * OAuth 2.0 token for the current user. + */ + oauth_token?: string; + /** + * Returns response with indentations and line breaks. + */ + prettyPrint?: boolean; + /** + * 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. + */ + quotaUser?: string; + /** + * Legacy upload protocol for media (e.g. "media", "multipart"). + */ + uploadType?: string; + /** + * Upload protocol for media (e.g. "raw", "multipart"). + */ + upload_protocol?: string; + } + + /** + * Database Migration API + * + * Manage Cloud Database Migration Service resources on Google Cloud Platform. + * + * @example + * ```js + * const {google} = require('googleapis'); + * const datamigration = google.datamigration('v1'); + * ``` + */ + export class Datamigration { + context: APIRequestContext; + projects: Resource$Projects; + + constructor(options: GlobalOptions, google?: GoogleConfigurable) { + this.context = { + _options: options || {}, + google, + }; + + this.projects = new Resource$Projects(this.context); + } + } + + /** + * Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { "audit_configs": [ { "service": "allServices", "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] \}, { "log_type": "DATA_WRITE" \}, { "log_type": "ADMIN_READ" \} ] \}, { "service": "sampleservice.googleapis.com", "audit_log_configs": [ { "log_type": "DATA_READ" \}, { "log_type": "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] \} ] \} ] \} For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging. + */ + export interface Schema$AuditConfig { + /** + * The configuration for logging of each type of permission. + */ + auditLogConfigs?: Schema$AuditLogConfig[]; + /** + * Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services. + */ + service?: string | null; + } + /** + * Provides the configuration for logging a type of permissions. Example: { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] \}, { "log_type": "DATA_WRITE" \} ] \} This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging. + */ + export interface Schema$AuditLogConfig { + /** + * Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members. + */ + exemptedMembers?: string[] | null; + /** + * The log type that this config enables. + */ + logType?: string | null; + } + /** + * Associates `members` with a `role`. + */ + export interface Schema$Binding { + /** + * The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + */ + condition?: Schema$Expr; + /** + * Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid\}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid\}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid\}`: An email address that represents a Google group. For example, `admins@example.com`. * `deleted:user:{emailid\}?uid={uniqueid\}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid\}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid\}?uid={uniqueid\}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid\}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid\}?uid={uniqueid\}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid\}` and the recovered group retains the role in the binding. * `domain:{domain\}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. + */ + members?: string[] | null; + /** + * Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + */ + role?: string | null; + } + /** + * The request message for Operations.CancelOperation. + */ + export interface Schema$CancelOperationRequest {} + /** + * Specifies required connection parameters, and, optionally, the parameters required to create a Cloud SQL destination database instance. + */ + export interface Schema$CloudSqlConnectionProfile { + /** + * Output only. The Cloud SQL instance ID that this connection profile is associated with. + */ + cloudSqlId?: string | null; + /** + * Output only. The Cloud SQL database instance's private IP. + */ + privateIp?: string | null; + /** + * Output only. The Cloud SQL database instance's public IP. + */ + publicIp?: string | null; + /** + * Immutable. Metadata used to create the destination Cloud SQL database. + */ + settings?: Schema$CloudSqlSettings; + } + /** + * Settings for creating a Cloud SQL database instance. + */ + export interface Schema$CloudSqlSettings { + /** + * The activation policy specifies when the instance is activated; it is applicable only when the instance state is 'RUNNABLE'. Valid values: 'ALWAYS': The instance is on, and remains so even in the absence of connection requests. `NEVER`: The instance is off; it is not activated, even if a connection request arrives. + */ + activationPolicy?: string | null; + /** + * [default: ON] If you enable this setting, Cloud SQL checks your available storage every 30 seconds. If the available storage falls below a threshold size, Cloud SQL automatically adds additional storage capacity. If the available storage repeatedly falls below the threshold size, Cloud SQL continues to add storage until it reaches the maximum of 30 TB. + */ + autoStorageIncrease?: boolean | null; + /** + * The Cloud SQL default instance level collation. + */ + collation?: string | null; + /** + * The database flags passed to the Cloud SQL instance at startup. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" \}. + */ + databaseFlags?: {[key: string]: string} | null; + /** + * The database engine type and version. + */ + databaseVersion?: string | null; + /** + * The storage capacity available to the database, in GB. The minimum (and default) size is 10GB. + */ + dataDiskSizeGb?: string | null; + /** + * The type of storage: `PD_SSD` (default) or `PD_HDD`. + */ + dataDiskType?: string | null; + /** + * The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance. The IPv4 address cannot be disabled. + */ + ipConfig?: Schema$SqlIpConfig; + /** + * Input only. Initial root password. + */ + rootPassword?: string | null; + /** + * Output only. Indicates If this connection profile root password is stored. + */ + rootPasswordSet?: boolean | null; + /** + * The Database Migration Service source connection profile ID, in the format: `projects/my_project_name/locations/us-central1/connectionProfiles/connection_profile_ID` + */ + sourceId?: string | null; + /** + * The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit. + */ + storageAutoResizeLimit?: string | null; + /** + * The tier (or machine type) for this instance, for example: `db-n1-standard-1` (MySQL instances) or `db-custom-1-3840` (PostgreSQL instances). For more information, see [Cloud SQL Instance Settings](https://cloud.google.com/sql/docs/mysql/instance-settings). + */ + tier?: string | null; + /** + * The resource labels for a Cloud SQL instance to use to annotate any related underlying resources such as Compute Engine VMs. An object containing a list of "key": "value" pairs. Example: `{ "name": "wrench", "mass": "18kg", "count": "3" \}`. + */ + userLabels?: {[key: string]: string} | null; + /** + * The Google Cloud Platform zone where your Cloud SQL datdabse instance is located. + */ + zone?: string | null; + } + /** + * A connection profile definition. + */ + export interface Schema$ConnectionProfile { + /** + * A CloudSQL database connection profile. + */ + cloudsql?: Schema$CloudSqlConnectionProfile; + /** + * Output only. The timestamp when the resource was created. A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds. Example: "2014-10-02T15:01:23.045123456Z". + */ + createTime?: string | null; + /** + * The connection profile display name. + */ + displayName?: string | null; + /** + * Output only. The error details in case of state FAILED. + */ + error?: Schema$Status; + /** + * The resource labels for connection profile to use to annotate any related underlying resources such as Compute Engine VMs. An object containing a list of "key": "value" pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" \}`. + */ + labels?: {[key: string]: string} | null; + /** + * A MySQL database connection profile. + */ + mysql?: Schema$MySqlConnectionProfile; + /** + * The name of this connection profile resource in the form of projects/{project\}/locations/{location\}/instances/{instance\}. + */ + name?: string | null; + /** + * A PostgreSQL database connection profile. + */ + postgresql?: Schema$PostgreSqlConnectionProfile; + /** + * The database provider. + */ + provider?: string | null; + /** + * The current connection profile state (e.g. DRAFT, READY, or FAILED). + */ + state?: string | null; + /** + * Output only. The timestamp when the resource was last updated. A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds. Example: "2014-10-02T15:01:23.045123456Z". + */ + updateTime?: string | null; + } + /** + * A message defining the database engine and provider. + */ + export interface Schema$DatabaseType { + /** + * The database engine. + */ + engine?: string | null; + /** + * The database provider. + */ + provider?: string | null; + } + /** + * 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); \} The JSON representation for `Empty` is empty JSON object `{\}`. + */ + export interface Schema$Empty {} + /** + * Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. + */ + export interface Schema$Expr { + /** + * Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. + */ + description?: string | null; + /** + * Textual representation of an expression in Common Expression Language syntax. + */ + expression?: string | null; + /** + * Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file. + */ + location?: string | null; + /** + * Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression. + */ + title?: string | null; + } + /** + * Request message for 'GenerateSshScript' request. + */ + export interface Schema$GenerateSshScriptRequest { + /** + * Required. Bastion VM Instance name to use or to create. + */ + vm?: string | null; + /** + * The VM creation configuration + */ + vmCreationConfig?: Schema$VmCreationConfig; + /** + * The port that will be open on the bastion host + */ + vmPort?: number | null; + /** + * The VM selection configuration + */ + vmSelectionConfig?: Schema$VmSelectionConfig; + } + /** + * Represents the metadata of the long-running operation. + */ + export interface Schema$GoogleCloudClouddmsV1OperationMetadata { + /** + * Output only. API version used to start the operation. + */ + apiVersion?: string | null; + /** + * Output only. The time the operation was created. + */ + createTime?: string | null; + /** + * Output only. The time the operation finished running. + */ + endTime?: string | null; + /** + * 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?: boolean | null; + /** + * Output only. Human-readable status of the operation, if any. + */ + statusMessage?: string | null; + /** + * Output only. Server-defined resource path for the target of the operation. + */ + target?: string | null; + /** + * Output only. Name of the verb executed by the operation. + */ + verb?: string | null; + } + /** + * Response message for 'ListConnectionProfiles' request. + */ + export interface Schema$ListConnectionProfilesResponse { + /** + * The response list of connection profiles. + */ + connectionProfiles?: Schema$ConnectionProfile[]; + /** + * A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. + */ + nextPageToken?: string | null; + /** + * Locations that could not be reached. + */ + unreachable?: string[] | null; + } + /** + * The response message for Locations.ListLocations. + */ + export interface Schema$ListLocationsResponse { + /** + * A list of locations that matches the specified filter in the request. + */ + locations?: Schema$Location[]; + /** + * The standard List next-page token. + */ + nextPageToken?: string | null; + } + /** + * Response message for 'ListMigrationJobs' request. + */ + export interface Schema$ListMigrationJobsResponse { + /** + * The list of migration jobs objects. + */ + migrationJobs?: Schema$MigrationJob[]; + /** + * A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. + */ + nextPageToken?: string | null; + /** + * Locations that could not be reached. + */ + unreachable?: string[] | null; + } + /** + * The response message for Operations.ListOperations. + */ + export interface Schema$ListOperationsResponse { + /** + * The standard List next-page token. + */ + nextPageToken?: string | null; + /** + * A list of operations that matches the specified filter in the request. + */ + operations?: Schema$Operation[]; + } + /** + * A resource that represents Google Cloud Platform location. + */ + export interface Schema$Location { + /** + * The friendly name for this location, typically a nearby city name. For example, "Tokyo". + */ + displayName?: string | null; + /** + * Cross-service attributes for the location. For example {"cloud.googleapis.com/region": "us-east1"\} + */ + labels?: {[key: string]: string} | null; + /** + * The canonical id for this location. For example: `"us-east1"`. + */ + locationId?: string | null; + /** + * Service-specific metadata. For example the available capacity at the given location. + */ + metadata?: {[key: string]: any} | null; + /** + * Resource name for the location, which may vary between implementations. For example: `"projects/example-project/locations/us-east1"` + */ + name?: string | null; + } + /** + * Represents a Database Migration Service migration job object. + */ + export interface Schema$MigrationJob { + /** + * Output only. The timestamp when the migration job resource was created. A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds. Example: "2014-10-02T15:01:23.045123456Z". + */ + createTime?: string | null; + /** + * Required. The resource name (URI) of the destination connection profile. + */ + destination?: string | null; + /** + * The database engine type and provider of the destination. + */ + destinationDatabase?: Schema$DatabaseType; + /** + * The migration job display name. + */ + displayName?: string | null; + /** + * The path to the dump file in Google Cloud Storage, in the format: (gs://[BUCKET_NAME]/[OBJECT_NAME]). + */ + dumpPath?: string | null; + /** + * Output only. The duration of the migration job (in seconds). A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s". + */ + duration?: string | null; + /** + * Output only. If the migration job is completed, the time when it was completed. + */ + endTime?: string | null; + /** + * Output only. The error details in case of state FAILED. + */ + error?: Schema$Status; + /** + * The resource labels for migration job to use to annotate any related underlying resources such as Compute Engine VMs. An object containing a list of "key": "value" pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" \}`. + */ + labels?: {[key: string]: string} | null; + /** + * The name (URI) of this migration job resource, in the form of: projects/{project\}/locations/{location\}/instances/{instance\}. + */ + name?: string | null; + /** + * Output only. The current migration job phase. + */ + phase?: string | null; + /** + * The details needed to communicate to the source over Reverse SSH tunnel connectivity. + */ + reverseSshConnectivity?: Schema$ReverseSshConnectivity; + /** + * Required. The resource name (URI) of the source connection profile. + */ + source?: string | null; + /** + * The database engine type and provider of the source. + */ + sourceDatabase?: Schema$DatabaseType; + /** + * The current migration job state. + */ + state?: string | null; + /** + * static ip connectivity data (default, no additional details needed). + */ + staticIpConnectivity?: Schema$StaticIpConnectivity; + /** + * Required. The migration job type. + */ + type?: string | null; + /** + * Output only. The timestamp when the migration job resource was last updated. A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds. Example: "2014-10-02T15:01:23.045123456Z". + */ + updateTime?: string | null; + /** + * The details of the VPC network that the source database is located in. + */ + vpcPeeringConnectivity?: Schema$VpcPeeringConnectivity; + } + /** + * Error message of a verification Migration job. + */ + export interface Schema$MigrationJobVerificationError { + /** + * Output only. An instance of ErrorCode specifying the error that occurred. + */ + errorCode?: string | null; + /** + * Output only. A specific detailed error message, if supplied by the engine. + */ + errorDetailMessage?: string | null; + /** + * Output only. A formatted message with further details about the error and a CTA. + */ + errorMessage?: string | null; + } + /** + * Specifies connection parameters required specifically for MySQL databases. + */ + export interface Schema$MySqlConnectionProfile { + /** + * If the source is a Cloud SQL database, use this field to provide the Cloud SQL instance ID of the source. + */ + cloudSqlId?: string | null; + /** + * Required. The IP or hostname of the source MySQL database. + */ + host?: string | null; + /** + * Required. Input only. The password for the user that Database Migration Service will be using to connect to the database. This field is not returned on request, and the value is encrypted when stored in Database Migration Service. + */ + password?: string | null; + /** + * Output only. Indicates If this connection profile password is stored. + */ + passwordSet?: boolean | null; + /** + * Required. The network port of the source MySQL database. + */ + port?: number | null; + /** + * SSL configuration for the destination to connect to the source database. + */ + ssl?: Schema$SslConfig; + /** + * Required. The username that Database Migration Service will use to connect to the database. The value is encrypted when stored in Database Migration Service. + */ + username?: string | null; + } + /** + * This resource represents a long-running operation that is the result of a network API call. + */ + export interface Schema$Operation { + /** + * 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?: boolean | null; + /** + * The error result of the operation in case of failure or cancellation. + */ + error?: Schema$Status; + /** + * 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?: {[key: string]: any} | null; + /** + * 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 | null; + /** + * The normal response of the operation in case of success. 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?: {[key: string]: any} | null; + } + /** + * An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] \}, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", \} \} ], "etag": "BwWWja0YfJA=", "version": 3 \} **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/). + */ + export interface Schema$Policy { + /** + * Specifies cloud audit logging configuration for this policy. + */ + auditConfigs?: Schema$AuditConfig[]; + /** + * Associates a list of `members` to a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one member. + */ + bindings?: Schema$Binding[]; + /** + * `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. + */ + etag?: string | null; + /** + * Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + */ + version?: number | null; + } + /** + * Specifies connection parameters required specifically for PostgreSQL databases. + */ + export interface Schema$PostgreSqlConnectionProfile { + /** + * If the source is a Cloud SQL database, use this field to provide the Cloud SQL instance ID of the source. + */ + cloudSqlId?: string | null; + /** + * Required. The IP or hostname of the source PostgreSQL database. + */ + host?: string | null; + /** + * Required. Input only. The password for the user that Database Migration Service will be using to connect to the database. This field is not returned on request, and the value is encrypted when stored in Database Migration Service. + */ + password?: string | null; + /** + * Output only. Indicates If this connection profile password is stored. + */ + passwordSet?: boolean | null; + /** + * Required. The network port of the source PostgreSQL database. + */ + port?: number | null; + /** + * SSL configuration for the destination to connect to the source database. + */ + ssl?: Schema$SslConfig; + /** + * Required. The username that Database Migration Service will use to connect to the database. The value is encrypted when stored in Database Migration Service. + */ + username?: string | null; + } + /** + * Request message for 'PromoteMigrationJob' request. + */ + export interface Schema$PromoteMigrationJobRequest {} + /** + * Request message for 'RestartMigrationJob' request. + */ + export interface Schema$RestartMigrationJobRequest {} + /** + * Request message for 'ResumeMigrationJob' request. + */ + export interface Schema$ResumeMigrationJobRequest {} + /** + * The details needed to configure a reverse SSH tunnel between the source and destination databases. These details will be used when calling the generateSshScript method (see https://cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.migrationJobs/generateSshScript) to produce the script that will help set up the reverse SSH tunnel, and to set up the VPC peering between the Cloud SQL private network and the VPC. + */ + export interface Schema$ReverseSshConnectivity { + /** + * The name of the virtual machine (Compute Engine) used as the bastion server for the SSH tunnel. + */ + vm?: string | null; + /** + * Required. The IP of the virtual machine (Compute Engine) used as the bastion server for the SSH tunnel. + */ + vmIp?: string | null; + /** + * Required. The forwarding port of the virtual machine (Compute Engine) used as the bastion server for the SSH tunnel. + */ + vmPort?: number | null; + /** + * The name of the VPC to peer with the Cloud SQL private network. + */ + vpc?: string | null; + } + /** + * Request message for `SetIamPolicy` method. + */ + export interface Schema$SetIamPolicyRequest { + /** + * REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them. + */ + policy?: Schema$Policy; + /** + * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used: `paths: "bindings, etag"` + */ + updateMask?: string | null; + } + /** + * An entry for an Access Control list. + */ + export interface Schema$SqlAclEntry { + /** + * The time when this access control entry expires in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example: `2012-11-15T16:19:00.094Z`. + */ + expireTime?: string | null; + /** + * A label to identify this entry. + */ + label?: string | null; + /** + * Input only. The time-to-leave of this access control entry. + */ + ttl?: string | null; + /** + * The allowlisted value for the access control list. + */ + value?: string | null; + } + /** + * IP Management configuration. + */ + export interface Schema$SqlIpConfig { + /** + * The list of external networks that are allowed to connect to the instance using the IP. See https://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation, also known as 'slash' notation (e.g. `192.168.100.0/24`). + */ + authorizedNetworks?: Schema$SqlAclEntry[]; + /** + * Whether the instance should be assigned an IPv4 address or not. + */ + enableIpv4?: boolean | null; + /** + * The resource link for the VPC network from which the Cloud SQL instance is accessible for private IP. For example, `/projects/myProject/global/networks/default`. This setting can be updated, but it cannot be removed after it is set. + */ + privateNetwork?: string | null; + /** + * Whether SSL connections over IP should be enforced or not. + */ + requireSsl?: boolean | null; + } + /** + * Response message for 'GenerateSshScript' request. + */ + export interface Schema$SshScript { + /** + * The ssh configuration script. + */ + script?: string | null; + } + /** + * SSL configuration information. + */ + export interface Schema$SslConfig { + /** + * Required. Input only. The x509 PEM-encoded certificate of the CA that signed the source database server's certificate. The replica will use this certificate to verify it's connecting to the right host. + */ + caCertificate?: string | null; + /** + * Input only. The x509 PEM-encoded certificate that will be used by the replica to authenticate against the source database server.If this field is used then the 'client_key' field is mandatory. + */ + clientCertificate?: string | null; + /** + * Input only. The unencrypted PKCS#1 or PKCS#8 PEM-encoded private key associated with the Client Certificate. If this field is used then the 'client_certificate' field is mandatory. + */ + clientKey?: string | null; + /** + * Output only. The ssl config type according to 'client_key', 'client_certificate' and 'ca_certificate'. + */ + type?: string | null; + } + /** + * Request message for 'StartMigrationJob' request. + */ + export interface Schema$StartMigrationJobRequest {} + /** + * The source database will allow incoming connections from the destination database's public IP. You can retrieve the Cloud SQL instance's public IP from the Cloud SQL console or using Cloud SQL APIs. No additional configuration is required. + */ + export interface Schema$StaticIpConnectivity {} + /** + * 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). + */ + export interface Schema$Status { + /** + * The status code, which should be an enum value of google.rpc.Code. + */ + code?: number | null; + /** + * A list of messages that carry the error details. There is a common set of message types for APIs to use. + */ + details?: Array<{[key: string]: any}> | null; + /** + * 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 | null; + } + /** + * Request message for 'StopMigrationJob' request. + */ + export interface Schema$StopMigrationJobRequest {} + /** + * Request message for `TestIamPermissions` method. + */ + export interface Schema$TestIamPermissionsRequest { + /** + * The set of permissions to check for the `resource`. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + */ + permissions?: string[] | null; + } + /** + * Response message for `TestIamPermissions` method. + */ + export interface Schema$TestIamPermissionsResponse { + /** + * A subset of `TestPermissionsRequest.permissions` that the caller is allowed. + */ + permissions?: string[] | null; + } + /** + * Request message for 'VerifyMigrationJob' request. + */ + export interface Schema$VerifyMigrationJobRequest {} + /** + * VM creation configuration message + */ + export interface Schema$VmCreationConfig { + /** + * The subnet name the vm needs to be created in. + */ + subnet?: string | null; + /** + * Required. VM instance machine type to create. + */ + vmMachineType?: string | null; + /** + * The Google Cloud Platform zone to create the VM in. + */ + vmZone?: string | null; + } + /** + * VM selection configuration message + */ + export interface Schema$VmSelectionConfig { + /** + * Required. The Google Cloud Platform zone the VM is located. + */ + vmZone?: string | null; + } + /** + * The details of the VPC where the source database is located in Google Cloud. We will use this information to set up the VPC peering connection between Cloud SQL and this VPC. + */ + export interface Schema$VpcPeeringConnectivity { + /** + * The name of the VPC network to peer with the Cloud SQL private network. + */ + vpc?: string | null; + } + + export class Resource$Projects { + context: APIRequestContext; + locations: Resource$Projects$Locations; + constructor(context: APIRequestContext) { + this.context = context; + this.locations = new Resource$Projects$Locations(this.context); + } + } + + export class Resource$Projects$Locations { + context: APIRequestContext; + connectionProfiles: Resource$Projects$Locations$Connectionprofiles; + migrationJobs: Resource$Projects$Locations$Migrationjobs; + operations: Resource$Projects$Locations$Operations; + constructor(context: APIRequestContext) { + this.context = context; + this.connectionProfiles = new Resource$Projects$Locations$Connectionprofiles( + this.context + ); + this.migrationJobs = new Resource$Projects$Locations$Migrationjobs( + this.context + ); + this.operations = new Resource$Projects$Locations$Operations( + this.context + ); + } + + /** + * Gets information about a location. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/datamigration.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const datamigration = google.datamigration('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await datamigration.projects.locations.get({ + * // Resource name for the location. + * name: 'projects/my-project/locations/my-location', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "displayName": "my_displayName", + * // "labels": {}, + * // "locationId": "my_locationId", + * // "metadata": {}, + * // "name": "my_name" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Projects$Locations$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Projects$Locations$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://datamigration.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Lists information about the supported locations for this service. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/datamigration.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const datamigration = google.datamigration('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await datamigration.projects.locations.list({ + * // 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). + * filter: 'placeholder-value', + * // The resource that owns the locations collection, if applicable. + * name: 'projects/my-project', + * // The maximum number of results to return. If not set, the service will select a default. + * pageSize: 'placeholder-value', + * // A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. + * pageToken: 'placeholder-value', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "locations": [], + * // "nextPageToken": "my_nextPageToken" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Projects$Locations$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Projects$Locations$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$List, + callback: BodyResponseCallback + ): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Locations$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://datamigration.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}/locations').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Locations$Get + extends StandardParameters { + /** + * Resource name for the location. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$List + extends StandardParameters { + /** + * 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). + */ + filter?: string; + /** + * The resource that owns the locations collection, if applicable. + */ + name?: string; + /** + * The maximum number of results to return. If not set, the service will select a default. + */ + pageSize?: number; + /** + * A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. + */ + pageToken?: string; + } + + export class Resource$Projects$Locations$Connectionprofiles { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Creates a new connection profile in a given project and location. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/datamigration.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const datamigration = google.datamigration('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await datamigration.projects.locations.connectionProfiles.create({ + * // Required. The connection profile identifier. + * connectionProfileId: 'placeholder-value', + * // Required. The parent, which owns this collection of connection profiles. + * parent: 'projects/my-project/locations/my-location', + * // A unique id used to identify the request. If the server receives two requests with the same id, then the second request will be ignored. It is recommended to always set this value to a UUID. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters. + * requestId: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "cloudsql": {}, + * // "createTime": "my_createTime", + * // "displayName": "my_displayName", + * // "error": {}, + * // "labels": {}, + * // "mysql": {}, + * // "name": "my_name", + * // "postgresql": {}, + * // "provider": "my_provider", + * // "state": "my_state", + * // "updateTime": "my_updateTime" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + create( + params: Params$Resource$Projects$Locations$Connectionprofiles$Create, + options: StreamMethodOptions + ): GaxiosPromise; + create( + params?: Params$Resource$Projects$Locations$Connectionprofiles$Create, + options?: MethodOptions + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Locations$Connectionprofiles$Create, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Locations$Connectionprofiles$Create, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Locations$Connectionprofiles$Create, + callback: BodyResponseCallback + ): void; + create(callback: BodyResponseCallback): void; + create( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Connectionprofiles$Create + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Connectionprofiles$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Connectionprofiles$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://datamigration.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+parent}/connectionProfiles').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Deletes a single Database Migration Service connection profile. A connection profile can only be deleted if it is not in use by any active migration jobs. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/datamigration.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const datamigration = google.datamigration('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await datamigration.projects.locations.connectionProfiles.delete({ + * // In case of force delete, the CloudSQL replica database is also deleted (only for CloudSQL connection profile). + * force: 'placeholder-value', + * // Required. Name of the connection profile resource to delete. + * name: + * 'projects/my-project/locations/my-location/connectionProfiles/my-connectionProfile', + * // A unique id used to identify the request. If the server receives two requests with the same id, then the second request will be ignored. It is recommended to always set this value to a UUID. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters. + * requestId: 'placeholder-value', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + delete( + params: Params$Resource$Projects$Locations$Connectionprofiles$Delete, + options: StreamMethodOptions + ): GaxiosPromise; + delete( + params?: Params$Resource$Projects$Locations$Connectionprofiles$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Locations$Connectionprofiles$Delete, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Connectionprofiles$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Connectionprofiles$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Connectionprofiles$Delete + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Connectionprofiles$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Connectionprofiles$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://datamigration.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Gets details of a single connection profile. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/datamigration.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const datamigration = google.datamigration('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await datamigration.projects.locations.connectionProfiles.get({ + * // Required. Name of the connection profile resource to get. + * name: + * 'projects/my-project/locations/my-location/connectionProfiles/my-connectionProfile', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "cloudsql": {}, + * // "createTime": "my_createTime", + * // "displayName": "my_displayName", + * // "error": {}, + * // "labels": {}, + * // "mysql": {}, + * // "name": "my_name", + * // "postgresql": {}, + * // "provider": "my_provider", + * // "state": "my_state", + * // "updateTime": "my_updateTime" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Projects$Locations$Connectionprofiles$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Projects$Locations$Connectionprofiles$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Connectionprofiles$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Connectionprofiles$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Connectionprofiles$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Connectionprofiles$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Connectionprofiles$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Connectionprofiles$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://datamigration.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/datamigration.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const datamigration = google.datamigration('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await datamigration.projects.locations.connectionProfiles.getIamPolicy( + * { + * // Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + * 'options.requestedPolicyVersion': 'placeholder-value', + * // REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. + * resource: + * 'projects/my-project/locations/my-location/connectionProfiles/my-connectionProfile', + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "auditConfigs": [], + * // "bindings": [], + * // "etag": "my_etag", + * // "version": 0 + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + getIamPolicy( + params: Params$Resource$Projects$Locations$Connectionprofiles$Getiampolicy, + options: StreamMethodOptions + ): GaxiosPromise; + getIamPolicy( + params?: Params$Resource$Projects$Locations$Connectionprofiles$Getiampolicy, + options?: MethodOptions + ): GaxiosPromise; + getIamPolicy( + params: Params$Resource$Projects$Locations$Connectionprofiles$Getiampolicy, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getIamPolicy( + params: Params$Resource$Projects$Locations$Connectionprofiles$Getiampolicy, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getIamPolicy( + params: Params$Resource$Projects$Locations$Connectionprofiles$Getiampolicy, + callback: BodyResponseCallback + ): void; + getIamPolicy(callback: BodyResponseCallback): void; + getIamPolicy( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Connectionprofiles$Getiampolicy + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Connectionprofiles$Getiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Connectionprofiles$Getiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://datamigration.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+resource}:getIamPolicy').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Retrieve a list of all connection profiles in a given project and location. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/datamigration.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const datamigration = google.datamigration('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await datamigration.projects.locations.connectionProfiles.list({ + * // A filter expression that filters connection profiles listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \>, or <. For example, list connection profiles created this year by specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z**. You can also filter nested fields. For example, you could specify **mySql.username = %lt;my_username%gt;** to list all connection profiles configured to connect with a specific username. + * filter: 'placeholder-value', + * // the order by fields for the result. + * orderBy: 'placeholder-value', + * // The maximum number of connection profiles to return. The service may return fewer than this value. If unspecified, at most 50 connection profiles will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. + * pageSize: 'placeholder-value', + * // A page token, received from a previous `ListConnectionProfiles` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListConnectionProfiles` must match the call that provided the page token. + * pageToken: 'placeholder-value', + * // Required. The parent, which owns this collection of connection profiles. + * parent: 'projects/my-project/locations/my-location', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "connectionProfiles": [], + * // "nextPageToken": "my_nextPageToken", + * // "unreachable": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Projects$Locations$Connectionprofiles$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Projects$Locations$Connectionprofiles$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$Connectionprofiles$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Connectionprofiles$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Connectionprofiles$List, + callback: BodyResponseCallback + ): void; + list( + callback: BodyResponseCallback + ): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Connectionprofiles$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Connectionprofiles$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Connectionprofiles$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://datamigration.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+parent}/connectionProfiles').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Update the configuration of a single connection profile. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/datamigration.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const datamigration = google.datamigration('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await datamigration.projects.locations.connectionProfiles.patch({ + * // The name of this connection profile resource in the form of projects/{project\}/locations/{location\}/instances/{instance\}. + * name: + * 'projects/my-project/locations/my-location/connectionProfiles/my-connectionProfile', + * // A unique id used to identify the request. If the server receives two requests with the same id, then the second request will be ignored. It is recommended to always set this value to a UUID. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters. + * requestId: 'placeholder-value', + * // Required. Field mask is used to specify the fields to be overwritten in the connection profile resource by the update. + * updateMask: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "cloudsql": {}, + * // "createTime": "my_createTime", + * // "displayName": "my_displayName", + * // "error": {}, + * // "labels": {}, + * // "mysql": {}, + * // "name": "my_name", + * // "postgresql": {}, + * // "provider": "my_provider", + * // "state": "my_state", + * // "updateTime": "my_updateTime" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + patch( + params: Params$Resource$Projects$Locations$Connectionprofiles$Patch, + options: StreamMethodOptions + ): GaxiosPromise; + patch( + params?: Params$Resource$Projects$Locations$Connectionprofiles$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Locations$Connectionprofiles$Patch, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Locations$Connectionprofiles$Patch, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Locations$Connectionprofiles$Patch, + callback: BodyResponseCallback + ): void; + patch(callback: BodyResponseCallback): void; + patch( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Connectionprofiles$Patch + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Connectionprofiles$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Connectionprofiles$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://datamigration.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/datamigration.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const datamigration = google.datamigration('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await datamigration.projects.locations.connectionProfiles.setIamPolicy( + * { + * // REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. + * resource: + * 'projects/my-project/locations/my-location/connectionProfiles/my-connectionProfile', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "policy": {}, + * // "updateMask": "my_updateMask" + * // } + * }, + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "auditConfigs": [], + * // "bindings": [], + * // "etag": "my_etag", + * // "version": 0 + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + setIamPolicy( + params: Params$Resource$Projects$Locations$Connectionprofiles$Setiampolicy, + options: StreamMethodOptions + ): GaxiosPromise; + setIamPolicy( + params?: Params$Resource$Projects$Locations$Connectionprofiles$Setiampolicy, + options?: MethodOptions + ): GaxiosPromise; + setIamPolicy( + params: Params$Resource$Projects$Locations$Connectionprofiles$Setiampolicy, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + setIamPolicy( + params: Params$Resource$Projects$Locations$Connectionprofiles$Setiampolicy, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + setIamPolicy( + params: Params$Resource$Projects$Locations$Connectionprofiles$Setiampolicy, + callback: BodyResponseCallback + ): void; + setIamPolicy(callback: BodyResponseCallback): void; + setIamPolicy( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Connectionprofiles$Setiampolicy + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Connectionprofiles$Setiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Connectionprofiles$Setiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://datamigration.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+resource}:setIamPolicy').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/datamigration.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const datamigration = google.datamigration('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await datamigration.projects.locations.connectionProfiles.testIamPermissions( + * { + * // REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. + * resource: + * 'projects/my-project/locations/my-location/connectionProfiles/my-connectionProfile', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "permissions": [] + * // } + * }, + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "permissions": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + testIamPermissions( + params: Params$Resource$Projects$Locations$Connectionprofiles$Testiampermissions, + options: StreamMethodOptions + ): GaxiosPromise; + testIamPermissions( + params?: Params$Resource$Projects$Locations$Connectionprofiles$Testiampermissions, + options?: MethodOptions + ): GaxiosPromise; + testIamPermissions( + params: Params$Resource$Projects$Locations$Connectionprofiles$Testiampermissions, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + testIamPermissions( + params: Params$Resource$Projects$Locations$Connectionprofiles$Testiampermissions, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + testIamPermissions( + params: Params$Resource$Projects$Locations$Connectionprofiles$Testiampermissions, + callback: BodyResponseCallback + ): void; + testIamPermissions( + callback: BodyResponseCallback + ): void; + testIamPermissions( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Connectionprofiles$Testiampermissions + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Connectionprofiles$Testiampermissions; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Connectionprofiles$Testiampermissions; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://datamigration.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+resource}:testIamPermissions').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Locations$Connectionprofiles$Create + extends StandardParameters { + /** + * Required. The connection profile identifier. + */ + connectionProfileId?: string; + /** + * Required. The parent, which owns this collection of connection profiles. + */ + parent?: string; + /** + * A unique id used to identify the request. If the server receives two requests with the same id, then the second request will be ignored. It is recommended to always set this value to a UUID. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters. + */ + requestId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$ConnectionProfile; + } + export interface Params$Resource$Projects$Locations$Connectionprofiles$Delete + extends StandardParameters { + /** + * In case of force delete, the CloudSQL replica database is also deleted (only for CloudSQL connection profile). + */ + force?: boolean; + /** + * Required. Name of the connection profile resource to delete. + */ + name?: string; + /** + * A unique id used to identify the request. If the server receives two requests with the same id, then the second request will be ignored. It is recommended to always set this value to a UUID. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters. + */ + requestId?: string; + } + export interface Params$Resource$Projects$Locations$Connectionprofiles$Get + extends StandardParameters { + /** + * Required. Name of the connection profile resource to get. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Connectionprofiles$Getiampolicy + extends StandardParameters { + /** + * Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + */ + 'options.requestedPolicyVersion'?: number; + /** + * REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. + */ + resource?: string; + } + export interface Params$Resource$Projects$Locations$Connectionprofiles$List + extends StandardParameters { + /** + * A filter expression that filters connection profiles listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \>, or <. For example, list connection profiles created this year by specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z**. You can also filter nested fields. For example, you could specify **mySql.username = %lt;my_username%gt;** to list all connection profiles configured to connect with a specific username. + */ + filter?: string; + /** + * the order by fields for the result. + */ + orderBy?: string; + /** + * The maximum number of connection profiles to return. The service may return fewer than this value. If unspecified, at most 50 connection profiles will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. + */ + pageSize?: number; + /** + * A page token, received from a previous `ListConnectionProfiles` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListConnectionProfiles` must match the call that provided the page token. + */ + pageToken?: string; + /** + * Required. The parent, which owns this collection of connection profiles. + */ + parent?: string; + } + export interface Params$Resource$Projects$Locations$Connectionprofiles$Patch + extends StandardParameters { + /** + * The name of this connection profile resource in the form of projects/{project\}/locations/{location\}/instances/{instance\}. + */ + name?: string; + /** + * A unique id used to identify the request. If the server receives two requests with the same id, then the second request will be ignored. It is recommended to always set this value to a UUID. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters. + */ + requestId?: string; + /** + * Required. Field mask is used to specify the fields to be overwritten in the connection profile resource by the update. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$ConnectionProfile; + } + export interface Params$Resource$Projects$Locations$Connectionprofiles$Setiampolicy + extends StandardParameters { + /** + * REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$SetIamPolicyRequest; + } + export interface Params$Resource$Projects$Locations$Connectionprofiles$Testiampermissions + extends StandardParameters { + /** + * REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$TestIamPermissionsRequest; + } + + export class Resource$Projects$Locations$Migrationjobs { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Creates a new migration job in a given project and location. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/datamigration.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const datamigration = google.datamigration('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await datamigration.projects.locations.migrationJobs.create({ + * // Required. The ID of the instance to create. + * migrationJobId: 'placeholder-value', + * // Required. The parent, which owns this collection of migration jobs. + * parent: 'projects/my-project/locations/my-location', + * // A unique id used to identify the request. If the server receives two requests with the same id, then the second request will be ignored. It is recommended to always set this value to a UUID. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters. + * requestId: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "createTime": "my_createTime", + * // "destination": "my_destination", + * // "destinationDatabase": {}, + * // "displayName": "my_displayName", + * // "dumpPath": "my_dumpPath", + * // "duration": "my_duration", + * // "endTime": "my_endTime", + * // "error": {}, + * // "labels": {}, + * // "name": "my_name", + * // "phase": "my_phase", + * // "reverseSshConnectivity": {}, + * // "source": "my_source", + * // "sourceDatabase": {}, + * // "state": "my_state", + * // "staticIpConnectivity": {}, + * // "type": "my_type", + * // "updateTime": "my_updateTime", + * // "vpcPeeringConnectivity": {} + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + create( + params: Params$Resource$Projects$Locations$Migrationjobs$Create, + options: StreamMethodOptions + ): GaxiosPromise; + create( + params?: Params$Resource$Projects$Locations$Migrationjobs$Create, + options?: MethodOptions + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Locations$Migrationjobs$Create, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Locations$Migrationjobs$Create, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Locations$Migrationjobs$Create, + callback: BodyResponseCallback + ): void; + create(callback: BodyResponseCallback): void; + create( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Migrationjobs$Create + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Migrationjobs$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Migrationjobs$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://datamigration.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+parent}/migrationJobs').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Deletes a single migration job. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/datamigration.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const datamigration = google.datamigration('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await datamigration.projects.locations.migrationJobs.delete({ + * // The destination CloudSQL connection profile is always deleted with the migration job. In case of force delete, the destination CloudSQL replica database is also deleted. + * force: 'placeholder-value', + * // Required. Name of the migration job resource to delete. + * name: + * 'projects/my-project/locations/my-location/migrationJobs/my-migrationJob', + * // A unique id used to identify the request. If the server receives two requests with the same id, then the second request will be ignored. It is recommended to always set this value to a UUID. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters. + * requestId: 'placeholder-value', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + delete( + params: Params$Resource$Projects$Locations$Migrationjobs$Delete, + options: StreamMethodOptions + ): GaxiosPromise; + delete( + params?: Params$Resource$Projects$Locations$Migrationjobs$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Locations$Migrationjobs$Delete, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Migrationjobs$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Migrationjobs$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Migrationjobs$Delete + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Migrationjobs$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Migrationjobs$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://datamigration.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Generate a SSH configuration script to configure the reverse SSH connectivity. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/datamigration.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const datamigration = google.datamigration('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await datamigration.projects.locations.migrationJobs.generateSshScript( + * { + * // Name of the migration job resource to generate the SSH script. + * migrationJob: + * 'projects/my-project/locations/my-location/migrationJobs/my-migrationJob', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "vm": "my_vm", + * // "vmCreationConfig": {}, + * // "vmPort": 0, + * // "vmSelectionConfig": {} + * // } + * }, + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "script": "my_script" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + generateSshScript( + params: Params$Resource$Projects$Locations$Migrationjobs$Generatesshscript, + options: StreamMethodOptions + ): GaxiosPromise; + generateSshScript( + params?: Params$Resource$Projects$Locations$Migrationjobs$Generatesshscript, + options?: MethodOptions + ): GaxiosPromise; + generateSshScript( + params: Params$Resource$Projects$Locations$Migrationjobs$Generatesshscript, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + generateSshScript( + params: Params$Resource$Projects$Locations$Migrationjobs$Generatesshscript, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + generateSshScript( + params: Params$Resource$Projects$Locations$Migrationjobs$Generatesshscript, + callback: BodyResponseCallback + ): void; + generateSshScript(callback: BodyResponseCallback): void; + generateSshScript( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Migrationjobs$Generatesshscript + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Migrationjobs$Generatesshscript; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Migrationjobs$Generatesshscript; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://datamigration.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+migrationJob}:generateSshScript').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['migrationJob'], + pathParams: ['migrationJob'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Gets details of a single migration job. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/datamigration.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const datamigration = google.datamigration('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await datamigration.projects.locations.migrationJobs.get({ + * // Required. Name of the migration job resource to get. + * name: + * 'projects/my-project/locations/my-location/migrationJobs/my-migrationJob', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "createTime": "my_createTime", + * // "destination": "my_destination", + * // "destinationDatabase": {}, + * // "displayName": "my_displayName", + * // "dumpPath": "my_dumpPath", + * // "duration": "my_duration", + * // "endTime": "my_endTime", + * // "error": {}, + * // "labels": {}, + * // "name": "my_name", + * // "phase": "my_phase", + * // "reverseSshConnectivity": {}, + * // "source": "my_source", + * // "sourceDatabase": {}, + * // "state": "my_state", + * // "staticIpConnectivity": {}, + * // "type": "my_type", + * // "updateTime": "my_updateTime", + * // "vpcPeeringConnectivity": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Projects$Locations$Migrationjobs$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Projects$Locations$Migrationjobs$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Migrationjobs$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Migrationjobs$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Migrationjobs$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Migrationjobs$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Migrationjobs$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Migrationjobs$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://datamigration.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/datamigration.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const datamigration = google.datamigration('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await datamigration.projects.locations.migrationJobs.getIamPolicy( + * { + * // Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + * 'options.requestedPolicyVersion': 'placeholder-value', + * // REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. + * resource: + * 'projects/my-project/locations/my-location/migrationJobs/my-migrationJob', + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "auditConfigs": [], + * // "bindings": [], + * // "etag": "my_etag", + * // "version": 0 + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + getIamPolicy( + params: Params$Resource$Projects$Locations$Migrationjobs$Getiampolicy, + options: StreamMethodOptions + ): GaxiosPromise; + getIamPolicy( + params?: Params$Resource$Projects$Locations$Migrationjobs$Getiampolicy, + options?: MethodOptions + ): GaxiosPromise; + getIamPolicy( + params: Params$Resource$Projects$Locations$Migrationjobs$Getiampolicy, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getIamPolicy( + params: Params$Resource$Projects$Locations$Migrationjobs$Getiampolicy, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getIamPolicy( + params: Params$Resource$Projects$Locations$Migrationjobs$Getiampolicy, + callback: BodyResponseCallback + ): void; + getIamPolicy(callback: BodyResponseCallback): void; + getIamPolicy( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Migrationjobs$Getiampolicy + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Migrationjobs$Getiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Migrationjobs$Getiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://datamigration.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+resource}:getIamPolicy').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Lists migration jobs in a given project and location. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/datamigration.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const datamigration = google.datamigration('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await datamigration.projects.locations.migrationJobs.list({ + * // A filter expression that filters migration jobs listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \>, or <. For example, list migration jobs created this year by specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z.** You can also filter nested fields. For example, you could specify **reverseSshConnectivity.vmIp = "1.2.3.4"** to select all migration jobs connecting through the specific SSH tunnel bastion. + * filter: 'placeholder-value', + * // Sort the results based on the migration job name. Valid values are: "name", "name asc", and "name desc". + * orderBy: 'placeholder-value', + * // The maximum number of migration jobs to return. The service may return fewer than this value. If unspecified, at most 50 migration jobs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. + * pageSize: 'placeholder-value', + * // The nextPageToken value received in the previous call to migrationJobs.list, used in the subsequent request to retrieve the next page of results. On first call this should be left blank. When paginating, all other parameters provided to migrationJobs.list must match the call that provided the page token. + * pageToken: 'placeholder-value', + * // Required. The parent, which owns this collection of migrationJobs. + * parent: 'projects/my-project/locations/my-location', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "migrationJobs": [], + * // "nextPageToken": "my_nextPageToken", + * // "unreachable": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Projects$Locations$Migrationjobs$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Projects$Locations$Migrationjobs$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$Migrationjobs$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Migrationjobs$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Migrationjobs$List, + callback: BodyResponseCallback + ): void; + list( + callback: BodyResponseCallback + ): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Migrationjobs$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Migrationjobs$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Migrationjobs$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://datamigration.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+parent}/migrationJobs').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Updates the parameters of a single migration job. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/datamigration.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const datamigration = google.datamigration('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await datamigration.projects.locations.migrationJobs.patch({ + * // The name (URI) of this migration job resource, in the form of: projects/{project\}/locations/{location\}/instances/{instance\}. + * name: + * 'projects/my-project/locations/my-location/migrationJobs/my-migrationJob', + * // A unique id used to identify the request. If the server receives two requests with the same id, then the second request will be ignored. It is recommended to always set this value to a UUID. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters. + * requestId: 'placeholder-value', + * // Required. Field mask is used to specify the fields to be overwritten in the migration job resource by the update. + * updateMask: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "createTime": "my_createTime", + * // "destination": "my_destination", + * // "destinationDatabase": {}, + * // "displayName": "my_displayName", + * // "dumpPath": "my_dumpPath", + * // "duration": "my_duration", + * // "endTime": "my_endTime", + * // "error": {}, + * // "labels": {}, + * // "name": "my_name", + * // "phase": "my_phase", + * // "reverseSshConnectivity": {}, + * // "source": "my_source", + * // "sourceDatabase": {}, + * // "state": "my_state", + * // "staticIpConnectivity": {}, + * // "type": "my_type", + * // "updateTime": "my_updateTime", + * // "vpcPeeringConnectivity": {} + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + patch( + params: Params$Resource$Projects$Locations$Migrationjobs$Patch, + options: StreamMethodOptions + ): GaxiosPromise; + patch( + params?: Params$Resource$Projects$Locations$Migrationjobs$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Locations$Migrationjobs$Patch, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Locations$Migrationjobs$Patch, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Locations$Migrationjobs$Patch, + callback: BodyResponseCallback + ): void; + patch(callback: BodyResponseCallback): void; + patch( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Migrationjobs$Patch + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Migrationjobs$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Migrationjobs$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://datamigration.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Promote a migration job, stopping replication to the destination and promoting the destination to be a standalone database. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/datamigration.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const datamigration = google.datamigration('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await datamigration.projects.locations.migrationJobs.promote({ + * // Name of the migration job resource to promote. + * name: + * 'projects/my-project/locations/my-location/migrationJobs/my-migrationJob', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // {} + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + promote( + params: Params$Resource$Projects$Locations$Migrationjobs$Promote, + options: StreamMethodOptions + ): GaxiosPromise; + promote( + params?: Params$Resource$Projects$Locations$Migrationjobs$Promote, + options?: MethodOptions + ): GaxiosPromise; + promote( + params: Params$Resource$Projects$Locations$Migrationjobs$Promote, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + promote( + params: Params$Resource$Projects$Locations$Migrationjobs$Promote, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + promote( + params: Params$Resource$Projects$Locations$Migrationjobs$Promote, + callback: BodyResponseCallback + ): void; + promote(callback: BodyResponseCallback): void; + promote( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Migrationjobs$Promote + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Migrationjobs$Promote; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Migrationjobs$Promote; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://datamigration.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}:promote').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Restart a stopped or failed migration job, resetting the destination instance to its original state and starting the migration process from scratch. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/datamigration.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const datamigration = google.datamigration('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await datamigration.projects.locations.migrationJobs.restart({ + * // Name of the migration job resource to restart. + * name: + * 'projects/my-project/locations/my-location/migrationJobs/my-migrationJob', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // {} + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + restart( + params: Params$Resource$Projects$Locations$Migrationjobs$Restart, + options: StreamMethodOptions + ): GaxiosPromise; + restart( + params?: Params$Resource$Projects$Locations$Migrationjobs$Restart, + options?: MethodOptions + ): GaxiosPromise; + restart( + params: Params$Resource$Projects$Locations$Migrationjobs$Restart, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + restart( + params: Params$Resource$Projects$Locations$Migrationjobs$Restart, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + restart( + params: Params$Resource$Projects$Locations$Migrationjobs$Restart, + callback: BodyResponseCallback + ): void; + restart(callback: BodyResponseCallback): void; + restart( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Migrationjobs$Restart + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Migrationjobs$Restart; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Migrationjobs$Restart; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://datamigration.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}:restart').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Resume a migration job that is currently stopped and is resumable (was stopped during CDC phase). + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/datamigration.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const datamigration = google.datamigration('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await datamigration.projects.locations.migrationJobs.resume({ + * // Name of the migration job resource to resume. + * name: + * 'projects/my-project/locations/my-location/migrationJobs/my-migrationJob', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // {} + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + resume( + params: Params$Resource$Projects$Locations$Migrationjobs$Resume, + options: StreamMethodOptions + ): GaxiosPromise; + resume( + params?: Params$Resource$Projects$Locations$Migrationjobs$Resume, + options?: MethodOptions + ): GaxiosPromise; + resume( + params: Params$Resource$Projects$Locations$Migrationjobs$Resume, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + resume( + params: Params$Resource$Projects$Locations$Migrationjobs$Resume, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + resume( + params: Params$Resource$Projects$Locations$Migrationjobs$Resume, + callback: BodyResponseCallback + ): void; + resume(callback: BodyResponseCallback): void; + resume( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Migrationjobs$Resume + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Migrationjobs$Resume; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Migrationjobs$Resume; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://datamigration.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}:resume').replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/datamigration.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const datamigration = google.datamigration('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await datamigration.projects.locations.migrationJobs.setIamPolicy( + * { + * // REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. + * resource: + * 'projects/my-project/locations/my-location/migrationJobs/my-migrationJob', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "policy": {}, + * // "updateMask": "my_updateMask" + * // } + * }, + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "auditConfigs": [], + * // "bindings": [], + * // "etag": "my_etag", + * // "version": 0 + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + setIamPolicy( + params: Params$Resource$Projects$Locations$Migrationjobs$Setiampolicy, + options: StreamMethodOptions + ): GaxiosPromise; + setIamPolicy( + params?: Params$Resource$Projects$Locations$Migrationjobs$Setiampolicy, + options?: MethodOptions + ): GaxiosPromise; + setIamPolicy( + params: Params$Resource$Projects$Locations$Migrationjobs$Setiampolicy, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + setIamPolicy( + params: Params$Resource$Projects$Locations$Migrationjobs$Setiampolicy, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + setIamPolicy( + params: Params$Resource$Projects$Locations$Migrationjobs$Setiampolicy, + callback: BodyResponseCallback + ): void; + setIamPolicy(callback: BodyResponseCallback): void; + setIamPolicy( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Migrationjobs$Setiampolicy + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Migrationjobs$Setiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Migrationjobs$Setiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://datamigration.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+resource}:setIamPolicy').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Start an already created migration job. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/datamigration.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const datamigration = google.datamigration('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await datamigration.projects.locations.migrationJobs.start({ + * // Name of the migration job resource to start. + * name: + * 'projects/my-project/locations/my-location/migrationJobs/my-migrationJob', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // {} + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + start( + params: Params$Resource$Projects$Locations$Migrationjobs$Start, + options: StreamMethodOptions + ): GaxiosPromise; + start( + params?: Params$Resource$Projects$Locations$Migrationjobs$Start, + options?: MethodOptions + ): GaxiosPromise; + start( + params: Params$Resource$Projects$Locations$Migrationjobs$Start, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + start( + params: Params$Resource$Projects$Locations$Migrationjobs$Start, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + start( + params: Params$Resource$Projects$Locations$Migrationjobs$Start, + callback: BodyResponseCallback + ): void; + start(callback: BodyResponseCallback): void; + start( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Migrationjobs$Start + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Migrationjobs$Start; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Migrationjobs$Start; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://datamigration.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}:start').replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Stops a running migration job. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/datamigration.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const datamigration = google.datamigration('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await datamigration.projects.locations.migrationJobs.stop({ + * // Name of the migration job resource to stop. + * name: + * 'projects/my-project/locations/my-location/migrationJobs/my-migrationJob', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // {} + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + stop( + params: Params$Resource$Projects$Locations$Migrationjobs$Stop, + options: StreamMethodOptions + ): GaxiosPromise; + stop( + params?: Params$Resource$Projects$Locations$Migrationjobs$Stop, + options?: MethodOptions + ): GaxiosPromise; + stop( + params: Params$Resource$Projects$Locations$Migrationjobs$Stop, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + stop( + params: Params$Resource$Projects$Locations$Migrationjobs$Stop, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + stop( + params: Params$Resource$Projects$Locations$Migrationjobs$Stop, + callback: BodyResponseCallback + ): void; + stop(callback: BodyResponseCallback): void; + stop( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Migrationjobs$Stop + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Migrationjobs$Stop; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Migrationjobs$Stop; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://datamigration.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}:stop').replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/datamigration.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const datamigration = google.datamigration('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await datamigration.projects.locations.migrationJobs.testIamPermissions( + * { + * // REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. + * resource: + * 'projects/my-project/locations/my-location/migrationJobs/my-migrationJob', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "permissions": [] + * // } + * }, + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "permissions": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + testIamPermissions( + params: Params$Resource$Projects$Locations$Migrationjobs$Testiampermissions, + options: StreamMethodOptions + ): GaxiosPromise; + testIamPermissions( + params?: Params$Resource$Projects$Locations$Migrationjobs$Testiampermissions, + options?: MethodOptions + ): GaxiosPromise; + testIamPermissions( + params: Params$Resource$Projects$Locations$Migrationjobs$Testiampermissions, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + testIamPermissions( + params: Params$Resource$Projects$Locations$Migrationjobs$Testiampermissions, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + testIamPermissions( + params: Params$Resource$Projects$Locations$Migrationjobs$Testiampermissions, + callback: BodyResponseCallback + ): void; + testIamPermissions( + callback: BodyResponseCallback + ): void; + testIamPermissions( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Migrationjobs$Testiampermissions + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Migrationjobs$Testiampermissions; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Migrationjobs$Testiampermissions; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://datamigration.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+resource}:testIamPermissions').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Verify a migration job, making sure the destination can reach the source and that all configuration and prerequisites are met. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/datamigration.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const datamigration = google.datamigration('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await datamigration.projects.locations.migrationJobs.verify({ + * // Name of the migration job resource to verify. + * name: + * 'projects/my-project/locations/my-location/migrationJobs/my-migrationJob', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // {} + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + verify( + params: Params$Resource$Projects$Locations$Migrationjobs$Verify, + options: StreamMethodOptions + ): GaxiosPromise; + verify( + params?: Params$Resource$Projects$Locations$Migrationjobs$Verify, + options?: MethodOptions + ): GaxiosPromise; + verify( + params: Params$Resource$Projects$Locations$Migrationjobs$Verify, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + verify( + params: Params$Resource$Projects$Locations$Migrationjobs$Verify, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + verify( + params: Params$Resource$Projects$Locations$Migrationjobs$Verify, + callback: BodyResponseCallback + ): void; + verify(callback: BodyResponseCallback): void; + verify( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Migrationjobs$Verify + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Migrationjobs$Verify; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Migrationjobs$Verify; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://datamigration.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}:verify').replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Locations$Migrationjobs$Create + extends StandardParameters { + /** + * Required. The ID of the instance to create. + */ + migrationJobId?: string; + /** + * Required. The parent, which owns this collection of migration jobs. + */ + parent?: string; + /** + * A unique id used to identify the request. If the server receives two requests with the same id, then the second request will be ignored. It is recommended to always set this value to a UUID. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters. + */ + requestId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$MigrationJob; + } + export interface Params$Resource$Projects$Locations$Migrationjobs$Delete + extends StandardParameters { + /** + * The destination CloudSQL connection profile is always deleted with the migration job. In case of force delete, the destination CloudSQL replica database is also deleted. + */ + force?: boolean; + /** + * Required. Name of the migration job resource to delete. + */ + name?: string; + /** + * A unique id used to identify the request. If the server receives two requests with the same id, then the second request will be ignored. It is recommended to always set this value to a UUID. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters. + */ + requestId?: string; + } + export interface Params$Resource$Projects$Locations$Migrationjobs$Generatesshscript + extends StandardParameters { + /** + * Name of the migration job resource to generate the SSH script. + */ + migrationJob?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GenerateSshScriptRequest; + } + export interface Params$Resource$Projects$Locations$Migrationjobs$Get + extends StandardParameters { + /** + * Required. Name of the migration job resource to get. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Migrationjobs$Getiampolicy + extends StandardParameters { + /** + * Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + */ + 'options.requestedPolicyVersion'?: number; + /** + * REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. + */ + resource?: string; + } + export interface Params$Resource$Projects$Locations$Migrationjobs$List + extends StandardParameters { + /** + * A filter expression that filters migration jobs listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \>, or <. For example, list migration jobs created this year by specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z.** You can also filter nested fields. For example, you could specify **reverseSshConnectivity.vmIp = "1.2.3.4"** to select all migration jobs connecting through the specific SSH tunnel bastion. + */ + filter?: string; + /** + * Sort the results based on the migration job name. Valid values are: "name", "name asc", and "name desc". + */ + orderBy?: string; + /** + * The maximum number of migration jobs to return. The service may return fewer than this value. If unspecified, at most 50 migration jobs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. + */ + pageSize?: number; + /** + * The nextPageToken value received in the previous call to migrationJobs.list, used in the subsequent request to retrieve the next page of results. On first call this should be left blank. When paginating, all other parameters provided to migrationJobs.list must match the call that provided the page token. + */ + pageToken?: string; + /** + * Required. The parent, which owns this collection of migrationJobs. + */ + parent?: string; + } + export interface Params$Resource$Projects$Locations$Migrationjobs$Patch + extends StandardParameters { + /** + * The name (URI) of this migration job resource, in the form of: projects/{project\}/locations/{location\}/instances/{instance\}. + */ + name?: string; + /** + * A unique id used to identify the request. If the server receives two requests with the same id, then the second request will be ignored. It is recommended to always set this value to a UUID. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters. + */ + requestId?: string; + /** + * Required. Field mask is used to specify the fields to be overwritten in the migration job resource by the update. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$MigrationJob; + } + export interface Params$Resource$Projects$Locations$Migrationjobs$Promote + extends StandardParameters { + /** + * Name of the migration job resource to promote. + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$PromoteMigrationJobRequest; + } + export interface Params$Resource$Projects$Locations$Migrationjobs$Restart + extends StandardParameters { + /** + * Name of the migration job resource to restart. + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$RestartMigrationJobRequest; + } + export interface Params$Resource$Projects$Locations$Migrationjobs$Resume + extends StandardParameters { + /** + * Name of the migration job resource to resume. + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$ResumeMigrationJobRequest; + } + export interface Params$Resource$Projects$Locations$Migrationjobs$Setiampolicy + extends StandardParameters { + /** + * REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$SetIamPolicyRequest; + } + export interface Params$Resource$Projects$Locations$Migrationjobs$Start + extends StandardParameters { + /** + * Name of the migration job resource to start. + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$StartMigrationJobRequest; + } + export interface Params$Resource$Projects$Locations$Migrationjobs$Stop + extends StandardParameters { + /** + * Name of the migration job resource to stop. + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$StopMigrationJobRequest; + } + export interface Params$Resource$Projects$Locations$Migrationjobs$Testiampermissions + extends StandardParameters { + /** + * REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$TestIamPermissionsRequest; + } + export interface Params$Resource$Projects$Locations$Migrationjobs$Verify + extends StandardParameters { + /** + * Name of the migration job resource to verify. + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$VerifyMigrationJobRequest; + } + + export class Resource$Projects$Locations$Operations { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * 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`. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/datamigration.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const datamigration = google.datamigration('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await datamigration.projects.locations.operations.cancel({ + * // The name of the operation resource to be cancelled. + * name: 'projects/my-project/locations/my-location/operations/my-operation', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // {} + * }, + * }); + * console.log(res.data); + * + * // Example response + * // {} + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + cancel( + params: Params$Resource$Projects$Locations$Operations$Cancel, + options: StreamMethodOptions + ): GaxiosPromise; + cancel( + params?: Params$Resource$Projects$Locations$Operations$Cancel, + options?: MethodOptions + ): GaxiosPromise; + cancel( + params: Params$Resource$Projects$Locations$Operations$Cancel, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + cancel( + params: Params$Resource$Projects$Locations$Operations$Cancel, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + cancel( + params: Params$Resource$Projects$Locations$Operations$Cancel, + callback: BodyResponseCallback + ): void; + cancel(callback: BodyResponseCallback): void; + cancel( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Operations$Cancel + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Operations$Cancel; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Operations$Cancel; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://datamigration.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}:cancel').replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * 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`. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/datamigration.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const datamigration = google.datamigration('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await datamigration.projects.locations.operations.delete({ + * // The name of the operation resource to be deleted. + * name: 'projects/my-project/locations/my-location/operations/my-operation', + * }); + * console.log(res.data); + * + * // Example response + * // {} + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + delete( + params: Params$Resource$Projects$Locations$Operations$Delete, + options: StreamMethodOptions + ): GaxiosPromise; + delete( + params?: Params$Resource$Projects$Locations$Operations$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Locations$Operations$Delete, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Operations$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Operations$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Operations$Delete + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Operations$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Operations$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://datamigration.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * 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. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/datamigration.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const datamigration = google.datamigration('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await datamigration.projects.locations.operations.get({ + * // The name of the operation resource. + * name: 'projects/my-project/locations/my-location/operations/my-operation', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Projects$Locations$Operations$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Projects$Locations$Operations$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Operations$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Operations$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Operations$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Operations$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Operations$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Operations$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://datamigration.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/x/operations`. To override the binding, API services can add a binding such as `"/v1/{name=users/x\}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/datamigration.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const datamigration = google.datamigration('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await datamigration.projects.locations.operations.list({ + * // The standard list filter. + * filter: 'placeholder-value', + * // The name of the operation's parent resource. + * name: 'projects/my-project/locations/my-location', + * // The standard list page size. + * pageSize: 'placeholder-value', + * // The standard list page token. + * pageToken: 'placeholder-value', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "nextPageToken": "my_nextPageToken", + * // "operations": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Projects$Locations$Operations$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Projects$Locations$Operations$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$Operations$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Operations$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Operations$List, + callback: BodyResponseCallback + ): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Operations$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Operations$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Operations$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://datamigration.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}/operations').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Locations$Operations$Cancel + extends StandardParameters { + /** + * The name of the operation resource to be cancelled. + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$CancelOperationRequest; + } + export interface Params$Resource$Projects$Locations$Operations$Delete + extends StandardParameters { + /** + * The name of the operation resource to be deleted. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Operations$Get + extends StandardParameters { + /** + * The name of the operation resource. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Operations$List + extends StandardParameters { + /** + * The standard list filter. + */ + filter?: string; + /** + * The name of the operation's parent resource. + */ + name?: string; + /** + * The standard list page size. + */ + pageSize?: number; + /** + * The standard list page token. + */ + pageToken?: string; + } +} diff --git a/src/apis/datamigration/v1beta1.ts b/src/apis/datamigration/v1beta1.ts index 62196a2ec7c..dfd5a743cd6 100644 --- a/src/apis/datamigration/v1beta1.ts +++ b/src/apis/datamigration/v1beta1.ts @@ -1043,13 +1043,13 @@ export namespace datamigration_v1beta1 { * * // Do the magic * const res = await datamigration.projects.locations.list({ - * // The standard list 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). * filter: 'placeholder-value', * // The resource that owns the locations collection, if applicable. * name: 'projects/my-project', - * // The standard list page size. + * // The maximum number of results to return. If not set, the service will select a default. * pageSize: 'placeholder-value', - * // The standard list page token. + * // A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. * pageToken: 'placeholder-value', * }); * console.log(res.data); @@ -1169,7 +1169,7 @@ export namespace datamigration_v1beta1 { export interface Params$Resource$Projects$Locations$List extends StandardParameters { /** - * The standard list 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). */ filter?: string; /** @@ -1177,11 +1177,11 @@ export namespace datamigration_v1beta1 { */ name?: string; /** - * The standard list page size. + * The maximum number of results to return. If not set, the service will select a default. */ pageSize?: number; /** - * The standard list page token. + * A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. */ pageToken?: string; } diff --git a/src/apis/dataproc/v1.ts b/src/apis/dataproc/v1.ts index 9ec0c283bbd..55b2766c5c0 100644 --- a/src/apis/dataproc/v1.ts +++ b/src/apis/dataproc/v1.ts @@ -733,7 +733,7 @@ export namespace dataproc_v1 { */ minCpuPlatform?: string | null; /** - * Optional. The number of VM instances in the instance group. For master instance groups, must be set to 1. + * Optional. The number of VM instances in the instance group. For HA cluster master_config groups, must be set to 3. For standard cluster master_config groups, must be set to 1. */ numInstances?: number | null; /** diff --git a/src/apis/dataproc/v1beta2.ts b/src/apis/dataproc/v1beta2.ts index fe06d6fd57f..2605612236a 100644 --- a/src/apis/dataproc/v1beta2.ts +++ b/src/apis/dataproc/v1beta2.ts @@ -746,7 +746,7 @@ export namespace dataproc_v1beta2 { */ minCpuPlatform?: string | null; /** - * Optional. The number of VM instances in the instance group. For master instance groups, must be set to 1. + * Optional. The number of VM instances in the instance group. For HA cluster master_config groups, must be set to 3. For standard cluster master_config groups, must be set to 1. */ numInstances?: number | null; /** diff --git a/src/apis/datastore/v1.ts b/src/apis/datastore/v1.ts index b967c0e38c2..6ce643b302d 100644 --- a/src/apis/datastore/v1.ts +++ b/src/apis/datastore/v1.ts @@ -681,7 +681,7 @@ export namespace datastore_v1 { name?: string | null; } /** - * An object representing a latitude/longitude pair. This is expressed as a pair of doubles representing degrees latitude and degrees longitude. Unless specified otherwise, this must conform to the WGS84 standard. Values must be within normalized ranges. + * An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this must conform to the WGS84 standard. Values must be within normalized ranges. */ export interface Schema$LatLng { /** diff --git a/src/apis/datastore/v1beta3.ts b/src/apis/datastore/v1beta3.ts index 71c513fdb5d..634bf6bc462 100644 --- a/src/apis/datastore/v1beta3.ts +++ b/src/apis/datastore/v1beta3.ts @@ -550,7 +550,7 @@ export namespace datastore_v1beta3 { name?: string | null; } /** - * An object representing a latitude/longitude pair. This is expressed as a pair of doubles representing degrees latitude and degrees longitude. Unless specified otherwise, this must conform to the WGS84 standard. Values must be within normalized ranges. + * An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this must conform to the WGS84 standard. Values must be within normalized ranges. */ export interface Schema$LatLng { /** diff --git a/src/apis/dialogflow/v2.ts b/src/apis/dialogflow/v2.ts index 00b369a738c..7ed81a49402 100644 --- a/src/apis/dialogflow/v2.ts +++ b/src/apis/dialogflow/v2.ts @@ -1095,7 +1095,7 @@ export namespace dialogflow_v2 { genericMetadata?: Schema$GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata; } /** - * The request message for a webhook call. + * The request message for a webhook call. The request is sent as a JSON object and the field names will be presented in camel cases. */ export interface Schema$GoogleCloudDialogflowCxV3beta1WebhookRequest { /** @@ -2141,7 +2141,7 @@ export namespace dialogflow_v2 { genericMetadata?: Schema$GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata; } /** - * The request message for a webhook call. + * The request message for a webhook call. The request is sent as a JSON object and the field names will be presented in camel cases. */ export interface Schema$GoogleCloudDialogflowCxV3WebhookRequest { /** @@ -2332,6 +2332,94 @@ export namespace dialogflow_v2 { */ timeZone?: string | null; } + /** + * Detail feedback of Agent Assist result. + */ + export interface Schema$GoogleCloudDialogflowV2AgentAssistantFeedback { + /** + * Optional. Whether or not the suggested answer is relevant. For example: * Query: "Can I change my mailing address?" * Suggested document says: "Items must be returned/exchanged within 60 days of the purchase date." * answer_relevance: AnswerRelevance.IRRELEVANT + */ + answerRelevance?: string | null; + /** + * Optional. Whether or not the information in the document is correct. For example: * Query: "Can I return the package in 2 days once received?" * Suggested document says: "Items must be returned/exchanged within 60 days of the purchase date." * Ground truth: "No return or exchange is allowed." * [document_correctness]: INCORRECT + */ + documentCorrectness?: string | null; + /** + * Optional. Whether or not the suggested document is efficient. For example, if the document is poorly written, hard to understand, hard to use or too long to find useful information, document_efficiency is DocumentEfficiency.INEFFICIENT. + */ + documentEfficiency?: string | null; + } + /** + * Represents a record of a human agent assist answer. + */ + export interface Schema$GoogleCloudDialogflowV2AgentAssistantRecord { + /** + * Output only. The article suggestion answer. + */ + articleSuggestionAnswer?: Schema$GoogleCloudDialogflowV2ArticleAnswer; + /** + * Output only. The FAQ answer. + */ + faqAnswer?: Schema$GoogleCloudDialogflowV2FaqAnswer; + } + /** + * The request message for Participants.AnalyzeContent. + */ + export interface Schema$GoogleCloudDialogflowV2AnalyzeContentRequest { + /** + * An input event to send to Dialogflow. + */ + eventInput?: Schema$GoogleCloudDialogflowV2EventInput; + /** + * Parameters for a Dialogflow virtual-agent query. + */ + queryParams?: Schema$GoogleCloudDialogflowV2QueryParameters; + /** + * Speech synthesis configuration. The speech synthesis settings for a virtual agent that may be configured for the associated conversation profile are not used when calling AnalyzeContent. If this configuration is not supplied, speech synthesis is disabled. + */ + replyAudioConfig?: Schema$GoogleCloudDialogflowV2OutputAudioConfig; + /** + * A unique identifier for this request. Restricted to 36 ASCII characters. A random UUID is recommended. This request is only idempotent if a `request_id` is provided. + */ + requestId?: string | null; + /** + * The natural language text to be processed. + */ + textInput?: Schema$GoogleCloudDialogflowV2TextInput; + } + /** + * The response message for Participants.AnalyzeContent. + */ + export interface Schema$GoogleCloudDialogflowV2AnalyzeContentResponse { + /** + * Only set if a Dialogflow automated agent has responded. Note that: AutomatedAgentReply.detect_intent_response.output_audio and AutomatedAgentReply.detect_intent_response.output_audio_config are always empty, use reply_audio instead. + */ + automatedAgentReply?: Schema$GoogleCloudDialogflowV2AutomatedAgentReply; + /** + * Indicates the parameters of DTMF. + */ + dtmfParameters?: Schema$GoogleCloudDialogflowV2DtmfParameters; + /** + * The suggestions for end user. The order is the same as HumanAgentAssistantConfig.SuggestionConfig.feature_configs of HumanAgentAssistantConfig.end_user_suggestion_config. + */ + endUserSuggestionResults?: Schema$GoogleCloudDialogflowV2SuggestionResult[]; + /** + * The suggestions for most recent human agent. The order is the same as HumanAgentAssistantConfig.SuggestionConfig.feature_configs of HumanAgentAssistantConfig.human_agent_suggestion_config. + */ + humanAgentSuggestionResults?: Schema$GoogleCloudDialogflowV2SuggestionResult[]; + /** + * Message analyzed by CCAI. + */ + message?: Schema$GoogleCloudDialogflowV2Message; + /** + * The audio data bytes encoded as specified in the request. This field is set if: - `reply_audio_config` was specified in the request, or - The automated agent responded with audio to play to the user. In such case, `reply_audio.config` contains settings used to synthesize the speech. In some scenarios, multiple output audio fields may be present in the response structure. In these cases, only the top-most-level audio output has content. + */ + replyAudio?: Schema$GoogleCloudDialogflowV2OutputAudio; + /** + * The output text content. This field is set if the automated agent responded with text to show to the user. + */ + replyText?: string | null; + } /** * Represents a part of a message possibly annotated with an entity. The part can be an entity or purely a part of the message between two entities or message start/end. */ @@ -2349,6 +2437,99 @@ export namespace dialogflow_v2 { */ text?: string | null; } + /** + * Represents feedback the customer has about the quality & correctness of a certain answer in a conversation. + */ + export interface Schema$GoogleCloudDialogflowV2AnswerFeedback { + /** + * Detail feedback of agent assist suggestions. + */ + agentAssistantDetailFeedback?: Schema$GoogleCloudDialogflowV2AgentAssistantFeedback; + /** + * Indicates whether the answer/item was clicked by the human agent or not. Default to false. + */ + clicked?: boolean | null; + /** + * Time when the answer/item was clicked. + */ + clickTime?: string | null; + /** + * The correctness level of the specific answer. + */ + correctnessLevel?: string | null; + /** + * Indicates whether the answer/item was displayed to the human agent in the agent desktop UI. Default to false. + */ + displayed?: boolean | null; + /** + * Time when the answer/item was displayed. + */ + displayTime?: string | null; + } + /** + * Answer records are records to manage answer history and feedbacks for Dialogflow. Currently, answer record includes: - human agent assistant article suggestion - human agent assistant faq article It doesn't include: - `DetectIntent` intent matching - `DetectIntent` knowledge Answer records are not related to the conversation history in the Dialogflow Console. A Record is generated even when the end-user disables conversation history in the console. Records are created when there's a human agent assistant suggestion generated. A typical workflow for customers provide feedback to an answer is: 1. For human agent assistant, customers get suggestion via ListSuggestions API. Together with the answers, AnswerRecord.name are returned to the customers. 2. The customer uses the AnswerRecord.name to call the UpdateAnswerRecord method to send feedback about a specific answer that they believe is wrong. + */ + export interface Schema$GoogleCloudDialogflowV2AnswerRecord { + /** + * Output only. The record for human agent assistant. + */ + agentAssistantRecord?: Schema$GoogleCloudDialogflowV2AgentAssistantRecord; + /** + * Required. The AnswerFeedback for this record. You can set this with AnswerRecords.UpdateAnswerRecord in order to give us feedback about this answer. + */ + answerFeedback?: Schema$GoogleCloudDialogflowV2AnswerFeedback; + /** + * The unique identifier of this answer record. Format: `projects//locations//answerRecords/`. + */ + name?: string | null; + } + /** + * Represents article answer. + */ + export interface Schema$GoogleCloudDialogflowV2ArticleAnswer { + /** + * The name of answer record, in the format of "projects//locations//answerRecords/" + */ + answerRecord?: string | null; + /** + * Article match confidence. The system's confidence score that this article is a good match for this conversation, as a value from 0.0 (completely uncertain) to 1.0 (completely certain). + */ + confidence?: number | null; + /** + * A map that contains metadata about the answer and the document from which it originates. + */ + metadata?: {[key: string]: string} | null; + /** + * Article snippets. + */ + snippets?: string[] | null; + /** + * The article title. + */ + title?: string | null; + /** + * The article URI. + */ + uri?: string | null; + } + /** + * Defines the Automated Agent to connect to a conversation. + */ + export interface Schema$GoogleCloudDialogflowV2AutomatedAgentConfig { + /** + * Required. ID of the Dialogflow agent environment to use. This project needs to either be the same project as the conversation or you need to grant `service-@gcp-sa-dialogflow.iam.gserviceaccount.com` the `Dialogflow API Service Agent` role in this project. Format: `projects//locations//agent/environments/`. If environment is not specified, the default `draft` environment is used. Refer to [DetectIntentRequest](/dialogflow/docs/reference/rpc/google.cloud.dialogflow.v2#google.cloud.dialogflow.v2.DetectIntentRequest) for more details. + */ + agent?: string | null; + } + /** + * Represents a response from an automated agent. + */ + export interface Schema$GoogleCloudDialogflowV2AutomatedAgentReply { + /** + * Response of the Dialogflow Sessions.DetectIntent call. + */ + detectIntentResponse?: Schema$GoogleCloudDialogflowV2DetectIntentResponse; + } /** * The request message for EntityTypes.BatchCreateEntities. */ @@ -2471,6 +2652,48 @@ export namespace dialogflow_v2 { */ intents?: Schema$GoogleCloudDialogflowV2Intent[]; } + /** + * Represents a part of a message possibly annotated with an entity. The part can be an entity or purely a part of the message between two entities or message start/end. + */ + export interface Schema$GoogleCloudDialogflowV2beta1AnnotatedMessagePart { + /** + * Optional. The [Dialogflow system entity type](https://cloud.google.com/dialogflow/docs/reference/system-entities) of this message part. If this is empty, Dialogflow could not annotate the phrase part with a system entity. + */ + entityType?: string | null; + /** + * Optional. The [Dialogflow system entity formatted value ](https://cloud.google.com/dialogflow/docs/reference/system-entities) of this message part. For example for a system entity of type `@sys.unit-currency`, this may contain: { "amount": 5, "currency": "USD" \} + */ + formattedValue?: any | null; + /** + * Required. A part of a message possibly annotated with an entity. + */ + text?: string | null; + } + /** + * Represents article answer. + */ + export interface Schema$GoogleCloudDialogflowV2beta1ArticleAnswer { + /** + * The name of answer record, in the format of "projects//locations//answerRecords/" + */ + answerRecord?: string | null; + /** + * A map that contains metadata about the answer and the document from which it originates. + */ + metadata?: {[key: string]: string} | null; + /** + * Output only. Article snippets. + */ + snippets?: string[] | null; + /** + * The article title. + */ + title?: string | null; + /** + * The article URI. + */ + uri?: string | null; + } /** * The response message for EntityTypes.BatchUpdateEntityTypes. */ @@ -2506,6 +2729,27 @@ export namespace dialogflow_v2 { */ parameters?: {[key: string]: any} | null; } + /** + * Represents a notification sent to Pub/Sub subscribers for conversation lifecycle events. + */ + export interface Schema$GoogleCloudDialogflowV2beta1ConversationEvent { + /** + * Required. The unique identifier of the conversation this notification refers to. Format: `projects//conversations/`. + */ + conversation?: string | null; + /** + * Optional. More detailed information about an error. Only set for type UNRECOVERABLE_ERROR_IN_PHONE_CALL. + */ + errorStatus?: Schema$GoogleRpcStatus; + /** + * Payload of NEW_MESSAGE event. + */ + newMessagePayload?: Schema$GoogleCloudDialogflowV2beta1Message; + /** + * Required. The type of the event that this notification refers to. + */ + type?: string | null; + } /** * Each intent parameter has a type, called the entity type, which dictates exactly how data from an end-user expression is extracted. Dialogflow provides predefined system entities that can match many common types of data. For example, there are system entities for matching dates, times, colors, email addresses, and so on. You can also create your own custom entities for matching custom data. For example, you could define a vegetable entity that can match the types of vegetables available for purchase with a grocery store agent. For more information, see the [Entity guide](https://cloud.google.com/dialogflow/docs/entities-overview). */ @@ -2578,6 +2822,61 @@ export namespace dialogflow_v2 { */ agentUri?: string | null; } + /** + * Represents answer from "frequently asked questions". + */ + export interface Schema$GoogleCloudDialogflowV2beta1FaqAnswer { + /** + * The piece of text from the `source` knowledge base document. + */ + answer?: string | null; + /** + * The name of answer record, in the format of "projects//locations//answerRecords/" + */ + answerRecord?: string | null; + /** + * The system's confidence score that this Knowledge answer is a good match for this conversational query, range from 0.0 (completely uncertain) to 1.0 (completely certain). + */ + confidence?: number | null; + /** + * A map that contains metadata about the answer and the document from which it originates. + */ + metadata?: {[key: string]: string} | null; + /** + * The corresponding FAQ question. + */ + question?: string | null; + /** + * Indicates which Knowledge Document this answer was extracted from. Format: `projects//locations//agent/knowledgeBases//documents/`. + */ + source?: string | null; + } + /** + * Output only. Represents a notification sent to Pub/Sub subscribers for agent assistant events in a specific conversation. + */ + export interface Schema$GoogleCloudDialogflowV2beta1HumanAgentAssistantEvent { + /** + * The conversation this notification refers to. Format: `projects//conversations/`. + */ + conversation?: string | null; + /** + * The participant that the suggestion is compiled for. And This field is used to call Participants.ListSuggestions API. Format: `projects//conversations//participants/`. It will not be set in legacy workflow. HumanAgentAssistantConfig.name for more information. + */ + participant?: string | null; + /** + * The suggestion results payload that this notification refers to. It will only be set when HumanAgentAssistantConfig.SuggestionConfig.group_suggestion_responses sets to true. + */ + suggestionResults?: Schema$GoogleCloudDialogflowV2beta1SuggestionResult[]; + } + /** + * Response message for Documents.ImportDocuments. + */ + export interface Schema$GoogleCloudDialogflowV2beta1ImportDocumentsResponse { + /** + * Includes details about skipped documents or any other warnings. + */ + warnings?: Schema$GoogleRpcStatus[]; + } /** * An intent categorizes an end-user's intention for one conversation turn. For each agent, you define many intents, where your combined intents can handle a complete conversation. When an end-user writes or says something, referred to as an end-user expression or end-user input, Dialogflow matches the end-user input to the best intent in your agent. Matching an intent is also known as intent classification. For more information, see the [intent guide](https://cloud.google.com/dialogflow/docs/intents-overview). */ @@ -2614,6 +2913,10 @@ export namespace dialogflow_v2 { * Optional. Indicates whether this is a fallback intent. */ isFallback?: boolean | null; + /** + * Optional. Indicates that a live agent should be brought in to handle the interaction with the user. In most cases, when you set this flag to true, you would also want to set end_interaction to true as well. Default is false. + */ + liveAgentHandoff?: boolean | null; /** * Optional. The collection of rich messages corresponding to the `Response` field in the Dialogflow console. */ @@ -3479,6 +3782,60 @@ export namespace dialogflow_v2 { */ state?: string | null; } + /** + * Represents a message posted into a conversation. + */ + export interface Schema$GoogleCloudDialogflowV2beta1Message { + /** + * Required. The message content. + */ + content?: string | null; + /** + * Output only. The time when the message was created in Contact Center AI. + */ + createTime?: string | null; + /** + * Optional. The message language. This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. Example: "en-US". + */ + languageCode?: string | null; + /** + * Output only. The annotation for the message. + */ + messageAnnotation?: Schema$GoogleCloudDialogflowV2beta1MessageAnnotation; + /** + * Optional. The unique identifier of the message. Format: `projects//locations//conversations//messages/`. + */ + name?: string | null; + /** + * Output only. The participant that sends this message. + */ + participant?: string | null; + /** + * Output only. The role of the participant. + */ + participantRole?: string | null; + /** + * Optional. The time when the message was sent. + */ + sendTime?: string | null; + /** + * Output only. The sentiment analysis result for the message. + */ + sentimentAnalysis?: Schema$GoogleCloudDialogflowV2beta1SentimentAnalysisResult; + } + /** + * Represents the result of annotation for the message. + */ + export interface Schema$GoogleCloudDialogflowV2beta1MessageAnnotation { + /** + * Required. Indicates whether the text message contains entities. + */ + containEntities?: boolean | null; + /** + * Optional. The collection of annotated message parts ordered by their position in the message. You can recover the annotated message by concatenating [AnnotatedMessagePart.text]. + */ + parts?: Schema$GoogleCloudDialogflowV2beta1AnnotatedMessagePart[]; + } /** * Represents the contents of the original request that was passed to the `[Streaming]DetectIntent` call. */ @@ -3605,50 +3962,143 @@ export namespace dialogflow_v2 { name?: string | null; } /** - * The request message for a webhook call. + * Represents a smart reply answer. */ - export interface Schema$GoogleCloudDialogflowV2beta1WebhookRequest { + export interface Schema$GoogleCloudDialogflowV2beta1SmartReplyAnswer { /** - * Alternative query results from KnowledgeService. + * The name of answer record, in the format of "projects//locations//answerRecords/" */ - alternativeQueryResults?: Schema$GoogleCloudDialogflowV2beta1QueryResult[]; + answerRecord?: string | null; /** - * Optional. The contents of the original request that was passed to `[Streaming]DetectIntent` call. + * Smart reply confidence. The system's confidence score that this reply is a good match for this conversation, as a value from 0.0 (completely uncertain) to 1.0 (completely certain). */ - originalDetectIntentRequest?: Schema$GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest; + confidence?: number | null; /** - * The result of the conversational query or event processing. Contains the same value as `[Streaming]DetectIntentResponse.query_result`. + * The content of the reply. */ - queryResult?: Schema$GoogleCloudDialogflowV2beta1QueryResult; + reply?: string | null; + } + /** + * The response message for Participants.SuggestArticles. + */ + export interface Schema$GoogleCloudDialogflowV2beta1SuggestArticlesResponse { /** - * The unique identifier of the response. Contains the same value as `[Streaming]DetectIntentResponse.response_id`. + * Output only. Articles ordered by score in descending order. */ - responseId?: string | null; + articleAnswers?: Schema$GoogleCloudDialogflowV2beta1ArticleAnswer[]; /** - * The unique identifier of detectIntent request session. Can be used to identify end-user inside webhook implementation. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, + * Number of messages prior to and including latest_message to compile the suggestion. It may be smaller than the SuggestArticlesResponse.context_size field in the request if there aren't that many messages in the conversation. */ - session?: string | null; + contextSize?: number | null; + /** + * The name of the latest conversation message used to compile suggestion for. Format: `projects//locations//conversations//messages/`. + */ + latestMessage?: string | null; } /** - * The response message for a webhook call. This response is validated by the Dialogflow server. If validation fails, an error will be returned in the QueryResult.diagnostic_info field. Setting JSON fields to an empty value with the wrong type is a common error. To avoid this error: - Use `""` for empty strings - Use `{\}` or `null` for empty objects - Use `[]` or `null` for empty arrays For more information, see the [Protocol Buffers Language Guide](https://developers.google.com/protocol-buffers/docs/proto3#json). + * The request message for Participants.SuggestFaqAnswers. */ - export interface Schema$GoogleCloudDialogflowV2beta1WebhookResponse { + export interface Schema$GoogleCloudDialogflowV2beta1SuggestFaqAnswersResponse { /** - * Optional. Indicates that this intent ends an interaction. Some integrations (e.g., Actions on Google or Dialogflow phone gateway) use this information to close interaction with an end user. Default is false. + * Number of messages prior to and including latest_message to compile the suggestion. It may be smaller than the SuggestFaqAnswersRequest.context_size field in the request if there aren't that many messages in the conversation. */ - endInteraction?: boolean | null; + contextSize?: number | null; /** - * Optional. Invokes the supplied events. When this field is set, Dialogflow ignores the `fulfillment_text`, `fulfillment_messages`, and `payload` fields. + * Output only. Answers extracted from FAQ documents. */ - followupEventInput?: Schema$GoogleCloudDialogflowV2beta1EventInput; + faqAnswers?: Schema$GoogleCloudDialogflowV2beta1FaqAnswer[]; /** - * Optional. The rich response messages intended for the end-user. When provided, Dialogflow uses this field to populate QueryResult.fulfillment_messages sent to the integration or API caller. + * The name of the latest conversation message used to compile suggestion for. Format: `projects//locations//conversations//messages/`. */ - fulfillmentMessages?: Schema$GoogleCloudDialogflowV2beta1IntentMessage[]; - /** - * Optional. The text response message intended for the end-user. It is recommended to use `fulfillment_messages.text.text[0]` instead. When provided, Dialogflow uses this field to populate QueryResult.fulfillment_text sent to the integration or API caller. + latestMessage?: string | null; + } + /** + * One response of different type of suggestion response which is used in the response of Participants.AnalyzeContent and Participants.AnalyzeContent, as well as HumanAgentAssistantEvent. + */ + export interface Schema$GoogleCloudDialogflowV2beta1SuggestionResult { + /** + * Error status if the request failed. + */ + error?: Schema$GoogleRpcStatus; + /** + * SuggestArticlesResponse if request is for ARTICLE_SUGGESTION. + */ + suggestArticlesResponse?: Schema$GoogleCloudDialogflowV2beta1SuggestArticlesResponse; + /** + * SuggestFaqAnswersResponse if request is for FAQ_ANSWER. + */ + suggestFaqAnswersResponse?: Schema$GoogleCloudDialogflowV2beta1SuggestFaqAnswersResponse; + /** + * SuggestSmartRepliesResponse if request is for SMART_REPLY. + */ + suggestSmartRepliesResponse?: Schema$GoogleCloudDialogflowV2beta1SuggestSmartRepliesResponse; + } + /** + * The response message for Participants.SuggestSmartReplies. + */ + export interface Schema$GoogleCloudDialogflowV2beta1SuggestSmartRepliesResponse { + /** + * Number of messages prior to and including latest_message to compile the suggestion. It may be smaller than the SuggestSmartRepliesRequest.context_size field in the request if there aren't that many messages in the conversation. + */ + contextSize?: number | null; + /** + * The name of the latest conversation message used to compile suggestion for. Format: `projects//locations//conversations//messages/`. + */ + latestMessage?: string | null; + /** + * Output only. Multiple reply options provided by smart reply service. The order is based on the rank of the model prediction. The maximum number of the returned replies is set in SmartReplyConfig. + */ + smartReplyAnswers?: Schema$GoogleCloudDialogflowV2beta1SmartReplyAnswer[]; + } + /** + * The request message for a webhook call. + */ + export interface Schema$GoogleCloudDialogflowV2beta1WebhookRequest { + /** + * Alternative query results from KnowledgeService. + */ + alternativeQueryResults?: Schema$GoogleCloudDialogflowV2beta1QueryResult[]; + /** + * Optional. The contents of the original request that was passed to `[Streaming]DetectIntent` call. + */ + originalDetectIntentRequest?: Schema$GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest; + /** + * The result of the conversational query or event processing. Contains the same value as `[Streaming]DetectIntentResponse.query_result`. + */ + queryResult?: Schema$GoogleCloudDialogflowV2beta1QueryResult; + /** + * The unique identifier of the response. Contains the same value as `[Streaming]DetectIntentResponse.response_id`. + */ + responseId?: string | null; + /** + * The unique identifier of detectIntent request session. Can be used to identify end-user inside webhook implementation. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, + */ + session?: string | null; + } + /** + * The response message for a webhook call. This response is validated by the Dialogflow server. If validation fails, an error will be returned in the QueryResult.diagnostic_info field. Setting JSON fields to an empty value with the wrong type is a common error. To avoid this error: - Use `""` for empty strings - Use `{\}` or `null` for empty objects - Use `[]` or `null` for empty arrays For more information, see the [Protocol Buffers Language Guide](https://developers.google.com/protocol-buffers/docs/proto3#json). + */ + export interface Schema$GoogleCloudDialogflowV2beta1WebhookResponse { + /** + * Optional. Indicates that this intent ends an interaction. Some integrations (e.g., Actions on Google or Dialogflow phone gateway) use this information to close interaction with an end user. Default is false. + */ + endInteraction?: boolean | null; + /** + * Optional. Invokes the supplied events. When this field is set, Dialogflow ignores the `fulfillment_text`, `fulfillment_messages`, and `payload` fields. + */ + followupEventInput?: Schema$GoogleCloudDialogflowV2beta1EventInput; + /** + * Optional. The rich response messages intended for the end-user. When provided, Dialogflow uses this field to populate QueryResult.fulfillment_messages sent to the integration or API caller. + */ + fulfillmentMessages?: Schema$GoogleCloudDialogflowV2beta1IntentMessage[]; + /** + * Optional. The text response message intended for the end-user. It is recommended to use `fulfillment_messages.text.text[0]` instead. When provided, Dialogflow uses this field to populate QueryResult.fulfillment_text sent to the integration or API caller. */ fulfillmentText?: string | null; + /** + * Indicates that a live agent should be brought in to handle the interaction with the user. In most cases, when you set this flag to true, you would also want to set end_interaction to true as well. Default is false. + */ + liveAgentHandoff?: boolean | null; /** * Optional. The collection of output contexts that will overwrite currently active contexts for the session and reset their lifespans. When provided, Dialogflow uses this field to populate QueryResult.output_contexts sent to the integration or API caller. */ @@ -3666,6 +4116,10 @@ export namespace dialogflow_v2 { */ source?: string | null; } + /** + * The request message for Conversations.CompleteConversation. + */ + export interface Schema$GoogleCloudDialogflowV2CompleteConversationRequest {} /** * Dialogflow contexts are similar to natural language context. If a person says to you "they are orange", you need context in order to understand what "they" is referring to. Similarly, for Dialogflow to handle an end-user expression like that, it needs to be provided with context in order to correctly match an intent. Using contexts, you can control the flow of a conversation. You can configure contexts for an intent by setting input and output contexts, which are identified by string names. When an intent is matched, any configured output contexts for that intent become active. While any contexts are active, Dialogflow is more likely to match intents that are configured with input contexts that correspond to the currently active contexts. For more information about context, see the [Contexts guide](https://cloud.google.com/dialogflow/docs/contexts-overview). */ @@ -3683,6 +4137,39 @@ export namespace dialogflow_v2 { */ parameters?: {[key: string]: any} | null; } + /** + * Represents a conversation. A conversation is an interaction between an agent, including live agents and Dialogflow agents, and a support customer. Conversations can include phone calls and text-based chat sessions. + */ + export interface Schema$GoogleCloudDialogflowV2Conversation { + /** + * Required. The Conversation Profile to be used to configure this Conversation. This field cannot be updated. Format: `projects//locations//conversationProfiles/`. + */ + conversationProfile?: string | null; + /** + * The stage of a conversation. It indicates whether the virtual agent or a human agent is handling the conversation. If the conversation is created with the conversation profile that has Dialogflow config set, defaults to ConversationStage.VIRTUAL_AGENT_STAGE; Otherwise, defaults to ConversationStage.HUMAN_ASSIST_STAGE. If the conversation is created with the conversation profile that has Dialogflow config set but explicitly sets conversation_stage to ConversationStage.HUMAN_ASSIST_STAGE, it skips ConversationStage.VIRTUAL_AGENT_STAGE stage and directly goes to ConversationStage.HUMAN_ASSIST_STAGE. + */ + conversationStage?: string | null; + /** + * Output only. The time the conversation was finished. + */ + endTime?: string | null; + /** + * Output only. The current state of the Conversation. + */ + lifecycleState?: string | null; + /** + * Output only. The unique identifier of this conversation. Format: `projects//locations//conversations/`. + */ + name?: string | null; + /** + * Output only. It will not be empty if the conversation is to be connected over telephony. + */ + phoneNumber?: Schema$GoogleCloudDialogflowV2ConversationPhoneNumber; + /** + * Output only. The time the conversation was started. + */ + startTime?: string | null; + } /** * Represents a notification sent to Pub/Sub subscribers for conversation lifecycle events. */ @@ -3704,6 +4191,64 @@ export namespace dialogflow_v2 { */ type?: string | null; } + /** + * Represents a phone number for telephony integration. It allows for connecting a particular conversation over telephony. + */ + export interface Schema$GoogleCloudDialogflowV2ConversationPhoneNumber { + /** + * Output only. The phone number to connect to this conversation. + */ + phoneNumber?: string | null; + } + /** + * Defines the services to connect to incoming Dialogflow conversations. + */ + export interface Schema$GoogleCloudDialogflowV2ConversationProfile { + /** + * Configuration for an automated agent to use with this profile. + */ + automatedAgentConfig?: Schema$GoogleCloudDialogflowV2AutomatedAgentConfig; + /** + * Output only. Create time of the conversation profile. + */ + createTime?: string | null; + /** + * Required. Human readable name for this profile. Max length 1024 bytes. + */ + displayName?: string | null; + /** + * Configuration for agent assistance to use with this profile. + */ + humanAgentAssistantConfig?: Schema$GoogleCloudDialogflowV2HumanAgentAssistantConfig; + /** + * Language which represents the conversationProfile. If unspecified, the default language code en-us applies. Users need to create a ConversationProfile for each language they want to support. + */ + languageCode?: string | null; + /** + * Configuration for logging conversation lifecycle events. + */ + loggingConfig?: Schema$GoogleCloudDialogflowV2LoggingConfig; + /** + * The unique identifier of this conversation profile. Format: `projects//locations//conversationProfiles/`. + */ + name?: string | null; + /** + * Configuration for publishing new message events. Event will be sent in format of ConversationEvent + */ + newMessageEventNotificationConfig?: Schema$GoogleCloudDialogflowV2NotificationConfig; + /** + * Configuration for publishing conversation lifecycle events. + */ + notificationConfig?: Schema$GoogleCloudDialogflowV2NotificationConfig; + /** + * Settings for speech transcription. + */ + sttConfig?: Schema$GoogleCloudDialogflowV2SpeechToTextConfig; + /** + * Output only. Update time of the conversation profile. + */ + updateTime?: string | null; + } /** * The request to detect user's intent. */ @@ -3754,6 +4299,69 @@ export namespace dialogflow_v2 { */ webhookStatus?: Schema$GoogleRpcStatus; } + /** + * A knowledge document to be used by a KnowledgeBase. For more information, see the [knowledge base guide](https://cloud.google.com/dialogflow/docs/how/knowledge-bases). Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`. + */ + export interface Schema$GoogleCloudDialogflowV2Document { + /** + * The URI where the file content is located. For documents stored in Google Cloud Storage, these URIs must have the form `gs:///`. NOTE: External URLs must correspond to public webpages, i.e., they must be indexed by Google Search. In particular, URLs for showing documents in Google Cloud Storage (i.e. the URL in your browser) are not supported. Instead use the `gs://` format URI described above. + */ + contentUri?: string | null; + /** + * Required. The display name of the document. The name must be 1024 bytes or less; otherwise, the creation request fails. + */ + displayName?: string | null; + /** + * Optional. If true, we try to automatically reload the document every day (at a time picked by the system). If false or unspecified, we don't try to automatically reload the document. Currently you can only enable automatic reload for documents sourced from a public url, see `source` field for the source types. Reload status can be tracked in `latest_reload_status`. If a reload fails, we will keep the document unchanged. If a reload fails with internal errors, the system will try to reload the document on the next day. If a reload fails with non-retriable errors (e.g. PERMISION_DENIED), the system will not try to reload the document anymore. You need to manually reload the document successfully by calling `ReloadDocument` and clear the errors. + */ + enableAutoReload?: boolean | null; + /** + * Required. The knowledge type of document content. + */ + knowledgeTypes?: string[] | null; + /** + * Output only. The time and status of the latest reload. This reload may have been triggered automatically or manually and may not have succeeded. + */ + latestReloadStatus?: Schema$GoogleCloudDialogflowV2DocumentReloadStatus; + /** + * Optional. Metadata for the document. The metadata supports arbitrary key-value pairs. Suggested use cases include storing a document's title, an external URL distinct from the document's content_uri, etc. The max size of a `key` or a `value` of the metadata is 1024 bytes. + */ + metadata?: {[key: string]: string} | null; + /** + * Required. The MIME type of this document. + */ + mimeType?: string | null; + /** + * Optional. The document resource name. The name must be empty when creating a document. Format: `projects//locations//knowledgeBases//documents/`. + */ + name?: string | null; + /** + * The raw content of the document. This field is only permitted for EXTRACTIVE_QA and FAQ knowledge types. + */ + rawContent?: string | null; + } + /** + * The status of a reload attempt. + */ + export interface Schema$GoogleCloudDialogflowV2DocumentReloadStatus { + /** + * The status of a reload attempt or the initial load. + */ + status?: Schema$GoogleRpcStatus; + /** + * The time of a reload attempt. This reload may have been triggered automatically or manually and may not have succeeded. + */ + time?: string | null; + } + /** + * The message in the response that indicates the parameters of DTMF. + */ + export interface Schema$GoogleCloudDialogflowV2DtmfParameters { + /** + * Indicates whether DTMF input can be handled in the next request. + */ + acceptsDtmfInput?: boolean | null; + } /** * Each intent parameter has a type, called the entity type, which dictates exactly how data from an end-user expression is extracted. Dialogflow provides predefined system entities that can match many common types of data. For example, there are system entities for matching dates, times, colors, email addresses, and so on. You can also create your own custom entities for matching custom data. For example, you could define a vegetable entity that can match the types of vegetables available for purchase with a grocery store agent. For more information, see the [Entity guide](https://cloud.google.com/dialogflow/docs/entities-overview). */ @@ -3869,6 +4477,35 @@ export namespace dialogflow_v2 { */ agentUri?: string | null; } + /** + * Represents answer from "frequently asked questions". + */ + export interface Schema$GoogleCloudDialogflowV2FaqAnswer { + /** + * The piece of text from the `source` knowledge base document. + */ + answer?: string | null; + /** + * The name of answer record, in the format of "projects//locations//answerRecords/" + */ + answerRecord?: string | null; + /** + * The system's confidence score that this Knowledge answer is a good match for this conversational query, range from 0.0 (completely uncertain) to 1.0 (completely certain). + */ + confidence?: number | null; + /** + * A map that contains metadata about the answer and the document from which it originates. + */ + metadata?: {[key: string]: string} | null; + /** + * The corresponding FAQ question. + */ + question?: string | null; + /** + * Indicates which Knowledge Document this answer was extracted from. Format: `projects//locations//agent/knowledgeBases//documents/`. + */ + source?: string | null; + } /** * By default, your agent responds to a matched intent with a static response. As an alternative, you can provide a more dynamic response by using fulfillment. When you enable fulfillment for an intent, Dialogflow responds to that intent by calling a service that you define. For example, if an end-user wants to schedule a haircut on Friday, your service can check your database and respond to the end-user with availability information for Friday. For more information, see the [fulfillment guide](https://cloud.google.com/dialogflow/docs/fulfillment-overview). */ @@ -3929,111 +4566,299 @@ export namespace dialogflow_v2 { username?: string | null; } /** - * The request message for Agents.ImportAgent. + * Defines the Human Agent Assist to connect to a conversation. */ - export interface Schema$GoogleCloudDialogflowV2ImportAgentRequest { + export interface Schema$GoogleCloudDialogflowV2HumanAgentAssistantConfig { /** - * Zip compressed raw byte content for agent. + * Configuration for agent assistance of human agent participant. */ - agentContent?: string | null; + humanAgentSuggestionConfig?: Schema$GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionConfig; /** - * The URI to a Google Cloud Storage file containing the agent to import. Note: The URI must start with "gs://". + * Configuration for message analysis. */ - agentUri?: string | null; + messageAnalysisConfig?: Schema$GoogleCloudDialogflowV2HumanAgentAssistantConfigMessageAnalysisConfig; + /** + * Pub/Sub topic on which to publish new agent assistant events. + */ + notificationConfig?: Schema$GoogleCloudDialogflowV2NotificationConfig; } /** - * Instructs the speech recognizer how to process the audio content. + * Custom conversation models used in agent assist feature. Supported feature: ARTICLE_SUGGESTION, SMART_COMPOSE, SMART_REPLY. */ - export interface Schema$GoogleCloudDialogflowV2InputAudioConfig { + export interface Schema$GoogleCloudDialogflowV2HumanAgentAssistantConfigConversationModelConfig { /** - * Required. Audio encoding of the audio content to process. + * Required. Conversation model resource name. Format: `projects//conversationModels/`. */ - audioEncoding?: string | null; + model?: string | null; + } + /** + * Configuration for analyses to run on each conversation message. + */ + export interface Schema$GoogleCloudDialogflowV2HumanAgentAssistantConfigMessageAnalysisConfig { /** - * If `true`, Dialogflow returns SpeechWordInfo in StreamingRecognitionResult with information about the recognized speech words, e.g. start and end time offsets. If false or unspecified, Speech doesn't return any word-level information. + * Enable sentiment analysis in conversation messages on [agent assist stage](https://cloud.google.com/dialogflow/priv/docs/contact-center/basics#stages). If unspecified, defaults to false. Sentiment analysis inspects user input and identifies the prevailing subjective opinion, especially to determine a user's attitude as positive, negative, or neutral: https://cloud.google.com/natural-language/docs/basics#sentiment_analysis For Participants.StreamingAnalyzeContent method, result will be in StreamingAnalyzeContentResponse.message.SentimentAnalysisResult. For Participants.AnalyzeContent method, result will be in AnalyzeContentResponse.message.SentimentAnalysisResult For Conversations.ListMessages method, result will be in ListMessagesResponse.messages.SentimentAnalysisResult If Pub/Sub notification is configured, result will be in ConversationEvent.new_message_payload.SentimentAnalysisResult. */ - enableWordInfo?: boolean | null; + enableSentimentAnalysis?: boolean | null; + } + /** + * Detail human agent assistant config. + */ + export interface Schema$GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionConfig { /** - * Required. The language of the supplied audio. Dialogflow does not do translations. See [Language Support](https://cloud.google.com/dialogflow/docs/reference/language) for a list of the currently supported language codes. Note that queries in the same session do not necessarily need to specify the same language. + * Configuration of different suggestion features. One feature can have only one config. */ - languageCode?: string | null; + featureConfigs?: Schema$GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionFeatureConfig[]; /** - * Which Speech model to select for the given request. Select the model best suited to your domain to get best results. If a model is not explicitly specified, then we auto-select a model based on the parameters in the InputAudioConfig. If enhanced speech model is enabled for the agent and an enhanced version of the specified model for the language does not exist, then the speech is recognized using the standard version of the specified model. Refer to [Cloud Speech API documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model) for more details. + * If `group_suggestion_responses` is false, and there are multiple `feature_configs` in `event based suggestion` or StreamingAnalyzeContent, we will try to deliver suggestions to customers as soon as we get new suggestion. Different type of suggestions based on the same context will be in separate Pub/Sub event or `StreamingAnalyzeContentResponse`. If `group_suggestion_responses` set to true. All the suggestions to the same participant based on the same context will be grouped into a single Pub/Sub event or StreamingAnalyzeContentResponse. */ - model?: string | null; + groupSuggestionResponses?: boolean | null; + } + /** + * Config for suggestion features. + */ + export interface Schema$GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionFeatureConfig { /** - * Which variant of the Speech model to use. + * Configs of custom conversation model. */ - modelVariant?: string | null; + conversationModelConfig?: Schema$GoogleCloudDialogflowV2HumanAgentAssistantConfigConversationModelConfig; /** - * A list of strings containing words and phrases that the speech recognizer should recognize with higher likelihood. See [the Cloud Speech documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints) for more details. This field is deprecated. Please use [speech_contexts]() instead. If you specify both [phrase_hints]() and [speech_contexts](), Dialogflow will treat the [phrase_hints]() as a single additional [SpeechContext](). + * Automatically iterates all participants and tries to compile suggestions. Supported features: ARTICLE_SUGGESTION, FAQ, DIALOGFLOW_ASSIST. */ - phraseHints?: string[] | null; + enableEventBasedSuggestion?: boolean | null; /** - * Required. Sample rate (in Hertz) of the audio content sent in the query. Refer to [Cloud Speech API documentation](https://cloud.google.com/speech-to-text/docs/basics) for more details. + * Configs of query. */ - sampleRateHertz?: number | null; + queryConfig?: Schema$GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfig; /** - * If `false` (default), recognition does not cease until the client closes the stream. If `true`, the recognizer will detect a single spoken utterance in input audio. Recognition ceases when it detects the audio's voice has stopped or paused. In this case, once a detected intent is received, the client should close the stream and start a new request with a new stream as needed. Note: This setting is relevant only for streaming methods. Note: When specified, InputAudioConfig.single_utterance takes precedence over StreamingDetectIntentRequest.single_utterance. + * The suggestion feature. */ - singleUtterance?: boolean | null; + suggestionFeature?: Schema$GoogleCloudDialogflowV2SuggestionFeature; /** - * Context information to assist speech recognition. See [the Cloud Speech documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints) for more details. + * Settings of suggestion trigger. Currently, only ARTICLE_SUGGESTION and FAQ will use this field. */ - speechContexts?: Schema$GoogleCloudDialogflowV2SpeechContext[]; + suggestionTriggerSettings?: Schema$GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionTriggerSettings; } /** - * An intent categorizes an end-user's intention for one conversation turn. For each agent, you define many intents, where your combined intents can handle a complete conversation. When an end-user writes or says something, referred to as an end-user expression or end-user input, Dialogflow matches the end-user input to the best intent in your agent. Matching an intent is also known as intent classification. For more information, see the [intent guide](https://cloud.google.com/dialogflow/docs/intents-overview). + * Config for suggestion query. */ - export interface Schema$GoogleCloudDialogflowV2Intent { + export interface Schema$GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfig { /** - * Optional. The name of the action associated with the intent. Note: The action name must not contain whitespaces. + * Confidence threshold of query result. Agent Assist gives each suggestion a score in the range [0.0, 1.0], based on the relevance between the suggestion and the current conversation context. A score of 0.0 has no relevance, while a score of 1.0 has high relevance. Only suggestions with a score greater than or equal to the value of this field are included in the results. For a baseline model (the default), the recommended value is in the range [0.05, 0.1]. For a custom model, there is no recommended value. Tune this value by starting from a very low value and slowly increasing until you have desired results. If this field is not set, it defaults to 0.0, which means that all suggestions are returned. Supported features: ARTICLE_SUGGESTION. */ - action?: string | null; + confidenceThreshold?: number | null; /** - * Optional. The list of platforms for which the first responses will be copied from the messages in PLATFORM_UNSPECIFIED (i.e. default platform). + * Determines how recent conversation context is filtered when generating suggestions. If unspecified, no messages will be dropped. */ - defaultResponsePlatforms?: string[] | null; + contextFilterSettings?: Schema$GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigContextFilterSettings; /** - * Required. The name of this intent. + * Query from Dialogflow agent. It is used by DIALOGFLOW_ASSIST. */ - displayName?: string | null; + dialogflowQuerySource?: Schema$GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDialogflowQuerySource; /** - * Optional. The collection of event names that trigger the intent. If the collection of input contexts is not empty, all of the contexts must be present in the active user session for an event to trigger this intent. Event names are limited to 150 characters. + * Query from knowledge base document. It is used by: SMART_REPLY, SMART_COMPOSE. */ - events?: string[] | null; + documentQuerySource?: Schema$GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDocumentQuerySource; /** - * Read-only. Information about all followup intents that have this intent as a direct or indirect parent. We populate this field only in the output. + * Query from knowledgebase. It is used by: ARTICLE_SUGGESTION, FAQ. */ - followupIntentInfo?: Schema$GoogleCloudDialogflowV2IntentFollowupIntentInfo[]; + knowledgeBaseQuerySource?: Schema$GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigKnowledgeBaseQuerySource; /** - * Optional. The list of context names required for this intent to be triggered. Format: `projects//agent/sessions/-/contexts/`. + * Maximum number of results to return. Currently, if unset, defaults to 10. And the max number is 20. */ - inputContextNames?: string[] | null; + maxResults?: number | null; + } + /** + * Settings that determine how to filter recent conversation context when generating suggestions. + */ + export interface Schema$GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigContextFilterSettings { /** - * Optional. Indicates whether this is a fallback intent. + * If set to true, the last message from virtual agent (hand off message) and the message before it (trigger message of hand off) are dropped. */ - isFallback?: boolean | null; + dropHandoffMessages?: boolean | null; /** - * Optional. The collection of rich messages corresponding to the `Response` field in the Dialogflow console. + * If set to true, all messages from ivr stage are dropped. */ - messages?: Schema$GoogleCloudDialogflowV2IntentMessage[]; + dropIvrMessages?: boolean | null; /** - * Optional. Indicates whether Machine Learning is disabled for the intent. Note: If `ml_disabled` setting is set to true, then this intent is not taken into account during inference in `ML ONLY` match mode. Also, auto-markup in the UI is turned off. + * If set to true, all messages from virtual agent are dropped. */ - mlDisabled?: boolean | null; + dropVirtualAgentMessages?: boolean | null; + } + /** + * Dialogflow source setting. Supported feature: DIALOGFLOW_ASSIST. + */ + export interface Schema$GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDialogflowQuerySource { /** - * Optional. The unique identifier of this intent. Required for Intents.UpdateIntent and Intents.BatchUpdateIntents methods. Format: `projects//agent/intents/`. + * Required. The name of a Dialogflow virtual agent used for end user side intent detection and suggestion. Format: `projects//locations//agent`. When multiple agents are allowed in the same Dialogflow project. */ - name?: string | null; + agent?: string | null; + } + /** + * Document source settings. Supported features: SMART_REPLY, SMART_COMPOSE. + */ + export interface Schema$GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDocumentQuerySource { /** - * Optional. The collection of contexts that are activated when the intent is matched. Context messages in this collection should not set the parameters field. Setting the `lifespan_count` to 0 will reset the context when the intent is matched. Format: `projects//agent/sessions/-/contexts/`. + * Required. Knowledge documents to query from. Format: `projects//locations//knowledgeBases//documents/`. Currently, at most 5 documents are supported. */ - outputContexts?: Schema$GoogleCloudDialogflowV2Context[]; + documents?: string[] | null; + } + /** + * Knowledge base source settings. Supported features: ARTICLE_SUGGESTION, FAQ. + */ + export interface Schema$GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigKnowledgeBaseQuerySource { /** - * Optional. The collection of parameters associated with the intent. + * Required. Knowledge bases to query. Format: `projects//locations//knowledgeBases/`. Currently, at most 5 knowledge bases are supported. */ - parameters?: Schema$GoogleCloudDialogflowV2IntentParameter[]; + knowledgeBases?: string[] | null; + } + /** + * Settings of suggestion trigger. + */ + export interface Schema$GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionTriggerSettings { + /** + * Do not trigger if last utterance is small talk. + */ + noSmalltalk?: boolean | null; + /** + * Only trigger suggestion if participant role of last utterance is END_USER. + */ + onlyEndUser?: boolean | null; + } + /** + * Represents a notification sent to Cloud Pub/Sub subscribers for human agent assistant events in a specific conversation. + */ + export interface Schema$GoogleCloudDialogflowV2HumanAgentAssistantEvent { + /** + * The conversation this notification refers to. Format: `projects//conversations/`. + */ + conversation?: string | null; + /** + * The participant that the suggestion is compiled for. Format: `projects//conversations//participants/`. It will not be set in legacy workflow. + */ + participant?: string | null; + /** + * The suggestion results payload that this notification refers to. + */ + suggestionResults?: Schema$GoogleCloudDialogflowV2SuggestionResult[]; + } + /** + * The request message for Agents.ImportAgent. + */ + export interface Schema$GoogleCloudDialogflowV2ImportAgentRequest { + /** + * Zip compressed raw byte content for agent. + */ + agentContent?: string | null; + /** + * The URI to a Google Cloud Storage file containing the agent to import. Note: The URI must start with "gs://". + */ + agentUri?: string | null; + } + /** + * Instructs the speech recognizer how to process the audio content. + */ + export interface Schema$GoogleCloudDialogflowV2InputAudioConfig { + /** + * Required. Audio encoding of the audio content to process. + */ + audioEncoding?: string | null; + /** + * Only used in Participants.AnalyzeContent and Participants.StreamingAnalyzeContent. If `false` and recognition doesn't return any result, trigger `NO_SPEECH_RECOGNIZED` event to Dialogflow agent. + */ + disableNoSpeechRecognizedEvent?: boolean | null; + /** + * If `true`, Dialogflow returns SpeechWordInfo in StreamingRecognitionResult with information about the recognized speech words, e.g. start and end time offsets. If false or unspecified, Speech doesn't return any word-level information. + */ + enableWordInfo?: boolean | null; + /** + * Required. The language of the supplied audio. Dialogflow does not do translations. See [Language Support](https://cloud.google.com/dialogflow/docs/reference/language) for a list of the currently supported language codes. Note that queries in the same session do not necessarily need to specify the same language. + */ + languageCode?: string | null; + /** + * Which Speech model to select for the given request. Select the model best suited to your domain to get best results. If a model is not explicitly specified, then we auto-select a model based on the parameters in the InputAudioConfig. If enhanced speech model is enabled for the agent and an enhanced version of the specified model for the language does not exist, then the speech is recognized using the standard version of the specified model. Refer to [Cloud Speech API documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model) for more details. + */ + model?: string | null; + /** + * Which variant of the Speech model to use. + */ + modelVariant?: string | null; + /** + * A list of strings containing words and phrases that the speech recognizer should recognize with higher likelihood. See [the Cloud Speech documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints) for more details. This field is deprecated. Please use [speech_contexts]() instead. If you specify both [phrase_hints]() and [speech_contexts](), Dialogflow will treat the [phrase_hints]() as a single additional [SpeechContext](). + */ + phraseHints?: string[] | null; + /** + * Required. Sample rate (in Hertz) of the audio content sent in the query. Refer to [Cloud Speech API documentation](https://cloud.google.com/speech-to-text/docs/basics) for more details. + */ + sampleRateHertz?: number | null; + /** + * If `false` (default), recognition does not cease until the client closes the stream. If `true`, the recognizer will detect a single spoken utterance in input audio. Recognition ceases when it detects the audio's voice has stopped or paused. In this case, once a detected intent is received, the client should close the stream and start a new request with a new stream as needed. Note: This setting is relevant only for streaming methods. Note: When specified, InputAudioConfig.single_utterance takes precedence over StreamingDetectIntentRequest.single_utterance. + */ + singleUtterance?: boolean | null; + /** + * Context information to assist speech recognition. See [the Cloud Speech documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints) for more details. + */ + speechContexts?: Schema$GoogleCloudDialogflowV2SpeechContext[]; + } + /** + * An intent categorizes an end-user's intention for one conversation turn. For each agent, you define many intents, where your combined intents can handle a complete conversation. When an end-user writes or says something, referred to as an end-user expression or end-user input, Dialogflow matches the end-user input to the best intent in your agent. Matching an intent is also known as intent classification. For more information, see the [intent guide](https://cloud.google.com/dialogflow/docs/intents-overview). + */ + export interface Schema$GoogleCloudDialogflowV2Intent { + /** + * Optional. The name of the action associated with the intent. Note: The action name must not contain whitespaces. + */ + action?: string | null; + /** + * Optional. The list of platforms for which the first responses will be copied from the messages in PLATFORM_UNSPECIFIED (i.e. default platform). + */ + defaultResponsePlatforms?: string[] | null; + /** + * Required. The name of this intent. + */ + displayName?: string | null; + /** + * Optional. Indicates that this intent ends an interaction. Some integrations (e.g., Actions on Google or Dialogflow phone gateway) use this information to close interaction with an end user. Default is false. + */ + endInteraction?: boolean | null; + /** + * Optional. The collection of event names that trigger the intent. If the collection of input contexts is not empty, all of the contexts must be present in the active user session for an event to trigger this intent. Event names are limited to 150 characters. + */ + events?: string[] | null; + /** + * Read-only. Information about all followup intents that have this intent as a direct or indirect parent. We populate this field only in the output. + */ + followupIntentInfo?: Schema$GoogleCloudDialogflowV2IntentFollowupIntentInfo[]; + /** + * Optional. The list of context names required for this intent to be triggered. Format: `projects//agent/sessions/-/contexts/`. + */ + inputContextNames?: string[] | null; + /** + * Optional. Indicates whether this is a fallback intent. + */ + isFallback?: boolean | null; + /** + * Optional. Indicates that a live agent should be brought in to handle the interaction with the user. In most cases, when you set this flag to true, you would also want to set end_interaction to true as well. Default is false. + */ + liveAgentHandoff?: boolean | null; + /** + * Optional. The collection of rich messages corresponding to the `Response` field in the Dialogflow console. + */ + messages?: Schema$GoogleCloudDialogflowV2IntentMessage[]; + /** + * Optional. Indicates whether Machine Learning is disabled for the intent. Note: If `ml_disabled` setting is set to true, then this intent is not taken into account during inference in `ML ONLY` match mode. Also, auto-markup in the UI is turned off. + */ + mlDisabled?: boolean | null; + /** + * Optional. The unique identifier of this intent. Required for Intents.UpdateIntent and Intents.BatchUpdateIntents methods. Format: `projects//agent/intents/`. + */ + name?: string | null; + /** + * Optional. The collection of contexts that are activated when the intent is matched. Context messages in this collection should not set the parameters field. Setting the `lifespan_count` to 0 will reset the context when the intent is matched. Format: `projects//agent/sessions/-/contexts/`. + */ + outputContexts?: Schema$GoogleCloudDialogflowV2Context[]; + /** + * Optional. The collection of parameters associated with the intent. + */ + parameters?: Schema$GoogleCloudDialogflowV2IntentParameter[]; /** * Read-only after creation. The unique identifier of the parent intent in the chain of followup intents. You can set this field when creating an intent, for example with CreateIntent or BatchUpdateIntents, in order to make this intent a followup intent. It identifies the parent followup intent. Format: `projects//agent/intents/`. */ @@ -4632,6 +5457,45 @@ export namespace dialogflow_v2 { */ userDefined?: boolean | null; } + /** + * A knowledge base represents a collection of knowledge documents that you provide to Dialogflow. Your knowledge documents contain information that may be useful during conversations with end-users. Some Dialogflow features use knowledge bases when looking for a response to an end-user input. For more information, see the [knowledge base guide](https://cloud.google.com/dialogflow/docs/how/knowledge-bases). Note: The `projects.agent.knowledgeBases` resource is deprecated; only use `projects.knowledgeBases`. + */ + export interface Schema$GoogleCloudDialogflowV2KnowledgeBase { + /** + * Required. The display name of the knowledge base. The name must be 1024 bytes or less; otherwise, the creation request fails. + */ + displayName?: string | null; + /** + * Language which represents the KnowledgeBase. When the KnowledgeBase is created/updated, expect this to be present for non en-us languages. When unspecified, the default language code en-us applies. + */ + languageCode?: string | null; + /** + * The knowledge base resource name. The name must be empty when creating a knowledge base. Format: `projects//locations//knowledgeBases/`. + */ + name?: string | null; + } + /** + * Metadata in google::longrunning::Operation for Knowledge operations. + */ + export interface Schema$GoogleCloudDialogflowV2KnowledgeOperationMetadata { + /** + * Output only. The current state of this operation. + */ + state?: string | null; + } + /** + * Response message for AnswerRecords.ListAnswerRecords. + */ + export interface Schema$GoogleCloudDialogflowV2ListAnswerRecordsResponse { + /** + * The list of answer records. + */ + answerRecords?: Schema$GoogleCloudDialogflowV2AnswerRecord[]; + /** + * A token to retrieve next page of results. Or empty if there are no more results. Pass this value in the ListAnswerRecordsRequest.page_token field in the subsequent call to `ListAnswerRecords` method to retrieve the next page of results. + */ + nextPageToken?: string | null; + } /** * The response message for Contexts.ListContexts. */ @@ -4645,6 +5509,45 @@ export namespace dialogflow_v2 { */ nextPageToken?: string | null; } + /** + * The response message for ConversationProfiles.ListConversationProfiles. + */ + export interface Schema$GoogleCloudDialogflowV2ListConversationProfilesResponse { + /** + * The list of project conversation profiles. There is a maximum number of items returned based on the page_size field in the request. + */ + conversationProfiles?: Schema$GoogleCloudDialogflowV2ConversationProfile[]; + /** + * Token to retrieve the next page of results, or empty if there are no more results in the list. + */ + nextPageToken?: string | null; + } + /** + * The response message for Conversations.ListConversations. + */ + export interface Schema$GoogleCloudDialogflowV2ListConversationsResponse { + /** + * The list of conversations. There will be a maximum number of items returned based on the page_size field in the request. + */ + conversations?: Schema$GoogleCloudDialogflowV2Conversation[]; + /** + * Token to retrieve the next page of results, or empty if there are no more results in the list. + */ + nextPageToken?: string | null; + } + /** + * Response message for Documents.ListDocuments. + */ + export interface Schema$GoogleCloudDialogflowV2ListDocumentsResponse { + /** + * The list of documents. + */ + documents?: Schema$GoogleCloudDialogflowV2Document[]; + /** + * Token to retrieve the next page of results, or empty if there are no more results in the list. + */ + nextPageToken?: string | null; + } /** * The response message for EntityTypes.ListEntityTypes. */ @@ -4684,6 +5587,45 @@ export namespace dialogflow_v2 { */ nextPageToken?: string | null; } + /** + * Response message for KnowledgeBases.ListKnowledgeBases. + */ + export interface Schema$GoogleCloudDialogflowV2ListKnowledgeBasesResponse { + /** + * The list of knowledge bases. + */ + knowledgeBases?: Schema$GoogleCloudDialogflowV2KnowledgeBase[]; + /** + * Token to retrieve the next page of results, or empty if there are no more results in the list. + */ + nextPageToken?: string | null; + } + /** + * The response message for Conversations.ListMessages. + */ + export interface Schema$GoogleCloudDialogflowV2ListMessagesResponse { + /** + * The list of messages. There will be a maximum number of items returned based on the page_size field in the request. `messages` is sorted by `create_time` in descending order. + */ + messages?: Schema$GoogleCloudDialogflowV2Message[]; + /** + * Token to retrieve the next page of results, or empty if there are no more results in the list. + */ + nextPageToken?: string | null; + } + /** + * The response message for Participants.ListParticipants. + */ + export interface Schema$GoogleCloudDialogflowV2ListParticipantsResponse { + /** + * Token to retrieve the next page of results or empty if there are no more results in the list. + */ + nextPageToken?: string | null; + /** + * The list of participants. There is a maximum number of items returned based on the page_size field in the request. + */ + participants?: Schema$GoogleCloudDialogflowV2Participant[]; + } /** * The response message for SessionEntityTypes.ListSessionEntityTypes. */ @@ -4697,6 +5639,15 @@ export namespace dialogflow_v2 { */ sessionEntityTypes?: Schema$GoogleCloudDialogflowV2SessionEntityType[]; } + /** + * Defines logging behavior for conversation lifecycle events. + */ + export interface Schema$GoogleCloudDialogflowV2LoggingConfig { + /** + * Whether to log conversation events like CONVERSATION_STARTED to Stackdriver in the conversation project as JSON format ConversationEvent protos. + */ + enableStackdriverLogging?: boolean | null; + } /** * Represents a message posted into a conversation. */ @@ -4743,6 +5694,19 @@ export namespace dialogflow_v2 { */ parts?: Schema$GoogleCloudDialogflowV2AnnotatedMessagePart[]; } + /** + * Defines notification behavior. + */ + export interface Schema$GoogleCloudDialogflowV2NotificationConfig { + /** + * Format of message. + */ + messageFormat?: string | null; + /** + * Name of the Pub/Sub topic to publish conversation events like CONVERSATION_STARTED as serialized ConversationEvent protos. Notification works for phone calls, if this topic either is in the same project as the conversation or you grant `service-@gcp-sa-dialogflow.iam.gserviceaccount.com` the `Dialogflow Service Agent` role in the topic project. Format: `projects//locations//topics/`. + */ + topic?: string | null; + } /** * Represents the contents of the original request that was passed to the `[Streaming]DetectIntent` call. */ @@ -4760,6 +5724,19 @@ export namespace dialogflow_v2 { */ version?: string | null; } + /** + * Represents the natural language speech audio to be played to the end user. + */ + export interface Schema$GoogleCloudDialogflowV2OutputAudio { + /** + * The natural language speech audio. + */ + audio?: string | null; + /** + * Instructs the speech synthesizer how to generate the speech audio. + */ + config?: Schema$GoogleCloudDialogflowV2OutputAudioConfig; + } /** * Instructs the speech synthesizer on how to generate the output audio content. If this audio config is supplied in a request, it overrides all existing text-to-speech settings applied to the agent. */ @@ -4777,6 +5754,23 @@ export namespace dialogflow_v2 { */ synthesizeSpeechConfig?: Schema$GoogleCloudDialogflowV2SynthesizeSpeechConfig; } + /** + * Represents a conversation participant (human agent, virtual agent, end-user). + */ + export interface Schema$GoogleCloudDialogflowV2Participant { + /** + * Optional. The unique identifier of this participant. Format: `projects//locations//conversations//participants/`. + */ + name?: string | null; + /** + * Immutable. The role this participant plays in the conversation. This field must be set during participant creation and is then immutable. + */ + role?: string | null; + /** + * Optional. Label applied to streams representing this participant in SIPREC XML metadata and SDP. This is used to assign transcriptions from that media stream to this participant. This field can be updated. + */ + sipRecordingMediaLabel?: string | null; + } /** * Represents the query input. It can contain either: 1. An audio config which instructs the speech recognizer how to process the speech audio. 2. A conversational query in the form of text,. 3. An event that specifies which intent to trigger. */ @@ -4896,6 +5890,15 @@ export namespace dialogflow_v2 { */ webhookSource?: string | null; } + /** + * Request message for Documents.ReloadDocument. + */ + export interface Schema$GoogleCloudDialogflowV2ReloadDocumentRequest { + /** + * Optional. The path of gcs source file for reloading document content. For now, only gcs uri is supported. For documents stored in Google Cloud Storage, these URIs must have the form `gs:///`. + */ + contentUri?: string | null; + } /** * The request message for Agents.RestoreAgent. */ @@ -4984,21 +5987,116 @@ export namespace dialogflow_v2 { phrases?: string[] | null; } /** - * Configuration of how speech should be synthesized. + * Configures speech transcription for ConversationProfile. */ - export interface Schema$GoogleCloudDialogflowV2SynthesizeSpeechConfig { + export interface Schema$GoogleCloudDialogflowV2SpeechToTextConfig { /** - * Optional. An identifier which selects 'audio effects' profiles that are applied on (post synthesized) text to speech. Effects are applied on top of each other in the order they are given. + * Optional. The speech model used in speech to text. `SPEECH_MODEL_VARIANT_UNSPECIFIED`, `USE_BEST_AVAILABLE` will be treated as `USE_ENHANCED`. It can be overridden in AnalyzeContentRequest and StreamingAnalyzeContentRequest request. */ - effectsProfileId?: string[] | null; + speechModelVariant?: string | null; + } + /** + * The request message for Participants.SuggestArticles. + */ + export interface Schema$GoogleCloudDialogflowV2SuggestArticlesRequest { /** - * Optional. Speaking pitch, in the range [-20.0, 20.0]. 20 means increase 20 semitones from the original pitch. -20 means decrease 20 semitones from the original pitch. + * Max number of messages prior to and including latest_message to use as context when compiling the suggestion. By default 20 and at most 50. */ - pitch?: number | null; + contextSize?: number | null; /** - * Optional. Speaking rate/speed, in the range [0.25, 4.0]. 1.0 is the normal native speed supported by the specific voice. 2.0 is twice as fast, and 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 speed. Any other values < 0.25 or \> 4.0 will return an error. + * The name of the latest conversation message to compile suggestion for. If empty, it will be the latest message of the conversation. Format: `projects//locations//conversations//messages/`. */ - speakingRate?: number | null; + latestMessage?: string | null; + } + /** + * The response message for Participants.SuggestArticles. + */ + export interface Schema$GoogleCloudDialogflowV2SuggestArticlesResponse { + /** + * Articles ordered by score in descending order. + */ + articleAnswers?: Schema$GoogleCloudDialogflowV2ArticleAnswer[]; + /** + * Number of messages prior to and including latest_message to compile the suggestion. It may be smaller than the SuggestArticlesRequest.context_size field in the request if there aren't that many messages in the conversation. + */ + contextSize?: number | null; + /** + * The name of the latest conversation message used to compile suggestion for. Format: `projects//locations//conversations//messages/`. + */ + latestMessage?: string | null; + } + /** + * The request message for Participants.SuggestFaqAnswers. + */ + export interface Schema$GoogleCloudDialogflowV2SuggestFaqAnswersRequest { + /** + * Max number of messages prior to and including [latest_message] to use as context when compiling the suggestion. By default 20 and at most 50. + */ + contextSize?: number | null; + /** + * The name of the latest conversation message to compile suggestion for. If empty, it will be the latest message of the conversation. Format: `projects//locations//conversations//messages/`. + */ + latestMessage?: string | null; + } + /** + * The request message for Participants.SuggestFaqAnswers. + */ + export interface Schema$GoogleCloudDialogflowV2SuggestFaqAnswersResponse { + /** + * Number of messages prior to and including latest_message to compile the suggestion. It may be smaller than the SuggestFaqAnswersRequest.context_size field in the request if there aren't that many messages in the conversation. + */ + contextSize?: number | null; + /** + * Answers extracted from FAQ documents. + */ + faqAnswers?: Schema$GoogleCloudDialogflowV2FaqAnswer[]; + /** + * The name of the latest conversation message used to compile suggestion for. Format: `projects//locations//conversations//messages/`. + */ + latestMessage?: string | null; + } + /** + * The type of Human Agent Assistant API suggestion to perform, and the maximum number of results to return for that type. Multiple `Feature` objects can be specified in the `features` list. + */ + export interface Schema$GoogleCloudDialogflowV2SuggestionFeature { + /** + * Type of Human Agent Assistant API feature to request. + */ + type?: string | null; + } + /** + * One response of different type of suggestion response which is used in the response of Participants.AnalyzeContent and Participants.AnalyzeContent, as well as HumanAgentAssistantEvent. + */ + export interface Schema$GoogleCloudDialogflowV2SuggestionResult { + /** + * Error status if the request failed. + */ + error?: Schema$GoogleRpcStatus; + /** + * SuggestArticlesResponse if request is for ARTICLE_SUGGESTION. + */ + suggestArticlesResponse?: Schema$GoogleCloudDialogflowV2SuggestArticlesResponse; + /** + * SuggestFaqAnswersResponse if request is for FAQ_ANSWER. + */ + suggestFaqAnswersResponse?: Schema$GoogleCloudDialogflowV2SuggestFaqAnswersResponse; + } + /** + * Configuration of how speech should be synthesized. + */ + export interface Schema$GoogleCloudDialogflowV2SynthesizeSpeechConfig { + /** + * Optional. An identifier which selects 'audio effects' profiles that are applied on (post synthesized) text to speech. Effects are applied on top of each other in the order they are given. + */ + effectsProfileId?: string[] | null; + /** + * Optional. Speaking pitch, in the range [-20.0, 20.0]. 20 means increase 20 semitones from the original pitch. -20 means decrease 20 semitones from the original pitch. + */ + pitch?: number | null; + /** + * Optional. Speaking rate/speed, in the range [0.25, 4.0]. 1.0 is the normal native speed supported by the specific voice. 2.0 is twice as fast, and 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 speed. Any other values < 0.25 or \> 4.0 will return an error. + */ + speakingRate?: number | null; /** * Optional. The desired voice of the synthesized audio. */ @@ -5257,11 +6355,21 @@ export namespace dialogflow_v2 { export class Resource$Projects { context: APIRequestContext; agent: Resource$Projects$Agent; + answerRecords: Resource$Projects$Answerrecords; + conversationProfiles: Resource$Projects$Conversationprofiles; + conversations: Resource$Projects$Conversations; + knowledgeBases: Resource$Projects$Knowledgebases; locations: Resource$Projects$Locations; operations: Resource$Projects$Operations; constructor(context: APIRequestContext) { this.context = context; this.agent = new Resource$Projects$Agent(this.context); + this.answerRecords = new Resource$Projects$Answerrecords(this.context); + this.conversationProfiles = new Resource$Projects$Conversationprofiles( + this.context + ); + this.conversations = new Resource$Projects$Conversations(this.context); + this.knowledgeBases = new Resource$Projects$Knowledgebases(this.context); this.locations = new Resource$Projects$Locations(this.context); this.operations = new Resource$Projects$Operations(this.context); } @@ -5763,6 +6871,7 @@ export namespace dialogflow_v2 { entityTypes: Resource$Projects$Agent$Entitytypes; environments: Resource$Projects$Agent$Environments; intents: Resource$Projects$Agent$Intents; + knowledgeBases: Resource$Projects$Agent$Knowledgebases; sessions: Resource$Projects$Agent$Sessions; constructor(context: APIRequestContext) { this.context = context; @@ -5771,6 +6880,9 @@ export namespace dialogflow_v2 { this.context ); this.intents = new Resource$Projects$Agent$Intents(this.context); + this.knowledgeBases = new Resource$Projects$Agent$Knowledgebases( + this.context + ); this.sessions = new Resource$Projects$Agent$Sessions(this.context); } @@ -11381,10 +12493,12 @@ export namespace dialogflow_v2 { * // "action": "my_action", * // "defaultResponsePlatforms": [], * // "displayName": "my_displayName", + * // "endInteraction": false, * // "events": [], * // "followupIntentInfo": [], * // "inputContextNames": [], * // "isFallback": false, + * // "liveAgentHandoff": false, * // "messages": [], * // "mlDisabled": false, * // "name": "my_name", @@ -11406,10 +12520,12 @@ export namespace dialogflow_v2 { * // "action": "my_action", * // "defaultResponsePlatforms": [], * // "displayName": "my_displayName", + * // "endInteraction": false, * // "events": [], * // "followupIntentInfo": [], * // "inputContextNames": [], * // "isFallback": false, + * // "liveAgentHandoff": false, * // "messages": [], * // "mlDisabled": false, * // "name": "my_name", @@ -11698,10 +12814,12 @@ export namespace dialogflow_v2 { * // "action": "my_action", * // "defaultResponsePlatforms": [], * // "displayName": "my_displayName", + * // "endInteraction": false, * // "events": [], * // "followupIntentInfo": [], * // "inputContextNames": [], * // "isFallback": false, + * // "liveAgentHandoff": false, * // "messages": [], * // "mlDisabled": false, * // "name": "my_name", @@ -12009,10 +13127,12 @@ export namespace dialogflow_v2 { * // "action": "my_action", * // "defaultResponsePlatforms": [], * // "displayName": "my_displayName", + * // "endInteraction": false, * // "events": [], * // "followupIntentInfo": [], * // "inputContextNames": [], * // "isFallback": false, + * // "liveAgentHandoff": false, * // "messages": [], * // "mlDisabled": false, * // "name": "my_name", @@ -12034,10 +13154,12 @@ export namespace dialogflow_v2 { * // "action": "my_action", * // "defaultResponsePlatforms": [], * // "displayName": "my_displayName", + * // "endInteraction": false, * // "events": [], * // "followupIntentInfo": [], * // "inputContextNames": [], * // "isFallback": false, + * // "liveAgentHandoff": false, * // "messages": [], * // "mlDisabled": false, * // "name": "my_name", @@ -12264,22 +13386,18 @@ export namespace dialogflow_v2 { requestBody?: Schema$GoogleCloudDialogflowV2Intent; } - export class Resource$Projects$Agent$Sessions { + export class Resource$Projects$Agent$Knowledgebases { context: APIRequestContext; - contexts: Resource$Projects$Agent$Sessions$Contexts; - entityTypes: Resource$Projects$Agent$Sessions$Entitytypes; + documents: Resource$Projects$Agent$Knowledgebases$Documents; constructor(context: APIRequestContext) { this.context = context; - this.contexts = new Resource$Projects$Agent$Sessions$Contexts( - this.context - ); - this.entityTypes = new Resource$Projects$Agent$Sessions$Entitytypes( + this.documents = new Resource$Projects$Agent$Knowledgebases$Documents( this.context ); } /** - * Deletes all active contexts in the specified session. + * Creates a knowledge base. * @example * ```js * // Before running the sample: @@ -12307,14 +13425,28 @@ export namespace dialogflow_v2 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.agent.sessions.deleteContexts({ - * // Required. The name of the session to delete all contexts from. Format: `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. - * parent: 'projects/my-project/agent/sessions/my-session', + * const res = await dialogflow.projects.agent.knowledgeBases.create({ + * // Required. The project to create a knowledge base for. Format: `projects//locations/`. + * parent: 'projects/my-project/agent', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "displayName": "my_displayName", + * // "languageCode": "my_languageCode", + * // "name": "my_name" + * // } + * }, * }); * console.log(res.data); * * // Example response - * // {} + * // { + * // "displayName": "my_displayName", + * // "languageCode": "my_languageCode", + * // "name": "my_name" + * // } * } * * main().catch(e => { @@ -12329,55 +13461,57 @@ export namespace dialogflow_v2 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - deleteContexts( - params: Params$Resource$Projects$Agent$Sessions$Deletecontexts, + create( + params: Params$Resource$Projects$Agent$Knowledgebases$Create, options: StreamMethodOptions ): GaxiosPromise; - deleteContexts( - params?: Params$Resource$Projects$Agent$Sessions$Deletecontexts, + create( + params?: Params$Resource$Projects$Agent$Knowledgebases$Create, options?: MethodOptions - ): GaxiosPromise; - deleteContexts( - params: Params$Resource$Projects$Agent$Sessions$Deletecontexts, + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Agent$Knowledgebases$Create, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - deleteContexts( - params: Params$Resource$Projects$Agent$Sessions$Deletecontexts, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + create( + params: Params$Resource$Projects$Agent$Knowledgebases$Create, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - deleteContexts( - params: Params$Resource$Projects$Agent$Sessions$Deletecontexts, - callback: BodyResponseCallback + create( + params: Params$Resource$Projects$Agent$Knowledgebases$Create, + callback: BodyResponseCallback ): void; - deleteContexts( - callback: BodyResponseCallback + create( + callback: BodyResponseCallback ): void; - deleteContexts( + create( paramsOrCallback?: - | Params$Resource$Projects$Agent$Sessions$Deletecontexts - | BodyResponseCallback + | Params$Resource$Projects$Agent$Knowledgebases$Create + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Sessions$Deletecontexts; + {}) as Params$Resource$Projects$Agent$Knowledgebases$Create; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Sessions$Deletecontexts; + params = {} as Params$Resource$Projects$Agent$Knowledgebases$Create; options = {}; } @@ -12390,11 +13524,11 @@ export namespace dialogflow_v2 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2/{+parent}/contexts').replace( + url: (rootUrl + '/v2/{+parent}/knowledgeBases').replace( /([^:]\/)\/+/g, '$1' ), - method: 'DELETE', + method: 'POST', }, options ), @@ -12404,17 +13538,19 @@ export namespace dialogflow_v2 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest( + parameters + ); } } /** - * Processes a natural language query and returns structured, actionable data as a result. This method is not idempotent, because it may cause contexts and session entity types to be updated, which in turn might affect results of future queries. Note: Always use agent versions for production traffic. See [Versions and environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). + * Deletes the specified knowledge base. * @example * ```js * // Before running the sample: @@ -12442,32 +13578,16 @@ export namespace dialogflow_v2 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.agent.sessions.detectIntent({ - * // Required. The name of the session this query is sent to. Format: `projects//agent/sessions/`, or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment (`Environment ID` might be referred to as environment name at some places). If `User ID` is not specified, we are using "-". It's up to the API caller to choose an appropriate `Session ID` and `User Id`. They can be a random number or some type of user and session identifiers (preferably hashed). The length of the `Session ID` and `User ID` must not exceed 36 characters. For more information, see the [API interactions guide](https://cloud.google.com/dialogflow/docs/api-overview). Note: Always use agent versions for production traffic. See [Versions and environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). - * session: 'projects/my-project/agent/sessions/my-session', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "inputAudio": "my_inputAudio", - * // "outputAudioConfig": {}, - * // "outputAudioConfigMask": "my_outputAudioConfigMask", - * // "queryInput": {}, - * // "queryParams": {} - * // } - * }, + * const res = await dialogflow.projects.agent.knowledgeBases.delete({ + * // Optional. Force deletes the knowledge base. When set to true, any documents in the knowledge base are also deleted. + * force: 'placeholder-value', + * // Required. The name of the knowledge base to delete. Format: `projects//locations//knowledgeBases/`. + * name: 'projects/my-project/agent/knowledgeBases/my-knowledgeBase', * }); * console.log(res.data); * * // Example response - * // { - * // "outputAudio": "my_outputAudio", - * // "outputAudioConfig": {}, - * // "queryResult": {}, - * // "responseId": "my_responseId", - * // "webhookStatus": {} - * // } + * // {} * } * * main().catch(e => { @@ -12482,57 +13602,53 @@ export namespace dialogflow_v2 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - detectIntent( - params: Params$Resource$Projects$Agent$Sessions$Detectintent, + delete( + params: Params$Resource$Projects$Agent$Knowledgebases$Delete, options: StreamMethodOptions ): GaxiosPromise; - detectIntent( - params?: Params$Resource$Projects$Agent$Sessions$Detectintent, + delete( + params?: Params$Resource$Projects$Agent$Knowledgebases$Delete, options?: MethodOptions - ): GaxiosPromise; - detectIntent( - params: Params$Resource$Projects$Agent$Sessions$Detectintent, + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Agent$Knowledgebases$Delete, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - detectIntent( - params: Params$Resource$Projects$Agent$Sessions$Detectintent, - options: - | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - detectIntent( - params: Params$Resource$Projects$Agent$Sessions$Detectintent, - callback: BodyResponseCallback + delete( + params: Params$Resource$Projects$Agent$Knowledgebases$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - detectIntent( - callback: BodyResponseCallback + delete( + params: Params$Resource$Projects$Agent$Knowledgebases$Delete, + callback: BodyResponseCallback ): void; - detectIntent( + delete(callback: BodyResponseCallback): void; + delete( paramsOrCallback?: - | Params$Resource$Projects$Agent$Sessions$Detectintent - | BodyResponseCallback + | Params$Resource$Projects$Agent$Knowledgebases$Delete + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Sessions$Detectintent; + {}) as Params$Resource$Projects$Agent$Knowledgebases$Delete; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Sessions$Detectintent; + params = {} as Params$Resource$Projects$Agent$Knowledgebases$Delete; options = {}; } @@ -12545,60 +13661,28 @@ export namespace dialogflow_v2 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2/{+session}:detectIntent').replace( - /([^:]\/)\/+/g, - '$1' - ), - method: 'POST', + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', }, options ), params, - requiredParams: ['session'], - pathParams: ['session'], + requiredParams: ['name'], + pathParams: ['name'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest( - parameters - ); + return createAPIRequest(parameters); } } - } - - export interface Params$Resource$Projects$Agent$Sessions$Deletecontexts - extends StandardParameters { - /** - * Required. The name of the session to delete all contexts from. Format: `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. - */ - parent?: string; - } - export interface Params$Resource$Projects$Agent$Sessions$Detectintent - extends StandardParameters { - /** - * Required. The name of the session this query is sent to. Format: `projects//agent/sessions/`, or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment (`Environment ID` might be referred to as environment name at some places). If `User ID` is not specified, we are using "-". It's up to the API caller to choose an appropriate `Session ID` and `User Id`. They can be a random number or some type of user and session identifiers (preferably hashed). The length of the `Session ID` and `User ID` must not exceed 36 characters. For more information, see the [API interactions guide](https://cloud.google.com/dialogflow/docs/api-overview). Note: Always use agent versions for production traffic. See [Versions and environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). - */ - session?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$GoogleCloudDialogflowV2DetectIntentRequest; - } - - export class Resource$Projects$Agent$Sessions$Contexts { - context: APIRequestContext; - constructor(context: APIRequestContext) { - this.context = context; - } /** - * Creates a context. If the specified context already exists, overrides the context. + * Retrieves the specified knowledge base. * @example * ```js * // Before running the sample: @@ -12626,27 +13710,17 @@ export namespace dialogflow_v2 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.agent.sessions.contexts.create({ - * // Required. The session to create a context for. Format: `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. - * parent: 'projects/my-project/agent/sessions/my-session', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "lifespanCount": 0, - * // "name": "my_name", - * // "parameters": {} - * // } - * }, + * const res = await dialogflow.projects.agent.knowledgeBases.get({ + * // Required. The name of the knowledge base to retrieve. Format `projects//locations//knowledgeBases/`. + * name: 'projects/my-project/agent/knowledgeBases/my-knowledgeBase', * }); * console.log(res.data); * * // Example response * // { - * // "lifespanCount": 0, - * // "name": "my_name", - * // "parameters": {} + * // "displayName": "my_displayName", + * // "languageCode": "my_languageCode", + * // "name": "my_name" * // } * } * @@ -12662,57 +13736,57 @@ export namespace dialogflow_v2 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - create( - params: Params$Resource$Projects$Agent$Sessions$Contexts$Create, + get( + params: Params$Resource$Projects$Agent$Knowledgebases$Get, options: StreamMethodOptions ): GaxiosPromise; - create( - params?: Params$Resource$Projects$Agent$Sessions$Contexts$Create, + get( + params?: Params$Resource$Projects$Agent$Knowledgebases$Get, options?: MethodOptions - ): GaxiosPromise; - create( - params: Params$Resource$Projects$Agent$Sessions$Contexts$Create, + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Agent$Knowledgebases$Get, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - create( - params: Params$Resource$Projects$Agent$Sessions$Contexts$Create, + get( + params: Params$Resource$Projects$Agent$Knowledgebases$Get, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - create( - params: Params$Resource$Projects$Agent$Sessions$Contexts$Create, - callback: BodyResponseCallback + get( + params: Params$Resource$Projects$Agent$Knowledgebases$Get, + callback: BodyResponseCallback ): void; - create( - callback: BodyResponseCallback + get( + callback: BodyResponseCallback ): void; - create( + get( paramsOrCallback?: - | Params$Resource$Projects$Agent$Sessions$Contexts$Create - | BodyResponseCallback + | Params$Resource$Projects$Agent$Knowledgebases$Get + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Sessions$Contexts$Create; + {}) as Params$Resource$Projects$Agent$Knowledgebases$Get; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Sessions$Contexts$Create; + params = {} as Params$Resource$Projects$Agent$Knowledgebases$Get; options = {}; } @@ -12725,33 +13799,30 @@ export namespace dialogflow_v2 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2/{+parent}/contexts').replace( - /([^:]\/)\/+/g, - '$1' - ), - method: 'POST', + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', }, options ), params, - requiredParams: ['parent'], - pathParams: ['parent'], + requiredParams: ['name'], + pathParams: ['name'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest( + return createAPIRequest( parameters ); } } /** - * Deletes the specified context. + * Returns the list of all knowledge bases of the specified agent. * @example * ```js * // Before running the sample: @@ -12779,14 +13850,21 @@ export namespace dialogflow_v2 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.agent.sessions.contexts.delete({ - * // Required. The name of the context to delete. Format: `projects//agent/sessions//contexts/` or `projects//agent/environments//users//sessions//contexts/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. - * name: 'projects/my-project/agent/sessions/my-session/contexts/my-context', + * const res = await dialogflow.projects.agent.knowledgeBases.list({ + * // The maximum number of items to return in a single page. By default 10 and at most 100. + * pageSize: 'placeholder-value', + * // The next_page_token value returned from a previous list request. + * pageToken: 'placeholder-value', + * // Required. The project to list of knowledge bases for. Format: `projects//locations/`. + * parent: 'projects/my-project/agent', * }); * console.log(res.data); * * // Example response - * // {} + * // { + * // "knowledgeBases": [], + * // "nextPageToken": "my_nextPageToken" + * // } * } * * main().catch(e => { @@ -12801,53 +13879,57 @@ export namespace dialogflow_v2 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - delete( - params: Params$Resource$Projects$Agent$Sessions$Contexts$Delete, + list( + params: Params$Resource$Projects$Agent$Knowledgebases$List, options: StreamMethodOptions ): GaxiosPromise; - delete( - params?: Params$Resource$Projects$Agent$Sessions$Contexts$Delete, + list( + params?: Params$Resource$Projects$Agent$Knowledgebases$List, options?: MethodOptions - ): GaxiosPromise; - delete( - params: Params$Resource$Projects$Agent$Sessions$Contexts$Delete, + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Agent$Knowledgebases$List, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - delete( - params: Params$Resource$Projects$Agent$Sessions$Contexts$Delete, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + list( + params: Params$Resource$Projects$Agent$Knowledgebases$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - delete( - params: Params$Resource$Projects$Agent$Sessions$Contexts$Delete, - callback: BodyResponseCallback + list( + params: Params$Resource$Projects$Agent$Knowledgebases$List, + callback: BodyResponseCallback ): void; - delete(callback: BodyResponseCallback): void; - delete( + list( + callback: BodyResponseCallback + ): void; + list( paramsOrCallback?: - | Params$Resource$Projects$Agent$Sessions$Contexts$Delete - | BodyResponseCallback + | Params$Resource$Projects$Agent$Knowledgebases$List + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Sessions$Contexts$Delete; + {}) as Params$Resource$Projects$Agent$Knowledgebases$List; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Sessions$Contexts$Delete; + params = {} as Params$Resource$Projects$Agent$Knowledgebases$List; options = {}; } @@ -12860,28 +13942,33 @@ export namespace dialogflow_v2 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), - method: 'DELETE', + url: (rootUrl + '/v2/{+parent}/knowledgeBases').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', }, options ), params, - requiredParams: ['name'], - pathParams: ['name'], + requiredParams: ['parent'], + pathParams: ['parent'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest( + parameters + ); } } /** - * Retrieves the specified context. + * Updates the specified knowledge base. * @example * ```js * // Before running the sample: @@ -12909,17 +13996,29 @@ export namespace dialogflow_v2 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.agent.sessions.contexts.get({ - * // Required. The name of the context. Format: `projects//agent/sessions//contexts/` or `projects//agent/environments//users//sessions//contexts/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. - * name: 'projects/my-project/agent/sessions/my-session/contexts/my-context', + * const res = await dialogflow.projects.agent.knowledgeBases.patch({ + * // The knowledge base resource name. The name must be empty when creating a knowledge base. Format: `projects//locations//knowledgeBases/`. + * name: 'projects/my-project/agent/knowledgeBases/my-knowledgeBase', + * // Optional. Not specified means `update all`. Currently, only `display_name` can be updated, an InvalidArgument will be returned for attempting to update other fields. + * updateMask: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "displayName": "my_displayName", + * // "languageCode": "my_languageCode", + * // "name": "my_name" + * // } + * }, * }); * console.log(res.data); * * // Example response * // { - * // "lifespanCount": 0, - * // "name": "my_name", - * // "parameters": {} + * // "displayName": "my_displayName", + * // "languageCode": "my_languageCode", + * // "name": "my_name" * // } * } * @@ -12935,57 +14034,57 @@ export namespace dialogflow_v2 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - get( - params: Params$Resource$Projects$Agent$Sessions$Contexts$Get, + patch( + params: Params$Resource$Projects$Agent$Knowledgebases$Patch, options: StreamMethodOptions ): GaxiosPromise; - get( - params?: Params$Resource$Projects$Agent$Sessions$Contexts$Get, + patch( + params?: Params$Resource$Projects$Agent$Knowledgebases$Patch, options?: MethodOptions - ): GaxiosPromise; - get( - params: Params$Resource$Projects$Agent$Sessions$Contexts$Get, + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Agent$Knowledgebases$Patch, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - get( - params: Params$Resource$Projects$Agent$Sessions$Contexts$Get, + patch( + params: Params$Resource$Projects$Agent$Knowledgebases$Patch, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - get( - params: Params$Resource$Projects$Agent$Sessions$Contexts$Get, - callback: BodyResponseCallback + patch( + params: Params$Resource$Projects$Agent$Knowledgebases$Patch, + callback: BodyResponseCallback ): void; - get( - callback: BodyResponseCallback + patch( + callback: BodyResponseCallback ): void; - get( + patch( paramsOrCallback?: - | Params$Resource$Projects$Agent$Sessions$Contexts$Get - | BodyResponseCallback + | Params$Resource$Projects$Agent$Knowledgebases$Patch + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Sessions$Contexts$Get; + {}) as Params$Resource$Projects$Agent$Knowledgebases$Patch; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Sessions$Contexts$Get; + params = {} as Params$Resource$Projects$Agent$Knowledgebases$Patch; options = {}; } @@ -12999,7 +14098,7 @@ export namespace dialogflow_v2 { options: Object.assign( { url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), - method: 'GET', + method: 'PATCH', }, options ), @@ -13009,19 +14108,88 @@ export namespace dialogflow_v2 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest( + return createAPIRequest( parameters ); } } + } + export interface Params$Resource$Projects$Agent$Knowledgebases$Create + extends StandardParameters { /** - * Returns the list of all contexts in the specified session. + * Required. The project to create a knowledge base for. Format: `projects//locations/`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2KnowledgeBase; + } + export interface Params$Resource$Projects$Agent$Knowledgebases$Delete + extends StandardParameters { + /** + * Optional. Force deletes the knowledge base. When set to true, any documents in the knowledge base are also deleted. + */ + force?: boolean; + /** + * Required. The name of the knowledge base to delete. Format: `projects//locations//knowledgeBases/`. + */ + name?: string; + } + export interface Params$Resource$Projects$Agent$Knowledgebases$Get + extends StandardParameters { + /** + * Required. The name of the knowledge base to retrieve. Format `projects//locations//knowledgeBases/`. + */ + name?: string; + } + export interface Params$Resource$Projects$Agent$Knowledgebases$List + extends StandardParameters { + /** + * The maximum number of items to return in a single page. By default 10 and at most 100. + */ + pageSize?: number; + /** + * The next_page_token value returned from a previous list request. + */ + pageToken?: string; + /** + * Required. The project to list of knowledge bases for. Format: `projects//locations/`. + */ + parent?: string; + } + export interface Params$Resource$Projects$Agent$Knowledgebases$Patch + extends StandardParameters { + /** + * The knowledge base resource name. The name must be empty when creating a knowledge base. Format: `projects//locations//knowledgeBases/`. + */ + name?: string; + /** + * Optional. Not specified means `update all`. Currently, only `display_name` can be updated, an InvalidArgument will be returned for attempting to update other fields. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2KnowledgeBase; + } + + export class Resource$Projects$Agent$Knowledgebases$Documents { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Creates a new document. Operation * @example * ```js * // Before running the sample: @@ -13049,20 +14217,35 @@ export namespace dialogflow_v2 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.agent.sessions.contexts.list({ - * // Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. - * pageSize: 'placeholder-value', - * // Optional. The next_page_token value returned from a previous list request. - * pageToken: 'placeholder-value', - * // Required. The session to list all contexts from. Format: `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. - * parent: 'projects/my-project/agent/sessions/my-session', + * const res = await dialogflow.projects.agent.knowledgeBases.documents.create({ + * // Required. The knowledge base to create a document for. Format: `projects//locations//knowledgeBases/`. + * parent: 'projects/my-project/agent/knowledgeBases/my-knowledgeBase', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "contentUri": "my_contentUri", + * // "displayName": "my_displayName", + * // "enableAutoReload": false, + * // "knowledgeTypes": [], + * // "latestReloadStatus": {}, + * // "metadata": {}, + * // "mimeType": "my_mimeType", + * // "name": "my_name", + * // "rawContent": "my_rawContent" + * // } + * }, * }); * console.log(res.data); * * // Example response * // { - * // "contexts": [], - * // "nextPageToken": "my_nextPageToken" + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} * // } * } * @@ -13078,57 +14261,57 @@ export namespace dialogflow_v2 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - list( - params: Params$Resource$Projects$Agent$Sessions$Contexts$List, + create( + params: Params$Resource$Projects$Agent$Knowledgebases$Documents$Create, options: StreamMethodOptions ): GaxiosPromise; - list( - params?: Params$Resource$Projects$Agent$Sessions$Contexts$List, + create( + params?: Params$Resource$Projects$Agent$Knowledgebases$Documents$Create, options?: MethodOptions - ): GaxiosPromise; - list( - params: Params$Resource$Projects$Agent$Sessions$Contexts$List, + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Agent$Knowledgebases$Documents$Create, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Projects$Agent$Sessions$Contexts$List, + create( + params: Params$Resource$Projects$Agent$Knowledgebases$Documents$Create, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Projects$Agent$Sessions$Contexts$List, - callback: BodyResponseCallback + create( + params: Params$Resource$Projects$Agent$Knowledgebases$Documents$Create, + callback: BodyResponseCallback ): void; - list( - callback: BodyResponseCallback + create( + callback: BodyResponseCallback ): void; - list( + create( paramsOrCallback?: - | Params$Resource$Projects$Agent$Sessions$Contexts$List - | BodyResponseCallback + | Params$Resource$Projects$Agent$Knowledgebases$Documents$Create + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Sessions$Contexts$List; + {}) as Params$Resource$Projects$Agent$Knowledgebases$Documents$Create; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Sessions$Contexts$List; + params = {} as Params$Resource$Projects$Agent$Knowledgebases$Documents$Create; options = {}; } @@ -13141,11 +14324,11 @@ export namespace dialogflow_v2 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2/{+parent}/contexts').replace( + url: (rootUrl + '/v2/{+parent}/documents').replace( /([^:]\/)\/+/g, '$1' ), - method: 'GET', + method: 'POST', }, options ), @@ -13155,19 +14338,17 @@ export namespace dialogflow_v2 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest( - parameters - ); + return createAPIRequest(parameters); } } /** - * Updates the specified context. + * Deletes the specified document. Operation * @example * ```js * // Before running the sample: @@ -13195,29 +14376,20 @@ export namespace dialogflow_v2 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.agent.sessions.contexts.patch({ - * // Required. The unique identifier of the context. Format: `projects//agent/sessions//contexts/`, or `projects//agent/environments//users//sessions//contexts/`. The `Context ID` is always converted to lowercase, may only contain characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. The following context names are reserved for internal use by Dialogflow. You should not use these contexts or create contexts with these names: * `__system_counters__` * `*_id_dialog_context` * `*_dialog_params_size` - * name: 'projects/my-project/agent/sessions/my-session/contexts/my-context', - * // Optional. The mask to control which fields get updated. - * updateMask: 'placeholder-value', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "lifespanCount": 0, - * // "name": "my_name", - * // "parameters": {} - * // } - * }, + * const res = await dialogflow.projects.agent.knowledgeBases.documents.delete({ + * // Required. The name of the document to delete. Format: `projects//locations//knowledgeBases//documents/`. + * name: + * 'projects/my-project/agent/knowledgeBases/my-knowledgeBase/documents/my-document', * }); * console.log(res.data); * * // Example response * // { - * // "lifespanCount": 0, + * // "done": false, + * // "error": {}, + * // "metadata": {}, * // "name": "my_name", - * // "parameters": {} + * // "response": {} * // } * } * @@ -13233,57 +14405,57 @@ export namespace dialogflow_v2 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - patch( - params: Params$Resource$Projects$Agent$Sessions$Contexts$Patch, + delete( + params: Params$Resource$Projects$Agent$Knowledgebases$Documents$Delete, options: StreamMethodOptions ): GaxiosPromise; - patch( - params?: Params$Resource$Projects$Agent$Sessions$Contexts$Patch, + delete( + params?: Params$Resource$Projects$Agent$Knowledgebases$Documents$Delete, options?: MethodOptions - ): GaxiosPromise; - patch( - params: Params$Resource$Projects$Agent$Sessions$Contexts$Patch, + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Agent$Knowledgebases$Documents$Delete, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - patch( - params: Params$Resource$Projects$Agent$Sessions$Contexts$Patch, + delete( + params: Params$Resource$Projects$Agent$Knowledgebases$Documents$Delete, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - patch( - params: Params$Resource$Projects$Agent$Sessions$Contexts$Patch, - callback: BodyResponseCallback + delete( + params: Params$Resource$Projects$Agent$Knowledgebases$Documents$Delete, + callback: BodyResponseCallback ): void; - patch( - callback: BodyResponseCallback + delete( + callback: BodyResponseCallback ): void; - patch( + delete( paramsOrCallback?: - | Params$Resource$Projects$Agent$Sessions$Contexts$Patch - | BodyResponseCallback + | Params$Resource$Projects$Agent$Knowledgebases$Documents$Delete + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Sessions$Contexts$Patch; + {}) as Params$Resource$Projects$Agent$Knowledgebases$Documents$Delete; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Sessions$Contexts$Patch; + params = {} as Params$Resource$Projects$Agent$Knowledgebases$Documents$Delete; options = {}; } @@ -13297,7 +14469,7 @@ export namespace dialogflow_v2 { options: Object.assign( { url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), - method: 'PATCH', + method: 'DELETE', }, options ), @@ -13307,84 +14479,17 @@ export namespace dialogflow_v2 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest( - parameters - ); + return createAPIRequest(parameters); } } - } - - export interface Params$Resource$Projects$Agent$Sessions$Contexts$Create - extends StandardParameters { - /** - * Required. The session to create a context for. Format: `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. - */ - parent?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$GoogleCloudDialogflowV2Context; - } - export interface Params$Resource$Projects$Agent$Sessions$Contexts$Delete - extends StandardParameters { - /** - * Required. The name of the context to delete. Format: `projects//agent/sessions//contexts/` or `projects//agent/environments//users//sessions//contexts/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. - */ - name?: string; - } - export interface Params$Resource$Projects$Agent$Sessions$Contexts$Get - extends StandardParameters { - /** - * Required. The name of the context. Format: `projects//agent/sessions//contexts/` or `projects//agent/environments//users//sessions//contexts/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. - */ - name?: string; - } - export interface Params$Resource$Projects$Agent$Sessions$Contexts$List - extends StandardParameters { - /** - * Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. - */ - pageSize?: number; - /** - * Optional. The next_page_token value returned from a previous list request. - */ - pageToken?: string; - /** - * Required. The session to list all contexts from. Format: `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. - */ - parent?: string; - } - export interface Params$Resource$Projects$Agent$Sessions$Contexts$Patch - extends StandardParameters { - /** - * Required. The unique identifier of the context. Format: `projects//agent/sessions//contexts/`, or `projects//agent/environments//users//sessions//contexts/`. The `Context ID` is always converted to lowercase, may only contain characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. The following context names are reserved for internal use by Dialogflow. You should not use these contexts or create contexts with these names: * `__system_counters__` * `*_id_dialog_context` * `*_dialog_params_size` - */ - name?: string; - /** - * Optional. The mask to control which fields get updated. - */ - updateMask?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$GoogleCloudDialogflowV2Context; - } - - export class Resource$Projects$Agent$Sessions$Entitytypes { - context: APIRequestContext; - constructor(context: APIRequestContext) { - this.context = context; - } /** - * Creates a session entity type. If the specified session entity type already exists, overrides the session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration. + * Retrieves the specified document. * @example * ```js * // Before running the sample: @@ -13412,27 +14517,24 @@ export namespace dialogflow_v2 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.agent.sessions.entityTypes.create({ - * // Required. The session to create a session entity type for. Format: `projects//agent/sessions/` or `projects//agent/environments//users// sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. - * parent: 'projects/my-project/agent/sessions/my-session', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "entities": [], - * // "entityOverrideMode": "my_entityOverrideMode", - * // "name": "my_name" - * // } - * }, + * const res = await dialogflow.projects.agent.knowledgeBases.documents.get({ + * // Required. The name of the document to retrieve. Format `projects//locations//knowledgeBases//documents/`. + * name: + * 'projects/my-project/agent/knowledgeBases/my-knowledgeBase/documents/my-document', * }); * console.log(res.data); * * // Example response * // { - * // "entities": [], - * // "entityOverrideMode": "my_entityOverrideMode", - * // "name": "my_name" + * // "contentUri": "my_contentUri", + * // "displayName": "my_displayName", + * // "enableAutoReload": false, + * // "knowledgeTypes": [], + * // "latestReloadStatus": {}, + * // "metadata": {}, + * // "mimeType": "my_mimeType", + * // "name": "my_name", + * // "rawContent": "my_rawContent" * // } * } * @@ -13448,57 +14550,57 @@ export namespace dialogflow_v2 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - create( - params: Params$Resource$Projects$Agent$Sessions$Entitytypes$Create, + get( + params: Params$Resource$Projects$Agent$Knowledgebases$Documents$Get, options: StreamMethodOptions ): GaxiosPromise; - create( - params?: Params$Resource$Projects$Agent$Sessions$Entitytypes$Create, + get( + params?: Params$Resource$Projects$Agent$Knowledgebases$Documents$Get, options?: MethodOptions - ): GaxiosPromise; - create( - params: Params$Resource$Projects$Agent$Sessions$Entitytypes$Create, + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Agent$Knowledgebases$Documents$Get, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - create( - params: Params$Resource$Projects$Agent$Sessions$Entitytypes$Create, + get( + params: Params$Resource$Projects$Agent$Knowledgebases$Documents$Get, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - create( - params: Params$Resource$Projects$Agent$Sessions$Entitytypes$Create, - callback: BodyResponseCallback + get( + params: Params$Resource$Projects$Agent$Knowledgebases$Documents$Get, + callback: BodyResponseCallback ): void; - create( - callback: BodyResponseCallback + get( + callback: BodyResponseCallback ): void; - create( + get( paramsOrCallback?: - | Params$Resource$Projects$Agent$Sessions$Entitytypes$Create - | BodyResponseCallback + | Params$Resource$Projects$Agent$Knowledgebases$Documents$Get + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Sessions$Entitytypes$Create; + {}) as Params$Resource$Projects$Agent$Knowledgebases$Documents$Get; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Sessions$Entitytypes$Create; + params = {} as Params$Resource$Projects$Agent$Knowledgebases$Documents$Get; options = {}; } @@ -13511,33 +14613,30 @@ export namespace dialogflow_v2 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2/{+parent}/entityTypes').replace( - /([^:]\/)\/+/g, - '$1' - ), - method: 'POST', + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', }, options ), params, - requiredParams: ['parent'], - pathParams: ['parent'], + requiredParams: ['name'], + pathParams: ['name'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest( + return createAPIRequest( parameters ); } } /** - * Deletes the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration. + * Returns the list of all documents of the knowledge base. * @example * ```js * // Before running the sample: @@ -13565,15 +14664,21 @@ export namespace dialogflow_v2 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.agent.sessions.entityTypes.delete({ - * // Required. The name of the entity type to delete. Format: `projects//agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. - * name: - * 'projects/my-project/agent/sessions/my-session/entityTypes/my-entityType', + * const res = await dialogflow.projects.agent.knowledgeBases.documents.list({ + * // The maximum number of items to return in a single page. By default 10 and at most 100. + * pageSize: 'placeholder-value', + * // The next_page_token value returned from a previous list request. + * pageToken: 'placeholder-value', + * // Required. The knowledge base to list all documents for. Format: `projects//locations//knowledgeBases/`. + * parent: 'projects/my-project/agent/knowledgeBases/my-knowledgeBase', * }); * console.log(res.data); * * // Example response - * // {} + * // { + * // "documents": [], + * // "nextPageToken": "my_nextPageToken" + * // } * } * * main().catch(e => { @@ -13588,53 +14693,20430 @@ export namespace dialogflow_v2 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - delete( - params: Params$Resource$Projects$Agent$Sessions$Entitytypes$Delete, + list( + params: Params$Resource$Projects$Agent$Knowledgebases$Documents$List, options: StreamMethodOptions ): GaxiosPromise; - delete( - params?: Params$Resource$Projects$Agent$Sessions$Entitytypes$Delete, + list( + params?: Params$Resource$Projects$Agent$Knowledgebases$Documents$List, options?: MethodOptions - ): GaxiosPromise; - delete( - params: Params$Resource$Projects$Agent$Sessions$Entitytypes$Delete, + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Agent$Knowledgebases$Documents$List, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - delete( - params: Params$Resource$Projects$Agent$Sessions$Entitytypes$Delete, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + list( + params: Params$Resource$Projects$Agent$Knowledgebases$Documents$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Agent$Knowledgebases$Documents$List, + callback: BodyResponseCallback + ): void; + list( + callback: BodyResponseCallback + ): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Knowledgebases$Documents$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Knowledgebases$Documents$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$Knowledgebases$Documents$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/documents').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Updates the specified document. Operation + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.agent.knowledgeBases.documents.patch({ + * // Optional. The document resource name. The name must be empty when creating a document. Format: `projects//locations//knowledgeBases//documents/`. + * name: + * 'projects/my-project/agent/knowledgeBases/my-knowledgeBase/documents/my-document', + * // Optional. Not specified means `update all`. Currently, only `display_name` can be updated, an InvalidArgument will be returned for attempting to update other fields. + * updateMask: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "contentUri": "my_contentUri", + * // "displayName": "my_displayName", + * // "enableAutoReload": false, + * // "knowledgeTypes": [], + * // "latestReloadStatus": {}, + * // "metadata": {}, + * // "mimeType": "my_mimeType", + * // "name": "my_name", + * // "rawContent": "my_rawContent" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + patch( + params: Params$Resource$Projects$Agent$Knowledgebases$Documents$Patch, + options: StreamMethodOptions + ): GaxiosPromise; + patch( + params?: Params$Resource$Projects$Agent$Knowledgebases$Documents$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Agent$Knowledgebases$Documents$Patch, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Agent$Knowledgebases$Documents$Patch, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Agent$Knowledgebases$Documents$Patch, + callback: BodyResponseCallback + ): void; + patch( + callback: BodyResponseCallback + ): void; + patch( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Knowledgebases$Documents$Patch + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Knowledgebases$Documents$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$Knowledgebases$Documents$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Reloads the specified document from its specified source, content_uri or content. The previously loaded content of the document will be deleted. Note: Even when the content of the document has not changed, there still may be side effects because of internal implementation changes. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`. Operation + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.agent.knowledgeBases.documents.reload({ + * // Required. The name of the document to reload. Format: `projects//locations//knowledgeBases//documents/` + * name: + * 'projects/my-project/agent/knowledgeBases/my-knowledgeBase/documents/my-document', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "contentUri": "my_contentUri" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + reload( + params: Params$Resource$Projects$Agent$Knowledgebases$Documents$Reload, + options: StreamMethodOptions + ): GaxiosPromise; + reload( + params?: Params$Resource$Projects$Agent$Knowledgebases$Documents$Reload, + options?: MethodOptions + ): GaxiosPromise; + reload( + params: Params$Resource$Projects$Agent$Knowledgebases$Documents$Reload, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + reload( + params: Params$Resource$Projects$Agent$Knowledgebases$Documents$Reload, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + reload( + params: Params$Resource$Projects$Agent$Knowledgebases$Documents$Reload, + callback: BodyResponseCallback + ): void; + reload( + callback: BodyResponseCallback + ): void; + reload( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Knowledgebases$Documents$Reload + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Knowledgebases$Documents$Reload; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$Knowledgebases$Documents$Reload; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}:reload').replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Agent$Knowledgebases$Documents$Create + extends StandardParameters { + /** + * Required. The knowledge base to create a document for. Format: `projects//locations//knowledgeBases/`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2Document; + } + export interface Params$Resource$Projects$Agent$Knowledgebases$Documents$Delete + extends StandardParameters { + /** + * Required. The name of the document to delete. Format: `projects//locations//knowledgeBases//documents/`. + */ + name?: string; + } + export interface Params$Resource$Projects$Agent$Knowledgebases$Documents$Get + extends StandardParameters { + /** + * Required. The name of the document to retrieve. Format `projects//locations//knowledgeBases//documents/`. + */ + name?: string; + } + export interface Params$Resource$Projects$Agent$Knowledgebases$Documents$List + extends StandardParameters { + /** + * The maximum number of items to return in a single page. By default 10 and at most 100. + */ + pageSize?: number; + /** + * The next_page_token value returned from a previous list request. + */ + pageToken?: string; + /** + * Required. The knowledge base to list all documents for. Format: `projects//locations//knowledgeBases/`. + */ + parent?: string; + } + export interface Params$Resource$Projects$Agent$Knowledgebases$Documents$Patch + extends StandardParameters { + /** + * Optional. The document resource name. The name must be empty when creating a document. Format: `projects//locations//knowledgeBases//documents/`. + */ + name?: string; + /** + * Optional. Not specified means `update all`. Currently, only `display_name` can be updated, an InvalidArgument will be returned for attempting to update other fields. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2Document; + } + export interface Params$Resource$Projects$Agent$Knowledgebases$Documents$Reload + extends StandardParameters { + /** + * Required. The name of the document to reload. Format: `projects//locations//knowledgeBases//documents/` + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2ReloadDocumentRequest; + } + + export class Resource$Projects$Agent$Sessions { + context: APIRequestContext; + contexts: Resource$Projects$Agent$Sessions$Contexts; + entityTypes: Resource$Projects$Agent$Sessions$Entitytypes; + constructor(context: APIRequestContext) { + this.context = context; + this.contexts = new Resource$Projects$Agent$Sessions$Contexts( + this.context + ); + this.entityTypes = new Resource$Projects$Agent$Sessions$Entitytypes( + this.context + ); + } + + /** + * Deletes all active contexts in the specified session. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.agent.sessions.deleteContexts({ + * // Required. The name of the session to delete all contexts from. Format: `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * parent: 'projects/my-project/agent/sessions/my-session', + * }); + * console.log(res.data); + * + * // Example response + * // {} + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + deleteContexts( + params: Params$Resource$Projects$Agent$Sessions$Deletecontexts, + options: StreamMethodOptions + ): GaxiosPromise; + deleteContexts( + params?: Params$Resource$Projects$Agent$Sessions$Deletecontexts, + options?: MethodOptions + ): GaxiosPromise; + deleteContexts( + params: Params$Resource$Projects$Agent$Sessions$Deletecontexts, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + deleteContexts( + params: Params$Resource$Projects$Agent$Sessions$Deletecontexts, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + deleteContexts( + params: Params$Resource$Projects$Agent$Sessions$Deletecontexts, + callback: BodyResponseCallback + ): void; + deleteContexts( + callback: BodyResponseCallback + ): void; + deleteContexts( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Sessions$Deletecontexts + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Sessions$Deletecontexts; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$Sessions$Deletecontexts; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/contexts').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Processes a natural language query and returns structured, actionable data as a result. This method is not idempotent, because it may cause contexts and session entity types to be updated, which in turn might affect results of future queries. Note: Always use agent versions for production traffic. See [Versions and environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.agent.sessions.detectIntent({ + * // Required. The name of the session this query is sent to. Format: `projects//agent/sessions/`, or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment (`Environment ID` might be referred to as environment name at some places). If `User ID` is not specified, we are using "-". It's up to the API caller to choose an appropriate `Session ID` and `User Id`. They can be a random number or some type of user and session identifiers (preferably hashed). The length of the `Session ID` and `User ID` must not exceed 36 characters. For more information, see the [API interactions guide](https://cloud.google.com/dialogflow/docs/api-overview). Note: Always use agent versions for production traffic. See [Versions and environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). + * session: 'projects/my-project/agent/sessions/my-session', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "inputAudio": "my_inputAudio", + * // "outputAudioConfig": {}, + * // "outputAudioConfigMask": "my_outputAudioConfigMask", + * // "queryInput": {}, + * // "queryParams": {} + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "outputAudio": "my_outputAudio", + * // "outputAudioConfig": {}, + * // "queryResult": {}, + * // "responseId": "my_responseId", + * // "webhookStatus": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + detectIntent( + params: Params$Resource$Projects$Agent$Sessions$Detectintent, + options: StreamMethodOptions + ): GaxiosPromise; + detectIntent( + params?: Params$Resource$Projects$Agent$Sessions$Detectintent, + options?: MethodOptions + ): GaxiosPromise; + detectIntent( + params: Params$Resource$Projects$Agent$Sessions$Detectintent, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + detectIntent( + params: Params$Resource$Projects$Agent$Sessions$Detectintent, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + detectIntent( + params: Params$Resource$Projects$Agent$Sessions$Detectintent, + callback: BodyResponseCallback + ): void; + detectIntent( + callback: BodyResponseCallback + ): void; + detectIntent( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Sessions$Detectintent + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Sessions$Detectintent; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$Sessions$Detectintent; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+session}:detectIntent').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['session'], + pathParams: ['session'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + } + + export interface Params$Resource$Projects$Agent$Sessions$Deletecontexts + extends StandardParameters { + /** + * Required. The name of the session to delete all contexts from. Format: `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + */ + parent?: string; + } + export interface Params$Resource$Projects$Agent$Sessions$Detectintent + extends StandardParameters { + /** + * Required. The name of the session this query is sent to. Format: `projects//agent/sessions/`, or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment (`Environment ID` might be referred to as environment name at some places). If `User ID` is not specified, we are using "-". It's up to the API caller to choose an appropriate `Session ID` and `User Id`. They can be a random number or some type of user and session identifiers (preferably hashed). The length of the `Session ID` and `User ID` must not exceed 36 characters. For more information, see the [API interactions guide](https://cloud.google.com/dialogflow/docs/api-overview). Note: Always use agent versions for production traffic. See [Versions and environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). + */ + session?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2DetectIntentRequest; + } + + export class Resource$Projects$Agent$Sessions$Contexts { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Creates a context. If the specified context already exists, overrides the context. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.agent.sessions.contexts.create({ + * // Required. The session to create a context for. Format: `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * parent: 'projects/my-project/agent/sessions/my-session', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "lifespanCount": 0, + * // "name": "my_name", + * // "parameters": {} + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "lifespanCount": 0, + * // "name": "my_name", + * // "parameters": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + create( + params: Params$Resource$Projects$Agent$Sessions$Contexts$Create, + options: StreamMethodOptions + ): GaxiosPromise; + create( + params?: Params$Resource$Projects$Agent$Sessions$Contexts$Create, + options?: MethodOptions + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Agent$Sessions$Contexts$Create, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Agent$Sessions$Contexts$Create, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Agent$Sessions$Contexts$Create, + callback: BodyResponseCallback + ): void; + create( + callback: BodyResponseCallback + ): void; + create( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Sessions$Contexts$Create + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Sessions$Contexts$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$Sessions$Contexts$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/contexts').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Deletes the specified context. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.agent.sessions.contexts.delete({ + * // Required. The name of the context to delete. Format: `projects//agent/sessions//contexts/` or `projects//agent/environments//users//sessions//contexts/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * name: 'projects/my-project/agent/sessions/my-session/contexts/my-context', + * }); + * console.log(res.data); + * + * // Example response + * // {} + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + delete( + params: Params$Resource$Projects$Agent$Sessions$Contexts$Delete, + options: StreamMethodOptions + ): GaxiosPromise; + delete( + params?: Params$Resource$Projects$Agent$Sessions$Contexts$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Agent$Sessions$Contexts$Delete, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Agent$Sessions$Contexts$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Agent$Sessions$Contexts$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Sessions$Contexts$Delete + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Sessions$Contexts$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$Sessions$Contexts$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Retrieves the specified context. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.agent.sessions.contexts.get({ + * // Required. The name of the context. Format: `projects//agent/sessions//contexts/` or `projects//agent/environments//users//sessions//contexts/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * name: 'projects/my-project/agent/sessions/my-session/contexts/my-context', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "lifespanCount": 0, + * // "name": "my_name", + * // "parameters": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Projects$Agent$Sessions$Contexts$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Projects$Agent$Sessions$Contexts$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Agent$Sessions$Contexts$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Agent$Sessions$Contexts$Get, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Agent$Sessions$Contexts$Get, + callback: BodyResponseCallback + ): void; + get( + callback: BodyResponseCallback + ): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Sessions$Contexts$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Sessions$Contexts$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$Sessions$Contexts$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Returns the list of all contexts in the specified session. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.agent.sessions.contexts.list({ + * // Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. + * pageSize: 'placeholder-value', + * // Optional. The next_page_token value returned from a previous list request. + * pageToken: 'placeholder-value', + * // Required. The session to list all contexts from. Format: `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * parent: 'projects/my-project/agent/sessions/my-session', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "contexts": [], + * // "nextPageToken": "my_nextPageToken" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Projects$Agent$Sessions$Contexts$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Projects$Agent$Sessions$Contexts$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Agent$Sessions$Contexts$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Agent$Sessions$Contexts$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Agent$Sessions$Contexts$List, + callback: BodyResponseCallback + ): void; + list( + callback: BodyResponseCallback + ): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Sessions$Contexts$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Sessions$Contexts$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$Sessions$Contexts$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/contexts').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Updates the specified context. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.agent.sessions.contexts.patch({ + * // Required. The unique identifier of the context. Format: `projects//agent/sessions//contexts/`, or `projects//agent/environments//users//sessions//contexts/`. The `Context ID` is always converted to lowercase, may only contain characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. The following context names are reserved for internal use by Dialogflow. You should not use these contexts or create contexts with these names: * `__system_counters__` * `*_id_dialog_context` * `*_dialog_params_size` + * name: 'projects/my-project/agent/sessions/my-session/contexts/my-context', + * // Optional. The mask to control which fields get updated. + * updateMask: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "lifespanCount": 0, + * // "name": "my_name", + * // "parameters": {} + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "lifespanCount": 0, + * // "name": "my_name", + * // "parameters": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + patch( + params: Params$Resource$Projects$Agent$Sessions$Contexts$Patch, + options: StreamMethodOptions + ): GaxiosPromise; + patch( + params?: Params$Resource$Projects$Agent$Sessions$Contexts$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Agent$Sessions$Contexts$Patch, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Agent$Sessions$Contexts$Patch, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Agent$Sessions$Contexts$Patch, + callback: BodyResponseCallback + ): void; + patch( + callback: BodyResponseCallback + ): void; + patch( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Sessions$Contexts$Patch + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Sessions$Contexts$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$Sessions$Contexts$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + } + + export interface Params$Resource$Projects$Agent$Sessions$Contexts$Create + extends StandardParameters { + /** + * Required. The session to create a context for. Format: `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2Context; + } + export interface Params$Resource$Projects$Agent$Sessions$Contexts$Delete + extends StandardParameters { + /** + * Required. The name of the context to delete. Format: `projects//agent/sessions//contexts/` or `projects//agent/environments//users//sessions//contexts/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + */ + name?: string; + } + export interface Params$Resource$Projects$Agent$Sessions$Contexts$Get + extends StandardParameters { + /** + * Required. The name of the context. Format: `projects//agent/sessions//contexts/` or `projects//agent/environments//users//sessions//contexts/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + */ + name?: string; + } + export interface Params$Resource$Projects$Agent$Sessions$Contexts$List + extends StandardParameters { + /** + * Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. + */ + pageSize?: number; + /** + * Optional. The next_page_token value returned from a previous list request. + */ + pageToken?: string; + /** + * Required. The session to list all contexts from. Format: `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + */ + parent?: string; + } + export interface Params$Resource$Projects$Agent$Sessions$Contexts$Patch + extends StandardParameters { + /** + * Required. The unique identifier of the context. Format: `projects//agent/sessions//contexts/`, or `projects//agent/environments//users//sessions//contexts/`. The `Context ID` is always converted to lowercase, may only contain characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. The following context names are reserved for internal use by Dialogflow. You should not use these contexts or create contexts with these names: * `__system_counters__` * `*_id_dialog_context` * `*_dialog_params_size` + */ + name?: string; + /** + * Optional. The mask to control which fields get updated. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2Context; + } + + export class Resource$Projects$Agent$Sessions$Entitytypes { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Creates a session entity type. If the specified session entity type already exists, overrides the session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.agent.sessions.entityTypes.create({ + * // Required. The session to create a session entity type for. Format: `projects//agent/sessions/` or `projects//agent/environments//users// sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * parent: 'projects/my-project/agent/sessions/my-session', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "entities": [], + * // "entityOverrideMode": "my_entityOverrideMode", + * // "name": "my_name" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "entities": [], + * // "entityOverrideMode": "my_entityOverrideMode", + * // "name": "my_name" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + create( + params: Params$Resource$Projects$Agent$Sessions$Entitytypes$Create, + options: StreamMethodOptions + ): GaxiosPromise; + create( + params?: Params$Resource$Projects$Agent$Sessions$Entitytypes$Create, + options?: MethodOptions + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Agent$Sessions$Entitytypes$Create, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Agent$Sessions$Entitytypes$Create, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Agent$Sessions$Entitytypes$Create, + callback: BodyResponseCallback + ): void; + create( + callback: BodyResponseCallback + ): void; + create( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Sessions$Entitytypes$Create + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Sessions$Entitytypes$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$Sessions$Entitytypes$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/entityTypes').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Deletes the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.agent.sessions.entityTypes.delete({ + * // Required. The name of the entity type to delete. Format: `projects//agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * name: + * 'projects/my-project/agent/sessions/my-session/entityTypes/my-entityType', + * }); + * console.log(res.data); + * + * // Example response + * // {} + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + delete( + params: Params$Resource$Projects$Agent$Sessions$Entitytypes$Delete, + options: StreamMethodOptions + ): GaxiosPromise; + delete( + params?: Params$Resource$Projects$Agent$Sessions$Entitytypes$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Agent$Sessions$Entitytypes$Delete, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Agent$Sessions$Entitytypes$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Agent$Sessions$Entitytypes$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Sessions$Entitytypes$Delete + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Sessions$Entitytypes$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$Sessions$Entitytypes$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Retrieves the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.agent.sessions.entityTypes.get({ + * // Required. The name of the session entity type. Format: `projects//agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * name: + * 'projects/my-project/agent/sessions/my-session/entityTypes/my-entityType', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "entities": [], + * // "entityOverrideMode": "my_entityOverrideMode", + * // "name": "my_name" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Projects$Agent$Sessions$Entitytypes$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Projects$Agent$Sessions$Entitytypes$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Agent$Sessions$Entitytypes$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Agent$Sessions$Entitytypes$Get, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Agent$Sessions$Entitytypes$Get, + callback: BodyResponseCallback + ): void; + get( + callback: BodyResponseCallback + ): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Sessions$Entitytypes$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Sessions$Entitytypes$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$Sessions$Entitytypes$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Returns the list of all session entity types in the specified session. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.agent.sessions.entityTypes.list({ + * // Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. + * pageSize: 'placeholder-value', + * // Optional. The next_page_token value returned from a previous list request. + * pageToken: 'placeholder-value', + * // Required. The session to list all session entity types from. Format: `projects//agent/sessions/` or `projects//agent/environments//users// sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * parent: 'projects/my-project/agent/sessions/my-session', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "nextPageToken": "my_nextPageToken", + * // "sessionEntityTypes": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Projects$Agent$Sessions$Entitytypes$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Projects$Agent$Sessions$Entitytypes$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Agent$Sessions$Entitytypes$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Agent$Sessions$Entitytypes$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Agent$Sessions$Entitytypes$List, + callback: BodyResponseCallback + ): void; + list( + callback: BodyResponseCallback + ): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Sessions$Entitytypes$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Sessions$Entitytypes$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$Sessions$Entitytypes$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/entityTypes').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Updates the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.agent.sessions.entityTypes.patch({ + * // Required. The unique identifier of this session entity type. Format: `projects//agent/sessions//entityTypes/`, or `projects//agent/environments//users//sessions//entityTypes/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. `` must be the display name of an existing entity type in the same agent that will be overridden or supplemented. + * name: + * 'projects/my-project/agent/sessions/my-session/entityTypes/my-entityType', + * // Optional. The mask to control which fields get updated. + * updateMask: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "entities": [], + * // "entityOverrideMode": "my_entityOverrideMode", + * // "name": "my_name" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "entities": [], + * // "entityOverrideMode": "my_entityOverrideMode", + * // "name": "my_name" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + patch( + params: Params$Resource$Projects$Agent$Sessions$Entitytypes$Patch, + options: StreamMethodOptions + ): GaxiosPromise; + patch( + params?: Params$Resource$Projects$Agent$Sessions$Entitytypes$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Agent$Sessions$Entitytypes$Patch, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Agent$Sessions$Entitytypes$Patch, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Agent$Sessions$Entitytypes$Patch, + callback: BodyResponseCallback + ): void; + patch( + callback: BodyResponseCallback + ): void; + patch( + paramsOrCallback?: + | Params$Resource$Projects$Agent$Sessions$Entitytypes$Patch + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Agent$Sessions$Entitytypes$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Agent$Sessions$Entitytypes$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + } + + export interface Params$Resource$Projects$Agent$Sessions$Entitytypes$Create + extends StandardParameters { + /** + * Required. The session to create a session entity type for. Format: `projects//agent/sessions/` or `projects//agent/environments//users// sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2SessionEntityType; + } + export interface Params$Resource$Projects$Agent$Sessions$Entitytypes$Delete + extends StandardParameters { + /** + * Required. The name of the entity type to delete. Format: `projects//agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + */ + name?: string; + } + export interface Params$Resource$Projects$Agent$Sessions$Entitytypes$Get + extends StandardParameters { + /** + * Required. The name of the session entity type. Format: `projects//agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + */ + name?: string; + } + export interface Params$Resource$Projects$Agent$Sessions$Entitytypes$List + extends StandardParameters { + /** + * Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. + */ + pageSize?: number; + /** + * Optional. The next_page_token value returned from a previous list request. + */ + pageToken?: string; + /** + * Required. The session to list all session entity types from. Format: `projects//agent/sessions/` or `projects//agent/environments//users// sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + */ + parent?: string; + } + export interface Params$Resource$Projects$Agent$Sessions$Entitytypes$Patch + extends StandardParameters { + /** + * Required. The unique identifier of this session entity type. Format: `projects//agent/sessions//entityTypes/`, or `projects//agent/environments//users//sessions//entityTypes/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. `` must be the display name of an existing entity type in the same agent that will be overridden or supplemented. + */ + name?: string; + /** + * Optional. The mask to control which fields get updated. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2SessionEntityType; + } + + export class Resource$Projects$Answerrecords { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Returns the list of all answer records in the specified project in reverse chronological order. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.answerRecords.list({ + * // Required. Filters to restrict results to specific answer records. Filter on answer record type. Currently predicates on `type` is supported, valid values are `ARTICLE_ANSWER`, `FAQ_ANSWER`. For more information about filtering, see [API Filtering](https://aip.dev/160). + * filter: 'placeholder-value', + * // Optional. The maximum number of records to return in a single page. The server may return fewer records than this. If unspecified, we use 10. The maximum is 100. + * pageSize: 'placeholder-value', + * // Optional. The ListAnswerRecordsResponse.next_page_token value returned from a previous list request used to continue listing on the next page. + * pageToken: 'placeholder-value', + * // Required. The project to list all answer records for in reverse chronological order. Format: `projects//locations/`. + * parent: 'projects/my-project', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "answerRecords": [], + * // "nextPageToken": "my_nextPageToken" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Projects$Answerrecords$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Projects$Answerrecords$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Answerrecords$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Answerrecords$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Answerrecords$List, + callback: BodyResponseCallback + ): void; + list( + callback: BodyResponseCallback + ): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Answerrecords$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Answerrecords$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Answerrecords$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/answerRecords').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Updates the specified answer record. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.answerRecords.patch({ + * // The unique identifier of this answer record. Format: `projects//locations//answerRecords/`. + * name: 'projects/my-project/answerRecords/my-answerRecord', + * // Required. The mask to control which fields get updated. + * updateMask: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "agentAssistantRecord": {}, + * // "answerFeedback": {}, + * // "name": "my_name" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "agentAssistantRecord": {}, + * // "answerFeedback": {}, + * // "name": "my_name" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + patch( + params: Params$Resource$Projects$Answerrecords$Patch, + options: StreamMethodOptions + ): GaxiosPromise; + patch( + params?: Params$Resource$Projects$Answerrecords$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Answerrecords$Patch, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Answerrecords$Patch, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Answerrecords$Patch, + callback: BodyResponseCallback + ): void; + patch( + callback: BodyResponseCallback + ): void; + patch( + paramsOrCallback?: + | Params$Resource$Projects$Answerrecords$Patch + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Answerrecords$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Answerrecords$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + } + + export interface Params$Resource$Projects$Answerrecords$List + extends StandardParameters { + /** + * Required. Filters to restrict results to specific answer records. Filter on answer record type. Currently predicates on `type` is supported, valid values are `ARTICLE_ANSWER`, `FAQ_ANSWER`. For more information about filtering, see [API Filtering](https://aip.dev/160). + */ + filter?: string; + /** + * Optional. The maximum number of records to return in a single page. The server may return fewer records than this. If unspecified, we use 10. The maximum is 100. + */ + pageSize?: number; + /** + * Optional. The ListAnswerRecordsResponse.next_page_token value returned from a previous list request used to continue listing on the next page. + */ + pageToken?: string; + /** + * Required. The project to list all answer records for in reverse chronological order. Format: `projects//locations/`. + */ + parent?: string; + } + export interface Params$Resource$Projects$Answerrecords$Patch + extends StandardParameters { + /** + * The unique identifier of this answer record. Format: `projects//locations//answerRecords/`. + */ + name?: string; + /** + * Required. The mask to control which fields get updated. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2AnswerRecord; + } + + export class Resource$Projects$Conversationprofiles { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Creates a conversation profile in the specified project. ConversationProfile.CreateTime and ConversationProfile.UpdateTime aren't populated in the response. You can retrieve them via GetConversationProfile API. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.conversationProfiles.create({ + * // Required. The project to create a conversation profile for. Format: `projects//locations/`. + * parent: 'projects/my-project', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "automatedAgentConfig": {}, + * // "createTime": "my_createTime", + * // "displayName": "my_displayName", + * // "humanAgentAssistantConfig": {}, + * // "languageCode": "my_languageCode", + * // "loggingConfig": {}, + * // "name": "my_name", + * // "newMessageEventNotificationConfig": {}, + * // "notificationConfig": {}, + * // "sttConfig": {}, + * // "updateTime": "my_updateTime" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "automatedAgentConfig": {}, + * // "createTime": "my_createTime", + * // "displayName": "my_displayName", + * // "humanAgentAssistantConfig": {}, + * // "languageCode": "my_languageCode", + * // "loggingConfig": {}, + * // "name": "my_name", + * // "newMessageEventNotificationConfig": {}, + * // "notificationConfig": {}, + * // "sttConfig": {}, + * // "updateTime": "my_updateTime" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + create( + params: Params$Resource$Projects$Conversationprofiles$Create, + options: StreamMethodOptions + ): GaxiosPromise; + create( + params?: Params$Resource$Projects$Conversationprofiles$Create, + options?: MethodOptions + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Conversationprofiles$Create, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Conversationprofiles$Create, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Conversationprofiles$Create, + callback: BodyResponseCallback + ): void; + create( + callback: BodyResponseCallback + ): void; + create( + paramsOrCallback?: + | Params$Resource$Projects$Conversationprofiles$Create + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Conversationprofiles$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Conversationprofiles$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/conversationProfiles').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Deletes the specified conversation profile. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.conversationProfiles.delete({ + * // Required. The name of the conversation profile to delete. Format: `projects//locations//conversationProfiles/`. + * name: 'projects/my-project/conversationProfiles/my-conversationProfile', + * }); + * console.log(res.data); + * + * // Example response + * // {} + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + delete( + params: Params$Resource$Projects$Conversationprofiles$Delete, + options: StreamMethodOptions + ): GaxiosPromise; + delete( + params?: Params$Resource$Projects$Conversationprofiles$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Conversationprofiles$Delete, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Conversationprofiles$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Conversationprofiles$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Projects$Conversationprofiles$Delete + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Conversationprofiles$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Conversationprofiles$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Retrieves the specified conversation profile. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.conversationProfiles.get({ + * // Required. The resource name of the conversation profile. Format: `projects//locations//conversationProfiles/`. + * name: 'projects/my-project/conversationProfiles/my-conversationProfile', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "automatedAgentConfig": {}, + * // "createTime": "my_createTime", + * // "displayName": "my_displayName", + * // "humanAgentAssistantConfig": {}, + * // "languageCode": "my_languageCode", + * // "loggingConfig": {}, + * // "name": "my_name", + * // "newMessageEventNotificationConfig": {}, + * // "notificationConfig": {}, + * // "sttConfig": {}, + * // "updateTime": "my_updateTime" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Projects$Conversationprofiles$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Projects$Conversationprofiles$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Conversationprofiles$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Conversationprofiles$Get, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Conversationprofiles$Get, + callback: BodyResponseCallback + ): void; + get( + callback: BodyResponseCallback + ): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Conversationprofiles$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Conversationprofiles$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Conversationprofiles$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Returns the list of all conversation profiles in the specified project. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.conversationProfiles.list({ + * // The maximum number of items to return in a single page. By default 100 and at most 1000. + * pageSize: 'placeholder-value', + * // The next_page_token value returned from a previous list request. + * pageToken: 'placeholder-value', + * // Required. The project to list all conversation profiles from. Format: `projects//locations/`. + * parent: 'projects/my-project', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "conversationProfiles": [], + * // "nextPageToken": "my_nextPageToken" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Projects$Conversationprofiles$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Projects$Conversationprofiles$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Conversationprofiles$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Conversationprofiles$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Conversationprofiles$List, + callback: BodyResponseCallback + ): void; + list( + callback: BodyResponseCallback + ): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Conversationprofiles$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Conversationprofiles$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Conversationprofiles$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/conversationProfiles').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Updates the specified conversation profile. ConversationProfile.CreateTime and ConversationProfile.UpdateTime aren't populated in the response. You can retrieve them via GetConversationProfile API. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.conversationProfiles.patch({ + * // The unique identifier of this conversation profile. Format: `projects//locations//conversationProfiles/`. + * name: 'projects/my-project/conversationProfiles/my-conversationProfile', + * // Required. The mask to control which fields to update. + * updateMask: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "automatedAgentConfig": {}, + * // "createTime": "my_createTime", + * // "displayName": "my_displayName", + * // "humanAgentAssistantConfig": {}, + * // "languageCode": "my_languageCode", + * // "loggingConfig": {}, + * // "name": "my_name", + * // "newMessageEventNotificationConfig": {}, + * // "notificationConfig": {}, + * // "sttConfig": {}, + * // "updateTime": "my_updateTime" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "automatedAgentConfig": {}, + * // "createTime": "my_createTime", + * // "displayName": "my_displayName", + * // "humanAgentAssistantConfig": {}, + * // "languageCode": "my_languageCode", + * // "loggingConfig": {}, + * // "name": "my_name", + * // "newMessageEventNotificationConfig": {}, + * // "notificationConfig": {}, + * // "sttConfig": {}, + * // "updateTime": "my_updateTime" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + patch( + params: Params$Resource$Projects$Conversationprofiles$Patch, + options: StreamMethodOptions + ): GaxiosPromise; + patch( + params?: Params$Resource$Projects$Conversationprofiles$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Conversationprofiles$Patch, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Conversationprofiles$Patch, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Conversationprofiles$Patch, + callback: BodyResponseCallback + ): void; + patch( + callback: BodyResponseCallback + ): void; + patch( + paramsOrCallback?: + | Params$Resource$Projects$Conversationprofiles$Patch + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Conversationprofiles$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Conversationprofiles$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + } + + export interface Params$Resource$Projects$Conversationprofiles$Create + extends StandardParameters { + /** + * Required. The project to create a conversation profile for. Format: `projects//locations/`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2ConversationProfile; + } + export interface Params$Resource$Projects$Conversationprofiles$Delete + extends StandardParameters { + /** + * Required. The name of the conversation profile to delete. Format: `projects//locations//conversationProfiles/`. + */ + name?: string; + } + export interface Params$Resource$Projects$Conversationprofiles$Get + extends StandardParameters { + /** + * Required. The resource name of the conversation profile. Format: `projects//locations//conversationProfiles/`. + */ + name?: string; + } + export interface Params$Resource$Projects$Conversationprofiles$List + extends StandardParameters { + /** + * The maximum number of items to return in a single page. By default 100 and at most 1000. + */ + pageSize?: number; + /** + * The next_page_token value returned from a previous list request. + */ + pageToken?: string; + /** + * Required. The project to list all conversation profiles from. Format: `projects//locations/`. + */ + parent?: string; + } + export interface Params$Resource$Projects$Conversationprofiles$Patch + extends StandardParameters { + /** + * The unique identifier of this conversation profile. Format: `projects//locations//conversationProfiles/`. + */ + name?: string; + /** + * Required. The mask to control which fields to update. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2ConversationProfile; + } + + export class Resource$Projects$Conversations { + context: APIRequestContext; + messages: Resource$Projects$Conversations$Messages; + participants: Resource$Projects$Conversations$Participants; + constructor(context: APIRequestContext) { + this.context = context; + this.messages = new Resource$Projects$Conversations$Messages( + this.context + ); + this.participants = new Resource$Projects$Conversations$Participants( + this.context + ); + } + + /** + * Completes the specified conversation. Finished conversations are purged from the database after 30 days. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.conversations.complete({ + * // Required. Resource identifier of the conversation to close. Format: `projects//locations//conversations/`. + * name: 'projects/my-project/conversations/my-conversation', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // {} + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "conversationProfile": "my_conversationProfile", + * // "conversationStage": "my_conversationStage", + * // "endTime": "my_endTime", + * // "lifecycleState": "my_lifecycleState", + * // "name": "my_name", + * // "phoneNumber": {}, + * // "startTime": "my_startTime" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + complete( + params: Params$Resource$Projects$Conversations$Complete, + options: StreamMethodOptions + ): GaxiosPromise; + complete( + params?: Params$Resource$Projects$Conversations$Complete, + options?: MethodOptions + ): GaxiosPromise; + complete( + params: Params$Resource$Projects$Conversations$Complete, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + complete( + params: Params$Resource$Projects$Conversations$Complete, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + complete( + params: Params$Resource$Projects$Conversations$Complete, + callback: BodyResponseCallback + ): void; + complete( + callback: BodyResponseCallback + ): void; + complete( + paramsOrCallback?: + | Params$Resource$Projects$Conversations$Complete + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Conversations$Complete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Conversations$Complete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}:complete').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Creates a new conversation. Conversations are auto-completed after 24 hours. Conversation Lifecycle: There are two stages during a conversation: Automated Agent Stage and Assist Stage. For Automated Agent Stage, there will be a dialogflow agent responding to user queries. For Assist Stage, there's no dialogflow agent responding to user queries. But we will provide suggestions which are generated from conversation. If Conversation.conversation_profile is configured for a dialogflow agent, conversation will start from `Automated Agent Stage`, otherwise, it will start from `Assist Stage`. And during `Automated Agent Stage`, once an Intent with Intent.live_agent_handoff is triggered, conversation will transfer to Assist Stage. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.conversations.create({ + * // Optional. Identifier of the conversation. Generally it's auto generated by Google. Only set it if you cannot wait for the response to return a auto-generated one to you. The conversation ID must be compliant with the regression fomula "a-zA-Z*" with the characters length in range of [3,64]. If the field is provided, the caller is resposible for 1. the uniqueness of the ID, otherwise the request will be rejected. 2. the consistency for whether to use custom ID or not under a project to better ensure uniqueness. + * conversationId: 'placeholder-value', + * // Required. Resource identifier of the project creating the conversation. Format: `projects//locations/`. + * parent: 'projects/my-project', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "conversationProfile": "my_conversationProfile", + * // "conversationStage": "my_conversationStage", + * // "endTime": "my_endTime", + * // "lifecycleState": "my_lifecycleState", + * // "name": "my_name", + * // "phoneNumber": {}, + * // "startTime": "my_startTime" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "conversationProfile": "my_conversationProfile", + * // "conversationStage": "my_conversationStage", + * // "endTime": "my_endTime", + * // "lifecycleState": "my_lifecycleState", + * // "name": "my_name", + * // "phoneNumber": {}, + * // "startTime": "my_startTime" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + create( + params: Params$Resource$Projects$Conversations$Create, + options: StreamMethodOptions + ): GaxiosPromise; + create( + params?: Params$Resource$Projects$Conversations$Create, + options?: MethodOptions + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Conversations$Create, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Conversations$Create, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Conversations$Create, + callback: BodyResponseCallback + ): void; + create( + callback: BodyResponseCallback + ): void; + create( + paramsOrCallback?: + | Params$Resource$Projects$Conversations$Create + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Conversations$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Conversations$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/conversations').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Retrieves the specific conversation. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.conversations.get({ + * // Required. The name of the conversation. Format: `projects//locations//conversations/`. + * name: 'projects/my-project/conversations/my-conversation', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "conversationProfile": "my_conversationProfile", + * // "conversationStage": "my_conversationStage", + * // "endTime": "my_endTime", + * // "lifecycleState": "my_lifecycleState", + * // "name": "my_name", + * // "phoneNumber": {}, + * // "startTime": "my_startTime" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Projects$Conversations$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Projects$Conversations$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Conversations$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Conversations$Get, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Conversations$Get, + callback: BodyResponseCallback + ): void; + get( + callback: BodyResponseCallback + ): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Conversations$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Conversations$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Conversations$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Returns the list of all conversations in the specified project. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.conversations.list({ + * // A filter expression that filters conversations listed in the response. In general, the expression must specify the field name, a comparison operator, and the value to use for filtering: - The value must be a string, a number, or a boolean. - The comparison operator must be either `=`,`!=`, `\>`, or `<`. - To filter on multiple expressions, separate the expressions with `AND` or `OR` (omitting both implies `AND`). - For clarity, expressions can be enclosed in parentheses. Only `lifecycle_state` can be filtered on in this way. For example, the following expression only returns `COMPLETED` conversations: `lifecycle_state = "COMPLETED"` For more information about filtering, see [API Filtering](https://aip.dev/160). + * filter: 'placeholder-value', + * // Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. + * pageSize: 'placeholder-value', + * // Optional. The next_page_token value returned from a previous list request. + * pageToken: 'placeholder-value', + * // Required. The project from which to list all conversation. Format: `projects//locations/`. + * parent: 'projects/my-project', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "conversations": [], + * // "nextPageToken": "my_nextPageToken" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Projects$Conversations$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Projects$Conversations$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Conversations$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Conversations$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Conversations$List, + callback: BodyResponseCallback + ): void; + list( + callback: BodyResponseCallback + ): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Conversations$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Conversations$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Conversations$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/conversations').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + } + + export interface Params$Resource$Projects$Conversations$Complete + extends StandardParameters { + /** + * Required. Resource identifier of the conversation to close. Format: `projects//locations//conversations/`. + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2CompleteConversationRequest; + } + export interface Params$Resource$Projects$Conversations$Create + extends StandardParameters { + /** + * Optional. Identifier of the conversation. Generally it's auto generated by Google. Only set it if you cannot wait for the response to return a auto-generated one to you. The conversation ID must be compliant with the regression fomula "a-zA-Z*" with the characters length in range of [3,64]. If the field is provided, the caller is resposible for 1. the uniqueness of the ID, otherwise the request will be rejected. 2. the consistency for whether to use custom ID or not under a project to better ensure uniqueness. + */ + conversationId?: string; + /** + * Required. Resource identifier of the project creating the conversation. Format: `projects//locations/`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2Conversation; + } + export interface Params$Resource$Projects$Conversations$Get + extends StandardParameters { + /** + * Required. The name of the conversation. Format: `projects//locations//conversations/`. + */ + name?: string; + } + export interface Params$Resource$Projects$Conversations$List + extends StandardParameters { + /** + * A filter expression that filters conversations listed in the response. In general, the expression must specify the field name, a comparison operator, and the value to use for filtering: - The value must be a string, a number, or a boolean. - The comparison operator must be either `=`,`!=`, `\>`, or `<`. - To filter on multiple expressions, separate the expressions with `AND` or `OR` (omitting both implies `AND`). - For clarity, expressions can be enclosed in parentheses. Only `lifecycle_state` can be filtered on in this way. For example, the following expression only returns `COMPLETED` conversations: `lifecycle_state = "COMPLETED"` For more information about filtering, see [API Filtering](https://aip.dev/160). + */ + filter?: string; + /** + * Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. + */ + pageSize?: number; + /** + * Optional. The next_page_token value returned from a previous list request. + */ + pageToken?: string; + /** + * Required. The project from which to list all conversation. Format: `projects//locations/`. + */ + parent?: string; + } + + export class Resource$Projects$Conversations$Messages { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Lists messages that belong to a given conversation. `messages` are ordered by `create_time` in descending order. To fetch updates without duplication, send request with filter `create_time_epoch_microseconds \> [first item's create_time of previous request]` and empty page_token. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.conversations.messages.list({ + * // Optional. Filter on message fields. Currently predicates on `create_time` and `create_time_epoch_microseconds` are supported. `create_time` only support milliseconds accuracy. E.g., `create_time_epoch_microseconds \> 1551790877964485` or `create_time \> 2017-01-15T01:30:15.01Z`. For more information about filtering, see [API Filtering](https://aip.dev/160). + * filter: 'placeholder-value', + * // Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. + * pageSize: 'placeholder-value', + * // Optional. The next_page_token value returned from a previous list request. + * pageToken: 'placeholder-value', + * // Required. The name of the conversation to list messages for. Format: `projects//locations//conversations/` + * parent: 'projects/my-project/conversations/my-conversation', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "messages": [], + * // "nextPageToken": "my_nextPageToken" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Projects$Conversations$Messages$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Projects$Conversations$Messages$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Conversations$Messages$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Conversations$Messages$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Conversations$Messages$List, + callback: BodyResponseCallback + ): void; + list( + callback: BodyResponseCallback + ): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Conversations$Messages$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Conversations$Messages$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Conversations$Messages$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/messages').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + } + + export interface Params$Resource$Projects$Conversations$Messages$List + extends StandardParameters { + /** + * Optional. Filter on message fields. Currently predicates on `create_time` and `create_time_epoch_microseconds` are supported. `create_time` only support milliseconds accuracy. E.g., `create_time_epoch_microseconds \> 1551790877964485` or `create_time \> 2017-01-15T01:30:15.01Z`. For more information about filtering, see [API Filtering](https://aip.dev/160). + */ + filter?: string; + /** + * Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. + */ + pageSize?: number; + /** + * Optional. The next_page_token value returned from a previous list request. + */ + pageToken?: string; + /** + * Required. The name of the conversation to list messages for. Format: `projects//locations//conversations/` + */ + parent?: string; + } + + export class Resource$Projects$Conversations$Participants { + context: APIRequestContext; + suggestions: Resource$Projects$Conversations$Participants$Suggestions; + constructor(context: APIRequestContext) { + this.context = context; + this.suggestions = new Resource$Projects$Conversations$Participants$Suggestions( + this.context + ); + } + + /** + * Adds a text (chat, for example), or audio (phone recording, for example) message from a participant into the conversation. Note: Always use agent versions for production traffic sent to virtual agents. See [Versions and environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.conversations.participants.analyzeContent( + * { + * // Required. The name of the participant this text comes from. Format: `projects//locations//conversations//participants/`. + * participant: + * 'projects/my-project/conversations/my-conversation/participants/my-participant', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "eventInput": {}, + * // "queryParams": {}, + * // "replyAudioConfig": {}, + * // "requestId": "my_requestId", + * // "textInput": {} + * // } + * }, + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "automatedAgentReply": {}, + * // "dtmfParameters": {}, + * // "endUserSuggestionResults": [], + * // "humanAgentSuggestionResults": [], + * // "message": {}, + * // "replyAudio": {}, + * // "replyText": "my_replyText" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + analyzeContent( + params: Params$Resource$Projects$Conversations$Participants$Analyzecontent, + options: StreamMethodOptions + ): GaxiosPromise; + analyzeContent( + params?: Params$Resource$Projects$Conversations$Participants$Analyzecontent, + options?: MethodOptions + ): GaxiosPromise; + analyzeContent( + params: Params$Resource$Projects$Conversations$Participants$Analyzecontent, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + analyzeContent( + params: Params$Resource$Projects$Conversations$Participants$Analyzecontent, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + analyzeContent( + params: Params$Resource$Projects$Conversations$Participants$Analyzecontent, + callback: BodyResponseCallback + ): void; + analyzeContent( + callback: BodyResponseCallback + ): void; + analyzeContent( + paramsOrCallback?: + | Params$Resource$Projects$Conversations$Participants$Analyzecontent + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Conversations$Participants$Analyzecontent; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Conversations$Participants$Analyzecontent; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+participant}:analyzeContent').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['participant'], + pathParams: ['participant'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Creates a new participant in a conversation. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.conversations.participants.create({ + * // Required. Resource identifier of the conversation adding the participant. Format: `projects//locations//conversations/`. + * parent: 'projects/my-project/conversations/my-conversation', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "name": "my_name", + * // "role": "my_role", + * // "sipRecordingMediaLabel": "my_sipRecordingMediaLabel" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "name": "my_name", + * // "role": "my_role", + * // "sipRecordingMediaLabel": "my_sipRecordingMediaLabel" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + create( + params: Params$Resource$Projects$Conversations$Participants$Create, + options: StreamMethodOptions + ): GaxiosPromise; + create( + params?: Params$Resource$Projects$Conversations$Participants$Create, + options?: MethodOptions + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Conversations$Participants$Create, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Conversations$Participants$Create, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Conversations$Participants$Create, + callback: BodyResponseCallback + ): void; + create( + callback: BodyResponseCallback + ): void; + create( + paramsOrCallback?: + | Params$Resource$Projects$Conversations$Participants$Create + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Conversations$Participants$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Conversations$Participants$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/participants').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Retrieves a conversation participant. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.conversations.participants.get({ + * // Required. The name of the participant. Format: `projects//locations//conversations//participants/`. + * name: + * 'projects/my-project/conversations/my-conversation/participants/my-participant', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "name": "my_name", + * // "role": "my_role", + * // "sipRecordingMediaLabel": "my_sipRecordingMediaLabel" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Projects$Conversations$Participants$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Projects$Conversations$Participants$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Conversations$Participants$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Conversations$Participants$Get, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Conversations$Participants$Get, + callback: BodyResponseCallback + ): void; + get( + callback: BodyResponseCallback + ): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Conversations$Participants$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Conversations$Participants$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Conversations$Participants$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Returns the list of all participants in the specified conversation. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.conversations.participants.list({ + * // Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. + * pageSize: 'placeholder-value', + * // Optional. The next_page_token value returned from a previous list request. + * pageToken: 'placeholder-value', + * // Required. The conversation to list all participants from. Format: `projects//locations//conversations/`. + * parent: 'projects/my-project/conversations/my-conversation', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "nextPageToken": "my_nextPageToken", + * // "participants": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Projects$Conversations$Participants$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Projects$Conversations$Participants$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Conversations$Participants$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Conversations$Participants$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Conversations$Participants$List, + callback: BodyResponseCallback + ): void; + list( + callback: BodyResponseCallback + ): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Conversations$Participants$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Conversations$Participants$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Conversations$Participants$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/participants').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Updates the specified participant. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.conversations.participants.patch({ + * // Optional. The unique identifier of this participant. Format: `projects//locations//conversations//participants/`. + * name: + * 'projects/my-project/conversations/my-conversation/participants/my-participant', + * // Required. The mask to specify which fields to update. + * updateMask: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "name": "my_name", + * // "role": "my_role", + * // "sipRecordingMediaLabel": "my_sipRecordingMediaLabel" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "name": "my_name", + * // "role": "my_role", + * // "sipRecordingMediaLabel": "my_sipRecordingMediaLabel" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + patch( + params: Params$Resource$Projects$Conversations$Participants$Patch, + options: StreamMethodOptions + ): GaxiosPromise; + patch( + params?: Params$Resource$Projects$Conversations$Participants$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Conversations$Participants$Patch, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Conversations$Participants$Patch, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Conversations$Participants$Patch, + callback: BodyResponseCallback + ): void; + patch( + callback: BodyResponseCallback + ): void; + patch( + paramsOrCallback?: + | Params$Resource$Projects$Conversations$Participants$Patch + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Conversations$Participants$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Conversations$Participants$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + } + + export interface Params$Resource$Projects$Conversations$Participants$Analyzecontent + extends StandardParameters { + /** + * Required. The name of the participant this text comes from. Format: `projects//locations//conversations//participants/`. + */ + participant?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2AnalyzeContentRequest; + } + export interface Params$Resource$Projects$Conversations$Participants$Create + extends StandardParameters { + /** + * Required. Resource identifier of the conversation adding the participant. Format: `projects//locations//conversations/`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2Participant; + } + export interface Params$Resource$Projects$Conversations$Participants$Get + extends StandardParameters { + /** + * Required. The name of the participant. Format: `projects//locations//conversations//participants/`. + */ + name?: string; + } + export interface Params$Resource$Projects$Conversations$Participants$List + extends StandardParameters { + /** + * Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. + */ + pageSize?: number; + /** + * Optional. The next_page_token value returned from a previous list request. + */ + pageToken?: string; + /** + * Required. The conversation to list all participants from. Format: `projects//locations//conversations/`. + */ + parent?: string; + } + export interface Params$Resource$Projects$Conversations$Participants$Patch + extends StandardParameters { + /** + * Optional. The unique identifier of this participant. Format: `projects//locations//conversations//participants/`. + */ + name?: string; + /** + * Required. The mask to specify which fields to update. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2Participant; + } + + export class Resource$Projects$Conversations$Participants$Suggestions { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Gets suggested articles for a participant based on specific historical messages. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.conversations.participants.suggestions.suggestArticles( + * { + * // Required. The name of the participant to fetch suggestion for. Format: `projects//locations//conversations//participants/`. + * parent: + * 'projects/my-project/conversations/my-conversation/participants/my-participant', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "contextSize": 0, + * // "latestMessage": "my_latestMessage" + * // } + * }, + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "articleAnswers": [], + * // "contextSize": 0, + * // "latestMessage": "my_latestMessage" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + suggestArticles( + params: Params$Resource$Projects$Conversations$Participants$Suggestions$Suggestarticles, + options: StreamMethodOptions + ): GaxiosPromise; + suggestArticles( + params?: Params$Resource$Projects$Conversations$Participants$Suggestions$Suggestarticles, + options?: MethodOptions + ): GaxiosPromise; + suggestArticles( + params: Params$Resource$Projects$Conversations$Participants$Suggestions$Suggestarticles, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + suggestArticles( + params: Params$Resource$Projects$Conversations$Participants$Suggestions$Suggestarticles, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + suggestArticles( + params: Params$Resource$Projects$Conversations$Participants$Suggestions$Suggestarticles, + callback: BodyResponseCallback + ): void; + suggestArticles( + callback: BodyResponseCallback + ): void; + suggestArticles( + paramsOrCallback?: + | Params$Resource$Projects$Conversations$Participants$Suggestions$Suggestarticles + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Conversations$Participants$Suggestions$Suggestarticles; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Conversations$Participants$Suggestions$Suggestarticles; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + '/v2/{+parent}/suggestions:suggestArticles' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Gets suggested faq answers for a participant based on specific historical messages. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.conversations.participants.suggestions.suggestFaqAnswers( + * { + * // Required. The name of the participant to fetch suggestion for. Format: `projects//locations//conversations//participants/`. + * parent: + * 'projects/my-project/conversations/my-conversation/participants/my-participant', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "contextSize": 0, + * // "latestMessage": "my_latestMessage" + * // } + * }, + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "contextSize": 0, + * // "faqAnswers": [], + * // "latestMessage": "my_latestMessage" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + suggestFaqAnswers( + params: Params$Resource$Projects$Conversations$Participants$Suggestions$Suggestfaqanswers, + options: StreamMethodOptions + ): GaxiosPromise; + suggestFaqAnswers( + params?: Params$Resource$Projects$Conversations$Participants$Suggestions$Suggestfaqanswers, + options?: MethodOptions + ): GaxiosPromise; + suggestFaqAnswers( + params: Params$Resource$Projects$Conversations$Participants$Suggestions$Suggestfaqanswers, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + suggestFaqAnswers( + params: Params$Resource$Projects$Conversations$Participants$Suggestions$Suggestfaqanswers, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + suggestFaqAnswers( + params: Params$Resource$Projects$Conversations$Participants$Suggestions$Suggestfaqanswers, + callback: BodyResponseCallback + ): void; + suggestFaqAnswers( + callback: BodyResponseCallback + ): void; + suggestFaqAnswers( + paramsOrCallback?: + | Params$Resource$Projects$Conversations$Participants$Suggestions$Suggestfaqanswers + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Conversations$Participants$Suggestions$Suggestfaqanswers; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Conversations$Participants$Suggestions$Suggestfaqanswers; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + '/v2/{+parent}/suggestions:suggestFaqAnswers' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + } + + export interface Params$Resource$Projects$Conversations$Participants$Suggestions$Suggestarticles + extends StandardParameters { + /** + * Required. The name of the participant to fetch suggestion for. Format: `projects//locations//conversations//participants/`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2SuggestArticlesRequest; + } + export interface Params$Resource$Projects$Conversations$Participants$Suggestions$Suggestfaqanswers + extends StandardParameters { + /** + * Required. The name of the participant to fetch suggestion for. Format: `projects//locations//conversations//participants/`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2SuggestFaqAnswersRequest; + } + + export class Resource$Projects$Knowledgebases { + context: APIRequestContext; + documents: Resource$Projects$Knowledgebases$Documents; + constructor(context: APIRequestContext) { + this.context = context; + this.documents = new Resource$Projects$Knowledgebases$Documents( + this.context + ); + } + + /** + * Creates a knowledge base. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.knowledgeBases.create({ + * // Required. The project to create a knowledge base for. Format: `projects//locations/`. + * parent: 'projects/my-project', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "displayName": "my_displayName", + * // "languageCode": "my_languageCode", + * // "name": "my_name" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "displayName": "my_displayName", + * // "languageCode": "my_languageCode", + * // "name": "my_name" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + create( + params: Params$Resource$Projects$Knowledgebases$Create, + options: StreamMethodOptions + ): GaxiosPromise; + create( + params?: Params$Resource$Projects$Knowledgebases$Create, + options?: MethodOptions + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Knowledgebases$Create, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Knowledgebases$Create, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Knowledgebases$Create, + callback: BodyResponseCallback + ): void; + create( + callback: BodyResponseCallback + ): void; + create( + paramsOrCallback?: + | Params$Resource$Projects$Knowledgebases$Create + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Knowledgebases$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Knowledgebases$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/knowledgeBases').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Deletes the specified knowledge base. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.knowledgeBases.delete({ + * // Optional. Force deletes the knowledge base. When set to true, any documents in the knowledge base are also deleted. + * force: 'placeholder-value', + * // Required. The name of the knowledge base to delete. Format: `projects//locations//knowledgeBases/`. + * name: 'projects/my-project/knowledgeBases/my-knowledgeBase', + * }); + * console.log(res.data); + * + * // Example response + * // {} + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + delete( + params: Params$Resource$Projects$Knowledgebases$Delete, + options: StreamMethodOptions + ): GaxiosPromise; + delete( + params?: Params$Resource$Projects$Knowledgebases$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Knowledgebases$Delete, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Knowledgebases$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Knowledgebases$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Projects$Knowledgebases$Delete + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Knowledgebases$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Knowledgebases$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Retrieves the specified knowledge base. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.knowledgeBases.get({ + * // Required. The name of the knowledge base to retrieve. Format `projects//locations//knowledgeBases/`. + * name: 'projects/my-project/knowledgeBases/my-knowledgeBase', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "displayName": "my_displayName", + * // "languageCode": "my_languageCode", + * // "name": "my_name" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Projects$Knowledgebases$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Projects$Knowledgebases$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Knowledgebases$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Knowledgebases$Get, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Knowledgebases$Get, + callback: BodyResponseCallback + ): void; + get( + callback: BodyResponseCallback + ): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Knowledgebases$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Knowledgebases$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Knowledgebases$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Returns the list of all knowledge bases of the specified agent. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.knowledgeBases.list({ + * // The maximum number of items to return in a single page. By default 10 and at most 100. + * pageSize: 'placeholder-value', + * // The next_page_token value returned from a previous list request. + * pageToken: 'placeholder-value', + * // Required. The project to list of knowledge bases for. Format: `projects//locations/`. + * parent: 'projects/my-project', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "knowledgeBases": [], + * // "nextPageToken": "my_nextPageToken" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Projects$Knowledgebases$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Projects$Knowledgebases$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Knowledgebases$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Knowledgebases$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Knowledgebases$List, + callback: BodyResponseCallback + ): void; + list( + callback: BodyResponseCallback + ): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Knowledgebases$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Knowledgebases$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Knowledgebases$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/knowledgeBases').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Updates the specified knowledge base. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.knowledgeBases.patch({ + * // The knowledge base resource name. The name must be empty when creating a knowledge base. Format: `projects//locations//knowledgeBases/`. + * name: 'projects/my-project/knowledgeBases/my-knowledgeBase', + * // Optional. Not specified means `update all`. Currently, only `display_name` can be updated, an InvalidArgument will be returned for attempting to update other fields. + * updateMask: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "displayName": "my_displayName", + * // "languageCode": "my_languageCode", + * // "name": "my_name" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "displayName": "my_displayName", + * // "languageCode": "my_languageCode", + * // "name": "my_name" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + patch( + params: Params$Resource$Projects$Knowledgebases$Patch, + options: StreamMethodOptions + ): GaxiosPromise; + patch( + params?: Params$Resource$Projects$Knowledgebases$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Knowledgebases$Patch, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Knowledgebases$Patch, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Knowledgebases$Patch, + callback: BodyResponseCallback + ): void; + patch( + callback: BodyResponseCallback + ): void; + patch( + paramsOrCallback?: + | Params$Resource$Projects$Knowledgebases$Patch + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Knowledgebases$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Knowledgebases$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + } + + export interface Params$Resource$Projects$Knowledgebases$Create + extends StandardParameters { + /** + * Required. The project to create a knowledge base for. Format: `projects//locations/`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2KnowledgeBase; + } + export interface Params$Resource$Projects$Knowledgebases$Delete + extends StandardParameters { + /** + * Optional. Force deletes the knowledge base. When set to true, any documents in the knowledge base are also deleted. + */ + force?: boolean; + /** + * Required. The name of the knowledge base to delete. Format: `projects//locations//knowledgeBases/`. + */ + name?: string; + } + export interface Params$Resource$Projects$Knowledgebases$Get + extends StandardParameters { + /** + * Required. The name of the knowledge base to retrieve. Format `projects//locations//knowledgeBases/`. + */ + name?: string; + } + export interface Params$Resource$Projects$Knowledgebases$List + extends StandardParameters { + /** + * The maximum number of items to return in a single page. By default 10 and at most 100. + */ + pageSize?: number; + /** + * The next_page_token value returned from a previous list request. + */ + pageToken?: string; + /** + * Required. The project to list of knowledge bases for. Format: `projects//locations/`. + */ + parent?: string; + } + export interface Params$Resource$Projects$Knowledgebases$Patch + extends StandardParameters { + /** + * The knowledge base resource name. The name must be empty when creating a knowledge base. Format: `projects//locations//knowledgeBases/`. + */ + name?: string; + /** + * Optional. Not specified means `update all`. Currently, only `display_name` can be updated, an InvalidArgument will be returned for attempting to update other fields. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2KnowledgeBase; + } + + export class Resource$Projects$Knowledgebases$Documents { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Creates a new document. Operation + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.knowledgeBases.documents.create({ + * // Required. The knowledge base to create a document for. Format: `projects//locations//knowledgeBases/`. + * parent: 'projects/my-project/knowledgeBases/my-knowledgeBase', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "contentUri": "my_contentUri", + * // "displayName": "my_displayName", + * // "enableAutoReload": false, + * // "knowledgeTypes": [], + * // "latestReloadStatus": {}, + * // "metadata": {}, + * // "mimeType": "my_mimeType", + * // "name": "my_name", + * // "rawContent": "my_rawContent" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + create( + params: Params$Resource$Projects$Knowledgebases$Documents$Create, + options: StreamMethodOptions + ): GaxiosPromise; + create( + params?: Params$Resource$Projects$Knowledgebases$Documents$Create, + options?: MethodOptions + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Knowledgebases$Documents$Create, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Knowledgebases$Documents$Create, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Knowledgebases$Documents$Create, + callback: BodyResponseCallback + ): void; + create( + callback: BodyResponseCallback + ): void; + create( + paramsOrCallback?: + | Params$Resource$Projects$Knowledgebases$Documents$Create + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Knowledgebases$Documents$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Knowledgebases$Documents$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/documents').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Deletes the specified document. Operation + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.knowledgeBases.documents.delete({ + * // Required. The name of the document to delete. Format: `projects//locations//knowledgeBases//documents/`. + * name: + * 'projects/my-project/knowledgeBases/my-knowledgeBase/documents/my-document', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + delete( + params: Params$Resource$Projects$Knowledgebases$Documents$Delete, + options: StreamMethodOptions + ): GaxiosPromise; + delete( + params?: Params$Resource$Projects$Knowledgebases$Documents$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Knowledgebases$Documents$Delete, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Knowledgebases$Documents$Delete, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Knowledgebases$Documents$Delete, + callback: BodyResponseCallback + ): void; + delete( + callback: BodyResponseCallback + ): void; + delete( + paramsOrCallback?: + | Params$Resource$Projects$Knowledgebases$Documents$Delete + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Knowledgebases$Documents$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Knowledgebases$Documents$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Retrieves the specified document. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.knowledgeBases.documents.get({ + * // Required. The name of the document to retrieve. Format `projects//locations//knowledgeBases//documents/`. + * name: + * 'projects/my-project/knowledgeBases/my-knowledgeBase/documents/my-document', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "contentUri": "my_contentUri", + * // "displayName": "my_displayName", + * // "enableAutoReload": false, + * // "knowledgeTypes": [], + * // "latestReloadStatus": {}, + * // "metadata": {}, + * // "mimeType": "my_mimeType", + * // "name": "my_name", + * // "rawContent": "my_rawContent" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Projects$Knowledgebases$Documents$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Projects$Knowledgebases$Documents$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Knowledgebases$Documents$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Knowledgebases$Documents$Get, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Knowledgebases$Documents$Get, + callback: BodyResponseCallback + ): void; + get( + callback: BodyResponseCallback + ): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Knowledgebases$Documents$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Knowledgebases$Documents$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Knowledgebases$Documents$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Returns the list of all documents of the knowledge base. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.knowledgeBases.documents.list({ + * // The maximum number of items to return in a single page. By default 10 and at most 100. + * pageSize: 'placeholder-value', + * // The next_page_token value returned from a previous list request. + * pageToken: 'placeholder-value', + * // Required. The knowledge base to list all documents for. Format: `projects//locations//knowledgeBases/`. + * parent: 'projects/my-project/knowledgeBases/my-knowledgeBase', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "documents": [], + * // "nextPageToken": "my_nextPageToken" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Projects$Knowledgebases$Documents$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Projects$Knowledgebases$Documents$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Knowledgebases$Documents$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Knowledgebases$Documents$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Knowledgebases$Documents$List, + callback: BodyResponseCallback + ): void; + list( + callback: BodyResponseCallback + ): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Knowledgebases$Documents$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Knowledgebases$Documents$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Knowledgebases$Documents$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/documents').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Updates the specified document. Operation + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.knowledgeBases.documents.patch({ + * // Optional. The document resource name. The name must be empty when creating a document. Format: `projects//locations//knowledgeBases//documents/`. + * name: + * 'projects/my-project/knowledgeBases/my-knowledgeBase/documents/my-document', + * // Optional. Not specified means `update all`. Currently, only `display_name` can be updated, an InvalidArgument will be returned for attempting to update other fields. + * updateMask: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "contentUri": "my_contentUri", + * // "displayName": "my_displayName", + * // "enableAutoReload": false, + * // "knowledgeTypes": [], + * // "latestReloadStatus": {}, + * // "metadata": {}, + * // "mimeType": "my_mimeType", + * // "name": "my_name", + * // "rawContent": "my_rawContent" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + patch( + params: Params$Resource$Projects$Knowledgebases$Documents$Patch, + options: StreamMethodOptions + ): GaxiosPromise; + patch( + params?: Params$Resource$Projects$Knowledgebases$Documents$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Knowledgebases$Documents$Patch, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Knowledgebases$Documents$Patch, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Knowledgebases$Documents$Patch, + callback: BodyResponseCallback + ): void; + patch( + callback: BodyResponseCallback + ): void; + patch( + paramsOrCallback?: + | Params$Resource$Projects$Knowledgebases$Documents$Patch + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Knowledgebases$Documents$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Knowledgebases$Documents$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Reloads the specified document from its specified source, content_uri or content. The previously loaded content of the document will be deleted. Note: Even when the content of the document has not changed, there still may be side effects because of internal implementation changes. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`. Operation + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.knowledgeBases.documents.reload({ + * // Required. The name of the document to reload. Format: `projects//locations//knowledgeBases//documents/` + * name: + * 'projects/my-project/knowledgeBases/my-knowledgeBase/documents/my-document', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "contentUri": "my_contentUri" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + reload( + params: Params$Resource$Projects$Knowledgebases$Documents$Reload, + options: StreamMethodOptions + ): GaxiosPromise; + reload( + params?: Params$Resource$Projects$Knowledgebases$Documents$Reload, + options?: MethodOptions + ): GaxiosPromise; + reload( + params: Params$Resource$Projects$Knowledgebases$Documents$Reload, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + reload( + params: Params$Resource$Projects$Knowledgebases$Documents$Reload, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + reload( + params: Params$Resource$Projects$Knowledgebases$Documents$Reload, + callback: BodyResponseCallback + ): void; + reload( + callback: BodyResponseCallback + ): void; + reload( + paramsOrCallback?: + | Params$Resource$Projects$Knowledgebases$Documents$Reload + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Knowledgebases$Documents$Reload; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Knowledgebases$Documents$Reload; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}:reload').replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Knowledgebases$Documents$Create + extends StandardParameters { + /** + * Required. The knowledge base to create a document for. Format: `projects//locations//knowledgeBases/`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2Document; + } + export interface Params$Resource$Projects$Knowledgebases$Documents$Delete + extends StandardParameters { + /** + * Required. The name of the document to delete. Format: `projects//locations//knowledgeBases//documents/`. + */ + name?: string; + } + export interface Params$Resource$Projects$Knowledgebases$Documents$Get + extends StandardParameters { + /** + * Required. The name of the document to retrieve. Format `projects//locations//knowledgeBases//documents/`. + */ + name?: string; + } + export interface Params$Resource$Projects$Knowledgebases$Documents$List + extends StandardParameters { + /** + * The maximum number of items to return in a single page. By default 10 and at most 100. + */ + pageSize?: number; + /** + * The next_page_token value returned from a previous list request. + */ + pageToken?: string; + /** + * Required. The knowledge base to list all documents for. Format: `projects//locations//knowledgeBases/`. + */ + parent?: string; + } + export interface Params$Resource$Projects$Knowledgebases$Documents$Patch + extends StandardParameters { + /** + * Optional. The document resource name. The name must be empty when creating a document. Format: `projects//locations//knowledgeBases//documents/`. + */ + name?: string; + /** + * Optional. Not specified means `update all`. Currently, only `display_name` can be updated, an InvalidArgument will be returned for attempting to update other fields. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2Document; + } + export interface Params$Resource$Projects$Knowledgebases$Documents$Reload + extends StandardParameters { + /** + * Required. The name of the document to reload. Format: `projects//locations//knowledgeBases//documents/` + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2ReloadDocumentRequest; + } + + export class Resource$Projects$Locations { + context: APIRequestContext; + agent: Resource$Projects$Locations$Agent; + answerRecords: Resource$Projects$Locations$Answerrecords; + conversationProfiles: Resource$Projects$Locations$Conversationprofiles; + conversations: Resource$Projects$Locations$Conversations; + knowledgeBases: Resource$Projects$Locations$Knowledgebases; + operations: Resource$Projects$Locations$Operations; + constructor(context: APIRequestContext) { + this.context = context; + this.agent = new Resource$Projects$Locations$Agent(this.context); + this.answerRecords = new Resource$Projects$Locations$Answerrecords( + this.context + ); + this.conversationProfiles = new Resource$Projects$Locations$Conversationprofiles( + this.context + ); + this.conversations = new Resource$Projects$Locations$Conversations( + this.context + ); + this.knowledgeBases = new Resource$Projects$Locations$Knowledgebases( + this.context + ); + this.operations = new Resource$Projects$Locations$Operations( + this.context + ); + } + + /** + * Deletes the specified agent. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.deleteAgent({ + * // Required. The project that the agent to delete is associated with. Format: `projects/`. + * parent: 'projects/my-project/locations/my-location', + * }); + * console.log(res.data); + * + * // Example response + * // {} + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + deleteAgent( + params: Params$Resource$Projects$Locations$Deleteagent, + options: StreamMethodOptions + ): GaxiosPromise; + deleteAgent( + params?: Params$Resource$Projects$Locations$Deleteagent, + options?: MethodOptions + ): GaxiosPromise; + deleteAgent( + params: Params$Resource$Projects$Locations$Deleteagent, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + deleteAgent( + params: Params$Resource$Projects$Locations$Deleteagent, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + deleteAgent( + params: Params$Resource$Projects$Locations$Deleteagent, + callback: BodyResponseCallback + ): void; + deleteAgent( + callback: BodyResponseCallback + ): void; + deleteAgent( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Deleteagent + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Deleteagent; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Deleteagent; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/agent').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Retrieves the specified agent. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.getAgent({ + * // Required. The project that the agent to fetch is associated with. Format: `projects/`. + * parent: 'projects/my-project/locations/my-location', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "apiVersion": "my_apiVersion", + * // "avatarUri": "my_avatarUri", + * // "classificationThreshold": {}, + * // "defaultLanguageCode": "my_defaultLanguageCode", + * // "description": "my_description", + * // "displayName": "my_displayName", + * // "enableLogging": false, + * // "matchMode": "my_matchMode", + * // "parent": "my_parent", + * // "supportedLanguageCodes": [], + * // "tier": "my_tier", + * // "timeZone": "my_timeZone" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + getAgent( + params: Params$Resource$Projects$Locations$Getagent, + options: StreamMethodOptions + ): GaxiosPromise; + getAgent( + params?: Params$Resource$Projects$Locations$Getagent, + options?: MethodOptions + ): GaxiosPromise; + getAgent( + params: Params$Resource$Projects$Locations$Getagent, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getAgent( + params: Params$Resource$Projects$Locations$Getagent, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getAgent( + params: Params$Resource$Projects$Locations$Getagent, + callback: BodyResponseCallback + ): void; + getAgent( + callback: BodyResponseCallback + ): void; + getAgent( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Getagent + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Getagent; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Getagent; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/agent').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Creates/updates the specified agent. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.setAgent({ + * // Required. The project of this agent. Format: `projects/`. + * parent: 'projects/my-project/locations/my-location', + * // Optional. The mask to control which fields get updated. + * updateMask: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "apiVersion": "my_apiVersion", + * // "avatarUri": "my_avatarUri", + * // "classificationThreshold": {}, + * // "defaultLanguageCode": "my_defaultLanguageCode", + * // "description": "my_description", + * // "displayName": "my_displayName", + * // "enableLogging": false, + * // "matchMode": "my_matchMode", + * // "parent": "my_parent", + * // "supportedLanguageCodes": [], + * // "tier": "my_tier", + * // "timeZone": "my_timeZone" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "apiVersion": "my_apiVersion", + * // "avatarUri": "my_avatarUri", + * // "classificationThreshold": {}, + * // "defaultLanguageCode": "my_defaultLanguageCode", + * // "description": "my_description", + * // "displayName": "my_displayName", + * // "enableLogging": false, + * // "matchMode": "my_matchMode", + * // "parent": "my_parent", + * // "supportedLanguageCodes": [], + * // "tier": "my_tier", + * // "timeZone": "my_timeZone" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + setAgent( + params: Params$Resource$Projects$Locations$Setagent, + options: StreamMethodOptions + ): GaxiosPromise; + setAgent( + params?: Params$Resource$Projects$Locations$Setagent, + options?: MethodOptions + ): GaxiosPromise; + setAgent( + params: Params$Resource$Projects$Locations$Setagent, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + setAgent( + params: Params$Resource$Projects$Locations$Setagent, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + setAgent( + params: Params$Resource$Projects$Locations$Setagent, + callback: BodyResponseCallback + ): void; + setAgent( + callback: BodyResponseCallback + ): void; + setAgent( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Setagent + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Setagent; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Setagent; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/agent').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + } + + export interface Params$Resource$Projects$Locations$Deleteagent + extends StandardParameters { + /** + * Required. The project that the agent to delete is associated with. Format: `projects/`. + */ + parent?: string; + } + export interface Params$Resource$Projects$Locations$Getagent + extends StandardParameters { + /** + * Required. The project that the agent to fetch is associated with. Format: `projects/`. + */ + parent?: string; + } + export interface Params$Resource$Projects$Locations$Setagent + extends StandardParameters { + /** + * Required. The project of this agent. Format: `projects/`. + */ + parent?: string; + /** + * Optional. The mask to control which fields get updated. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2Agent; + } + + export class Resource$Projects$Locations$Agent { + context: APIRequestContext; + entityTypes: Resource$Projects$Locations$Agent$Entitytypes; + environments: Resource$Projects$Locations$Agent$Environments; + intents: Resource$Projects$Locations$Agent$Intents; + sessions: Resource$Projects$Locations$Agent$Sessions; + constructor(context: APIRequestContext) { + this.context = context; + this.entityTypes = new Resource$Projects$Locations$Agent$Entitytypes( + this.context + ); + this.environments = new Resource$Projects$Locations$Agent$Environments( + this.context + ); + this.intents = new Resource$Projects$Locations$Agent$Intents( + this.context + ); + this.sessions = new Resource$Projects$Locations$Agent$Sessions( + this.context + ); + } + + /** + * Exports the specified agent to a ZIP file. Operation + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.export({ + * // Required. The project that the agent to export is associated with. Format: `projects/`. + * parent: 'projects/my-project/locations/my-location', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "agentUri": "my_agentUri" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + export( + params: Params$Resource$Projects$Locations$Agent$Export, + options: StreamMethodOptions + ): GaxiosPromise; + export( + params?: Params$Resource$Projects$Locations$Agent$Export, + options?: MethodOptions + ): GaxiosPromise; + export( + params: Params$Resource$Projects$Locations$Agent$Export, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + export( + params: Params$Resource$Projects$Locations$Agent$Export, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + export( + params: Params$Resource$Projects$Locations$Agent$Export, + callback: BodyResponseCallback + ): void; + export( + callback: BodyResponseCallback + ): void; + export( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Export + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Export; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Export; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/agent:export').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Retrieves the fulfillment. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.getFulfillment({ + * // Required. The name of the fulfillment. Format: `projects//agent/fulfillment`. + * name: 'projects/my-project/locations/my-location/agent/fulfillment', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "displayName": "my_displayName", + * // "enabled": false, + * // "features": [], + * // "genericWebService": {}, + * // "name": "my_name" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + getFulfillment( + params: Params$Resource$Projects$Locations$Agent$Getfulfillment, + options: StreamMethodOptions + ): GaxiosPromise; + getFulfillment( + params?: Params$Resource$Projects$Locations$Agent$Getfulfillment, + options?: MethodOptions + ): GaxiosPromise; + getFulfillment( + params: Params$Resource$Projects$Locations$Agent$Getfulfillment, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getFulfillment( + params: Params$Resource$Projects$Locations$Agent$Getfulfillment, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getFulfillment( + params: Params$Resource$Projects$Locations$Agent$Getfulfillment, + callback: BodyResponseCallback + ): void; + getFulfillment( + callback: BodyResponseCallback + ): void; + getFulfillment( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Getfulfillment + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Getfulfillment; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Getfulfillment; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Gets agent validation result. Agent validation is performed during training time and is updated automatically when training is completed. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.getValidationResult({ + * // Optional. The language for which you want a validation result. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. + * languageCode: 'placeholder-value', + * // Required. The project that the agent is associated with. Format: `projects/`. + * parent: 'projects/my-project/locations/my-location', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "validationErrors": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + getValidationResult( + params: Params$Resource$Projects$Locations$Agent$Getvalidationresult, + options: StreamMethodOptions + ): GaxiosPromise; + getValidationResult( + params?: Params$Resource$Projects$Locations$Agent$Getvalidationresult, + options?: MethodOptions + ): GaxiosPromise; + getValidationResult( + params: Params$Resource$Projects$Locations$Agent$Getvalidationresult, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getValidationResult( + params: Params$Resource$Projects$Locations$Agent$Getvalidationresult, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getValidationResult( + params: Params$Resource$Projects$Locations$Agent$Getvalidationresult, + callback: BodyResponseCallback + ): void; + getValidationResult( + callback: BodyResponseCallback + ): void; + getValidationResult( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Getvalidationresult + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Getvalidationresult; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Getvalidationresult; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/agent/validationResult').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Imports the specified agent from a ZIP file. Uploads new intents and entity types without deleting the existing ones. Intents and entity types with the same name are replaced with the new versions from ImportAgentRequest. After the import, the imported draft agent will be trained automatically (unless disabled in agent settings). However, once the import is done, training may not be completed yet. Please call TrainAgent and wait for the operation it returns in order to train explicitly. Operation An operation which tracks when importing is complete. It only tracks when the draft agent is updated not when it is done training. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.import({ + * // Required. The project that the agent to import is associated with. Format: `projects/`. + * parent: 'projects/my-project/locations/my-location', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "agentContent": "my_agentContent", + * // "agentUri": "my_agentUri" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + import( + params: Params$Resource$Projects$Locations$Agent$Import, + options: StreamMethodOptions + ): GaxiosPromise; + import( + params?: Params$Resource$Projects$Locations$Agent$Import, + options?: MethodOptions + ): GaxiosPromise; + import( + params: Params$Resource$Projects$Locations$Agent$Import, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + import( + params: Params$Resource$Projects$Locations$Agent$Import, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + import( + params: Params$Resource$Projects$Locations$Agent$Import, + callback: BodyResponseCallback + ): void; + import( + callback: BodyResponseCallback + ): void; + import( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Import + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Import; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Import; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/agent:import').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Restores the specified agent from a ZIP file. Replaces the current agent version with a new one. All the intents and entity types in the older version are deleted. After the restore, the restored draft agent will be trained automatically (unless disabled in agent settings). However, once the restore is done, training may not be completed yet. Please call TrainAgent and wait for the operation it returns in order to train explicitly. Operation An operation which tracks when restoring is complete. It only tracks when the draft agent is updated not when it is done training. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.restore({ + * // Required. The project that the agent to restore is associated with. Format: `projects/`. + * parent: 'projects/my-project/locations/my-location', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "agentContent": "my_agentContent", + * // "agentUri": "my_agentUri" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + restore( + params: Params$Resource$Projects$Locations$Agent$Restore, + options: StreamMethodOptions + ): GaxiosPromise; + restore( + params?: Params$Resource$Projects$Locations$Agent$Restore, + options?: MethodOptions + ): GaxiosPromise; + restore( + params: Params$Resource$Projects$Locations$Agent$Restore, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + restore( + params: Params$Resource$Projects$Locations$Agent$Restore, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + restore( + params: Params$Resource$Projects$Locations$Agent$Restore, + callback: BodyResponseCallback + ): void; + restore( + callback: BodyResponseCallback + ): void; + restore( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Restore + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Restore; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Restore; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/agent:restore').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Returns the list of agents. Since there is at most one conversational agent per project, this method is useful primarily for listing all agents across projects the caller has access to. One can achieve that with a wildcard project collection id "-". Refer to [List Sub-Collections](https://cloud.google.com/apis/design/design_patterns#list_sub-collections). + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.search({ + * // Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. + * pageSize: 'placeholder-value', + * // The next_page_token value returned from a previous list request. + * pageToken: 'placeholder-value', + * // Required. The project to list agents from. Format: `projects/`. + * parent: 'projects/my-project/locations/my-location', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "agents": [], + * // "nextPageToken": "my_nextPageToken" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + search( + params: Params$Resource$Projects$Locations$Agent$Search, + options: StreamMethodOptions + ): GaxiosPromise; + search( + params?: Params$Resource$Projects$Locations$Agent$Search, + options?: MethodOptions + ): GaxiosPromise; + search( + params: Params$Resource$Projects$Locations$Agent$Search, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + search( + params: Params$Resource$Projects$Locations$Agent$Search, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + search( + params: Params$Resource$Projects$Locations$Agent$Search, + callback: BodyResponseCallback + ): void; + search( + callback: BodyResponseCallback + ): void; + search( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Search + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Search; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Search; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/agent:search').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Trains the specified agent. Operation + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.train({ + * // Required. The project that the agent to train is associated with. Format: `projects/`. + * parent: 'projects/my-project/locations/my-location', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // {} + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + train( + params: Params$Resource$Projects$Locations$Agent$Train, + options: StreamMethodOptions + ): GaxiosPromise; + train( + params?: Params$Resource$Projects$Locations$Agent$Train, + options?: MethodOptions + ): GaxiosPromise; + train( + params: Params$Resource$Projects$Locations$Agent$Train, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + train( + params: Params$Resource$Projects$Locations$Agent$Train, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + train( + params: Params$Resource$Projects$Locations$Agent$Train, + callback: BodyResponseCallback + ): void; + train( + callback: BodyResponseCallback + ): void; + train( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Train + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Train; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Train; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/agent:train').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Updates the fulfillment. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.updateFulfillment({ + * // Required. The unique identifier of the fulfillment. Format: `projects//agent/fulfillment`. + * name: 'projects/my-project/locations/my-location/agent/fulfillment', + * // Required. The mask to control which fields get updated. If the mask is not present, all fields will be updated. + * updateMask: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "displayName": "my_displayName", + * // "enabled": false, + * // "features": [], + * // "genericWebService": {}, + * // "name": "my_name" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "displayName": "my_displayName", + * // "enabled": false, + * // "features": [], + * // "genericWebService": {}, + * // "name": "my_name" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + updateFulfillment( + params: Params$Resource$Projects$Locations$Agent$Updatefulfillment, + options: StreamMethodOptions + ): GaxiosPromise; + updateFulfillment( + params?: Params$Resource$Projects$Locations$Agent$Updatefulfillment, + options?: MethodOptions + ): GaxiosPromise; + updateFulfillment( + params: Params$Resource$Projects$Locations$Agent$Updatefulfillment, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + updateFulfillment( + params: Params$Resource$Projects$Locations$Agent$Updatefulfillment, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + updateFulfillment( + params: Params$Resource$Projects$Locations$Agent$Updatefulfillment, + callback: BodyResponseCallback + ): void; + updateFulfillment( + callback: BodyResponseCallback + ): void; + updateFulfillment( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Updatefulfillment + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Updatefulfillment; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Updatefulfillment; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + } + + export interface Params$Resource$Projects$Locations$Agent$Export + extends StandardParameters { + /** + * Required. The project that the agent to export is associated with. Format: `projects/`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2ExportAgentRequest; + } + export interface Params$Resource$Projects$Locations$Agent$Getfulfillment + extends StandardParameters { + /** + * Required. The name of the fulfillment. Format: `projects//agent/fulfillment`. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Agent$Getvalidationresult + extends StandardParameters { + /** + * Optional. The language for which you want a validation result. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. + */ + languageCode?: string; + /** + * Required. The project that the agent is associated with. Format: `projects/`. + */ + parent?: string; + } + export interface Params$Resource$Projects$Locations$Agent$Import + extends StandardParameters { + /** + * Required. The project that the agent to import is associated with. Format: `projects/`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2ImportAgentRequest; + } + export interface Params$Resource$Projects$Locations$Agent$Restore + extends StandardParameters { + /** + * Required. The project that the agent to restore is associated with. Format: `projects/`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2RestoreAgentRequest; + } + export interface Params$Resource$Projects$Locations$Agent$Search + extends StandardParameters { + /** + * Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. + */ + pageSize?: number; + /** + * The next_page_token value returned from a previous list request. + */ + pageToken?: string; + /** + * Required. The project to list agents from. Format: `projects/`. + */ + parent?: string; + } + export interface Params$Resource$Projects$Locations$Agent$Train + extends StandardParameters { + /** + * Required. The project that the agent to train is associated with. Format: `projects/`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2TrainAgentRequest; + } + export interface Params$Resource$Projects$Locations$Agent$Updatefulfillment + extends StandardParameters { + /** + * Required. The unique identifier of the fulfillment. Format: `projects//agent/fulfillment`. + */ + name?: string; + /** + * Required. The mask to control which fields get updated. If the mask is not present, all fields will be updated. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2Fulfillment; + } + + export class Resource$Projects$Locations$Agent$Entitytypes { + context: APIRequestContext; + entities: Resource$Projects$Locations$Agent$Entitytypes$Entities; + constructor(context: APIRequestContext) { + this.context = context; + this.entities = new Resource$Projects$Locations$Agent$Entitytypes$Entities( + this.context + ); + } + + /** + * Deletes entity types in the specified agent. Operation + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.entityTypes.batchDelete( + * { + * // Required. The name of the agent to delete all entities types for. Format: `projects//agent`. + * parent: 'projects/my-project/locations/my-location/agent', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "entityTypeNames": [] + * // } + * }, + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + batchDelete( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Batchdelete, + options: StreamMethodOptions + ): GaxiosPromise; + batchDelete( + params?: Params$Resource$Projects$Locations$Agent$Entitytypes$Batchdelete, + options?: MethodOptions + ): GaxiosPromise; + batchDelete( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Batchdelete, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + batchDelete( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Batchdelete, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + batchDelete( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Batchdelete, + callback: BodyResponseCallback + ): void; + batchDelete( + callback: BodyResponseCallback + ): void; + batchDelete( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Entitytypes$Batchdelete + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Entitytypes$Batchdelete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Entitytypes$Batchdelete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/entityTypes:batchDelete').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Updates/Creates multiple entity types in the specified agent. Operation + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.entityTypes.batchUpdate( + * { + * // Required. The name of the agent to update or create entity types in. Format: `projects//agent`. + * parent: 'projects/my-project/locations/my-location/agent', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "entityTypeBatchInline": {}, + * // "entityTypeBatchUri": "my_entityTypeBatchUri", + * // "languageCode": "my_languageCode", + * // "updateMask": "my_updateMask" + * // } + * }, + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + batchUpdate( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Batchupdate, + options: StreamMethodOptions + ): GaxiosPromise; + batchUpdate( + params?: Params$Resource$Projects$Locations$Agent$Entitytypes$Batchupdate, + options?: MethodOptions + ): GaxiosPromise; + batchUpdate( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Batchupdate, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + batchUpdate( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Batchupdate, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + batchUpdate( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Batchupdate, + callback: BodyResponseCallback + ): void; + batchUpdate( + callback: BodyResponseCallback + ): void; + batchUpdate( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Entitytypes$Batchupdate + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Entitytypes$Batchupdate; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Entitytypes$Batchupdate; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/entityTypes:batchUpdate').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Creates an entity type in the specified agent. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.entityTypes.create({ + * // Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * languageCode: 'placeholder-value', + * // Required. The agent to create a entity type for. Format: `projects//agent`. + * parent: 'projects/my-project/locations/my-location/agent', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "autoExpansionMode": "my_autoExpansionMode", + * // "displayName": "my_displayName", + * // "enableFuzzyExtraction": false, + * // "entities": [], + * // "kind": "my_kind", + * // "name": "my_name" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "autoExpansionMode": "my_autoExpansionMode", + * // "displayName": "my_displayName", + * // "enableFuzzyExtraction": false, + * // "entities": [], + * // "kind": "my_kind", + * // "name": "my_name" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + create( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Create, + options: StreamMethodOptions + ): GaxiosPromise; + create( + params?: Params$Resource$Projects$Locations$Agent$Entitytypes$Create, + options?: MethodOptions + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Create, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Create, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Create, + callback: BodyResponseCallback + ): void; + create( + callback: BodyResponseCallback + ): void; + create( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Entitytypes$Create + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Entitytypes$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Entitytypes$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/entityTypes').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Deletes the specified entity type. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.entityTypes.delete({ + * // Required. The name of the entity type to delete. Format: `projects//agent/entityTypes/`. + * name: + * 'projects/my-project/locations/my-location/agent/entityTypes/my-entityType', + * }); + * console.log(res.data); + * + * // Example response + * // {} + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + delete( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Delete, + options: StreamMethodOptions + ): GaxiosPromise; + delete( + params?: Params$Resource$Projects$Locations$Agent$Entitytypes$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Delete, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Entitytypes$Delete + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Entitytypes$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Entitytypes$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Retrieves the specified entity type. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.entityTypes.get({ + * // Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * languageCode: 'placeholder-value', + * // Required. The name of the entity type. Format: `projects//agent/entityTypes/`. + * name: + * 'projects/my-project/locations/my-location/agent/entityTypes/my-entityType', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "autoExpansionMode": "my_autoExpansionMode", + * // "displayName": "my_displayName", + * // "enableFuzzyExtraction": false, + * // "entities": [], + * // "kind": "my_kind", + * // "name": "my_name" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Projects$Locations$Agent$Entitytypes$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Get, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Get, + callback: BodyResponseCallback + ): void; + get( + callback: BodyResponseCallback + ): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Entitytypes$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Entitytypes$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Entitytypes$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Returns the list of all entity types in the specified agent. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.entityTypes.list({ + * // Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * languageCode: 'placeholder-value', + * // Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. + * pageSize: 'placeholder-value', + * // Optional. The next_page_token value returned from a previous list request. + * pageToken: 'placeholder-value', + * // Required. The agent to list all entity types from. Format: `projects//agent`. + * parent: 'projects/my-project/locations/my-location/agent', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "entityTypes": [], + * // "nextPageToken": "my_nextPageToken" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Projects$Locations$Agent$Entitytypes$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$List, + callback: BodyResponseCallback + ): void; + list( + callback: BodyResponseCallback + ): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Entitytypes$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Entitytypes$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Entitytypes$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/entityTypes').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Updates the specified entity type. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.entityTypes.patch({ + * // Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * languageCode: 'placeholder-value', + * // The unique identifier of the entity type. Required for EntityTypes.UpdateEntityType and EntityTypes.BatchUpdateEntityTypes methods. Format: `projects//agent/entityTypes/`. + * name: + * 'projects/my-project/locations/my-location/agent/entityTypes/my-entityType', + * // Optional. The mask to control which fields get updated. + * updateMask: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "autoExpansionMode": "my_autoExpansionMode", + * // "displayName": "my_displayName", + * // "enableFuzzyExtraction": false, + * // "entities": [], + * // "kind": "my_kind", + * // "name": "my_name" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "autoExpansionMode": "my_autoExpansionMode", + * // "displayName": "my_displayName", + * // "enableFuzzyExtraction": false, + * // "entities": [], + * // "kind": "my_kind", + * // "name": "my_name" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + patch( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Patch, + options: StreamMethodOptions + ): GaxiosPromise; + patch( + params?: Params$Resource$Projects$Locations$Agent$Entitytypes$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Patch, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Patch, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Patch, + callback: BodyResponseCallback + ): void; + patch( + callback: BodyResponseCallback + ): void; + patch( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Entitytypes$Patch + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Entitytypes$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Entitytypes$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + } + + export interface Params$Resource$Projects$Locations$Agent$Entitytypes$Batchdelete + extends StandardParameters { + /** + * Required. The name of the agent to delete all entities types for. Format: `projects//agent`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2BatchDeleteEntityTypesRequest; + } + export interface Params$Resource$Projects$Locations$Agent$Entitytypes$Batchupdate + extends StandardParameters { + /** + * Required. The name of the agent to update or create entity types in. Format: `projects//agent`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2BatchUpdateEntityTypesRequest; + } + export interface Params$Resource$Projects$Locations$Agent$Entitytypes$Create + extends StandardParameters { + /** + * Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + */ + languageCode?: string; + /** + * Required. The agent to create a entity type for. Format: `projects//agent`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2EntityType; + } + export interface Params$Resource$Projects$Locations$Agent$Entitytypes$Delete + extends StandardParameters { + /** + * Required. The name of the entity type to delete. Format: `projects//agent/entityTypes/`. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Agent$Entitytypes$Get + extends StandardParameters { + /** + * Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + */ + languageCode?: string; + /** + * Required. The name of the entity type. Format: `projects//agent/entityTypes/`. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Agent$Entitytypes$List + extends StandardParameters { + /** + * Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + */ + languageCode?: string; + /** + * Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. + */ + pageSize?: number; + /** + * Optional. The next_page_token value returned from a previous list request. + */ + pageToken?: string; + /** + * Required. The agent to list all entity types from. Format: `projects//agent`. + */ + parent?: string; + } + export interface Params$Resource$Projects$Locations$Agent$Entitytypes$Patch + extends StandardParameters { + /** + * Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + */ + languageCode?: string; + /** + * The unique identifier of the entity type. Required for EntityTypes.UpdateEntityType and EntityTypes.BatchUpdateEntityTypes methods. Format: `projects//agent/entityTypes/`. + */ + name?: string; + /** + * Optional. The mask to control which fields get updated. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2EntityType; + } + + export class Resource$Projects$Locations$Agent$Entitytypes$Entities { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Creates multiple new entities in the specified entity type. Operation + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.entityTypes.entities.batchCreate( + * { + * // Required. The name of the entity type to create entities in. Format: `projects//agent/entityTypes/`. + * parent: + * 'projects/my-project/locations/my-location/agent/entityTypes/my-entityType', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "entities": [], + * // "languageCode": "my_languageCode" + * // } + * }, + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + batchCreate( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchcreate, + options: StreamMethodOptions + ): GaxiosPromise; + batchCreate( + params?: Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchcreate, + options?: MethodOptions + ): GaxiosPromise; + batchCreate( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchcreate, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + batchCreate( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchcreate, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + batchCreate( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchcreate, + callback: BodyResponseCallback + ): void; + batchCreate( + callback: BodyResponseCallback + ): void; + batchCreate( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchcreate + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchcreate; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchcreate; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/entities:batchCreate').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Deletes entities in the specified entity type. Operation + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.entityTypes.entities.batchDelete( + * { + * // Required. The name of the entity type to delete entries for. Format: `projects//agent/entityTypes/`. + * parent: + * 'projects/my-project/locations/my-location/agent/entityTypes/my-entityType', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "entityValues": [], + * // "languageCode": "my_languageCode" + * // } + * }, + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + batchDelete( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchdelete, + options: StreamMethodOptions + ): GaxiosPromise; + batchDelete( + params?: Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchdelete, + options?: MethodOptions + ): GaxiosPromise; + batchDelete( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchdelete, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + batchDelete( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchdelete, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + batchDelete( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchdelete, + callback: BodyResponseCallback + ): void; + batchDelete( + callback: BodyResponseCallback + ): void; + batchDelete( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchdelete + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchdelete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchdelete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/entities:batchDelete').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Updates or creates multiple entities in the specified entity type. This method does not affect entities in the entity type that aren't explicitly specified in the request. Operation + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.entityTypes.entities.batchUpdate( + * { + * // Required. The name of the entity type to update or create entities in. Format: `projects//agent/entityTypes/`. + * parent: + * 'projects/my-project/locations/my-location/agent/entityTypes/my-entityType', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "entities": [], + * // "languageCode": "my_languageCode", + * // "updateMask": "my_updateMask" + * // } + * }, + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + batchUpdate( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchupdate, + options: StreamMethodOptions + ): GaxiosPromise; + batchUpdate( + params?: Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchupdate, + options?: MethodOptions + ): GaxiosPromise; + batchUpdate( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchupdate, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + batchUpdate( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchupdate, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + batchUpdate( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchupdate, + callback: BodyResponseCallback + ): void; + batchUpdate( + callback: BodyResponseCallback + ): void; + batchUpdate( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchupdate + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchupdate; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchupdate; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/entities:batchUpdate').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchcreate + extends StandardParameters { + /** + * Required. The name of the entity type to create entities in. Format: `projects//agent/entityTypes/`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2BatchCreateEntitiesRequest; + } + export interface Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchdelete + extends StandardParameters { + /** + * Required. The name of the entity type to delete entries for. Format: `projects//agent/entityTypes/`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2BatchDeleteEntitiesRequest; + } + export interface Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchupdate + extends StandardParameters { + /** + * Required. The name of the entity type to update or create entities in. Format: `projects//agent/entityTypes/`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2BatchUpdateEntitiesRequest; + } + + export class Resource$Projects$Locations$Agent$Environments { + context: APIRequestContext; + users: Resource$Projects$Locations$Agent$Environments$Users; + constructor(context: APIRequestContext) { + this.context = context; + this.users = new Resource$Projects$Locations$Agent$Environments$Users( + this.context + ); + } + + /** + * Returns the list of all non-draft environments of the specified agent. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.environments.list({ + * // Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. + * pageSize: 'placeholder-value', + * // Optional. The next_page_token value returned from a previous list request. + * pageToken: 'placeholder-value', + * // Required. The agent to list all environments from. Format: `projects//agent`. + * parent: 'projects/my-project/locations/my-location/agent', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "environments": [], + * // "nextPageToken": "my_nextPageToken" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Projects$Locations$Agent$Environments$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Projects$Locations$Agent$Environments$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$Agent$Environments$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Agent$Environments$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Agent$Environments$List, + callback: BodyResponseCallback + ): void; + list( + callback: BodyResponseCallback + ): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Environments$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Environments$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Environments$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/environments').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + } + + export interface Params$Resource$Projects$Locations$Agent$Environments$List + extends StandardParameters { + /** + * Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. + */ + pageSize?: number; + /** + * Optional. The next_page_token value returned from a previous list request. + */ + pageToken?: string; + /** + * Required. The agent to list all environments from. Format: `projects//agent`. + */ + parent?: string; + } + + export class Resource$Projects$Locations$Agent$Environments$Users { + context: APIRequestContext; + sessions: Resource$Projects$Locations$Agent$Environments$Users$Sessions; + constructor(context: APIRequestContext) { + this.context = context; + this.sessions = new Resource$Projects$Locations$Agent$Environments$Users$Sessions( + this.context + ); + } + } + + export class Resource$Projects$Locations$Agent$Environments$Users$Sessions { + context: APIRequestContext; + contexts: Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts; + entityTypes: Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes; + constructor(context: APIRequestContext) { + this.context = context; + this.contexts = new Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts( + this.context + ); + this.entityTypes = new Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes( + this.context + ); + } + + /** + * Deletes all active contexts in the specified session. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.environments.users.sessions.deleteContexts( + * { + * // Required. The name of the session to delete all contexts from. Format: `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * parent: + * 'projects/my-project/locations/my-location/agent/environments/my-environment/users/my-user/sessions/my-session', + * } + * ); + * console.log(res.data); + * + * // Example response + * // {} + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + deleteContexts( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Deletecontexts, + options: StreamMethodOptions + ): GaxiosPromise; + deleteContexts( + params?: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Deletecontexts, + options?: MethodOptions + ): GaxiosPromise; + deleteContexts( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Deletecontexts, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + deleteContexts( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Deletecontexts, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + deleteContexts( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Deletecontexts, + callback: BodyResponseCallback + ): void; + deleteContexts( + callback: BodyResponseCallback + ): void; + deleteContexts( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Deletecontexts + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Deletecontexts; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Deletecontexts; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/contexts').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Processes a natural language query and returns structured, actionable data as a result. This method is not idempotent, because it may cause contexts and session entity types to be updated, which in turn might affect results of future queries. Note: Always use agent versions for production traffic. See [Versions and environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.environments.users.sessions.detectIntent( + * { + * // Required. The name of the session this query is sent to. Format: `projects//agent/sessions/`, or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment (`Environment ID` might be referred to as environment name at some places). If `User ID` is not specified, we are using "-". It's up to the API caller to choose an appropriate `Session ID` and `User Id`. They can be a random number or some type of user and session identifiers (preferably hashed). The length of the `Session ID` and `User ID` must not exceed 36 characters. For more information, see the [API interactions guide](https://cloud.google.com/dialogflow/docs/api-overview). Note: Always use agent versions for production traffic. See [Versions and environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). + * session: + * 'projects/my-project/locations/my-location/agent/environments/my-environment/users/my-user/sessions/my-session', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "inputAudio": "my_inputAudio", + * // "outputAudioConfig": {}, + * // "outputAudioConfigMask": "my_outputAudioConfigMask", + * // "queryInput": {}, + * // "queryParams": {} + * // } + * }, + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "outputAudio": "my_outputAudio", + * // "outputAudioConfig": {}, + * // "queryResult": {}, + * // "responseId": "my_responseId", + * // "webhookStatus": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + detectIntent( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Detectintent, + options: StreamMethodOptions + ): GaxiosPromise; + detectIntent( + params?: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Detectintent, + options?: MethodOptions + ): GaxiosPromise; + detectIntent( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Detectintent, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + detectIntent( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Detectintent, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + detectIntent( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Detectintent, + callback: BodyResponseCallback + ): void; + detectIntent( + callback: BodyResponseCallback + ): void; + detectIntent( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Detectintent + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Detectintent; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Detectintent; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+session}:detectIntent').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['session'], + pathParams: ['session'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + } + + export interface Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Deletecontexts + extends StandardParameters { + /** + * Required. The name of the session to delete all contexts from. Format: `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + */ + parent?: string; + } + export interface Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Detectintent + extends StandardParameters { + /** + * Required. The name of the session this query is sent to. Format: `projects//agent/sessions/`, or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment (`Environment ID` might be referred to as environment name at some places). If `User ID` is not specified, we are using "-". It's up to the API caller to choose an appropriate `Session ID` and `User Id`. They can be a random number or some type of user and session identifiers (preferably hashed). The length of the `Session ID` and `User ID` must not exceed 36 characters. For more information, see the [API interactions guide](https://cloud.google.com/dialogflow/docs/api-overview). Note: Always use agent versions for production traffic. See [Versions and environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). + */ + session?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2DetectIntentRequest; + } + + export class Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Creates a context. If the specified context already exists, overrides the context. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.environments.users.sessions.contexts.create( + * { + * // Required. The session to create a context for. Format: `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * parent: + * 'projects/my-project/locations/my-location/agent/environments/my-environment/users/my-user/sessions/my-session', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "lifespanCount": 0, + * // "name": "my_name", + * // "parameters": {} + * // } + * }, + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "lifespanCount": 0, + * // "name": "my_name", + * // "parameters": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + create( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Create, + options: StreamMethodOptions + ): GaxiosPromise; + create( + params?: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Create, + options?: MethodOptions + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Create, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Create, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Create, + callback: BodyResponseCallback + ): void; + create( + callback: BodyResponseCallback + ): void; + create( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Create + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/contexts').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Deletes the specified context. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.environments.users.sessions.contexts.delete( + * { + * // Required. The name of the context to delete. Format: `projects//agent/sessions//contexts/` or `projects//agent/environments//users//sessions//contexts/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * name: + * 'projects/my-project/locations/my-location/agent/environments/my-environment/users/my-user/sessions/my-session/contexts/my-context', + * } + * ); + * console.log(res.data); + * + * // Example response + * // {} + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + delete( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Delete, + options: StreamMethodOptions + ): GaxiosPromise; + delete( + params?: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Delete, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Delete + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Retrieves the specified context. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.environments.users.sessions.contexts.get( + * { + * // Required. The name of the context. Format: `projects//agent/sessions//contexts/` or `projects//agent/environments//users//sessions//contexts/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * name: + * 'projects/my-project/locations/my-location/agent/environments/my-environment/users/my-user/sessions/my-session/contexts/my-context', + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "lifespanCount": 0, + * // "name": "my_name", + * // "parameters": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Get, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Get, + callback: BodyResponseCallback + ): void; + get( + callback: BodyResponseCallback + ): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Returns the list of all contexts in the specified session. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.environments.users.sessions.contexts.list( + * { + * // Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. + * pageSize: 'placeholder-value', + * // Optional. The next_page_token value returned from a previous list request. + * pageToken: 'placeholder-value', + * // Required. The session to list all contexts from. Format: `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * parent: + * 'projects/my-project/locations/my-location/agent/environments/my-environment/users/my-user/sessions/my-session', + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "contexts": [], + * // "nextPageToken": "my_nextPageToken" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$List, + callback: BodyResponseCallback + ): void; + list( + callback: BodyResponseCallback + ): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/contexts').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Updates the specified context. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.environments.users.sessions.contexts.patch( + * { + * // Required. The unique identifier of the context. Format: `projects//agent/sessions//contexts/`, or `projects//agent/environments//users//sessions//contexts/`. The `Context ID` is always converted to lowercase, may only contain characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. The following context names are reserved for internal use by Dialogflow. You should not use these contexts or create contexts with these names: * `__system_counters__` * `*_id_dialog_context` * `*_dialog_params_size` + * name: + * 'projects/my-project/locations/my-location/agent/environments/my-environment/users/my-user/sessions/my-session/contexts/my-context', + * // Optional. The mask to control which fields get updated. + * updateMask: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "lifespanCount": 0, + * // "name": "my_name", + * // "parameters": {} + * // } + * }, + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "lifespanCount": 0, + * // "name": "my_name", + * // "parameters": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + patch( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Patch, + options: StreamMethodOptions + ): GaxiosPromise; + patch( + params?: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Patch, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Patch, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Patch, + callback: BodyResponseCallback + ): void; + patch( + callback: BodyResponseCallback + ): void; + patch( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Patch + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + } + + export interface Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Create + extends StandardParameters { + /** + * Required. The session to create a context for. Format: `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2Context; + } + export interface Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Delete + extends StandardParameters { + /** + * Required. The name of the context to delete. Format: `projects//agent/sessions//contexts/` or `projects//agent/environments//users//sessions//contexts/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Get + extends StandardParameters { + /** + * Required. The name of the context. Format: `projects//agent/sessions//contexts/` or `projects//agent/environments//users//sessions//contexts/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$List + extends StandardParameters { + /** + * Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. + */ + pageSize?: number; + /** + * Optional. The next_page_token value returned from a previous list request. + */ + pageToken?: string; + /** + * Required. The session to list all contexts from. Format: `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + */ + parent?: string; + } + export interface Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Patch + extends StandardParameters { + /** + * Required. The unique identifier of the context. Format: `projects//agent/sessions//contexts/`, or `projects//agent/environments//users//sessions//contexts/`. The `Context ID` is always converted to lowercase, may only contain characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. The following context names are reserved for internal use by Dialogflow. You should not use these contexts or create contexts with these names: * `__system_counters__` * `*_id_dialog_context` * `*_dialog_params_size` + */ + name?: string; + /** + * Optional. The mask to control which fields get updated. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2Context; + } + + export class Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Creates a session entity type. If the specified session entity type already exists, overrides the session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.create( + * { + * // Required. The session to create a session entity type for. Format: `projects//agent/sessions/` or `projects//agent/environments//users// sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * parent: + * 'projects/my-project/locations/my-location/agent/environments/my-environment/users/my-user/sessions/my-session', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "entities": [], + * // "entityOverrideMode": "my_entityOverrideMode", + * // "name": "my_name" + * // } + * }, + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "entities": [], + * // "entityOverrideMode": "my_entityOverrideMode", + * // "name": "my_name" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + create( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Create, + options: StreamMethodOptions + ): GaxiosPromise; + create( + params?: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Create, + options?: MethodOptions + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Create, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Create, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Create, + callback: BodyResponseCallback + ): void; + create( + callback: BodyResponseCallback + ): void; + create( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Create + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/entityTypes').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Deletes the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.delete( + * { + * // Required. The name of the entity type to delete. Format: `projects//agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * name: + * 'projects/my-project/locations/my-location/agent/environments/my-environment/users/my-user/sessions/my-session/entityTypes/my-entityType', + * } + * ); + * console.log(res.data); + * + * // Example response + * // {} + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + delete( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Delete, + options: StreamMethodOptions + ): GaxiosPromise; + delete( + params?: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Delete, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Delete + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Retrieves the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.get( + * { + * // Required. The name of the session entity type. Format: `projects//agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * name: + * 'projects/my-project/locations/my-location/agent/environments/my-environment/users/my-user/sessions/my-session/entityTypes/my-entityType', + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "entities": [], + * // "entityOverrideMode": "my_entityOverrideMode", + * // "name": "my_name" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Get, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Get, + callback: BodyResponseCallback + ): void; + get( + callback: BodyResponseCallback + ): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Returns the list of all session entity types in the specified session. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.list( + * { + * // Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. + * pageSize: 'placeholder-value', + * // Optional. The next_page_token value returned from a previous list request. + * pageToken: 'placeholder-value', + * // Required. The session to list all session entity types from. Format: `projects//agent/sessions/` or `projects//agent/environments//users// sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * parent: + * 'projects/my-project/locations/my-location/agent/environments/my-environment/users/my-user/sessions/my-session', + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "nextPageToken": "my_nextPageToken", + * // "sessionEntityTypes": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$List, + callback: BodyResponseCallback + ): void; + list( + callback: BodyResponseCallback + ): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/entityTypes').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Updates the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.patch( + * { + * // Required. The unique identifier of this session entity type. Format: `projects//agent/sessions//entityTypes/`, or `projects//agent/environments//users//sessions//entityTypes/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. `` must be the display name of an existing entity type in the same agent that will be overridden or supplemented. + * name: + * 'projects/my-project/locations/my-location/agent/environments/my-environment/users/my-user/sessions/my-session/entityTypes/my-entityType', + * // Optional. The mask to control which fields get updated. + * updateMask: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "entities": [], + * // "entityOverrideMode": "my_entityOverrideMode", + * // "name": "my_name" + * // } + * }, + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "entities": [], + * // "entityOverrideMode": "my_entityOverrideMode", + * // "name": "my_name" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + patch( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Patch, + options: StreamMethodOptions + ): GaxiosPromise; + patch( + params?: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Patch, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Patch, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Patch, + callback: BodyResponseCallback + ): void; + patch( + callback: BodyResponseCallback + ): void; + patch( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Patch + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + } + + export interface Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Create + extends StandardParameters { + /** + * Required. The session to create a session entity type for. Format: `projects//agent/sessions/` or `projects//agent/environments//users// sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2SessionEntityType; + } + export interface Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Delete + extends StandardParameters { + /** + * Required. The name of the entity type to delete. Format: `projects//agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Get + extends StandardParameters { + /** + * Required. The name of the session entity type. Format: `projects//agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$List + extends StandardParameters { + /** + * Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. + */ + pageSize?: number; + /** + * Optional. The next_page_token value returned from a previous list request. + */ + pageToken?: string; + /** + * Required. The session to list all session entity types from. Format: `projects//agent/sessions/` or `projects//agent/environments//users// sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + */ + parent?: string; + } + export interface Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Patch + extends StandardParameters { + /** + * Required. The unique identifier of this session entity type. Format: `projects//agent/sessions//entityTypes/`, or `projects//agent/environments//users//sessions//entityTypes/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. `` must be the display name of an existing entity type in the same agent that will be overridden or supplemented. + */ + name?: string; + /** + * Optional. The mask to control which fields get updated. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2SessionEntityType; + } + + export class Resource$Projects$Locations$Agent$Intents { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Deletes intents in the specified agent. Operation + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.intents.batchDelete({ + * // Required. The name of the agent to delete all entities types for. Format: `projects//agent`. + * parent: 'projects/my-project/locations/my-location/agent', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "intents": [] + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + batchDelete( + params: Params$Resource$Projects$Locations$Agent$Intents$Batchdelete, + options: StreamMethodOptions + ): GaxiosPromise; + batchDelete( + params?: Params$Resource$Projects$Locations$Agent$Intents$Batchdelete, + options?: MethodOptions + ): GaxiosPromise; + batchDelete( + params: Params$Resource$Projects$Locations$Agent$Intents$Batchdelete, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + batchDelete( + params: Params$Resource$Projects$Locations$Agent$Intents$Batchdelete, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + batchDelete( + params: Params$Resource$Projects$Locations$Agent$Intents$Batchdelete, + callback: BodyResponseCallback + ): void; + batchDelete( + callback: BodyResponseCallback + ): void; + batchDelete( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Intents$Batchdelete + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Intents$Batchdelete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Intents$Batchdelete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/intents:batchDelete').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Updates/Creates multiple intents in the specified agent. Operation + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.intents.batchUpdate({ + * // Required. The name of the agent to update or create intents in. Format: `projects//agent`. + * parent: 'projects/my-project/locations/my-location/agent', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "intentBatchInline": {}, + * // "intentBatchUri": "my_intentBatchUri", + * // "intentView": "my_intentView", + * // "languageCode": "my_languageCode", + * // "updateMask": "my_updateMask" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + batchUpdate( + params: Params$Resource$Projects$Locations$Agent$Intents$Batchupdate, + options: StreamMethodOptions + ): GaxiosPromise; + batchUpdate( + params?: Params$Resource$Projects$Locations$Agent$Intents$Batchupdate, + options?: MethodOptions + ): GaxiosPromise; + batchUpdate( + params: Params$Resource$Projects$Locations$Agent$Intents$Batchupdate, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + batchUpdate( + params: Params$Resource$Projects$Locations$Agent$Intents$Batchupdate, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + batchUpdate( + params: Params$Resource$Projects$Locations$Agent$Intents$Batchupdate, + callback: BodyResponseCallback + ): void; + batchUpdate( + callback: BodyResponseCallback + ): void; + batchUpdate( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Intents$Batchupdate + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Intents$Batchupdate; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Intents$Batchupdate; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/intents:batchUpdate').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Creates an intent in the specified agent. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.intents.create({ + * // Optional. The resource view to apply to the returned intent. + * intentView: 'placeholder-value', + * // Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * languageCode: 'placeholder-value', + * // Required. The agent to create a intent for. Format: `projects//agent`. + * parent: 'projects/my-project/locations/my-location/agent', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "action": "my_action", + * // "defaultResponsePlatforms": [], + * // "displayName": "my_displayName", + * // "endInteraction": false, + * // "events": [], + * // "followupIntentInfo": [], + * // "inputContextNames": [], + * // "isFallback": false, + * // "liveAgentHandoff": false, + * // "messages": [], + * // "mlDisabled": false, + * // "name": "my_name", + * // "outputContexts": [], + * // "parameters": [], + * // "parentFollowupIntentName": "my_parentFollowupIntentName", + * // "priority": 0, + * // "resetContexts": false, + * // "rootFollowupIntentName": "my_rootFollowupIntentName", + * // "trainingPhrases": [], + * // "webhookState": "my_webhookState" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "action": "my_action", + * // "defaultResponsePlatforms": [], + * // "displayName": "my_displayName", + * // "endInteraction": false, + * // "events": [], + * // "followupIntentInfo": [], + * // "inputContextNames": [], + * // "isFallback": false, + * // "liveAgentHandoff": false, + * // "messages": [], + * // "mlDisabled": false, + * // "name": "my_name", + * // "outputContexts": [], + * // "parameters": [], + * // "parentFollowupIntentName": "my_parentFollowupIntentName", + * // "priority": 0, + * // "resetContexts": false, + * // "rootFollowupIntentName": "my_rootFollowupIntentName", + * // "trainingPhrases": [], + * // "webhookState": "my_webhookState" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + create( + params: Params$Resource$Projects$Locations$Agent$Intents$Create, + options: StreamMethodOptions + ): GaxiosPromise; + create( + params?: Params$Resource$Projects$Locations$Agent$Intents$Create, + options?: MethodOptions + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Locations$Agent$Intents$Create, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Locations$Agent$Intents$Create, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Locations$Agent$Intents$Create, + callback: BodyResponseCallback + ): void; + create( + callback: BodyResponseCallback + ): void; + create( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Intents$Create + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Intents$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Intents$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/intents').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Deletes the specified intent and its direct or indirect followup intents. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.intents.delete({ + * // Required. The name of the intent to delete. If this intent has direct or indirect followup intents, we also delete them. Format: `projects//agent/intents/`. + * name: 'projects/my-project/locations/my-location/agent/intents/my-intent', + * }); + * console.log(res.data); + * + * // Example response + * // {} + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + delete( + params: Params$Resource$Projects$Locations$Agent$Intents$Delete, + options: StreamMethodOptions + ): GaxiosPromise; + delete( + params?: Params$Resource$Projects$Locations$Agent$Intents$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Locations$Agent$Intents$Delete, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Agent$Intents$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Agent$Intents$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Intents$Delete + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Intents$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Intents$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Retrieves the specified intent. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.intents.get({ + * // Optional. The resource view to apply to the returned intent. + * intentView: 'placeholder-value', + * // Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * languageCode: 'placeholder-value', + * // Required. The name of the intent. Format: `projects//agent/intents/`. + * name: 'projects/my-project/locations/my-location/agent/intents/my-intent', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "action": "my_action", + * // "defaultResponsePlatforms": [], + * // "displayName": "my_displayName", + * // "endInteraction": false, + * // "events": [], + * // "followupIntentInfo": [], + * // "inputContextNames": [], + * // "isFallback": false, + * // "liveAgentHandoff": false, + * // "messages": [], + * // "mlDisabled": false, + * // "name": "my_name", + * // "outputContexts": [], + * // "parameters": [], + * // "parentFollowupIntentName": "my_parentFollowupIntentName", + * // "priority": 0, + * // "resetContexts": false, + * // "rootFollowupIntentName": "my_rootFollowupIntentName", + * // "trainingPhrases": [], + * // "webhookState": "my_webhookState" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Projects$Locations$Agent$Intents$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Projects$Locations$Agent$Intents$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Agent$Intents$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Agent$Intents$Get, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Agent$Intents$Get, + callback: BodyResponseCallback + ): void; + get( + callback: BodyResponseCallback + ): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Intents$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Intents$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Intents$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Returns the list of all intents in the specified agent. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.intents.list({ + * // Optional. The resource view to apply to the returned intent. + * intentView: 'placeholder-value', + * // Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * languageCode: 'placeholder-value', + * // Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. + * pageSize: 'placeholder-value', + * // Optional. The next_page_token value returned from a previous list request. + * pageToken: 'placeholder-value', + * // Required. The agent to list all intents from. Format: `projects//agent`. + * parent: 'projects/my-project/locations/my-location/agent', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "intents": [], + * // "nextPageToken": "my_nextPageToken" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Projects$Locations$Agent$Intents$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Projects$Locations$Agent$Intents$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$Agent$Intents$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Agent$Intents$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Agent$Intents$List, + callback: BodyResponseCallback + ): void; + list( + callback: BodyResponseCallback + ): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Intents$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Intents$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Intents$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/intents').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Updates the specified intent. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.intents.patch({ + * // Optional. The resource view to apply to the returned intent. + * intentView: 'placeholder-value', + * // Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * languageCode: 'placeholder-value', + * // Optional. The unique identifier of this intent. Required for Intents.UpdateIntent and Intents.BatchUpdateIntents methods. Format: `projects//agent/intents/`. + * name: 'projects/my-project/locations/my-location/agent/intents/my-intent', + * // Optional. The mask to control which fields get updated. + * updateMask: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "action": "my_action", + * // "defaultResponsePlatforms": [], + * // "displayName": "my_displayName", + * // "endInteraction": false, + * // "events": [], + * // "followupIntentInfo": [], + * // "inputContextNames": [], + * // "isFallback": false, + * // "liveAgentHandoff": false, + * // "messages": [], + * // "mlDisabled": false, + * // "name": "my_name", + * // "outputContexts": [], + * // "parameters": [], + * // "parentFollowupIntentName": "my_parentFollowupIntentName", + * // "priority": 0, + * // "resetContexts": false, + * // "rootFollowupIntentName": "my_rootFollowupIntentName", + * // "trainingPhrases": [], + * // "webhookState": "my_webhookState" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "action": "my_action", + * // "defaultResponsePlatforms": [], + * // "displayName": "my_displayName", + * // "endInteraction": false, + * // "events": [], + * // "followupIntentInfo": [], + * // "inputContextNames": [], + * // "isFallback": false, + * // "liveAgentHandoff": false, + * // "messages": [], + * // "mlDisabled": false, + * // "name": "my_name", + * // "outputContexts": [], + * // "parameters": [], + * // "parentFollowupIntentName": "my_parentFollowupIntentName", + * // "priority": 0, + * // "resetContexts": false, + * // "rootFollowupIntentName": "my_rootFollowupIntentName", + * // "trainingPhrases": [], + * // "webhookState": "my_webhookState" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + patch( + params: Params$Resource$Projects$Locations$Agent$Intents$Patch, + options: StreamMethodOptions + ): GaxiosPromise; + patch( + params?: Params$Resource$Projects$Locations$Agent$Intents$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Locations$Agent$Intents$Patch, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Locations$Agent$Intents$Patch, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Locations$Agent$Intents$Patch, + callback: BodyResponseCallback + ): void; + patch( + callback: BodyResponseCallback + ): void; + patch( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Intents$Patch + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Intents$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Intents$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + } + + export interface Params$Resource$Projects$Locations$Agent$Intents$Batchdelete + extends StandardParameters { + /** + * Required. The name of the agent to delete all entities types for. Format: `projects//agent`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2BatchDeleteIntentsRequest; + } + export interface Params$Resource$Projects$Locations$Agent$Intents$Batchupdate + extends StandardParameters { + /** + * Required. The name of the agent to update or create intents in. Format: `projects//agent`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2BatchUpdateIntentsRequest; + } + export interface Params$Resource$Projects$Locations$Agent$Intents$Create + extends StandardParameters { + /** + * Optional. The resource view to apply to the returned intent. + */ + intentView?: string; + /** + * Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + */ + languageCode?: string; + /** + * Required. The agent to create a intent for. Format: `projects//agent`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2Intent; + } + export interface Params$Resource$Projects$Locations$Agent$Intents$Delete + extends StandardParameters { + /** + * Required. The name of the intent to delete. If this intent has direct or indirect followup intents, we also delete them. Format: `projects//agent/intents/`. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Agent$Intents$Get + extends StandardParameters { + /** + * Optional. The resource view to apply to the returned intent. + */ + intentView?: string; + /** + * Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + */ + languageCode?: string; + /** + * Required. The name of the intent. Format: `projects//agent/intents/`. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Agent$Intents$List + extends StandardParameters { + /** + * Optional. The resource view to apply to the returned intent. + */ + intentView?: string; + /** + * Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + */ + languageCode?: string; + /** + * Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. + */ + pageSize?: number; + /** + * Optional. The next_page_token value returned from a previous list request. + */ + pageToken?: string; + /** + * Required. The agent to list all intents from. Format: `projects//agent`. + */ + parent?: string; + } + export interface Params$Resource$Projects$Locations$Agent$Intents$Patch + extends StandardParameters { + /** + * Optional. The resource view to apply to the returned intent. + */ + intentView?: string; + /** + * Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + */ + languageCode?: string; + /** + * Optional. The unique identifier of this intent. Required for Intents.UpdateIntent and Intents.BatchUpdateIntents methods. Format: `projects//agent/intents/`. + */ + name?: string; + /** + * Optional. The mask to control which fields get updated. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2Intent; + } + + export class Resource$Projects$Locations$Agent$Sessions { + context: APIRequestContext; + contexts: Resource$Projects$Locations$Agent$Sessions$Contexts; + entityTypes: Resource$Projects$Locations$Agent$Sessions$Entitytypes; + constructor(context: APIRequestContext) { + this.context = context; + this.contexts = new Resource$Projects$Locations$Agent$Sessions$Contexts( + this.context + ); + this.entityTypes = new Resource$Projects$Locations$Agent$Sessions$Entitytypes( + this.context + ); + } + + /** + * Deletes all active contexts in the specified session. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.sessions.deleteContexts( + * { + * // Required. The name of the session to delete all contexts from. Format: `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * parent: + * 'projects/my-project/locations/my-location/agent/sessions/my-session', + * } + * ); + * console.log(res.data); + * + * // Example response + * // {} + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + deleteContexts( + params: Params$Resource$Projects$Locations$Agent$Sessions$Deletecontexts, + options: StreamMethodOptions + ): GaxiosPromise; + deleteContexts( + params?: Params$Resource$Projects$Locations$Agent$Sessions$Deletecontexts, + options?: MethodOptions + ): GaxiosPromise; + deleteContexts( + params: Params$Resource$Projects$Locations$Agent$Sessions$Deletecontexts, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + deleteContexts( + params: Params$Resource$Projects$Locations$Agent$Sessions$Deletecontexts, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + deleteContexts( + params: Params$Resource$Projects$Locations$Agent$Sessions$Deletecontexts, + callback: BodyResponseCallback + ): void; + deleteContexts( + callback: BodyResponseCallback + ): void; + deleteContexts( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Sessions$Deletecontexts + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Sessions$Deletecontexts; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Sessions$Deletecontexts; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/contexts').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Processes a natural language query and returns structured, actionable data as a result. This method is not idempotent, because it may cause contexts and session entity types to be updated, which in turn might affect results of future queries. Note: Always use agent versions for production traffic. See [Versions and environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.sessions.detectIntent({ + * // Required. The name of the session this query is sent to. Format: `projects//agent/sessions/`, or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment (`Environment ID` might be referred to as environment name at some places). If `User ID` is not specified, we are using "-". It's up to the API caller to choose an appropriate `Session ID` and `User Id`. They can be a random number or some type of user and session identifiers (preferably hashed). The length of the `Session ID` and `User ID` must not exceed 36 characters. For more information, see the [API interactions guide](https://cloud.google.com/dialogflow/docs/api-overview). Note: Always use agent versions for production traffic. See [Versions and environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). + * session: + * 'projects/my-project/locations/my-location/agent/sessions/my-session', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "inputAudio": "my_inputAudio", + * // "outputAudioConfig": {}, + * // "outputAudioConfigMask": "my_outputAudioConfigMask", + * // "queryInput": {}, + * // "queryParams": {} + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "outputAudio": "my_outputAudio", + * // "outputAudioConfig": {}, + * // "queryResult": {}, + * // "responseId": "my_responseId", + * // "webhookStatus": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + detectIntent( + params: Params$Resource$Projects$Locations$Agent$Sessions$Detectintent, + options: StreamMethodOptions + ): GaxiosPromise; + detectIntent( + params?: Params$Resource$Projects$Locations$Agent$Sessions$Detectintent, + options?: MethodOptions + ): GaxiosPromise; + detectIntent( + params: Params$Resource$Projects$Locations$Agent$Sessions$Detectintent, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + detectIntent( + params: Params$Resource$Projects$Locations$Agent$Sessions$Detectintent, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + detectIntent( + params: Params$Resource$Projects$Locations$Agent$Sessions$Detectintent, + callback: BodyResponseCallback + ): void; + detectIntent( + callback: BodyResponseCallback + ): void; + detectIntent( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Sessions$Detectintent + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Sessions$Detectintent; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Sessions$Detectintent; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+session}:detectIntent').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['session'], + pathParams: ['session'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + } + + export interface Params$Resource$Projects$Locations$Agent$Sessions$Deletecontexts + extends StandardParameters { + /** + * Required. The name of the session to delete all contexts from. Format: `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + */ + parent?: string; + } + export interface Params$Resource$Projects$Locations$Agent$Sessions$Detectintent + extends StandardParameters { + /** + * Required. The name of the session this query is sent to. Format: `projects//agent/sessions/`, or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment (`Environment ID` might be referred to as environment name at some places). If `User ID` is not specified, we are using "-". It's up to the API caller to choose an appropriate `Session ID` and `User Id`. They can be a random number or some type of user and session identifiers (preferably hashed). The length of the `Session ID` and `User ID` must not exceed 36 characters. For more information, see the [API interactions guide](https://cloud.google.com/dialogflow/docs/api-overview). Note: Always use agent versions for production traffic. See [Versions and environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). + */ + session?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2DetectIntentRequest; + } + + export class Resource$Projects$Locations$Agent$Sessions$Contexts { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Creates a context. If the specified context already exists, overrides the context. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.sessions.contexts.create( + * { + * // Required. The session to create a context for. Format: `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * parent: + * 'projects/my-project/locations/my-location/agent/sessions/my-session', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "lifespanCount": 0, + * // "name": "my_name", + * // "parameters": {} + * // } + * }, + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "lifespanCount": 0, + * // "name": "my_name", + * // "parameters": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + create( + params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Create, + options: StreamMethodOptions + ): GaxiosPromise; + create( + params?: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Create, + options?: MethodOptions + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Create, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Create, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Create, + callback: BodyResponseCallback + ): void; + create( + callback: BodyResponseCallback + ): void; + create( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Create + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/contexts').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Deletes the specified context. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.sessions.contexts.delete( + * { + * // Required. The name of the context to delete. Format: `projects//agent/sessions//contexts/` or `projects//agent/environments//users//sessions//contexts/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * name: + * 'projects/my-project/locations/my-location/agent/sessions/my-session/contexts/my-context', + * } + * ); + * console.log(res.data); + * + * // Example response + * // {} + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + delete( + params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Delete, + options: StreamMethodOptions + ): GaxiosPromise; + delete( + params?: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Delete, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Delete + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Retrieves the specified context. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.sessions.contexts.get({ + * // Required. The name of the context. Format: `projects//agent/sessions//contexts/` or `projects//agent/environments//users//sessions//contexts/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * name: + * 'projects/my-project/locations/my-location/agent/sessions/my-session/contexts/my-context', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "lifespanCount": 0, + * // "name": "my_name", + * // "parameters": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Get, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Get, + callback: BodyResponseCallback + ): void; + get( + callback: BodyResponseCallback + ): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Returns the list of all contexts in the specified session. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.sessions.contexts.list({ + * // Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. + * pageSize: 'placeholder-value', + * // Optional. The next_page_token value returned from a previous list request. + * pageToken: 'placeholder-value', + * // Required. The session to list all contexts from. Format: `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * parent: + * 'projects/my-project/locations/my-location/agent/sessions/my-session', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "contexts": [], + * // "nextPageToken": "my_nextPageToken" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$List, + callback: BodyResponseCallback + ): void; + list( + callback: BodyResponseCallback + ): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Sessions$Contexts$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Sessions$Contexts$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Sessions$Contexts$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/contexts').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Updates the specified context. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.sessions.contexts.patch( + * { + * // Required. The unique identifier of the context. Format: `projects//agent/sessions//contexts/`, or `projects//agent/environments//users//sessions//contexts/`. The `Context ID` is always converted to lowercase, may only contain characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. The following context names are reserved for internal use by Dialogflow. You should not use these contexts or create contexts with these names: * `__system_counters__` * `*_id_dialog_context` * `*_dialog_params_size` + * name: + * 'projects/my-project/locations/my-location/agent/sessions/my-session/contexts/my-context', + * // Optional. The mask to control which fields get updated. + * updateMask: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "lifespanCount": 0, + * // "name": "my_name", + * // "parameters": {} + * // } + * }, + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "lifespanCount": 0, + * // "name": "my_name", + * // "parameters": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + patch( + params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Patch, + options: StreamMethodOptions + ): GaxiosPromise; + patch( + params?: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Patch, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Patch, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Patch, + callback: BodyResponseCallback + ): void; + patch( + callback: BodyResponseCallback + ): void; + patch( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Patch + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + } + + export interface Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Create + extends StandardParameters { + /** + * Required. The session to create a context for. Format: `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2Context; + } + export interface Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Delete + extends StandardParameters { + /** + * Required. The name of the context to delete. Format: `projects//agent/sessions//contexts/` or `projects//agent/environments//users//sessions//contexts/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Get + extends StandardParameters { + /** + * Required. The name of the context. Format: `projects//agent/sessions//contexts/` or `projects//agent/environments//users//sessions//contexts/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Agent$Sessions$Contexts$List + extends StandardParameters { + /** + * Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. + */ + pageSize?: number; + /** + * Optional. The next_page_token value returned from a previous list request. + */ + pageToken?: string; + /** + * Required. The session to list all contexts from. Format: `projects//agent/sessions/` or `projects//agent/environments//users//sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + */ + parent?: string; + } + export interface Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Patch + extends StandardParameters { + /** + * Required. The unique identifier of the context. Format: `projects//agent/sessions//contexts/`, or `projects//agent/environments//users//sessions//contexts/`. The `Context ID` is always converted to lowercase, may only contain characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. The following context names are reserved for internal use by Dialogflow. You should not use these contexts or create contexts with these names: * `__system_counters__` * `*_id_dialog_context` * `*_dialog_params_size` + */ + name?: string; + /** + * Optional. The mask to control which fields get updated. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2Context; + } + + export class Resource$Projects$Locations$Agent$Sessions$Entitytypes { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Creates a session entity type. If the specified session entity type already exists, overrides the session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.sessions.entityTypes.create( + * { + * // Required. The session to create a session entity type for. Format: `projects//agent/sessions/` or `projects//agent/environments//users// sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * parent: + * 'projects/my-project/locations/my-location/agent/sessions/my-session', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "entities": [], + * // "entityOverrideMode": "my_entityOverrideMode", + * // "name": "my_name" + * // } + * }, + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "entities": [], + * // "entityOverrideMode": "my_entityOverrideMode", + * // "name": "my_name" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + create( + params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Create, + options: StreamMethodOptions + ): GaxiosPromise; + create( + params?: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Create, + options?: MethodOptions + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Create, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Create, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Create, + callback: BodyResponseCallback + ): void; + create( + callback: BodyResponseCallback + ): void; + create( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Create + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/entityTypes').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Deletes the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.sessions.entityTypes.delete( + * { + * // Required. The name of the entity type to delete. Format: `projects//agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * name: + * 'projects/my-project/locations/my-location/agent/sessions/my-session/entityTypes/my-entityType', + * } + * ); + * console.log(res.data); + * + * // Example response + * // {} + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + delete( + params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Delete, + options: StreamMethodOptions + ): GaxiosPromise; + delete( + params?: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Delete, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Delete + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Retrieves the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.sessions.entityTypes.get( + * { + * // Required. The name of the session entity type. Format: `projects//agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * name: + * 'projects/my-project/locations/my-location/agent/sessions/my-session/entityTypes/my-entityType', + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "entities": [], + * // "entityOverrideMode": "my_entityOverrideMode", + * // "name": "my_name" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Get, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Get, + callback: BodyResponseCallback + ): void; + get( + callback: BodyResponseCallback + ): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Returns the list of all session entity types in the specified session. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.sessions.entityTypes.list( + * { + * // Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. + * pageSize: 'placeholder-value', + * // Optional. The next_page_token value returned from a previous list request. + * pageToken: 'placeholder-value', + * // Required. The session to list all session entity types from. Format: `projects//agent/sessions/` or `projects//agent/environments//users// sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * parent: + * 'projects/my-project/locations/my-location/agent/sessions/my-session', + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "nextPageToken": "my_nextPageToken", + * // "sessionEntityTypes": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$List, + callback: BodyResponseCallback + ): void; + list( + callback: BodyResponseCallback + ): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/entityTypes').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Updates the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.sessions.entityTypes.patch( + * { + * // Required. The unique identifier of this session entity type. Format: `projects//agent/sessions//entityTypes/`, or `projects//agent/environments//users//sessions//entityTypes/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. `` must be the display name of an existing entity type in the same agent that will be overridden or supplemented. + * name: + * 'projects/my-project/locations/my-location/agent/sessions/my-session/entityTypes/my-entityType', + * // Optional. The mask to control which fields get updated. + * updateMask: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "entities": [], + * // "entityOverrideMode": "my_entityOverrideMode", + * // "name": "my_name" + * // } + * }, + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "entities": [], + * // "entityOverrideMode": "my_entityOverrideMode", + * // "name": "my_name" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + patch( + params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Patch, + options: StreamMethodOptions + ): GaxiosPromise; + patch( + params?: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Patch, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Patch, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Patch, + callback: BodyResponseCallback + ): void; + patch( + callback: BodyResponseCallback + ): void; + patch( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Patch + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + } + + export interface Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Create + extends StandardParameters { + /** + * Required. The session to create a session entity type for. Format: `projects//agent/sessions/` or `projects//agent/environments//users// sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2SessionEntityType; + } + export interface Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Delete + extends StandardParameters { + /** + * Required. The name of the entity type to delete. Format: `projects//agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Get + extends StandardParameters { + /** + * Required. The name of the session entity type. Format: `projects//agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$List + extends StandardParameters { + /** + * Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. + */ + pageSize?: number; + /** + * Optional. The next_page_token value returned from a previous list request. + */ + pageToken?: string; + /** + * Required. The session to list all session entity types from. Format: `projects//agent/sessions/` or `projects//agent/environments//users// sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + */ + parent?: string; + } + export interface Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Patch + extends StandardParameters { + /** + * Required. The unique identifier of this session entity type. Format: `projects//agent/sessions//entityTypes/`, or `projects//agent/environments//users//sessions//entityTypes/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. `` must be the display name of an existing entity type in the same agent that will be overridden or supplemented. + */ + name?: string; + /** + * Optional. The mask to control which fields get updated. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2SessionEntityType; + } + + export class Resource$Projects$Locations$Answerrecords { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Returns the list of all answer records in the specified project in reverse chronological order. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.answerRecords.list({ + * // Required. Filters to restrict results to specific answer records. Filter on answer record type. Currently predicates on `type` is supported, valid values are `ARTICLE_ANSWER`, `FAQ_ANSWER`. For more information about filtering, see [API Filtering](https://aip.dev/160). + * filter: 'placeholder-value', + * // Optional. The maximum number of records to return in a single page. The server may return fewer records than this. If unspecified, we use 10. The maximum is 100. + * pageSize: 'placeholder-value', + * // Optional. The ListAnswerRecordsResponse.next_page_token value returned from a previous list request used to continue listing on the next page. + * pageToken: 'placeholder-value', + * // Required. The project to list all answer records for in reverse chronological order. Format: `projects//locations/`. + * parent: 'projects/my-project/locations/my-location', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "answerRecords": [], + * // "nextPageToken": "my_nextPageToken" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Projects$Locations$Answerrecords$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Projects$Locations$Answerrecords$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$Answerrecords$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Answerrecords$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Answerrecords$List, + callback: BodyResponseCallback + ): void; + list( + callback: BodyResponseCallback + ): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Answerrecords$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Answerrecords$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Answerrecords$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/answerRecords').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Updates the specified answer record. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.answerRecords.patch({ + * // The unique identifier of this answer record. Format: `projects//locations//answerRecords/`. + * name: + * 'projects/my-project/locations/my-location/answerRecords/my-answerRecord', + * // Required. The mask to control which fields get updated. + * updateMask: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "agentAssistantRecord": {}, + * // "answerFeedback": {}, + * // "name": "my_name" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "agentAssistantRecord": {}, + * // "answerFeedback": {}, + * // "name": "my_name" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + patch( + params: Params$Resource$Projects$Locations$Answerrecords$Patch, + options: StreamMethodOptions + ): GaxiosPromise; + patch( + params?: Params$Resource$Projects$Locations$Answerrecords$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Locations$Answerrecords$Patch, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Locations$Answerrecords$Patch, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Locations$Answerrecords$Patch, + callback: BodyResponseCallback + ): void; + patch( + callback: BodyResponseCallback + ): void; + patch( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Answerrecords$Patch + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Answerrecords$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Answerrecords$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + } + + export interface Params$Resource$Projects$Locations$Answerrecords$List + extends StandardParameters { + /** + * Required. Filters to restrict results to specific answer records. Filter on answer record type. Currently predicates on `type` is supported, valid values are `ARTICLE_ANSWER`, `FAQ_ANSWER`. For more information about filtering, see [API Filtering](https://aip.dev/160). + */ + filter?: string; + /** + * Optional. The maximum number of records to return in a single page. The server may return fewer records than this. If unspecified, we use 10. The maximum is 100. + */ + pageSize?: number; + /** + * Optional. The ListAnswerRecordsResponse.next_page_token value returned from a previous list request used to continue listing on the next page. + */ + pageToken?: string; + /** + * Required. The project to list all answer records for in reverse chronological order. Format: `projects//locations/`. + */ + parent?: string; + } + export interface Params$Resource$Projects$Locations$Answerrecords$Patch + extends StandardParameters { + /** + * The unique identifier of this answer record. Format: `projects//locations//answerRecords/`. + */ + name?: string; + /** + * Required. The mask to control which fields get updated. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2AnswerRecord; + } + + export class Resource$Projects$Locations$Conversationprofiles { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Creates a conversation profile in the specified project. ConversationProfile.CreateTime and ConversationProfile.UpdateTime aren't populated in the response. You can retrieve them via GetConversationProfile API. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.conversationProfiles.create({ + * // Required. The project to create a conversation profile for. Format: `projects//locations/`. + * parent: 'projects/my-project/locations/my-location', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "automatedAgentConfig": {}, + * // "createTime": "my_createTime", + * // "displayName": "my_displayName", + * // "humanAgentAssistantConfig": {}, + * // "languageCode": "my_languageCode", + * // "loggingConfig": {}, + * // "name": "my_name", + * // "newMessageEventNotificationConfig": {}, + * // "notificationConfig": {}, + * // "sttConfig": {}, + * // "updateTime": "my_updateTime" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "automatedAgentConfig": {}, + * // "createTime": "my_createTime", + * // "displayName": "my_displayName", + * // "humanAgentAssistantConfig": {}, + * // "languageCode": "my_languageCode", + * // "loggingConfig": {}, + * // "name": "my_name", + * // "newMessageEventNotificationConfig": {}, + * // "notificationConfig": {}, + * // "sttConfig": {}, + * // "updateTime": "my_updateTime" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + create( + params: Params$Resource$Projects$Locations$Conversationprofiles$Create, + options: StreamMethodOptions + ): GaxiosPromise; + create( + params?: Params$Resource$Projects$Locations$Conversationprofiles$Create, + options?: MethodOptions + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Locations$Conversationprofiles$Create, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Locations$Conversationprofiles$Create, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Locations$Conversationprofiles$Create, + callback: BodyResponseCallback + ): void; + create( + callback: BodyResponseCallback + ): void; + create( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Conversationprofiles$Create + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Conversationprofiles$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Conversationprofiles$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/conversationProfiles').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Deletes the specified conversation profile. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.conversationProfiles.delete({ + * // Required. The name of the conversation profile to delete. Format: `projects//locations//conversationProfiles/`. + * name: + * 'projects/my-project/locations/my-location/conversationProfiles/my-conversationProfile', + * }); + * console.log(res.data); + * + * // Example response + * // {} + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + delete( + params: Params$Resource$Projects$Locations$Conversationprofiles$Delete, + options: StreamMethodOptions + ): GaxiosPromise; + delete( + params?: Params$Resource$Projects$Locations$Conversationprofiles$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Locations$Conversationprofiles$Delete, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Conversationprofiles$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Conversationprofiles$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Conversationprofiles$Delete + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Conversationprofiles$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Conversationprofiles$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Retrieves the specified conversation profile. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.conversationProfiles.get({ + * // Required. The resource name of the conversation profile. Format: `projects//locations//conversationProfiles/`. + * name: + * 'projects/my-project/locations/my-location/conversationProfiles/my-conversationProfile', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "automatedAgentConfig": {}, + * // "createTime": "my_createTime", + * // "displayName": "my_displayName", + * // "humanAgentAssistantConfig": {}, + * // "languageCode": "my_languageCode", + * // "loggingConfig": {}, + * // "name": "my_name", + * // "newMessageEventNotificationConfig": {}, + * // "notificationConfig": {}, + * // "sttConfig": {}, + * // "updateTime": "my_updateTime" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Projects$Locations$Conversationprofiles$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Projects$Locations$Conversationprofiles$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Conversationprofiles$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Conversationprofiles$Get, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Conversationprofiles$Get, + callback: BodyResponseCallback + ): void; + get( + callback: BodyResponseCallback + ): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Conversationprofiles$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Conversationprofiles$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Conversationprofiles$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Returns the list of all conversation profiles in the specified project. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.conversationProfiles.list({ + * // The maximum number of items to return in a single page. By default 100 and at most 1000. + * pageSize: 'placeholder-value', + * // The next_page_token value returned from a previous list request. + * pageToken: 'placeholder-value', + * // Required. The project to list all conversation profiles from. Format: `projects//locations/`. + * parent: 'projects/my-project/locations/my-location', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "conversationProfiles": [], + * // "nextPageToken": "my_nextPageToken" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Projects$Locations$Conversationprofiles$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Projects$Locations$Conversationprofiles$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$Conversationprofiles$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Conversationprofiles$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Conversationprofiles$List, + callback: BodyResponseCallback + ): void; + list( + callback: BodyResponseCallback + ): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Conversationprofiles$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Conversationprofiles$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Conversationprofiles$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/conversationProfiles').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Updates the specified conversation profile. ConversationProfile.CreateTime and ConversationProfile.UpdateTime aren't populated in the response. You can retrieve them via GetConversationProfile API. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.conversationProfiles.patch({ + * // The unique identifier of this conversation profile. Format: `projects//locations//conversationProfiles/`. + * name: + * 'projects/my-project/locations/my-location/conversationProfiles/my-conversationProfile', + * // Required. The mask to control which fields to update. + * updateMask: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "automatedAgentConfig": {}, + * // "createTime": "my_createTime", + * // "displayName": "my_displayName", + * // "humanAgentAssistantConfig": {}, + * // "languageCode": "my_languageCode", + * // "loggingConfig": {}, + * // "name": "my_name", + * // "newMessageEventNotificationConfig": {}, + * // "notificationConfig": {}, + * // "sttConfig": {}, + * // "updateTime": "my_updateTime" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "automatedAgentConfig": {}, + * // "createTime": "my_createTime", + * // "displayName": "my_displayName", + * // "humanAgentAssistantConfig": {}, + * // "languageCode": "my_languageCode", + * // "loggingConfig": {}, + * // "name": "my_name", + * // "newMessageEventNotificationConfig": {}, + * // "notificationConfig": {}, + * // "sttConfig": {}, + * // "updateTime": "my_updateTime" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + patch( + params: Params$Resource$Projects$Locations$Conversationprofiles$Patch, + options: StreamMethodOptions + ): GaxiosPromise; + patch( + params?: Params$Resource$Projects$Locations$Conversationprofiles$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Locations$Conversationprofiles$Patch, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Locations$Conversationprofiles$Patch, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Locations$Conversationprofiles$Patch, + callback: BodyResponseCallback + ): void; + patch( + callback: BodyResponseCallback + ): void; + patch( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Conversationprofiles$Patch + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Conversationprofiles$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Conversationprofiles$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + } + + export interface Params$Resource$Projects$Locations$Conversationprofiles$Create + extends StandardParameters { + /** + * Required. The project to create a conversation profile for. Format: `projects//locations/`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2ConversationProfile; + } + export interface Params$Resource$Projects$Locations$Conversationprofiles$Delete + extends StandardParameters { + /** + * Required. The name of the conversation profile to delete. Format: `projects//locations//conversationProfiles/`. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Conversationprofiles$Get + extends StandardParameters { + /** + * Required. The resource name of the conversation profile. Format: `projects//locations//conversationProfiles/`. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Conversationprofiles$List + extends StandardParameters { + /** + * The maximum number of items to return in a single page. By default 100 and at most 1000. + */ + pageSize?: number; + /** + * The next_page_token value returned from a previous list request. + */ + pageToken?: string; + /** + * Required. The project to list all conversation profiles from. Format: `projects//locations/`. + */ + parent?: string; + } + export interface Params$Resource$Projects$Locations$Conversationprofiles$Patch + extends StandardParameters { + /** + * The unique identifier of this conversation profile. Format: `projects//locations//conversationProfiles/`. + */ + name?: string; + /** + * Required. The mask to control which fields to update. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2ConversationProfile; + } + + export class Resource$Projects$Locations$Conversations { + context: APIRequestContext; + messages: Resource$Projects$Locations$Conversations$Messages; + participants: Resource$Projects$Locations$Conversations$Participants; + constructor(context: APIRequestContext) { + this.context = context; + this.messages = new Resource$Projects$Locations$Conversations$Messages( + this.context + ); + this.participants = new Resource$Projects$Locations$Conversations$Participants( + this.context + ); + } + + /** + * Completes the specified conversation. Finished conversations are purged from the database after 30 days. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.conversations.complete({ + * // Required. Resource identifier of the conversation to close. Format: `projects//locations//conversations/`. + * name: + * 'projects/my-project/locations/my-location/conversations/my-conversation', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // {} + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "conversationProfile": "my_conversationProfile", + * // "conversationStage": "my_conversationStage", + * // "endTime": "my_endTime", + * // "lifecycleState": "my_lifecycleState", + * // "name": "my_name", + * // "phoneNumber": {}, + * // "startTime": "my_startTime" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + complete( + params: Params$Resource$Projects$Locations$Conversations$Complete, + options: StreamMethodOptions + ): GaxiosPromise; + complete( + params?: Params$Resource$Projects$Locations$Conversations$Complete, + options?: MethodOptions + ): GaxiosPromise; + complete( + params: Params$Resource$Projects$Locations$Conversations$Complete, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + complete( + params: Params$Resource$Projects$Locations$Conversations$Complete, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + complete( + params: Params$Resource$Projects$Locations$Conversations$Complete, + callback: BodyResponseCallback + ): void; + complete( + callback: BodyResponseCallback + ): void; + complete( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Conversations$Complete + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Conversations$Complete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Conversations$Complete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}:complete').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Creates a new conversation. Conversations are auto-completed after 24 hours. Conversation Lifecycle: There are two stages during a conversation: Automated Agent Stage and Assist Stage. For Automated Agent Stage, there will be a dialogflow agent responding to user queries. For Assist Stage, there's no dialogflow agent responding to user queries. But we will provide suggestions which are generated from conversation. If Conversation.conversation_profile is configured for a dialogflow agent, conversation will start from `Automated Agent Stage`, otherwise, it will start from `Assist Stage`. And during `Automated Agent Stage`, once an Intent with Intent.live_agent_handoff is triggered, conversation will transfer to Assist Stage. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.conversations.create({ + * // Optional. Identifier of the conversation. Generally it's auto generated by Google. Only set it if you cannot wait for the response to return a auto-generated one to you. The conversation ID must be compliant with the regression fomula "a-zA-Z*" with the characters length in range of [3,64]. If the field is provided, the caller is resposible for 1. the uniqueness of the ID, otherwise the request will be rejected. 2. the consistency for whether to use custom ID or not under a project to better ensure uniqueness. + * conversationId: 'placeholder-value', + * // Required. Resource identifier of the project creating the conversation. Format: `projects//locations/`. + * parent: 'projects/my-project/locations/my-location', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "conversationProfile": "my_conversationProfile", + * // "conversationStage": "my_conversationStage", + * // "endTime": "my_endTime", + * // "lifecycleState": "my_lifecycleState", + * // "name": "my_name", + * // "phoneNumber": {}, + * // "startTime": "my_startTime" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "conversationProfile": "my_conversationProfile", + * // "conversationStage": "my_conversationStage", + * // "endTime": "my_endTime", + * // "lifecycleState": "my_lifecycleState", + * // "name": "my_name", + * // "phoneNumber": {}, + * // "startTime": "my_startTime" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + create( + params: Params$Resource$Projects$Locations$Conversations$Create, + options: StreamMethodOptions + ): GaxiosPromise; + create( + params?: Params$Resource$Projects$Locations$Conversations$Create, + options?: MethodOptions + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Locations$Conversations$Create, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Locations$Conversations$Create, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Locations$Conversations$Create, + callback: BodyResponseCallback + ): void; + create( + callback: BodyResponseCallback + ): void; + create( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Conversations$Create + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Conversations$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Conversations$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/conversations').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Retrieves the specific conversation. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.conversations.get({ + * // Required. The name of the conversation. Format: `projects//locations//conversations/`. + * name: + * 'projects/my-project/locations/my-location/conversations/my-conversation', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "conversationProfile": "my_conversationProfile", + * // "conversationStage": "my_conversationStage", + * // "endTime": "my_endTime", + * // "lifecycleState": "my_lifecycleState", + * // "name": "my_name", + * // "phoneNumber": {}, + * // "startTime": "my_startTime" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Projects$Locations$Conversations$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Projects$Locations$Conversations$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Conversations$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Conversations$Get, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Conversations$Get, + callback: BodyResponseCallback + ): void; + get( + callback: BodyResponseCallback + ): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Conversations$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Conversations$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Conversations$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Returns the list of all conversations in the specified project. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.conversations.list({ + * // A filter expression that filters conversations listed in the response. In general, the expression must specify the field name, a comparison operator, and the value to use for filtering: - The value must be a string, a number, or a boolean. - The comparison operator must be either `=`,`!=`, `\>`, or `<`. - To filter on multiple expressions, separate the expressions with `AND` or `OR` (omitting both implies `AND`). - For clarity, expressions can be enclosed in parentheses. Only `lifecycle_state` can be filtered on in this way. For example, the following expression only returns `COMPLETED` conversations: `lifecycle_state = "COMPLETED"` For more information about filtering, see [API Filtering](https://aip.dev/160). + * filter: 'placeholder-value', + * // Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. + * pageSize: 'placeholder-value', + * // Optional. The next_page_token value returned from a previous list request. + * pageToken: 'placeholder-value', + * // Required. The project from which to list all conversation. Format: `projects//locations/`. + * parent: 'projects/my-project/locations/my-location', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "conversations": [], + * // "nextPageToken": "my_nextPageToken" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Projects$Locations$Conversations$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Projects$Locations$Conversations$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$Conversations$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Conversations$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Conversations$List, + callback: BodyResponseCallback + ): void; + list( + callback: BodyResponseCallback + ): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Conversations$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Conversations$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Conversations$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/conversations').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + } + + export interface Params$Resource$Projects$Locations$Conversations$Complete + extends StandardParameters { + /** + * Required. Resource identifier of the conversation to close. Format: `projects//locations//conversations/`. + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2CompleteConversationRequest; + } + export interface Params$Resource$Projects$Locations$Conversations$Create + extends StandardParameters { + /** + * Optional. Identifier of the conversation. Generally it's auto generated by Google. Only set it if you cannot wait for the response to return a auto-generated one to you. The conversation ID must be compliant with the regression fomula "a-zA-Z*" with the characters length in range of [3,64]. If the field is provided, the caller is resposible for 1. the uniqueness of the ID, otherwise the request will be rejected. 2. the consistency for whether to use custom ID or not under a project to better ensure uniqueness. + */ + conversationId?: string; + /** + * Required. Resource identifier of the project creating the conversation. Format: `projects//locations/`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2Conversation; + } + export interface Params$Resource$Projects$Locations$Conversations$Get + extends StandardParameters { + /** + * Required. The name of the conversation. Format: `projects//locations//conversations/`. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Conversations$List + extends StandardParameters { + /** + * A filter expression that filters conversations listed in the response. In general, the expression must specify the field name, a comparison operator, and the value to use for filtering: - The value must be a string, a number, or a boolean. - The comparison operator must be either `=`,`!=`, `\>`, or `<`. - To filter on multiple expressions, separate the expressions with `AND` or `OR` (omitting both implies `AND`). - For clarity, expressions can be enclosed in parentheses. Only `lifecycle_state` can be filtered on in this way. For example, the following expression only returns `COMPLETED` conversations: `lifecycle_state = "COMPLETED"` For more information about filtering, see [API Filtering](https://aip.dev/160). + */ + filter?: string; + /** + * Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. + */ + pageSize?: number; + /** + * Optional. The next_page_token value returned from a previous list request. + */ + pageToken?: string; + /** + * Required. The project from which to list all conversation. Format: `projects//locations/`. + */ + parent?: string; + } + + export class Resource$Projects$Locations$Conversations$Messages { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Lists messages that belong to a given conversation. `messages` are ordered by `create_time` in descending order. To fetch updates without duplication, send request with filter `create_time_epoch_microseconds \> [first item's create_time of previous request]` and empty page_token. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.conversations.messages.list({ + * // Optional. Filter on message fields. Currently predicates on `create_time` and `create_time_epoch_microseconds` are supported. `create_time` only support milliseconds accuracy. E.g., `create_time_epoch_microseconds \> 1551790877964485` or `create_time \> 2017-01-15T01:30:15.01Z`. For more information about filtering, see [API Filtering](https://aip.dev/160). + * filter: 'placeholder-value', + * // Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. + * pageSize: 'placeholder-value', + * // Optional. The next_page_token value returned from a previous list request. + * pageToken: 'placeholder-value', + * // Required. The name of the conversation to list messages for. Format: `projects//locations//conversations/` + * parent: + * 'projects/my-project/locations/my-location/conversations/my-conversation', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "messages": [], + * // "nextPageToken": "my_nextPageToken" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Projects$Locations$Conversations$Messages$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Projects$Locations$Conversations$Messages$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$Conversations$Messages$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Conversations$Messages$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Conversations$Messages$List, + callback: BodyResponseCallback + ): void; + list( + callback: BodyResponseCallback + ): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Conversations$Messages$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Conversations$Messages$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Conversations$Messages$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/messages').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + } + + export interface Params$Resource$Projects$Locations$Conversations$Messages$List + extends StandardParameters { + /** + * Optional. Filter on message fields. Currently predicates on `create_time` and `create_time_epoch_microseconds` are supported. `create_time` only support milliseconds accuracy. E.g., `create_time_epoch_microseconds \> 1551790877964485` or `create_time \> 2017-01-15T01:30:15.01Z`. For more information about filtering, see [API Filtering](https://aip.dev/160). + */ + filter?: string; + /** + * Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. + */ + pageSize?: number; + /** + * Optional. The next_page_token value returned from a previous list request. + */ + pageToken?: string; + /** + * Required. The name of the conversation to list messages for. Format: `projects//locations//conversations/` + */ + parent?: string; + } + + export class Resource$Projects$Locations$Conversations$Participants { + context: APIRequestContext; + suggestions: Resource$Projects$Locations$Conversations$Participants$Suggestions; + constructor(context: APIRequestContext) { + this.context = context; + this.suggestions = new Resource$Projects$Locations$Conversations$Participants$Suggestions( + this.context + ); + } + + /** + * Adds a text (chat, for example), or audio (phone recording, for example) message from a participant into the conversation. Note: Always use agent versions for production traffic sent to virtual agents. See [Versions and environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.conversations.participants.analyzeContent( + * { + * // Required. The name of the participant this text comes from. Format: `projects//locations//conversations//participants/`. + * participant: + * 'projects/my-project/locations/my-location/conversations/my-conversation/participants/my-participant', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "eventInput": {}, + * // "queryParams": {}, + * // "replyAudioConfig": {}, + * // "requestId": "my_requestId", + * // "textInput": {} + * // } + * }, + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "automatedAgentReply": {}, + * // "dtmfParameters": {}, + * // "endUserSuggestionResults": [], + * // "humanAgentSuggestionResults": [], + * // "message": {}, + * // "replyAudio": {}, + * // "replyText": "my_replyText" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + analyzeContent( + params: Params$Resource$Projects$Locations$Conversations$Participants$Analyzecontent, + options: StreamMethodOptions + ): GaxiosPromise; + analyzeContent( + params?: Params$Resource$Projects$Locations$Conversations$Participants$Analyzecontent, + options?: MethodOptions + ): GaxiosPromise; + analyzeContent( + params: Params$Resource$Projects$Locations$Conversations$Participants$Analyzecontent, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + analyzeContent( + params: Params$Resource$Projects$Locations$Conversations$Participants$Analyzecontent, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + analyzeContent( + params: Params$Resource$Projects$Locations$Conversations$Participants$Analyzecontent, + callback: BodyResponseCallback + ): void; + analyzeContent( + callback: BodyResponseCallback + ): void; + analyzeContent( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Conversations$Participants$Analyzecontent + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Conversations$Participants$Analyzecontent; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Conversations$Participants$Analyzecontent; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+participant}:analyzeContent').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['participant'], + pathParams: ['participant'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Creates a new participant in a conversation. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.conversations.participants.create( + * { + * // Required. Resource identifier of the conversation adding the participant. Format: `projects//locations//conversations/`. + * parent: + * 'projects/my-project/locations/my-location/conversations/my-conversation', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "name": "my_name", + * // "role": "my_role", + * // "sipRecordingMediaLabel": "my_sipRecordingMediaLabel" + * // } + * }, + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "name": "my_name", + * // "role": "my_role", + * // "sipRecordingMediaLabel": "my_sipRecordingMediaLabel" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + create( + params: Params$Resource$Projects$Locations$Conversations$Participants$Create, + options: StreamMethodOptions + ): GaxiosPromise; + create( + params?: Params$Resource$Projects$Locations$Conversations$Participants$Create, + options?: MethodOptions + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Locations$Conversations$Participants$Create, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Locations$Conversations$Participants$Create, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Locations$Conversations$Participants$Create, + callback: BodyResponseCallback + ): void; + create( + callback: BodyResponseCallback + ): void; + create( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Conversations$Participants$Create + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Conversations$Participants$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Conversations$Participants$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/participants').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Retrieves a conversation participant. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.conversations.participants.get( + * { + * // Required. The name of the participant. Format: `projects//locations//conversations//participants/`. + * name: + * 'projects/my-project/locations/my-location/conversations/my-conversation/participants/my-participant', + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "name": "my_name", + * // "role": "my_role", + * // "sipRecordingMediaLabel": "my_sipRecordingMediaLabel" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Projects$Locations$Conversations$Participants$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Projects$Locations$Conversations$Participants$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Conversations$Participants$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Conversations$Participants$Get, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Conversations$Participants$Get, + callback: BodyResponseCallback + ): void; + get( + callback: BodyResponseCallback + ): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Conversations$Participants$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Conversations$Participants$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Conversations$Participants$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Returns the list of all participants in the specified conversation. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.conversations.participants.list( + * { + * // Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. + * pageSize: 'placeholder-value', + * // Optional. The next_page_token value returned from a previous list request. + * pageToken: 'placeholder-value', + * // Required. The conversation to list all participants from. Format: `projects//locations//conversations/`. + * parent: + * 'projects/my-project/locations/my-location/conversations/my-conversation', + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "nextPageToken": "my_nextPageToken", + * // "participants": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Projects$Locations$Conversations$Participants$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Projects$Locations$Conversations$Participants$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$Conversations$Participants$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Conversations$Participants$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Conversations$Participants$List, + callback: BodyResponseCallback + ): void; + list( + callback: BodyResponseCallback + ): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Conversations$Participants$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Conversations$Participants$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Conversations$Participants$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/participants').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Updates the specified participant. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.conversations.participants.patch( + * { + * // Optional. The unique identifier of this participant. Format: `projects//locations//conversations//participants/`. + * name: + * 'projects/my-project/locations/my-location/conversations/my-conversation/participants/my-participant', + * // Required. The mask to specify which fields to update. + * updateMask: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "name": "my_name", + * // "role": "my_role", + * // "sipRecordingMediaLabel": "my_sipRecordingMediaLabel" + * // } + * }, + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "name": "my_name", + * // "role": "my_role", + * // "sipRecordingMediaLabel": "my_sipRecordingMediaLabel" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + patch( + params: Params$Resource$Projects$Locations$Conversations$Participants$Patch, + options: StreamMethodOptions + ): GaxiosPromise; + patch( + params?: Params$Resource$Projects$Locations$Conversations$Participants$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Locations$Conversations$Participants$Patch, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Locations$Conversations$Participants$Patch, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Locations$Conversations$Participants$Patch, + callback: BodyResponseCallback + ): void; + patch( + callback: BodyResponseCallback + ): void; + patch( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Conversations$Participants$Patch + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Conversations$Participants$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Conversations$Participants$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + } + + export interface Params$Resource$Projects$Locations$Conversations$Participants$Analyzecontent + extends StandardParameters { + /** + * Required. The name of the participant this text comes from. Format: `projects//locations//conversations//participants/`. + */ + participant?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2AnalyzeContentRequest; + } + export interface Params$Resource$Projects$Locations$Conversations$Participants$Create + extends StandardParameters { + /** + * Required. Resource identifier of the conversation adding the participant. Format: `projects//locations//conversations/`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2Participant; + } + export interface Params$Resource$Projects$Locations$Conversations$Participants$Get + extends StandardParameters { + /** + * Required. The name of the participant. Format: `projects//locations//conversations//participants/`. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Conversations$Participants$List + extends StandardParameters { + /** + * Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. + */ + pageSize?: number; + /** + * Optional. The next_page_token value returned from a previous list request. + */ + pageToken?: string; + /** + * Required. The conversation to list all participants from. Format: `projects//locations//conversations/`. + */ + parent?: string; + } + export interface Params$Resource$Projects$Locations$Conversations$Participants$Patch + extends StandardParameters { + /** + * Optional. The unique identifier of this participant. Format: `projects//locations//conversations//participants/`. + */ + name?: string; + /** + * Required. The mask to specify which fields to update. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2Participant; + } + + export class Resource$Projects$Locations$Conversations$Participants$Suggestions { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Gets suggested articles for a participant based on specific historical messages. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.conversations.participants.suggestions.suggestArticles( + * { + * // Required. The name of the participant to fetch suggestion for. Format: `projects//locations//conversations//participants/`. + * parent: + * 'projects/my-project/locations/my-location/conversations/my-conversation/participants/my-participant', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "contextSize": 0, + * // "latestMessage": "my_latestMessage" + * // } + * }, + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "articleAnswers": [], + * // "contextSize": 0, + * // "latestMessage": "my_latestMessage" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + suggestArticles( + params: Params$Resource$Projects$Locations$Conversations$Participants$Suggestions$Suggestarticles, + options: StreamMethodOptions + ): GaxiosPromise; + suggestArticles( + params?: Params$Resource$Projects$Locations$Conversations$Participants$Suggestions$Suggestarticles, + options?: MethodOptions + ): GaxiosPromise; + suggestArticles( + params: Params$Resource$Projects$Locations$Conversations$Participants$Suggestions$Suggestarticles, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + suggestArticles( + params: Params$Resource$Projects$Locations$Conversations$Participants$Suggestions$Suggestarticles, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + suggestArticles( + params: Params$Resource$Projects$Locations$Conversations$Participants$Suggestions$Suggestarticles, + callback: BodyResponseCallback + ): void; + suggestArticles( + callback: BodyResponseCallback + ): void; + suggestArticles( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Conversations$Participants$Suggestions$Suggestarticles + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Conversations$Participants$Suggestions$Suggestarticles; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Conversations$Participants$Suggestions$Suggestarticles; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + '/v2/{+parent}/suggestions:suggestArticles' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Gets suggested faq answers for a participant based on specific historical messages. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.conversations.participants.suggestions.suggestFaqAnswers( + * { + * // Required. The name of the participant to fetch suggestion for. Format: `projects//locations//conversations//participants/`. + * parent: + * 'projects/my-project/locations/my-location/conversations/my-conversation/participants/my-participant', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "contextSize": 0, + * // "latestMessage": "my_latestMessage" + * // } + * }, + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "contextSize": 0, + * // "faqAnswers": [], + * // "latestMessage": "my_latestMessage" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + suggestFaqAnswers( + params: Params$Resource$Projects$Locations$Conversations$Participants$Suggestions$Suggestfaqanswers, + options: StreamMethodOptions + ): GaxiosPromise; + suggestFaqAnswers( + params?: Params$Resource$Projects$Locations$Conversations$Participants$Suggestions$Suggestfaqanswers, + options?: MethodOptions + ): GaxiosPromise; + suggestFaqAnswers( + params: Params$Resource$Projects$Locations$Conversations$Participants$Suggestions$Suggestfaqanswers, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + suggestFaqAnswers( + params: Params$Resource$Projects$Locations$Conversations$Participants$Suggestions$Suggestfaqanswers, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + suggestFaqAnswers( + params: Params$Resource$Projects$Locations$Conversations$Participants$Suggestions$Suggestfaqanswers, + callback: BodyResponseCallback + ): void; + suggestFaqAnswers( + callback: BodyResponseCallback + ): void; + suggestFaqAnswers( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Conversations$Participants$Suggestions$Suggestfaqanswers + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Conversations$Participants$Suggestions$Suggestfaqanswers; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Conversations$Participants$Suggestions$Suggestfaqanswers; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + '/v2/{+parent}/suggestions:suggestFaqAnswers' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + } + + export interface Params$Resource$Projects$Locations$Conversations$Participants$Suggestions$Suggestarticles + extends StandardParameters { + /** + * Required. The name of the participant to fetch suggestion for. Format: `projects//locations//conversations//participants/`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2SuggestArticlesRequest; + } + export interface Params$Resource$Projects$Locations$Conversations$Participants$Suggestions$Suggestfaqanswers + extends StandardParameters { + /** + * Required. The name of the participant to fetch suggestion for. Format: `projects//locations//conversations//participants/`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2SuggestFaqAnswersRequest; + } + + export class Resource$Projects$Locations$Knowledgebases { + context: APIRequestContext; + documents: Resource$Projects$Locations$Knowledgebases$Documents; + constructor(context: APIRequestContext) { + this.context = context; + this.documents = new Resource$Projects$Locations$Knowledgebases$Documents( + this.context + ); + } + + /** + * Creates a knowledge base. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.knowledgeBases.create({ + * // Required. The project to create a knowledge base for. Format: `projects//locations/`. + * parent: 'projects/my-project/locations/my-location', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "displayName": "my_displayName", + * // "languageCode": "my_languageCode", + * // "name": "my_name" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "displayName": "my_displayName", + * // "languageCode": "my_languageCode", + * // "name": "my_name" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + create( + params: Params$Resource$Projects$Locations$Knowledgebases$Create, + options: StreamMethodOptions + ): GaxiosPromise; + create( + params?: Params$Resource$Projects$Locations$Knowledgebases$Create, + options?: MethodOptions + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Locations$Knowledgebases$Create, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Locations$Knowledgebases$Create, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Locations$Knowledgebases$Create, + callback: BodyResponseCallback + ): void; + create( + callback: BodyResponseCallback + ): void; + create( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Knowledgebases$Create + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Knowledgebases$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Knowledgebases$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/knowledgeBases').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Deletes the specified knowledge base. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.knowledgeBases.delete({ + * // Optional. Force deletes the knowledge base. When set to true, any documents in the knowledge base are also deleted. + * force: 'placeholder-value', + * // Required. The name of the knowledge base to delete. Format: `projects//locations//knowledgeBases/`. + * name: + * 'projects/my-project/locations/my-location/knowledgeBases/my-knowledgeBase', + * }); + * console.log(res.data); + * + * // Example response + * // {} + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + delete( + params: Params$Resource$Projects$Locations$Knowledgebases$Delete, + options: StreamMethodOptions + ): GaxiosPromise; + delete( + params?: Params$Resource$Projects$Locations$Knowledgebases$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Locations$Knowledgebases$Delete, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Knowledgebases$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Knowledgebases$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Knowledgebases$Delete + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Knowledgebases$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Knowledgebases$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Retrieves the specified knowledge base. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.knowledgeBases.get({ + * // Required. The name of the knowledge base to retrieve. Format `projects//locations//knowledgeBases/`. + * name: + * 'projects/my-project/locations/my-location/knowledgeBases/my-knowledgeBase', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "displayName": "my_displayName", + * // "languageCode": "my_languageCode", + * // "name": "my_name" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Projects$Locations$Knowledgebases$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Projects$Locations$Knowledgebases$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Knowledgebases$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Knowledgebases$Get, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Knowledgebases$Get, + callback: BodyResponseCallback + ): void; + get( + callback: BodyResponseCallback + ): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Knowledgebases$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Knowledgebases$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Knowledgebases$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Returns the list of all knowledge bases of the specified agent. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.knowledgeBases.list({ + * // The maximum number of items to return in a single page. By default 10 and at most 100. + * pageSize: 'placeholder-value', + * // The next_page_token value returned from a previous list request. + * pageToken: 'placeholder-value', + * // Required. The project to list of knowledge bases for. Format: `projects//locations/`. + * parent: 'projects/my-project/locations/my-location', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "knowledgeBases": [], + * // "nextPageToken": "my_nextPageToken" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Projects$Locations$Knowledgebases$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Projects$Locations$Knowledgebases$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$Knowledgebases$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Knowledgebases$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Knowledgebases$List, + callback: BodyResponseCallback + ): void; + list( + callback: BodyResponseCallback + ): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Knowledgebases$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Knowledgebases$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Knowledgebases$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/knowledgeBases').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Updates the specified knowledge base. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.knowledgeBases.patch({ + * // The knowledge base resource name. The name must be empty when creating a knowledge base. Format: `projects//locations//knowledgeBases/`. + * name: + * 'projects/my-project/locations/my-location/knowledgeBases/my-knowledgeBase', + * // Optional. Not specified means `update all`. Currently, only `display_name` can be updated, an InvalidArgument will be returned for attempting to update other fields. + * updateMask: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "displayName": "my_displayName", + * // "languageCode": "my_languageCode", + * // "name": "my_name" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "displayName": "my_displayName", + * // "languageCode": "my_languageCode", + * // "name": "my_name" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + patch( + params: Params$Resource$Projects$Locations$Knowledgebases$Patch, + options: StreamMethodOptions + ): GaxiosPromise; + patch( + params?: Params$Resource$Projects$Locations$Knowledgebases$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Locations$Knowledgebases$Patch, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Locations$Knowledgebases$Patch, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Locations$Knowledgebases$Patch, + callback: BodyResponseCallback + ): void; + patch( + callback: BodyResponseCallback + ): void; + patch( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Knowledgebases$Patch + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Knowledgebases$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Knowledgebases$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + } + + export interface Params$Resource$Projects$Locations$Knowledgebases$Create + extends StandardParameters { + /** + * Required. The project to create a knowledge base for. Format: `projects//locations/`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2KnowledgeBase; + } + export interface Params$Resource$Projects$Locations$Knowledgebases$Delete + extends StandardParameters { + /** + * Optional. Force deletes the knowledge base. When set to true, any documents in the knowledge base are also deleted. + */ + force?: boolean; + /** + * Required. The name of the knowledge base to delete. Format: `projects//locations//knowledgeBases/`. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Knowledgebases$Get + extends StandardParameters { + /** + * Required. The name of the knowledge base to retrieve. Format `projects//locations//knowledgeBases/`. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Knowledgebases$List + extends StandardParameters { + /** + * The maximum number of items to return in a single page. By default 10 and at most 100. + */ + pageSize?: number; + /** + * The next_page_token value returned from a previous list request. + */ + pageToken?: string; + /** + * Required. The project to list of knowledge bases for. Format: `projects//locations/`. + */ + parent?: string; + } + export interface Params$Resource$Projects$Locations$Knowledgebases$Patch + extends StandardParameters { + /** + * The knowledge base resource name. The name must be empty when creating a knowledge base. Format: `projects//locations//knowledgeBases/`. + */ + name?: string; + /** + * Optional. Not specified means `update all`. Currently, only `display_name` can be updated, an InvalidArgument will be returned for attempting to update other fields. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2KnowledgeBase; + } + + export class Resource$Projects$Locations$Knowledgebases$Documents { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Creates a new document. Operation + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.knowledgeBases.documents.create( + * { + * // Required. The knowledge base to create a document for. Format: `projects//locations//knowledgeBases/`. + * parent: + * 'projects/my-project/locations/my-location/knowledgeBases/my-knowledgeBase', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "contentUri": "my_contentUri", + * // "displayName": "my_displayName", + * // "enableAutoReload": false, + * // "knowledgeTypes": [], + * // "latestReloadStatus": {}, + * // "metadata": {}, + * // "mimeType": "my_mimeType", + * // "name": "my_name", + * // "rawContent": "my_rawContent" + * // } + * }, + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + create( + params: Params$Resource$Projects$Locations$Knowledgebases$Documents$Create, + options: StreamMethodOptions + ): GaxiosPromise; + create( + params?: Params$Resource$Projects$Locations$Knowledgebases$Documents$Create, + options?: MethodOptions + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Locations$Knowledgebases$Documents$Create, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Locations$Knowledgebases$Documents$Create, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Locations$Knowledgebases$Documents$Create, + callback: BodyResponseCallback + ): void; + create( + callback: BodyResponseCallback + ): void; + create( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Knowledgebases$Documents$Create + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Knowledgebases$Documents$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Knowledgebases$Documents$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/documents').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Deletes the specified document. Operation + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.knowledgeBases.documents.delete( + * { + * // Required. The name of the document to delete. Format: `projects//locations//knowledgeBases//documents/`. + * name: + * 'projects/my-project/locations/my-location/knowledgeBases/my-knowledgeBase/documents/my-document', + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + delete( + params: Params$Resource$Projects$Locations$Knowledgebases$Documents$Delete, + options: StreamMethodOptions + ): GaxiosPromise; + delete( + params?: Params$Resource$Projects$Locations$Knowledgebases$Documents$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Locations$Knowledgebases$Documents$Delete, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; delete( - params: Params$Resource$Projects$Agent$Sessions$Entitytypes$Delete, - callback: BodyResponseCallback + params: Params$Resource$Projects$Locations$Knowledgebases$Documents$Delete, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Knowledgebases$Documents$Delete, + callback: BodyResponseCallback + ): void; + delete( + callback: BodyResponseCallback ): void; - delete(callback: BodyResponseCallback): void; delete( paramsOrCallback?: - | Params$Resource$Projects$Agent$Sessions$Entitytypes$Delete - | BodyResponseCallback + | Params$Resource$Projects$Locations$Knowledgebases$Documents$Delete + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Sessions$Entitytypes$Delete; + {}) as Params$Resource$Projects$Locations$Knowledgebases$Documents$Delete; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Sessions$Entitytypes$Delete; + params = {} as Params$Resource$Projects$Locations$Knowledgebases$Documents$Delete; options = {}; } @@ -13658,17 +35140,164 @@ export namespace dialogflow_v2 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Retrieves the specified document. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.knowledgeBases.documents.get({ + * // Required. The name of the document to retrieve. Format `projects//locations//knowledgeBases//documents/`. + * name: + * 'projects/my-project/locations/my-location/knowledgeBases/my-knowledgeBase/documents/my-document', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "contentUri": "my_contentUri", + * // "displayName": "my_displayName", + * // "enableAutoReload": false, + * // "knowledgeTypes": [], + * // "latestReloadStatus": {}, + * // "metadata": {}, + * // "mimeType": "my_mimeType", + * // "name": "my_name", + * // "rawContent": "my_rawContent" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Projects$Locations$Knowledgebases$Documents$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Projects$Locations$Knowledgebases$Documents$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Knowledgebases$Documents$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Knowledgebases$Documents$Get, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Knowledgebases$Documents$Get, + callback: BodyResponseCallback + ): void; + get( + callback: BodyResponseCallback + ): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Knowledgebases$Documents$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Knowledgebases$Documents$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Knowledgebases$Documents$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest( + parameters + ); } } /** - * Retrieves the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration. + * Returns the list of all documents of the knowledge base. * @example * ```js * // Before running the sample: @@ -13696,18 +35325,23 @@ export namespace dialogflow_v2 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.agent.sessions.entityTypes.get({ - * // Required. The name of the session entity type. Format: `projects//agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. - * name: - * 'projects/my-project/agent/sessions/my-session/entityTypes/my-entityType', - * }); + * const res = await dialogflow.projects.locations.knowledgeBases.documents.list( + * { + * // The maximum number of items to return in a single page. By default 10 and at most 100. + * pageSize: 'placeholder-value', + * // The next_page_token value returned from a previous list request. + * pageToken: 'placeholder-value', + * // Required. The knowledge base to list all documents for. Format: `projects//locations//knowledgeBases/`. + * parent: + * 'projects/my-project/locations/my-location/knowledgeBases/my-knowledgeBase', + * } + * ); * console.log(res.data); * * // Example response * // { - * // "entities": [], - * // "entityOverrideMode": "my_entityOverrideMode", - * // "name": "my_name" + * // "documents": [], + * // "nextPageToken": "my_nextPageToken" * // } * } * @@ -13723,57 +35357,57 @@ export namespace dialogflow_v2 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - get( - params: Params$Resource$Projects$Agent$Sessions$Entitytypes$Get, + list( + params: Params$Resource$Projects$Locations$Knowledgebases$Documents$List, options: StreamMethodOptions ): GaxiosPromise; - get( - params?: Params$Resource$Projects$Agent$Sessions$Entitytypes$Get, + list( + params?: Params$Resource$Projects$Locations$Knowledgebases$Documents$List, options?: MethodOptions - ): GaxiosPromise; - get( - params: Params$Resource$Projects$Agent$Sessions$Entitytypes$Get, + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$Knowledgebases$Documents$List, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - get( - params: Params$Resource$Projects$Agent$Sessions$Entitytypes$Get, + list( + params: Params$Resource$Projects$Locations$Knowledgebases$Documents$List, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - get( - params: Params$Resource$Projects$Agent$Sessions$Entitytypes$Get, - callback: BodyResponseCallback + list( + params: Params$Resource$Projects$Locations$Knowledgebases$Documents$List, + callback: BodyResponseCallback ): void; - get( - callback: BodyResponseCallback + list( + callback: BodyResponseCallback ): void; - get( + list( paramsOrCallback?: - | Params$Resource$Projects$Agent$Sessions$Entitytypes$Get - | BodyResponseCallback + | Params$Resource$Projects$Locations$Knowledgebases$Documents$List + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Sessions$Entitytypes$Get; + {}) as Params$Resource$Projects$Locations$Knowledgebases$Documents$List; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Sessions$Entitytypes$Get; + params = {} as Params$Resource$Projects$Locations$Knowledgebases$Documents$List; options = {}; } @@ -13786,30 +35420,33 @@ export namespace dialogflow_v2 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + url: (rootUrl + '/v2/{+parent}/documents').replace( + /([^:]\/)\/+/g, + '$1' + ), method: 'GET', }, options ), params, - requiredParams: ['name'], - pathParams: ['name'], + requiredParams: ['parent'], + pathParams: ['parent'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest( + return createAPIRequest( parameters ); } } /** - * Returns the list of all session entity types in the specified session. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration. + * Updates the specified document. Operation * @example * ```js * // Before running the sample: @@ -13837,20 +35474,40 @@ export namespace dialogflow_v2 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.agent.sessions.entityTypes.list({ - * // Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. - * pageSize: 'placeholder-value', - * // Optional. The next_page_token value returned from a previous list request. - * pageToken: 'placeholder-value', - * // Required. The session to list all session entity types from. Format: `projects//agent/sessions/` or `projects//agent/environments//users// sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. - * parent: 'projects/my-project/agent/sessions/my-session', - * }); + * const res = await dialogflow.projects.locations.knowledgeBases.documents.patch( + * { + * // Optional. The document resource name. The name must be empty when creating a document. Format: `projects//locations//knowledgeBases//documents/`. + * name: + * 'projects/my-project/locations/my-location/knowledgeBases/my-knowledgeBase/documents/my-document', + * // Optional. Not specified means `update all`. Currently, only `display_name` can be updated, an InvalidArgument will be returned for attempting to update other fields. + * updateMask: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "contentUri": "my_contentUri", + * // "displayName": "my_displayName", + * // "enableAutoReload": false, + * // "knowledgeTypes": [], + * // "latestReloadStatus": {}, + * // "metadata": {}, + * // "mimeType": "my_mimeType", + * // "name": "my_name", + * // "rawContent": "my_rawContent" + * // } + * }, + * } + * ); * console.log(res.data); * * // Example response * // { - * // "nextPageToken": "my_nextPageToken", - * // "sessionEntityTypes": [] + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} * // } * } * @@ -13866,57 +35523,57 @@ export namespace dialogflow_v2 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - list( - params: Params$Resource$Projects$Agent$Sessions$Entitytypes$List, + patch( + params: Params$Resource$Projects$Locations$Knowledgebases$Documents$Patch, options: StreamMethodOptions ): GaxiosPromise; - list( - params?: Params$Resource$Projects$Agent$Sessions$Entitytypes$List, + patch( + params?: Params$Resource$Projects$Locations$Knowledgebases$Documents$Patch, options?: MethodOptions - ): GaxiosPromise; - list( - params: Params$Resource$Projects$Agent$Sessions$Entitytypes$List, + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Locations$Knowledgebases$Documents$Patch, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Projects$Agent$Sessions$Entitytypes$List, + patch( + params: Params$Resource$Projects$Locations$Knowledgebases$Documents$Patch, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Projects$Agent$Sessions$Entitytypes$List, - callback: BodyResponseCallback + patch( + params: Params$Resource$Projects$Locations$Knowledgebases$Documents$Patch, + callback: BodyResponseCallback ): void; - list( - callback: BodyResponseCallback + patch( + callback: BodyResponseCallback ): void; - list( + patch( paramsOrCallback?: - | Params$Resource$Projects$Agent$Sessions$Entitytypes$List - | BodyResponseCallback + | Params$Resource$Projects$Locations$Knowledgebases$Documents$Patch + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Sessions$Entitytypes$List; + {}) as Params$Resource$Projects$Locations$Knowledgebases$Documents$Patch; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Sessions$Entitytypes$List; + params = {} as Params$Resource$Projects$Locations$Knowledgebases$Documents$Patch; options = {}; } @@ -13929,33 +35586,28 @@ export namespace dialogflow_v2 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2/{+parent}/entityTypes').replace( - /([^:]\/)\/+/g, - '$1' - ), - method: 'GET', + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', }, options ), params, - requiredParams: ['parent'], - pathParams: ['parent'], + requiredParams: ['name'], + pathParams: ['name'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest( - parameters - ); + return createAPIRequest(parameters); } } /** - * Updates the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration. + * Reloads the specified document from its specified source, content_uri or content. The previously loaded content of the document will be deleted. Note: Even when the content of the document has not changed, there still may be side effects because of internal implementation changes. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`. Operation * @example * ```js * // Before running the sample: @@ -13983,30 +35635,30 @@ export namespace dialogflow_v2 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.agent.sessions.entityTypes.patch({ - * // Required. The unique identifier of this session entity type. Format: `projects//agent/sessions//entityTypes/`, or `projects//agent/environments//users//sessions//entityTypes/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. `` must be the display name of an existing entity type in the same agent that will be overridden or supplemented. - * name: - * 'projects/my-project/agent/sessions/my-session/entityTypes/my-entityType', - * // Optional. The mask to control which fields get updated. - * updateMask: 'placeholder-value', + * const res = await dialogflow.projects.locations.knowledgeBases.documents.reload( + * { + * // Required. The name of the document to reload. Format: `projects//locations//knowledgeBases//documents/` + * name: + * 'projects/my-project/locations/my-location/knowledgeBases/my-knowledgeBase/documents/my-document', * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "entities": [], - * // "entityOverrideMode": "my_entityOverrideMode", - * // "name": "my_name" - * // } - * }, - * }); + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "contentUri": "my_contentUri" + * // } + * }, + * } + * ); * console.log(res.data); * * // Example response * // { - * // "entities": [], - * // "entityOverrideMode": "my_entityOverrideMode", - * // "name": "my_name" + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} * // } * } * @@ -14022,57 +35674,57 @@ export namespace dialogflow_v2 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - patch( - params: Params$Resource$Projects$Agent$Sessions$Entitytypes$Patch, + reload( + params: Params$Resource$Projects$Locations$Knowledgebases$Documents$Reload, options: StreamMethodOptions ): GaxiosPromise; - patch( - params?: Params$Resource$Projects$Agent$Sessions$Entitytypes$Patch, + reload( + params?: Params$Resource$Projects$Locations$Knowledgebases$Documents$Reload, options?: MethodOptions - ): GaxiosPromise; - patch( - params: Params$Resource$Projects$Agent$Sessions$Entitytypes$Patch, + ): GaxiosPromise; + reload( + params: Params$Resource$Projects$Locations$Knowledgebases$Documents$Reload, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - patch( - params: Params$Resource$Projects$Agent$Sessions$Entitytypes$Patch, + reload( + params: Params$Resource$Projects$Locations$Knowledgebases$Documents$Reload, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - patch( - params: Params$Resource$Projects$Agent$Sessions$Entitytypes$Patch, - callback: BodyResponseCallback + reload( + params: Params$Resource$Projects$Locations$Knowledgebases$Documents$Reload, + callback: BodyResponseCallback ): void; - patch( - callback: BodyResponseCallback + reload( + callback: BodyResponseCallback ): void; - patch( + reload( paramsOrCallback?: - | Params$Resource$Projects$Agent$Sessions$Entitytypes$Patch - | BodyResponseCallback + | Params$Resource$Projects$Locations$Knowledgebases$Documents$Reload + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Agent$Sessions$Entitytypes$Patch; + {}) as Params$Resource$Projects$Locations$Knowledgebases$Documents$Reload; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Agent$Sessions$Entitytypes$Patch; + params = {} as Params$Resource$Projects$Locations$Knowledgebases$Documents$Reload; options = {}; } @@ -14085,8 +35737,8 @@ export namespace dialogflow_v2 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), - method: 'PATCH', + url: (rootUrl + '/v2/{+name}:reload').replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', }, options ), @@ -14096,85 +35748,84 @@ export namespace dialogflow_v2 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest( - parameters - ); + return createAPIRequest(parameters); } } } - export interface Params$Resource$Projects$Agent$Sessions$Entitytypes$Create + export interface Params$Resource$Projects$Locations$Knowledgebases$Documents$Create extends StandardParameters { /** - * Required. The session to create a session entity type for. Format: `projects//agent/sessions/` or `projects//agent/environments//users// sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * Required. The knowledge base to create a document for. Format: `projects//locations//knowledgeBases/`. */ parent?: string; /** * Request body metadata */ - requestBody?: Schema$GoogleCloudDialogflowV2SessionEntityType; + requestBody?: Schema$GoogleCloudDialogflowV2Document; } - export interface Params$Resource$Projects$Agent$Sessions$Entitytypes$Delete + export interface Params$Resource$Projects$Locations$Knowledgebases$Documents$Delete extends StandardParameters { /** - * Required. The name of the entity type to delete. Format: `projects//agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * Required. The name of the document to delete. Format: `projects//locations//knowledgeBases//documents/`. */ name?: string; } - export interface Params$Resource$Projects$Agent$Sessions$Entitytypes$Get + export interface Params$Resource$Projects$Locations$Knowledgebases$Documents$Get extends StandardParameters { /** - * Required. The name of the session entity type. Format: `projects//agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * Required. The name of the document to retrieve. Format `projects//locations//knowledgeBases//documents/`. */ name?: string; } - export interface Params$Resource$Projects$Agent$Sessions$Entitytypes$List + export interface Params$Resource$Projects$Locations$Knowledgebases$Documents$List extends StandardParameters { /** - * Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. + * The maximum number of items to return in a single page. By default 10 and at most 100. */ pageSize?: number; /** - * Optional. The next_page_token value returned from a previous list request. + * The next_page_token value returned from a previous list request. */ pageToken?: string; /** - * Required. The session to list all session entity types from. Format: `projects//agent/sessions/` or `projects//agent/environments//users// sessions/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * Required. The knowledge base to list all documents for. Format: `projects//locations//knowledgeBases/`. */ parent?: string; } - export interface Params$Resource$Projects$Agent$Sessions$Entitytypes$Patch + export interface Params$Resource$Projects$Locations$Knowledgebases$Documents$Patch extends StandardParameters { /** - * Required. The unique identifier of this session entity type. Format: `projects//agent/sessions//entityTypes/`, or `projects//agent/environments//users//sessions//entityTypes/`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. `` must be the display name of an existing entity type in the same agent that will be overridden or supplemented. + * Optional. The document resource name. The name must be empty when creating a document. Format: `projects//locations//knowledgeBases//documents/`. */ name?: string; /** - * Optional. The mask to control which fields get updated. + * Optional. Not specified means `update all`. Currently, only `display_name` can be updated, an InvalidArgument will be returned for attempting to update other fields. */ updateMask?: string; /** * Request body metadata */ - requestBody?: Schema$GoogleCloudDialogflowV2SessionEntityType; + requestBody?: Schema$GoogleCloudDialogflowV2Document; } + export interface Params$Resource$Projects$Locations$Knowledgebases$Documents$Reload + extends StandardParameters { + /** + * Required. The name of the document to reload. Format: `projects//locations//knowledgeBases//documents/` + */ + name?: string; - export class Resource$Projects$Locations { - context: APIRequestContext; - operations: Resource$Projects$Locations$Operations; - constructor(context: APIRequestContext) { - this.context = context; - this.operations = new Resource$Projects$Locations$Operations( - this.context - ); - } + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2ReloadDocumentRequest; } export class Resource$Projects$Locations$Operations { diff --git a/src/apis/dialogflow/v2beta1.ts b/src/apis/dialogflow/v2beta1.ts index 473bb2c1424..96f411d97c4 100644 --- a/src/apis/dialogflow/v2beta1.ts +++ b/src/apis/dialogflow/v2beta1.ts @@ -1095,7 +1095,7 @@ export namespace dialogflow_v2beta1 { genericMetadata?: Schema$GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata; } /** - * The request message for a webhook call. + * The request message for a webhook call. The request is sent as a JSON object and the field names will be presented in camel cases. */ export interface Schema$GoogleCloudDialogflowCxV3beta1WebhookRequest { /** @@ -2141,7 +2141,7 @@ export namespace dialogflow_v2beta1 { genericMetadata?: Schema$GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata; } /** - * The request message for a webhook call. + * The request message for a webhook call. The request is sent as a JSON object and the field names will be presented in camel cases. */ export interface Schema$GoogleCloudDialogflowCxV3WebhookRequest { /** @@ -2296,6 +2296,35 @@ export namespace dialogflow_v2beta1 { */ text?: string | null; } + /** + * Represents article answer. + */ + export interface Schema$GoogleCloudDialogflowV2ArticleAnswer { + /** + * The name of answer record, in the format of "projects//locations//answerRecords/" + */ + answerRecord?: string | null; + /** + * Article match confidence. The system's confidence score that this article is a good match for this conversation, as a value from 0.0 (completely uncertain) to 1.0 (completely certain). + */ + confidence?: number | null; + /** + * A map that contains metadata about the answer and the document from which it originates. + */ + metadata?: {[key: string]: string} | null; + /** + * Article snippets. + */ + snippets?: string[] | null; + /** + * The article title. + */ + title?: string | null; + /** + * The article URI. + */ + uri?: string | null; + } /** * The response message for EntityTypes.BatchUpdateEntityTypes. */ @@ -2367,6 +2396,241 @@ export namespace dialogflow_v2beta1 { */ timeZone?: string | null; } + /** + * Detail feedback of Agent Assistant result. + */ + export interface Schema$GoogleCloudDialogflowV2beta1AgentAssistantFeedback { + /** + * Optional. Whether or not the suggested answer is relevant. For example: * Query: "Can I change my mailing address?" * Suggested document says: "Items must be returned/exchanged within 60 days of the purchase date." * answer_relevance: AnswerRelevance.IRRELEVANT + */ + answerRelevance?: string | null; + /** + * Optional. Whether or not the information in the document is correct. For example: * Query: "Can I return the package in 2 days once received?" * Suggested document says: "Items must be returned/exchanged within 60 days of the purchase date." * Ground truth: "No return or exchange is allowed." * [document_correctness]: INCORRECT + */ + documentCorrectness?: string | null; + /** + * Optional. Whether or not the suggested document is efficient. For example, if the document is poorly written, hard to understand, hard to use or too long to find useful information, document_efficiency is DocumentEfficiency.INEFFICIENT. + */ + documentEfficiency?: string | null; + /** + * Feedback for conversation summarization. + */ + summarizationFeedback?: Schema$GoogleCloudDialogflowV2beta1AgentAssistantFeedbackSummarizationFeedback; + } + /** + * Feedback for conversation summarization. + */ + export interface Schema$GoogleCloudDialogflowV2beta1AgentAssistantFeedbackSummarizationFeedback { + /** + * Timestamp when composing of the summary starts. + */ + startTimestamp?: string | null; + /** + * Timestamp when the summary was submitted. + */ + submitTimestamp?: string | null; + /** + * Text of actual submitted summary. + */ + summaryText?: string | null; + } + /** + * Represents a record of a human agent assistant answer. + */ + export interface Schema$GoogleCloudDialogflowV2beta1AgentAssistantRecord { + /** + * Output only. The article suggestion answer. + */ + articleSuggestionAnswer?: Schema$GoogleCloudDialogflowV2beta1ArticleAnswer; + /** + * Output only. The FAQ answer. + */ + faqAnswer?: Schema$GoogleCloudDialogflowV2beta1FaqAnswer; + } + /** + * The request message for Participants.AnalyzeContent. + */ + export interface Schema$GoogleCloudDialogflowV2beta1AnalyzeContentRequest { + /** + * An input event to send to Dialogflow. + */ + eventInput?: Schema$GoogleCloudDialogflowV2beta1EventInput; + /** + * Optional. The send time of the message from end user or human agent's perspective. It is used for identifying the same message under one participant. Given two messages under the same participant: - If send time are different regardless of whether the content of the messages are exactly the same, the conversation will regard them as two distinct messages sent by the participant. - If send time is the same regardless of whether the content of the messages are exactly the same, the conversation will regard them as same message, and ignore the message received later. If the value is not provided, a new request will always be regarded as a new message without any de-duplication. + */ + messageSendTime?: string | null; + /** + * Parameters for a Dialogflow virtual-agent query. + */ + queryParams?: Schema$GoogleCloudDialogflowV2beta1QueryParameters; + /** + * Speech synthesis configuration. The speech synthesis settings for a virtual agent that may be configured for the associated conversation profile are not used when calling AnalyzeContent. If this configuration is not supplied, speech synthesis is disabled. + */ + replyAudioConfig?: Schema$GoogleCloudDialogflowV2beta1OutputAudioConfig; + /** + * A unique identifier for this request. Restricted to 36 ASCII characters. A random UUID is recommended. This request is only idempotent if a `request_id` is provided. + */ + requestId?: string | null; + /** + * The natural language text to be processed. + */ + textInput?: Schema$GoogleCloudDialogflowV2beta1TextInput; + } + /** + * The response message for Participants.AnalyzeContent. + */ + export interface Schema$GoogleCloudDialogflowV2beta1AnalyzeContentResponse { + /** + * Optional. Only set if a Dialogflow automated agent has responded. Note that: AutomatedAgentReply.detect_intent_response.output_audio and AutomatedAgentReply.detect_intent_response.output_audio_config are always empty, use reply_audio instead. + */ + automatedAgentReply?: Schema$GoogleCloudDialogflowV2beta1AutomatedAgentReply; + /** + * Indicates the parameters of DTMF. + */ + dtmfParameters?: Schema$GoogleCloudDialogflowV2beta1DtmfParameters; + /** + * The suggestions for end user. The order is the same as HumanAgentAssistantConfig.SuggestionConfig.feature_configs of HumanAgentAssistantConfig.end_user_suggestion_config. + */ + endUserSuggestionResults?: Schema$GoogleCloudDialogflowV2beta1SuggestionResult[]; + /** + * The suggestions for most recent human agent. The order is the same as HumanAgentAssistantConfig.SuggestionConfig.feature_configs of HumanAgentAssistantConfig.human_agent_suggestion_config. + */ + humanAgentSuggestionResults?: Schema$GoogleCloudDialogflowV2beta1SuggestionResult[]; + /** + * Output only. Message analyzed by CCAI. + */ + message?: Schema$GoogleCloudDialogflowV2beta1Message; + /** + * Optional. The audio data bytes encoded as specified in the request. This field is set if: - `reply_audio_config` was specified in the request, or - The automated agent responded with audio to play to the user. In such case, `reply_audio.config` contains settings used to synthesize the speech. In some scenarios, multiple output audio fields may be present in the response structure. In these cases, only the top-most-level audio output has content. + */ + replyAudio?: Schema$GoogleCloudDialogflowV2beta1OutputAudio; + /** + * Output only. The output text content. This field is set if the automated agent responded with text to show to the user. + */ + replyText?: string | null; + } + /** + * Represents a part of a message possibly annotated with an entity. The part can be an entity or purely a part of the message between two entities or message start/end. + */ + export interface Schema$GoogleCloudDialogflowV2beta1AnnotatedMessagePart { + /** + * Optional. The [Dialogflow system entity type](https://cloud.google.com/dialogflow/docs/reference/system-entities) of this message part. If this is empty, Dialogflow could not annotate the phrase part with a system entity. + */ + entityType?: string | null; + /** + * Optional. The [Dialogflow system entity formatted value ](https://cloud.google.com/dialogflow/docs/reference/system-entities) of this message part. For example for a system entity of type `@sys.unit-currency`, this may contain: { "amount": 5, "currency": "USD" \} + */ + formattedValue?: any | null; + /** + * Required. A part of a message possibly annotated with an entity. + */ + text?: string | null; + } + /** + * Represents feedback the customer has about the quality & correctness of a certain answer in a conversation. + */ + export interface Schema$GoogleCloudDialogflowV2beta1AnswerFeedback { + /** + * Optional. Detail feedback of agent assistant suggestions. + */ + agentAssistantDetailFeedback?: Schema$GoogleCloudDialogflowV2beta1AgentAssistantFeedback; + /** + * Indicates whether the answer/item was clicked by the human agent or not. Default to false. + */ + clicked?: boolean | null; + /** + * Time when the answer/item was clicked. + */ + clickTime?: string | null; + /** + * The correctness level of the specific answer. + */ + correctnessLevel?: string | null; + /** + * Indicates whether the answer/item was displayed to the human agent in the agent desktop UI. Default to false. + */ + displayed?: boolean | null; + /** + * Time when the answer/item was displayed. + */ + displayTime?: string | null; + } + /** + * Answer records are records to manage answer history and feedbacks for Dialogflow. Currently, answer record includes: - human agent assistant article suggestion - human agent assistant faq article It doesn't include: - `DetectIntent` intent matching - `DetectIntent` knowledge Answer records are not related to the conversation history in the Dialogflow Console. A Record is generated even when the end-user disables conversation history in the console. Records are created when there's a human agent assistant suggestion generated. A typical workflow for customers provide feedback to an answer is: 1. For human agent assistant, customers get suggestion via ListSuggestions API. Together with the answers, AnswerRecord.name are returned to the customers. 2. The customer uses the AnswerRecord.name to call the UpdateAnswerRecord method to send feedback about a specific answer that they believe is wrong. + */ + export interface Schema$GoogleCloudDialogflowV2beta1AnswerRecord { + /** + * Output only. The record for human agent assistant. + */ + agentAssistantRecord?: Schema$GoogleCloudDialogflowV2beta1AgentAssistantRecord; + /** + * Optional. The AnswerFeedback for this record. You can set this with AnswerRecords.UpdateAnswerRecord in order to give us feedback about this answer. + */ + answerFeedback?: Schema$GoogleCloudDialogflowV2beta1AnswerFeedback; + /** + * The unique identifier of this answer record. Required for AnswerRecords.UpdateAnswerRecord method. Format: `projects//locations//answerRecords/`. + */ + name?: string | null; + } + /** + * Represents article answer. + */ + export interface Schema$GoogleCloudDialogflowV2beta1ArticleAnswer { + /** + * The name of answer record, in the format of "projects//locations//answerRecords/" + */ + answerRecord?: string | null; + /** + * A map that contains metadata about the answer and the document from which it originates. + */ + metadata?: {[key: string]: string} | null; + /** + * Output only. Article snippets. + */ + snippets?: string[] | null; + /** + * The article title. + */ + title?: string | null; + /** + * The article URI. + */ + uri?: string | null; + } + /** + * Defines the Automated Agent to connect to a conversation. + */ + export interface Schema$GoogleCloudDialogflowV2beta1AutomatedAgentConfig { + /** + * Required. ID of the Dialogflow agent environment to use. This project needs to either be the same project as the conversation or you need to grant `service-@gcp-sa-dialogflow.iam.gserviceaccount.com` the `Dialogflow API Service Agent` role in this project. - For ES agents, use format: `projects//locations//agent/environments/`. If environment is not specified, the default `draft` environment is used. Refer to [DetectIntentRequest](/dialogflow/docs/reference/rpc/google.cloud.dialogflow.v2beta1#google.cloud.dialogflow.v2beta1.DetectIntentRequest) for more details. - For CX agents, use format `projects//locations//agents//environments/`. If environment is not specified, the default `draft` environment is used. + */ + agent?: string | null; + } + /** + * Represents a response from an automated agent. + */ + export interface Schema$GoogleCloudDialogflowV2beta1AutomatedAgentReply { + /** + * The collection of current Dialogflow CX agent session parameters at the time of this response. + */ + cxSessionParameters?: {[key: string]: any} | null; + /** + * Response of the Dialogflow Sessions.DetectIntent call. + */ + detectIntentResponse?: Schema$GoogleCloudDialogflowV2beta1DetectIntentResponse; + /** + * Event name if an event is triggered for the query. + */ + event?: string | null; + /** + * Name of the intent if an intent is matched for the query. For a V2 query, the value format is `projects//locations/ /agent/intents/`. For a V3 query, the value format is `projects//locations/ /agents//intents/`. + */ + intent?: string | null; + /** + * Response messages from the automated agent. + */ + responseMessages?: Schema$GoogleCloudDialogflowV2beta1ResponseMessage[]; + } /** * The request message for EntityTypes.BatchCreateEntities. */ @@ -2380,6 +2644,24 @@ export namespace dialogflow_v2beta1 { */ languageCode?: string | null; } + /** + * The request message for Conversations.BatchCreateMessagesRequest. + */ + export interface Schema$GoogleCloudDialogflowV2beta1BatchCreateMessagesRequest { + /** + * Required. A maximum of 1000 Messages can be created in a batch. CreateMessageRequest.message.send_time is required. All created messages will have identical Message.create_time. + */ + requests?: Schema$GoogleCloudDialogflowV2beta1CreateMessageRequest[]; + } + /** + * The request message for Conversations.BatchCreateMessagesResponse. + */ + export interface Schema$GoogleCloudDialogflowV2beta1BatchCreateMessagesResponse { + /** + * Messages created. + */ + messages?: Schema$GoogleCloudDialogflowV2beta1Message[]; + } /** * The request message for EntityTypes.BatchDeleteEntities. */ @@ -2492,6 +2774,40 @@ export namespace dialogflow_v2beta1 { */ intents?: Schema$GoogleCloudDialogflowV2beta1Intent[]; } + /** + * The request message for Participants.CompileSuggestion. + */ + export interface Schema$GoogleCloudDialogflowV2beta1CompileSuggestionRequest { + /** + * Optional. Max number of messages prior to and including [latest_message] to use as context when compiling the suggestion. If zero or less than zero, 20 is used. + */ + contextSize?: number | null; + /** + * Optional. The name of the latest conversation message to compile suggestion for. If empty, it will be the latest message of the conversation. Format: `projects//locations//conversations//messages/`. + */ + latestMessage?: string | null; + } + /** + * The response message for Participants.CompileSuggestion. + */ + export interface Schema$GoogleCloudDialogflowV2beta1CompileSuggestionResponse { + /** + * Number of messages prior to and including latest_message to compile the suggestion. It may be smaller than the CompileSuggestionRequest.context_size field in the request if there aren't that many messages in the conversation. + */ + contextSize?: number | null; + /** + * The name of the latest conversation message used to compile suggestion for. Format: `projects//locations//conversations//messages/`. + */ + latestMessage?: string | null; + /** + * The compiled suggestion. + */ + suggestion?: Schema$GoogleCloudDialogflowV2beta1Suggestion; + } + /** + * The request message for Conversations.CompleteConversation. + */ + export interface Schema$GoogleCloudDialogflowV2beta1CompleteConversationRequest {} /** * Dialogflow contexts are similar to natural language context. If a person says to you "they are orange", you need context in order to understand what "they" is referring to. Similarly, for Dialogflow to handle an end-user expression like that, it needs to be provided with context in order to correctly match an intent. Using contexts, you can control the flow of a conversation. You can configure contexts for an intent by setting input and output contexts, which are identified by string names. When an intent is matched, any configured output contexts for that intent become active. While any contexts are active, Dialogflow is more likely to match intents that are configured with input contexts that correspond to the currently active contexts. For more information about context, see the [Contexts guide](https://cloud.google.com/dialogflow/docs/contexts-overview). */ @@ -2510,113 +2826,251 @@ export namespace dialogflow_v2beta1 { parameters?: {[key: string]: any} | null; } /** - * The request to detect user's intent. + * Represents a conversation. A conversation is an interaction between an agent, including live agents and Dialogflow agents, and a support customer. Conversations can include phone calls and text-based chat sessions. */ - export interface Schema$GoogleCloudDialogflowV2beta1DetectIntentRequest { + export interface Schema$GoogleCloudDialogflowV2beta1Conversation { /** - * The natural language speech audio to be processed. This field should be populated iff `query_input` is set to an input audio config. A single request can contain up to 1 minute of speech audio data. + * Required. The Conversation Profile to be used to configure this Conversation. This field cannot be updated. Format: `projects//locations//conversationProfiles/`. */ - inputAudio?: string | null; + conversationProfile?: string | null; /** - * Instructs the speech synthesizer how to generate the output audio. If this field is not set and agent-level speech synthesizer is not configured, no output audio is generated. + * The stage of a conversation. It indicates whether the virtual agent or a human agent is handling the conversation. If the conversation is created with the conversation profile that has Dialogflow config set, defaults to ConversationStage.VIRTUAL_AGENT_STAGE; Otherwise, defaults to ConversationStage.HUMAN_ASSIST_STAGE. If the conversation is created with the conversation profile that has Dialogflow config set but explicitly sets conversation_stage to ConversationStage.HUMAN_ASSIST_STAGE, it skips ConversationStage.VIRTUAL_AGENT_STAGE stage and directly goes to ConversationStage.HUMAN_ASSIST_STAGE. */ - outputAudioConfig?: Schema$GoogleCloudDialogflowV2beta1OutputAudioConfig; + conversationStage?: string | null; /** - * Mask for output_audio_config indicating which settings in this request-level config should override speech synthesizer settings defined at agent-level. If unspecified or empty, output_audio_config replaces the agent-level config in its entirety. + * Output only. The time the conversation was finished. */ - outputAudioConfigMask?: string | null; + endTime?: string | null; /** - * Required. The input specification. It can be set to: 1. an audio config which instructs the speech recognizer how to process the speech audio, 2. a conversational query in the form of text, or 3. an event that specifies which intent to trigger. + * Output only. The current state of the Conversation. */ - queryInput?: Schema$GoogleCloudDialogflowV2beta1QueryInput; + lifecycleState?: string | null; /** - * The parameters of this query. + * Output only. The unique identifier of this conversation. Format: `projects//locations//conversations/`. */ - queryParams?: Schema$GoogleCloudDialogflowV2beta1QueryParameters; + name?: string | null; + /** + * Output only. Required if the conversation is to be connected over telephony. + */ + phoneNumber?: Schema$GoogleCloudDialogflowV2beta1ConversationPhoneNumber; + /** + * Output only. The time the conversation was started. + */ + startTime?: string | null; } /** - * The message returned from the DetectIntent method. + * Represents a notification sent to Pub/Sub subscribers for conversation lifecycle events. */ - export interface Schema$GoogleCloudDialogflowV2beta1DetectIntentResponse { - /** - * If Knowledge Connectors are enabled, there could be more than one result returned for a given query or event, and this field will contain all results except for the top one, which is captured in query_result. The alternative results are ordered by decreasing `QueryResult.intent_detection_confidence`. If Knowledge Connectors are disabled, this field will be empty until multiple responses for regular intents are supported, at which point those additional results will be surfaced here. - */ - alternativeQueryResults?: Schema$GoogleCloudDialogflowV2beta1QueryResult[]; + export interface Schema$GoogleCloudDialogflowV2beta1ConversationEvent { /** - * The audio data bytes encoded as specified in the request. Note: The output audio is generated based on the values of default platform text responses found in the `query_result.fulfillment_messages` field. If multiple default text responses exist, they will be concatenated when generating audio. If no default platform text responses exist, the generated audio content will be empty. In some scenarios, multiple output audio fields may be present in the response structure. In these cases, only the top-most-level audio output has content. + * Required. The unique identifier of the conversation this notification refers to. Format: `projects//conversations/`. */ - outputAudio?: string | null; + conversation?: string | null; /** - * The config used by the speech synthesizer to generate the output audio. + * Optional. More detailed information about an error. Only set for type UNRECOVERABLE_ERROR_IN_PHONE_CALL. */ - outputAudioConfig?: Schema$GoogleCloudDialogflowV2beta1OutputAudioConfig; + errorStatus?: Schema$GoogleRpcStatus; /** - * The selected results of the conversational query or event processing. See `alternative_query_results` for additional potential results. + * Payload of NEW_MESSAGE event. */ - queryResult?: Schema$GoogleCloudDialogflowV2beta1QueryResult; + newMessagePayload?: Schema$GoogleCloudDialogflowV2beta1Message; /** - * The unique identifier of the response. It can be used to locate a response in the training example set or for reporting issues. + * Required. The type of the event that this notification refers to. */ - responseId?: string | null; + type?: string | null; + } + /** + * Represents a phone number for telephony integration. It allows for connecting a particular conversation over telephony. + */ + export interface Schema$GoogleCloudDialogflowV2beta1ConversationPhoneNumber { /** - * Specifies the status of the webhook request. + * Output only. The phone number to connect to this conversation. */ - webhookStatus?: Schema$GoogleRpcStatus; + phoneNumber?: string | null; } /** - * A knowledge document to be used by a KnowledgeBase. For more information, see the [knowledge base guide](https://cloud.google.com/dialogflow/docs/how/knowledge-bases). Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`. + * Defines the services to connect to incoming Dialogflow conversations. */ - export interface Schema$GoogleCloudDialogflowV2beta1Document { + export interface Schema$GoogleCloudDialogflowV2beta1ConversationProfile { /** - * The raw content of the document. This field is only permitted for EXTRACTIVE_QA and FAQ knowledge types. Note: This field is in the process of being deprecated, please use raw_content instead. + * Configuration for an automated agent to use with this profile. */ - content?: string | null; + automatedAgentConfig?: Schema$GoogleCloudDialogflowV2beta1AutomatedAgentConfig; /** - * The URI where the file content is located. For documents stored in Google Cloud Storage, these URIs must have the form `gs:///`. NOTE: External URLs must correspond to public webpages, i.e., they must be indexed by Google Search. In particular, URLs for showing documents in Google Cloud Storage (i.e. the URL in your browser) are not supported. Instead use the `gs://` format URI described above. + * Output only. Create time of the conversation profile. */ - contentUri?: string | null; + createTime?: string | null; /** - * Required. The display name of the document. The name must be 1024 bytes or less; otherwise, the creation request fails. + * Required. Human readable name for this profile. Max length 1024 bytes. */ displayName?: string | null; /** - * Optional. If true, we try to automatically reload the document every day (at a time picked by the system). If false or unspecified, we don't try to automatically reload the document. Currently you can only enable automatic reload for documents sourced from a public url, see `source` field for the source types. Reload status can be tracked in `latest_reload_status`. If a reload fails, we will keep the document unchanged. If a reload fails with internal errors, the system will try to reload the document on the next day. If a reload fails with non-retriable errors (e.g. PERMISION_DENIED), the system will not try to reload the document anymore. You need to manually reload the document successfully by calling `ReloadDocument` and clear the errors. + * Configuration for agent assistance to use with this profile. */ - enableAutoReload?: boolean | null; + humanAgentAssistantConfig?: Schema$GoogleCloudDialogflowV2beta1HumanAgentAssistantConfig; /** - * Required. The knowledge type of document content. + * Language code for the conversation profile. If not specified, the language is en-US. Language at ConversationProfile should be set for all non en-us languages. */ - knowledgeTypes?: string[] | null; + languageCode?: string | null; /** - * Output only. The time and status of the latest reload. This reload may have been triggered automatically or manually and may not have succeeded. + * Configuration for logging conversation lifecycle events. */ - latestReloadStatus?: Schema$GoogleCloudDialogflowV2beta1DocumentReloadStatus; + loggingConfig?: Schema$GoogleCloudDialogflowV2beta1LoggingConfig; /** - * Required. The MIME type of this document. + * The unique identifier of this conversation profile. Format: `projects//locations//conversationProfiles/`. */ - mimeType?: string | null; + name?: string | null; /** - * Optional. The document resource name. The name must be empty when creating a document. Format: `projects//locations//knowledgeBases//documents/`. + * Configuration for publishing new message events. Event will be sent in format of ConversationEvent */ - name?: string | null; + newMessageEventNotificationConfig?: Schema$GoogleCloudDialogflowV2beta1NotificationConfig; /** - * The raw content of the document. This field is only permitted for EXTRACTIVE_QA and FAQ knowledge types. + * Configuration for publishing conversation lifecycle events. */ - rawContent?: string | null; + notificationConfig?: Schema$GoogleCloudDialogflowV2beta1NotificationConfig; + /** + * Settings for speech transcription. + */ + sttConfig?: Schema$GoogleCloudDialogflowV2beta1SpeechToTextConfig; + /** + * Output only. Update time of the conversation profile. + */ + updateTime?: string | null; } /** - * The status of a reload attempt. + * The request message to create one Message. Currently it is only used in BatchCreateMessagesRequest. */ - export interface Schema$GoogleCloudDialogflowV2beta1DocumentReloadStatus { + export interface Schema$GoogleCloudDialogflowV2beta1CreateMessageRequest { /** - * Output only. The status of a reload attempt or the initial load. + * Required. The message to create. Message.participant is required. */ - status?: Schema$GoogleRpcStatus; + message?: Schema$GoogleCloudDialogflowV2beta1Message; /** - * Output only. The time of a reload attempt. This reload may have been triggered automatically or manually and may not have succeeded. + * Required. Resource identifier of the conversation to create message. Format: `projects//locations//conversations/`. + */ + parent?: string | null; + } + /** + * The request to detect user's intent. + */ + export interface Schema$GoogleCloudDialogflowV2beta1DetectIntentRequest { + /** + * The natural language speech audio to be processed. This field should be populated iff `query_input` is set to an input audio config. A single request can contain up to 1 minute of speech audio data. + */ + inputAudio?: string | null; + /** + * Instructs the speech synthesizer how to generate the output audio. If this field is not set and agent-level speech synthesizer is not configured, no output audio is generated. + */ + outputAudioConfig?: Schema$GoogleCloudDialogflowV2beta1OutputAudioConfig; + /** + * Mask for output_audio_config indicating which settings in this request-level config should override speech synthesizer settings defined at agent-level. If unspecified or empty, output_audio_config replaces the agent-level config in its entirety. + */ + outputAudioConfigMask?: string | null; + /** + * Required. The input specification. It can be set to: 1. an audio config which instructs the speech recognizer how to process the speech audio, 2. a conversational query in the form of text, or 3. an event that specifies which intent to trigger. + */ + queryInput?: Schema$GoogleCloudDialogflowV2beta1QueryInput; + /** + * The parameters of this query. + */ + queryParams?: Schema$GoogleCloudDialogflowV2beta1QueryParameters; + } + /** + * The message returned from the DetectIntent method. + */ + export interface Schema$GoogleCloudDialogflowV2beta1DetectIntentResponse { + /** + * If Knowledge Connectors are enabled, there could be more than one result returned for a given query or event, and this field will contain all results except for the top one, which is captured in query_result. The alternative results are ordered by decreasing `QueryResult.intent_detection_confidence`. If Knowledge Connectors are disabled, this field will be empty until multiple responses for regular intents are supported, at which point those additional results will be surfaced here. + */ + alternativeQueryResults?: Schema$GoogleCloudDialogflowV2beta1QueryResult[]; + /** + * The audio data bytes encoded as specified in the request. Note: The output audio is generated based on the values of default platform text responses found in the `query_result.fulfillment_messages` field. If multiple default text responses exist, they will be concatenated when generating audio. If no default platform text responses exist, the generated audio content will be empty. In some scenarios, multiple output audio fields may be present in the response structure. In these cases, only the top-most-level audio output has content. + */ + outputAudio?: string | null; + /** + * The config used by the speech synthesizer to generate the output audio. + */ + outputAudioConfig?: Schema$GoogleCloudDialogflowV2beta1OutputAudioConfig; + /** + * The selected results of the conversational query or event processing. See `alternative_query_results` for additional potential results. + */ + queryResult?: Schema$GoogleCloudDialogflowV2beta1QueryResult; + /** + * The unique identifier of the response. It can be used to locate a response in the training example set or for reporting issues. + */ + responseId?: string | null; + /** + * Specifies the status of the webhook request. + */ + webhookStatus?: Schema$GoogleRpcStatus; + } + /** + * A knowledge document to be used by a KnowledgeBase. For more information, see the [knowledge base guide](https://cloud.google.com/dialogflow/docs/how/knowledge-bases). Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`. + */ + export interface Schema$GoogleCloudDialogflowV2beta1Document { + /** + * The raw content of the document. This field is only permitted for EXTRACTIVE_QA and FAQ knowledge types. Note: This field is in the process of being deprecated, please use raw_content instead. + */ + content?: string | null; + /** + * The URI where the file content is located. For documents stored in Google Cloud Storage, these URIs must have the form `gs:///`. NOTE: External URLs must correspond to public webpages, i.e., they must be indexed by Google Search. In particular, URLs for showing documents in Google Cloud Storage (i.e. the URL in your browser) are not supported. Instead use the `gs://` format URI described above. + */ + contentUri?: string | null; + /** + * Required. The display name of the document. The name must be 1024 bytes or less; otherwise, the creation request fails. + */ + displayName?: string | null; + /** + * Optional. If true, we try to automatically reload the document every day (at a time picked by the system). If false or unspecified, we don't try to automatically reload the document. Currently you can only enable automatic reload for documents sourced from a public url, see `source` field for the source types. Reload status can be tracked in `latest_reload_status`. If a reload fails, we will keep the document unchanged. If a reload fails with internal errors, the system will try to reload the document on the next day. If a reload fails with non-retriable errors (e.g. PERMISION_DENIED), the system will not try to reload the document anymore. You need to manually reload the document successfully by calling `ReloadDocument` and clear the errors. + */ + enableAutoReload?: boolean | null; + /** + * Required. The knowledge type of document content. + */ + knowledgeTypes?: string[] | null; + /** + * Output only. The time and status of the latest reload. This reload may have been triggered automatically or manually and may not have succeeded. + */ + latestReloadStatus?: Schema$GoogleCloudDialogflowV2beta1DocumentReloadStatus; + /** + * Optional. Metadata for the document. The metadata supports arbitrary key-value pairs. Suggested use cases include storing a document's title, an external URL distinct from the document's content_uri, etc. The max size of a `key` or a `value` of the metadata is 1024 bytes. + */ + metadata?: {[key: string]: string} | null; + /** + * Required. The MIME type of this document. + */ + mimeType?: string | null; + /** + * Optional. The document resource name. The name must be empty when creating a document. Format: `projects//locations//knowledgeBases//documents/`. + */ + name?: string | null; + /** + * The raw content of the document. This field is only permitted for EXTRACTIVE_QA and FAQ knowledge types. + */ + rawContent?: string | null; + } + /** + * The status of a reload attempt. + */ + export interface Schema$GoogleCloudDialogflowV2beta1DocumentReloadStatus { + /** + * Output only. The status of a reload attempt or the initial load. + */ + status?: Schema$GoogleRpcStatus; + /** + * Output only. The time of a reload attempt. This reload may have been triggered automatically or manually and may not have succeeded. */ time?: string | null; } + /** + * The message in the response that indicates the parameters of DTMF. + */ + export interface Schema$GoogleCloudDialogflowV2beta1DtmfParameters { + /** + * Indicates whether DTMF input can be handled in the next request. + */ + acceptsDtmfInput?: boolean | null; + } /** * Each intent parameter has a type, called the entity type, which dictates exactly how data from an end-user expression is extracted. Dialogflow provides predefined system entities that can match many common types of data. For example, there are system entities for matching dates, times, colors, email addresses, and so on. You can also create your own custom entities for matching custom data. For example, you could define a vegetable entity that can match the types of vegetables available for purchase with a grocery store agent. For more information, see the [Entity guide](https://cloud.google.com/dialogflow/docs/entities-overview). */ @@ -2732,12 +3186,41 @@ export namespace dialogflow_v2beta1 { */ agentUri?: string | null; } + /** + * Represents answer from "frequently asked questions". + */ + export interface Schema$GoogleCloudDialogflowV2beta1FaqAnswer { + /** + * The piece of text from the `source` knowledge base document. + */ + answer?: string | null; + /** + * The name of answer record, in the format of "projects//locations//answerRecords/" + */ + answerRecord?: string | null; + /** + * The system's confidence score that this Knowledge answer is a good match for this conversational query, range from 0.0 (completely uncertain) to 1.0 (completely certain). + */ + confidence?: number | null; + /** + * A map that contains metadata about the answer and the document from which it originates. + */ + metadata?: {[key: string]: string} | null; + /** + * The corresponding FAQ question. + */ + question?: string | null; + /** + * Indicates which Knowledge Document this answer was extracted from. Format: `projects//locations//agent/knowledgeBases//documents/`. + */ + source?: string | null; + } /** * By default, your agent responds to a matched intent with a static response. As an alternative, you can provide a more dynamic response by using fulfillment. When you enable fulfillment for an intent, Dialogflow responds to that intent by calling a service that you define. For example, if an end-user wants to schedule a haircut on Friday, your service can check your database and respond to the end-user with availability information for Friday. For more information, see the [fulfillment guide](https://cloud.google.com/dialogflow/docs/fulfillment-overview). */ export interface Schema$GoogleCloudDialogflowV2beta1Fulfillment { /** - * The human-readable name of the fulfillment, unique within the agent. + * The human-readable name of the fulfillment, unique within the agent. This field is not used for Fulfillment in an Environment. */ displayName?: string | null; /** @@ -2753,7 +3236,7 @@ export namespace dialogflow_v2beta1 { */ genericWebService?: Schema$GoogleCloudDialogflowV2beta1FulfillmentGenericWebService; /** - * Required. The unique identifier of the fulfillment. Supported formats: - `projects//agent/fulfillment` - `projects//locations//agent/fulfillment` + * Required. The unique identifier of the fulfillment. Supported formats: - `projects//agent/fulfillment` - `projects//locations//agent/fulfillment` This field is not used for Fulfillment in an Environment. */ name?: string | null; } @@ -2801,183 +3284,419 @@ export namespace dialogflow_v2beta1 { uri?: string | null; } /** - * The request message for Agents.ImportAgent. + * Google Cloud Storage locations for the inputs. */ - export interface Schema$GoogleCloudDialogflowV2beta1ImportAgentRequest { - /** - * Zip compressed raw byte content for agent. - */ - agentContent?: string | null; + export interface Schema$GoogleCloudDialogflowV2beta1GcsSources { /** - * The URI to a Google Cloud Storage file containing the agent to import. Note: The URI must start with "gs://". + * Required. Google Cloud Storage URIs for the inputs. A URI is of the form: gs://bucket/object-prefix-or-name Whether a prefix or name is used depends on the use case. */ - agentUri?: string | null; + uris?: string[] | null; } /** - * Instructs the speech recognizer on how to process the audio content. + * Defines the Human Agent Assistant to connect to a conversation. */ - export interface Schema$GoogleCloudDialogflowV2beta1InputAudioConfig { + export interface Schema$GoogleCloudDialogflowV2beta1HumanAgentAssistantConfig { /** - * Required. Audio encoding of the audio content to process. + * Configuration for agent assistance of human agent participant. */ - audioEncoding?: string | null; + humanAgentSuggestionConfig?: Schema$GoogleCloudDialogflowV2beta1HumanAgentAssistantConfigSuggestionConfig; /** - * If `true`, Dialogflow returns SpeechWordInfo in StreamingRecognitionResult with information about the recognized speech words, e.g. start and end time offsets. If false or unspecified, Speech doesn't return any word-level information. + * Configuration for message analysis. */ - enableWordInfo?: boolean | null; + messageAnalysisConfig?: Schema$GoogleCloudDialogflowV2beta1HumanAgentAssistantConfigMessageAnalysisConfig; /** - * Required. The language of the supplied audio. Dialogflow does not do translations. See [Language Support](https://cloud.google.com/dialogflow/docs/reference/language) for a list of the currently supported language codes. Note that queries in the same session do not necessarily need to specify the same language. + * Pub/Sub topic on which to publish new agent assistant events. */ - languageCode?: string | null; + notificationConfig?: Schema$GoogleCloudDialogflowV2beta1NotificationConfig; + } + /** + * Custom conversation models used in agent assist feature. Supported feature: ARTICLE_SUGGESTION, SMART_COMPOSE, SMART_REPLY. + */ + export interface Schema$GoogleCloudDialogflowV2beta1HumanAgentAssistantConfigConversationModelConfig { /** - * Which Speech model to select for the given request. Select the model best suited to your domain to get best results. If a model is not explicitly specified, then we auto-select a model based on the parameters in the InputAudioConfig. If enhanced speech model is enabled for the agent and an enhanced version of the specified model for the language does not exist, then the speech is recognized using the standard version of the specified model. Refer to [Cloud Speech API documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model) for more details. + * Required. Conversation model resource name. Format: `projects//conversationModels/`. */ model?: string | null; - /** - * Which variant of the Speech model to use. - */ - modelVariant?: string | null; - /** - * A list of strings containing words and phrases that the speech recognizer should recognize with higher likelihood. See [the Cloud Speech documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints) for more details. This field is deprecated. Please use [speech_contexts]() instead. If you specify both [phrase_hints]() and [speech_contexts](), Dialogflow will treat the [phrase_hints]() as a single additional [SpeechContext](). - */ - phraseHints?: string[] | null; - /** - * Required. Sample rate (in Hertz) of the audio content sent in the query. Refer to [Cloud Speech API documentation](https://cloud.google.com/speech-to-text/docs/basics) for more details. - */ - sampleRateHertz?: number | null; - /** - * If `false` (default), recognition does not cease until the client closes the stream. If `true`, the recognizer will detect a single spoken utterance in input audio. Recognition ceases when it detects the audio's voice has stopped or paused. In this case, once a detected intent is received, the client should close the stream and start a new request with a new stream as needed. Note: This setting is relevant only for streaming methods. Note: When specified, InputAudioConfig.single_utterance takes precedence over StreamingDetectIntentRequest.single_utterance. - */ - singleUtterance?: boolean | null; - /** - * Context information to assist speech recognition. See [the Cloud Speech documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints) for more details. - */ - speechContexts?: Schema$GoogleCloudDialogflowV2beta1SpeechContext[]; } /** - * An intent categorizes an end-user's intention for one conversation turn. For each agent, you define many intents, where your combined intents can handle a complete conversation. When an end-user writes or says something, referred to as an end-user expression or end-user input, Dialogflow matches the end-user input to the best intent in your agent. Matching an intent is also known as intent classification. For more information, see the [intent guide](https://cloud.google.com/dialogflow/docs/intents-overview). + * Configuration for analyses to run on each conversation message. */ - export interface Schema$GoogleCloudDialogflowV2beta1Intent { - /** - * Optional. The name of the action associated with the intent. Note: The action name must not contain whitespaces. - */ - action?: string | null; + export interface Schema$GoogleCloudDialogflowV2beta1HumanAgentAssistantConfigMessageAnalysisConfig { /** - * Optional. The list of platforms for which the first responses will be copied from the messages in PLATFORM_UNSPECIFIED (i.e. default platform). + * Enable sentiment analysis in conversation messages on [agent assist stage](https://cloud.google.com/dialogflow/priv/docs/contact-center/basics#stages). If unspecified, defaults to false. Sentiment analysis inspects user input and identifies the prevailing subjective opinion, especially to determine a user's attitude as positive, negative, or neutral: https://cloud.google.com/natural-language/docs/basics#sentiment_analysis For Participants.StreamingAnalyzeContent method, result will be in StreamingAnalyzeContentResponse.message.SentimentAnalysisResult. For Participants.AnalyzeContent method, result will be in AnalyzeContentResponse.message.SentimentAnalysisResult For Conversations.ListMessages method, result will be in ListMessagesResponse.messages.SentimentAnalysisResult If Pub/Sub notification is configured, result will be in ConversationEvent.new_message_payload.SentimentAnalysisResult. */ - defaultResponsePlatforms?: string[] | null; + enableSentimentAnalysis?: boolean | null; + } + /** + * Detail human agent assistant config. + */ + export interface Schema$GoogleCloudDialogflowV2beta1HumanAgentAssistantConfigSuggestionConfig { /** - * Required. The name of this intent. + * Configuration of different suggestion features. One feature can have only one config. */ - displayName?: string | null; + featureConfigs?: Schema$GoogleCloudDialogflowV2beta1HumanAgentAssistantConfigSuggestionFeatureConfig[]; /** - * Optional. Indicates that this intent ends an interaction. Some integrations (e.g., Actions on Google or Dialogflow phone gateway) use this information to close interaction with an end user. Default is false. + * If `group_suggestion_responses` is false, and there are multiple `feature_configs` in `event based suggestion` or StreamingAnalyzeContent, we will try to deliver suggestions to customers as soon as we get new suggestion. Different type of suggestions based on the same context will be in separate Pub/Sub event or `StreamingAnalyzeContentResponse`. If `group_suggestion_responses` set to true. All the suggestions to the same participant based on the same context will be grouped into a single Pub/Sub event or StreamingAnalyzeContentResponse. */ - endInteraction?: boolean | null; + groupSuggestionResponses?: boolean | null; + } + /** + * Config for suggestion features. + */ + export interface Schema$GoogleCloudDialogflowV2beta1HumanAgentAssistantConfigSuggestionFeatureConfig { /** - * Optional. The collection of event names that trigger the intent. If the collection of input contexts is not empty, all of the contexts must be present in the active user session for an event to trigger this intent. Event names are limited to 150 characters. + * Configs of custom conversation model. */ - events?: string[] | null; + conversationModelConfig?: Schema$GoogleCloudDialogflowV2beta1HumanAgentAssistantConfigConversationModelConfig; /** - * Output only. Information about all followup intents that have this intent as a direct or indirect parent. We populate this field only in the output. + * Automatically iterates all participants and tries to compile suggestions. Supported features: ARTICLE_SUGGESTION, FAQ, DIALOGFLOW_ASSIST. */ - followupIntentInfo?: Schema$GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo[]; + enableEventBasedSuggestion?: boolean | null; /** - * Optional. The list of context names required for this intent to be triggered. Formats: - `projects//agent/sessions/-/contexts/` - `projects//locations//agent/sessions/-/contexts/` + * Configs of query. */ - inputContextNames?: string[] | null; + queryConfig?: Schema$GoogleCloudDialogflowV2beta1HumanAgentAssistantConfigSuggestionQueryConfig; /** - * Optional. Indicates whether this is a fallback intent. + * The suggestion feature. */ - isFallback?: boolean | null; + suggestionFeature?: Schema$GoogleCloudDialogflowV2beta1SuggestionFeature; /** - * Optional. The collection of rich messages corresponding to the `Response` field in the Dialogflow console. + * Settings of suggestion trigger. Currently, only ARTICLE_SUGGESTION, FAQ, and DIALOGFLOW_ASSIST will use this field. */ - messages?: Schema$GoogleCloudDialogflowV2beta1IntentMessage[]; + suggestionTriggerSettings?: Schema$GoogleCloudDialogflowV2beta1HumanAgentAssistantConfigSuggestionTriggerSettings; + } + /** + * Config for suggestion query. + */ + export interface Schema$GoogleCloudDialogflowV2beta1HumanAgentAssistantConfigSuggestionQueryConfig { /** - * Optional. Indicates whether Machine Learning is disabled for the intent. Note: If `ml_disabled` setting is set to true, then this intent is not taken into account during inference in `ML ONLY` match mode. Also, auto-markup in the UI is turned off. + * Confidence threshold of query result. Agent Assist gives each suggestion a score in the range [0.0, 1.0], based on the relevance between the suggestion and the current conversation context. A score of 0.0 has no relevance, while a score of 1.0 has high relevance. Only suggestions with a score greater than or equal to the value of this field are included in the results. For a baseline model (the default), the recommended value is in the range [0.05, 0.1]. For a custom model, there is no recommended value. Tune this value by starting from a very low value and slowly increasing until you have desired results. If this field is not set, it is default to 0.0, which means that all suggestions are returned. Supported features: ARTICLE_SUGGESTION, FAQ, SMART_REPLY, SMART_COMPOSE. */ - mlDisabled?: boolean | null; + confidenceThreshold?: number | null; /** - * Optional. Indicates whether Machine Learning is enabled for the intent. Note: If `ml_enabled` setting is set to false, then this intent is not taken into account during inference in `ML ONLY` match mode. Also, auto-markup in the UI is turned off. DEPRECATED! Please use `ml_disabled` field instead. NOTE: If both `ml_enabled` and `ml_disabled` are either not set or false, then the default value is determined as follows: - Before April 15th, 2018 the default is: ml_enabled = false / ml_disabled = true. - After April 15th, 2018 the default is: ml_enabled = true / ml_disabled = false. + * Determines how recent conversation context is filtered when generating suggestions. If unspecified, no messages will be dropped. */ - mlEnabled?: boolean | null; + contextFilterSettings?: Schema$GoogleCloudDialogflowV2beta1HumanAgentAssistantConfigSuggestionQueryConfigContextFilterSettings; /** - * Optional. The unique identifier of this intent. Required for Intents.UpdateIntent and Intents.BatchUpdateIntents methods. Supported formats: - `projects//agent/intents/` - `projects//locations//agent/intents/` + * Query from Dialogflow agent. It is used by DIALOGFLOW_ASSIST. */ - name?: string | null; + dialogflowQuerySource?: Schema$GoogleCloudDialogflowV2beta1HumanAgentAssistantConfigSuggestionQueryConfigDialogflowQuerySource; /** - * Optional. The collection of contexts that are activated when the intent is matched. Context messages in this collection should not set the parameters field. Setting the `lifespan_count` to 0 will reset the context when the intent is matched. Format: `projects//agent/sessions/-/contexts/`. + * Query from knowledge base document. It is used by: SMART_REPLY, SMART_COMPOSE. */ - outputContexts?: Schema$GoogleCloudDialogflowV2beta1Context[]; + documentQuerySource?: Schema$GoogleCloudDialogflowV2beta1HumanAgentAssistantConfigSuggestionQueryConfigDocumentQuerySource; /** - * Optional. The collection of parameters associated with the intent. + * Query from knowledgebase. It is used by: ARTICLE_SUGGESTION, FAQ. */ - parameters?: Schema$GoogleCloudDialogflowV2beta1IntentParameter[]; + knowledgeBaseQuerySource?: Schema$GoogleCloudDialogflowV2beta1HumanAgentAssistantConfigSuggestionQueryConfigKnowledgeBaseQuerySource; /** - * Optional. The unique identifier of the parent intent in the chain of followup intents. You can set this field when creating an intent, for example with CreateIntent or BatchUpdateIntents, in order to make this intent a followup intent. It identifies the parent followup intent. Format: `projects//agent/intents/`. + * Maximum number of results to return. Currently, if unset, defaults to 10. And the max number is 20. */ - parentFollowupIntentName?: string | null; + maxResults?: number | null; + } + /** + * Settings that determine how to filter recent conversation context when generating suggestions. + */ + export interface Schema$GoogleCloudDialogflowV2beta1HumanAgentAssistantConfigSuggestionQueryConfigContextFilterSettings { /** - * Optional. The priority of this intent. Higher numbers represent higher priorities. - If the supplied value is unspecified or 0, the service translates the value to 500,000, which corresponds to the `Normal` priority in the console. - If the supplied value is negative, the intent is ignored in runtime detect intent requests. + * If set to true, the last message from virtual agent (hand off message) and the message before it (trigger message of hand off) are dropped. */ - priority?: number | null; + dropHandoffMessages?: boolean | null; /** - * Optional. Indicates whether to delete all contexts in the current session when this intent is matched. + * If set to true, all messages from ivr stage are dropped. */ - resetContexts?: boolean | null; + dropIvrMessages?: boolean | null; /** - * Output only. The unique identifier of the root intent in the chain of followup intents. It identifies the correct followup intents chain for this intent. Format: `projects//agent/intents/`. + * If set to true, all messages from virtual agent are dropped. */ - rootFollowupIntentName?: string | null; + dropVirtualAgentMessages?: boolean | null; + } + /** + * Dialogflow source setting. Supported feature: DIALOGFLOW_ASSIST. + */ + export interface Schema$GoogleCloudDialogflowV2beta1HumanAgentAssistantConfigSuggestionQueryConfigDialogflowQuerySource { /** - * Optional. The collection of examples that the agent is trained on. + * Required. The name of a dialogflow virtual agent used for end user side intent detection and suggestion. Format: `projects//locations//agent`. When multiple agents are allowed in the same Dialogflow project. */ - trainingPhrases?: Schema$GoogleCloudDialogflowV2beta1IntentTrainingPhrase[]; + agent?: string | null; + } + /** + * Document source settings. Supported features: SMART_REPLY, SMART_COMPOSE. + */ + export interface Schema$GoogleCloudDialogflowV2beta1HumanAgentAssistantConfigSuggestionQueryConfigDocumentQuerySource { /** - * Optional. Indicates whether webhooks are enabled for the intent. + * Required. Knowledge documents to query from. Format: `projects//locations//knowledgeBases//documents/`. Currently, only one document is supported. */ - webhookState?: string | null; + documents?: string[] | null; } /** - * This message is a wrapper around a collection of intents. + * Knowledge base source settings. Supported features: ARTICLE_SUGGESTION, FAQ. */ - export interface Schema$GoogleCloudDialogflowV2beta1IntentBatch { + export interface Schema$GoogleCloudDialogflowV2beta1HumanAgentAssistantConfigSuggestionQueryConfigKnowledgeBaseQuerySource { /** - * A collection of intents. + * Required. Knowledge bases to query. Format: `projects//locations//knowledgeBases/`. Currently, only one knowledge base is supported. */ - intents?: Schema$GoogleCloudDialogflowV2beta1Intent[]; + knowledgeBases?: string[] | null; } /** - * Represents a single followup intent in the chain. + * Settings of suggestion trigger. */ - export interface Schema$GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo { + export interface Schema$GoogleCloudDialogflowV2beta1HumanAgentAssistantConfigSuggestionTriggerSettings { /** - * The unique identifier of the followup intent. Format: `projects//agent/intents/`. + * Do not trigger if last utterance is small talk. */ - followupIntentName?: string | null; + noSmallTalk?: boolean | null; /** - * The unique identifier of the followup intent's parent. Format: `projects//agent/intents/`. + * Only trigger suggestion if participant role of last utterance is END_USER. */ - parentFollowupIntentName?: string | null; + onlyEndUser?: boolean | null; } /** - * Corresponds to the `Response` field in the Dialogflow console. + * Output only. Represents a notification sent to Pub/Sub subscribers for agent assistant events in a specific conversation. */ - export interface Schema$GoogleCloudDialogflowV2beta1IntentMessage { + export interface Schema$GoogleCloudDialogflowV2beta1HumanAgentAssistantEvent { /** - * Displays a basic card for Actions on Google. + * The conversation this notification refers to. Format: `projects//conversations/`. */ - basicCard?: Schema$GoogleCloudDialogflowV2beta1IntentMessageBasicCard; + conversation?: string | null; /** - * Browse carousel card for Actions on Google. + * The participant that the suggestion is compiled for. And This field is used to call Participants.ListSuggestions API. Format: `projects//conversations//participants/`. It will not be set in legacy workflow. HumanAgentAssistantConfig.name for more information. */ - browseCarouselCard?: Schema$GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCard; + participant?: string | null; /** - * Displays a card. + * The suggestion results payload that this notification refers to. It will only be set when HumanAgentAssistantConfig.SuggestionConfig.group_suggestion_responses sets to true. */ - card?: Schema$GoogleCloudDialogflowV2beta1IntentMessageCard; - /** + suggestionResults?: Schema$GoogleCloudDialogflowV2beta1SuggestionResult[]; + } + /** + * The request message for Agents.ImportAgent. + */ + export interface Schema$GoogleCloudDialogflowV2beta1ImportAgentRequest { + /** + * Zip compressed raw byte content for agent. + */ + agentContent?: string | null; + /** + * The URI to a Google Cloud Storage file containing the agent to import. Note: The URI must start with "gs://". + */ + agentUri?: string | null; + } + /** + * Request message for Documents.ImportDocuments. + */ + export interface Schema$GoogleCloudDialogflowV2beta1ImportDocumentsRequest { + /** + * Required. Document template used for importing all the documents. + */ + documentTemplate?: Schema$GoogleCloudDialogflowV2beta1ImportDocumentTemplate; + /** + * The Google Cloud Storage location for the documents. The path can include a wildcard. These URIs may have the forms `gs:///`. `gs:////x.`. + */ + gcsSource?: Schema$GoogleCloudDialogflowV2beta1GcsSources; + /** + * Whether to import custom metadata from Google Cloud Storage. Only valid when the document source is Google Cloud Storage URI. + */ + importGcsCustomMetadata?: boolean | null; + } + /** + * Response message for Documents.ImportDocuments. + */ + export interface Schema$GoogleCloudDialogflowV2beta1ImportDocumentsResponse { + /** + * Includes details about skipped documents or any other warnings. + */ + warnings?: Schema$GoogleRpcStatus[]; + } + /** + * The template used for importing documents. + */ + export interface Schema$GoogleCloudDialogflowV2beta1ImportDocumentTemplate { + /** + * Required. The knowledge type of document content. + */ + knowledgeTypes?: string[] | null; + /** + * Metadata for the document. The metadata supports arbitrary key-value pairs. Suggested use cases include storing a document's title, an external URL distinct from the document's content_uri, etc. The max size of a `key` or a `value` of the metadata is 1024 bytes. + */ + metadata?: {[key: string]: string} | null; + /** + * Required. The MIME type of the document. + */ + mimeType?: string | null; + } + /** + * Instructs the speech recognizer on how to process the audio content. + */ + export interface Schema$GoogleCloudDialogflowV2beta1InputAudioConfig { + /** + * Required. Audio encoding of the audio content to process. + */ + audioEncoding?: string | null; + /** + * Only used in Participants.AnalyzeContent and Participants.StreamingAnalyzeContent. If `false` and recognition doesn't return any result, trigger `NO_SPEECH_RECOGNIZED` event to Dialogflow agent. + */ + disableNoSpeechRecognizedEvent?: boolean | null; + /** + * If `true`, Dialogflow returns SpeechWordInfo in StreamingRecognitionResult with information about the recognized speech words, e.g. start and end time offsets. If false or unspecified, Speech doesn't return any word-level information. + */ + enableWordInfo?: boolean | null; + /** + * Required. The language of the supplied audio. Dialogflow does not do translations. See [Language Support](https://cloud.google.com/dialogflow/docs/reference/language) for a list of the currently supported language codes. Note that queries in the same session do not necessarily need to specify the same language. + */ + languageCode?: string | null; + /** + * Which Speech model to select for the given request. Select the model best suited to your domain to get best results. If a model is not explicitly specified, then we auto-select a model based on the parameters in the InputAudioConfig. If enhanced speech model is enabled for the agent and an enhanced version of the specified model for the language does not exist, then the speech is recognized using the standard version of the specified model. Refer to [Cloud Speech API documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model) for more details. + */ + model?: string | null; + /** + * Which variant of the Speech model to use. + */ + modelVariant?: string | null; + /** + * A list of strings containing words and phrases that the speech recognizer should recognize with higher likelihood. See [the Cloud Speech documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints) for more details. This field is deprecated. Please use [speech_contexts]() instead. If you specify both [phrase_hints]() and [speech_contexts](), Dialogflow will treat the [phrase_hints]() as a single additional [SpeechContext](). + */ + phraseHints?: string[] | null; + /** + * Required. Sample rate (in Hertz) of the audio content sent in the query. Refer to [Cloud Speech API documentation](https://cloud.google.com/speech-to-text/docs/basics) for more details. + */ + sampleRateHertz?: number | null; + /** + * If `false` (default), recognition does not cease until the client closes the stream. If `true`, the recognizer will detect a single spoken utterance in input audio. Recognition ceases when it detects the audio's voice has stopped or paused. In this case, once a detected intent is received, the client should close the stream and start a new request with a new stream as needed. Note: This setting is relevant only for streaming methods. Note: When specified, InputAudioConfig.single_utterance takes precedence over StreamingDetectIntentRequest.single_utterance. + */ + singleUtterance?: boolean | null; + /** + * Context information to assist speech recognition. See [the Cloud Speech documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints) for more details. + */ + speechContexts?: Schema$GoogleCloudDialogflowV2beta1SpeechContext[]; + } + /** + * An intent categorizes an end-user's intention for one conversation turn. For each agent, you define many intents, where your combined intents can handle a complete conversation. When an end-user writes or says something, referred to as an end-user expression or end-user input, Dialogflow matches the end-user input to the best intent in your agent. Matching an intent is also known as intent classification. For more information, see the [intent guide](https://cloud.google.com/dialogflow/docs/intents-overview). + */ + export interface Schema$GoogleCloudDialogflowV2beta1Intent { + /** + * Optional. The name of the action associated with the intent. Note: The action name must not contain whitespaces. + */ + action?: string | null; + /** + * Optional. The list of platforms for which the first responses will be copied from the messages in PLATFORM_UNSPECIFIED (i.e. default platform). + */ + defaultResponsePlatforms?: string[] | null; + /** + * Required. The name of this intent. + */ + displayName?: string | null; + /** + * Optional. Indicates that this intent ends an interaction. Some integrations (e.g., Actions on Google or Dialogflow phone gateway) use this information to close interaction with an end user. Default is false. + */ + endInteraction?: boolean | null; + /** + * Optional. The collection of event names that trigger the intent. If the collection of input contexts is not empty, all of the contexts must be present in the active user session for an event to trigger this intent. Event names are limited to 150 characters. + */ + events?: string[] | null; + /** + * Output only. Information about all followup intents that have this intent as a direct or indirect parent. We populate this field only in the output. + */ + followupIntentInfo?: Schema$GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo[]; + /** + * Optional. The list of context names required for this intent to be triggered. Formats: - `projects//agent/sessions/-/contexts/` - `projects//locations//agent/sessions/-/contexts/` + */ + inputContextNames?: string[] | null; + /** + * Optional. Indicates whether this is a fallback intent. + */ + isFallback?: boolean | null; + /** + * Optional. Indicates that a live agent should be brought in to handle the interaction with the user. In most cases, when you set this flag to true, you would also want to set end_interaction to true as well. Default is false. + */ + liveAgentHandoff?: boolean | null; + /** + * Optional. The collection of rich messages corresponding to the `Response` field in the Dialogflow console. + */ + messages?: Schema$GoogleCloudDialogflowV2beta1IntentMessage[]; + /** + * Optional. Indicates whether Machine Learning is disabled for the intent. Note: If `ml_disabled` setting is set to true, then this intent is not taken into account during inference in `ML ONLY` match mode. Also, auto-markup in the UI is turned off. + */ + mlDisabled?: boolean | null; + /** + * Optional. Indicates whether Machine Learning is enabled for the intent. Note: If `ml_enabled` setting is set to false, then this intent is not taken into account during inference in `ML ONLY` match mode. Also, auto-markup in the UI is turned off. DEPRECATED! Please use `ml_disabled` field instead. NOTE: If both `ml_enabled` and `ml_disabled` are either not set or false, then the default value is determined as follows: - Before April 15th, 2018 the default is: ml_enabled = false / ml_disabled = true. - After April 15th, 2018 the default is: ml_enabled = true / ml_disabled = false. + */ + mlEnabled?: boolean | null; + /** + * Optional. The unique identifier of this intent. Required for Intents.UpdateIntent and Intents.BatchUpdateIntents methods. Supported formats: - `projects//agent/intents/` - `projects//locations//agent/intents/` + */ + name?: string | null; + /** + * Optional. The collection of contexts that are activated when the intent is matched. Context messages in this collection should not set the parameters field. Setting the `lifespan_count` to 0 will reset the context when the intent is matched. Format: `projects//agent/sessions/-/contexts/`. + */ + outputContexts?: Schema$GoogleCloudDialogflowV2beta1Context[]; + /** + * Optional. The collection of parameters associated with the intent. + */ + parameters?: Schema$GoogleCloudDialogflowV2beta1IntentParameter[]; + /** + * Optional. The unique identifier of the parent intent in the chain of followup intents. You can set this field when creating an intent, for example with CreateIntent or BatchUpdateIntents, in order to make this intent a followup intent. It identifies the parent followup intent. Format: `projects//agent/intents/`. + */ + parentFollowupIntentName?: string | null; + /** + * Optional. The priority of this intent. Higher numbers represent higher priorities. - If the supplied value is unspecified or 0, the service translates the value to 500,000, which corresponds to the `Normal` priority in the console. - If the supplied value is negative, the intent is ignored in runtime detect intent requests. + */ + priority?: number | null; + /** + * Optional. Indicates whether to delete all contexts in the current session when this intent is matched. + */ + resetContexts?: boolean | null; + /** + * Output only. The unique identifier of the root intent in the chain of followup intents. It identifies the correct followup intents chain for this intent. Format: `projects//agent/intents/`. + */ + rootFollowupIntentName?: string | null; + /** + * Optional. The collection of examples that the agent is trained on. + */ + trainingPhrases?: Schema$GoogleCloudDialogflowV2beta1IntentTrainingPhrase[]; + /** + * Optional. Indicates whether webhooks are enabled for the intent. + */ + webhookState?: string | null; + } + /** + * This message is a wrapper around a collection of intents. + */ + export interface Schema$GoogleCloudDialogflowV2beta1IntentBatch { + /** + * A collection of intents. + */ + intents?: Schema$GoogleCloudDialogflowV2beta1Intent[]; + } + /** + * Represents a single followup intent in the chain. + */ + export interface Schema$GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo { + /** + * The unique identifier of the followup intent. Format: `projects//agent/intents/`. + */ + followupIntentName?: string | null; + /** + * The unique identifier of the followup intent's parent. Format: `projects//agent/intents/`. + */ + parentFollowupIntentName?: string | null; + } + /** + * Corresponds to the `Response` field in the Dialogflow console. + */ + export interface Schema$GoogleCloudDialogflowV2beta1IntentMessage { + /** + * Displays a basic card for Actions on Google. + */ + basicCard?: Schema$GoogleCloudDialogflowV2beta1IntentMessageBasicCard; + /** + * Browse carousel card for Actions on Google. + */ + browseCarouselCard?: Schema$GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCard; + /** + * Displays a card. + */ + card?: Schema$GoogleCloudDialogflowV2beta1IntentMessageCard; + /** * Displays a carousel card for Actions on Google. */ carouselSelect?: Schema$GoogleCloudDialogflowV2beta1IntentMessageCarouselSelect; @@ -3781,6 +4500,19 @@ export namespace dialogflow_v2beta1 { */ state?: string | null; } + /** + * Response message for AnswerRecords.ListAnswerRecords. + */ + export interface Schema$GoogleCloudDialogflowV2beta1ListAnswerRecordsResponse { + /** + * The list of answer records. + */ + answerRecords?: Schema$GoogleCloudDialogflowV2beta1AnswerRecord[]; + /** + * A token to retrieve next page of results. Or empty if there are no more results. Pass this value in the ListAnswerRecordsRequest.page_token field in the subsequent call to `ListAnswerRecords` method to retrieve the next page of results. + */ + nextPageToken?: string | null; + } /** * The response message for Contexts.ListContexts. */ @@ -3794,6 +4526,32 @@ export namespace dialogflow_v2beta1 { */ nextPageToken?: string | null; } + /** + * The response message for ConversationProfiles.ListConversationProfiles. + */ + export interface Schema$GoogleCloudDialogflowV2beta1ListConversationProfilesResponse { + /** + * The list of project conversation profiles. There is a maximum number of items returned based on the page_size field in the request. + */ + conversationProfiles?: Schema$GoogleCloudDialogflowV2beta1ConversationProfile[]; + /** + * Token to retrieve the next page of results, or empty if there are no more results in the list. + */ + nextPageToken?: string | null; + } + /** + * The response message for Conversations.ListConversations. + */ + export interface Schema$GoogleCloudDialogflowV2beta1ListConversationsResponse { + /** + * The list of conversations. There will be a maximum number of items returned based on the page_size field in the request. + */ + conversations?: Schema$GoogleCloudDialogflowV2beta1Conversation[]; + /** + * Token to retrieve the next page of results, or empty if there are no more results in the list. + */ + nextPageToken?: string | null; + } /** * Response message for Documents.ListDocuments. */ @@ -3859,6 +4617,32 @@ export namespace dialogflow_v2beta1 { */ nextPageToken?: string | null; } + /** + * The response message for Conversations.ListMessages. + */ + export interface Schema$GoogleCloudDialogflowV2beta1ListMessagesResponse { + /** + * Required. The list of messages. There will be a maximum number of items returned based on the page_size field in the request. `messages` is sorted by `create_time` in descending order. + */ + messages?: Schema$GoogleCloudDialogflowV2beta1Message[]; + /** + * Optional. Token to retrieve the next page of results, or empty if there are no more results in the list. + */ + nextPageToken?: string | null; + } + /** + * The response message for Participants.ListParticipants. + */ + export interface Schema$GoogleCloudDialogflowV2beta1ListParticipantsResponse { + /** + * Token to retrieve the next page of results or empty if there are no more results in the list. + */ + nextPageToken?: string | null; + /** + * The list of participants. There is a maximum number of items returned based on the page_size field in the request. + */ + participants?: Schema$GoogleCloudDialogflowV2beta1Participant[]; + } /** * The response message for SessionEntityTypes.ListSessionEntityTypes. */ @@ -3872,6 +4656,95 @@ export namespace dialogflow_v2beta1 { */ sessionEntityTypes?: Schema$GoogleCloudDialogflowV2beta1SessionEntityType[]; } + /** + * The response message for Participants.ListSuggestions. + */ + export interface Schema$GoogleCloudDialogflowV2beta1ListSuggestionsResponse { + /** + * Optional. Token to retrieve the next page of results or empty if there are no more results in the list. + */ + nextPageToken?: string | null; + /** + * Required. The list of suggestions. There will be a maximum number of items returned based on the page_size field in the request. `suggestions` is sorted by `create_time` in descending order. + */ + suggestions?: Schema$GoogleCloudDialogflowV2beta1Suggestion[]; + } + /** + * Defines logging behavior for conversation lifecycle events. + */ + export interface Schema$GoogleCloudDialogflowV2beta1LoggingConfig { + /** + * Whether to log conversation events like CONVERSATION_STARTED to Stackdriver in the conversation project as JSON format ConversationEvent protos. + */ + enableStackdriverLogging?: boolean | null; + } + /** + * Represents a message posted into a conversation. + */ + export interface Schema$GoogleCloudDialogflowV2beta1Message { + /** + * Required. The message content. + */ + content?: string | null; + /** + * Output only. The time when the message was created in Contact Center AI. + */ + createTime?: string | null; + /** + * Optional. The message language. This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. Example: "en-US". + */ + languageCode?: string | null; + /** + * Output only. The annotation for the message. + */ + messageAnnotation?: Schema$GoogleCloudDialogflowV2beta1MessageAnnotation; + /** + * Optional. The unique identifier of the message. Format: `projects//locations//conversations//messages/`. + */ + name?: string | null; + /** + * Output only. The participant that sends this message. + */ + participant?: string | null; + /** + * Output only. The role of the participant. + */ + participantRole?: string | null; + /** + * Optional. The time when the message was sent. + */ + sendTime?: string | null; + /** + * Output only. The sentiment analysis result for the message. + */ + sentimentAnalysis?: Schema$GoogleCloudDialogflowV2beta1SentimentAnalysisResult; + } + /** + * Represents the result of annotation for the message. + */ + export interface Schema$GoogleCloudDialogflowV2beta1MessageAnnotation { + /** + * Required. Indicates whether the text message contains entities. + */ + containEntities?: boolean | null; + /** + * Optional. The collection of annotated message parts ordered by their position in the message. You can recover the annotated message by concatenating [AnnotatedMessagePart.text]. + */ + parts?: Schema$GoogleCloudDialogflowV2beta1AnnotatedMessagePart[]; + } + /** + * Defines notification behavior. + */ + export interface Schema$GoogleCloudDialogflowV2beta1NotificationConfig { + /** + * Format of message. + */ + messageFormat?: string | null; + /** + * Name of the Pub/Sub topic to publish conversation events like CONVERSATION_STARTED as serialized ConversationEvent protos. Notification works for phone calls, if this topic either is in the same project as the conversation or you grant `service-@gcp-sa-dialogflow.iam.gserviceaccount.com` the `Dialogflow Service Agent` role in the topic project. Format: `projects//locations//topics/`. + */ + topic?: string | null; + } /** * Represents the contents of the original request that was passed to the `[Streaming]DetectIntent` call. */ @@ -3889,6 +4762,19 @@ export namespace dialogflow_v2beta1 { */ version?: string | null; } + /** + * Represents the natural language speech audio to be played to the end user. + */ + export interface Schema$GoogleCloudDialogflowV2beta1OutputAudio { + /** + * Required. The natural language speech audio. + */ + audio?: string | null; + /** + * Required. Instructs the speech synthesizer how to generate the speech audio. + */ + config?: Schema$GoogleCloudDialogflowV2beta1OutputAudioConfig; + } /** * Instructs the speech synthesizer how to generate the output audio content. If this audio config is supplied in a request, it overrides all existing text-to-speech settings applied to the agent. */ @@ -3906,6 +4792,23 @@ export namespace dialogflow_v2beta1 { */ synthesizeSpeechConfig?: Schema$GoogleCloudDialogflowV2beta1SynthesizeSpeechConfig; } + /** + * Represents a conversation participant (human agent, virtual agent, end-user). + */ + export interface Schema$GoogleCloudDialogflowV2beta1Participant { + /** + * Optional. The unique identifier of this participant. Format: `projects//locations//conversations//participants/`. + */ + name?: string | null; + /** + * Optional. Obfuscated user id that should be associated with the created participant. You can specify a user id as follows: 1. If you set this field in CreateParticipantRequest or UpdateParticipantRequest, Dialogflow adds the obfuscated user id with the participant. 2. If you set this field in AnalyzeContent or StreamingAnalyzeContent, Dialogflow will update Participant.obfuscated_external_user_id. Dialogflow uses this user id for following purposes: 1) Billing and measurement. If user with the same obfuscated_external_user_id is created in a later conversation, dialogflow will know it's the same user. 2) Agent assist suggestion personalization. For example, Dialogflow can use it to provide personalized smart reply suggestions for this user. Note: * Please never pass raw user ids to Dialogflow. Always obfuscate your user id first. * Dialogflow only accepts a UTF-8 encoded string, e.g., a hex digest of a hash function like SHA-512. * The length of the user id must be <= 256 characters. + */ + obfuscatedExternalUserId?: string | null; + /** + * Immutable. The role this participant plays in the conversation. This field must be set during participant creation and is then immutable. + */ + role?: string | null; + } /** * Represents the query input. It can contain either: 1. An audio config which instructs the speech recognizer how to process the speech audio. 2. A conversational query in the form of text. 3. An event that specifies which intent to trigger. */ @@ -3914,6 +4817,10 @@ export namespace dialogflow_v2beta1 { * Instructs the speech recognizer how to process the speech audio. */ audioConfig?: Schema$GoogleCloudDialogflowV2beta1InputAudioConfig; + /** + * The DTMF digits used to invoke intent and fill in parameter value. + */ + dtmf?: Schema$GoogleCloudDialogflowV2beta1TelephonyDtmfEvents; /** * The event to be processed. */ @@ -4050,6 +4957,49 @@ export namespace dialogflow_v2beta1 { */ importGcsCustomMetadata?: boolean | null; } + /** + * Response messages from an automated agent. + */ + export interface Schema$GoogleCloudDialogflowV2beta1ResponseMessage { + /** + * A signal that indicates the interaction with the Dialogflow agent has ended. + */ + endInteraction?: Schema$GoogleCloudDialogflowV2beta1ResponseMessageEndInteraction; + /** + * Hands off conversation to a live agent. + */ + liveAgentHandoff?: Schema$GoogleCloudDialogflowV2beta1ResponseMessageLiveAgentHandoff; + /** + * Returns a response containing a custom, platform-specific payload. + */ + payload?: {[key: string]: any} | null; + /** + * Returns a text response. + */ + text?: Schema$GoogleCloudDialogflowV2beta1ResponseMessageText; + } + /** + * Indicates that interaction with the Dialogflow agent has ended. + */ + export interface Schema$GoogleCloudDialogflowV2beta1ResponseMessageEndInteraction {} + /** + * Indicates that the conversation should be handed off to a human agent. Dialogflow only uses this to determine which conversations were handed off to a human agent for measurement purposes. What else to do with this signal is up to you and your handoff procedures. You may set this, for example: * In the entry fulfillment of a CX Page if entering the page indicates something went extremely wrong in the conversation. * In a webhook response when you determine that the customer issue can only be handled by a human. + */ + export interface Schema$GoogleCloudDialogflowV2beta1ResponseMessageLiveAgentHandoff { + /** + * Custom metadata for your handoff procedure. Dialogflow doesn't impose any structure on this. + */ + metadata?: {[key: string]: any} | null; + } + /** + * The text response message. + */ + export interface Schema$GoogleCloudDialogflowV2beta1ResponseMessageText { + /** + * A collection of text responses. + */ + text?: string[] | null; + } /** * The request message for Agents.RestoreAgent. */ @@ -4124,6 +5074,23 @@ export namespace dialogflow_v2beta1 { */ name?: string | null; } + /** + * Represents a smart reply answer. + */ + export interface Schema$GoogleCloudDialogflowV2beta1SmartReplyAnswer { + /** + * The name of answer record, in the format of "projects//locations//answerRecords/" + */ + answerRecord?: string | null; + /** + * Smart reply confidence. The system's confidence score that this reply is a good match for this conversation, as a value from 0.0 (completely uncertain) to 1.0 (completely certain). + */ + confidence?: number | null; + /** + * The content of the reply. + */ + reply?: string | null; + } /** * Hints for the speech recognizer to help with recognition in a specific conversation state. */ @@ -4137,6 +5104,15 @@ export namespace dialogflow_v2beta1 { */ phrases?: string[] | null; } + /** + * Configures speech transcription for ConversationProfile. + */ + export interface Schema$GoogleCloudDialogflowV2beta1SpeechToTextConfig { + /** + * Optional. The speech model used in speech to text. `SPEECH_MODEL_VARIANT_UNSPECIFIED`, `USE_BEST_AVAILABLE` will be treated as `USE_ENHANCED`. It can be overridden in AnalyzeContentRequest and StreamingAnalyzeContentRequest request. + */ + speechModelVariant?: string | null; + } /** * Contains basic configuration for a sub-agent. */ @@ -4150,6 +5126,209 @@ export namespace dialogflow_v2beta1 { */ project?: string | null; } + /** + * The request message for Participants.SuggestArticles. + */ + export interface Schema$GoogleCloudDialogflowV2beta1SuggestArticlesRequest { + /** + * Optional. Max number of messages prior to and including latest_message to use as context when compiling the suggestion. By default 20 and at most 50. + */ + contextSize?: number | null; + /** + * Optional. The name of the latest conversation message to compile suggestion for. If empty, it will be the latest message of the conversation. Format: `projects//locations//conversations//messages/`. + */ + latestMessage?: string | null; + } + /** + * The response message for Participants.SuggestArticles. + */ + export interface Schema$GoogleCloudDialogflowV2beta1SuggestArticlesResponse { + /** + * Output only. Articles ordered by score in descending order. + */ + articleAnswers?: Schema$GoogleCloudDialogflowV2beta1ArticleAnswer[]; + /** + * Number of messages prior to and including latest_message to compile the suggestion. It may be smaller than the SuggestArticlesResponse.context_size field in the request if there aren't that many messages in the conversation. + */ + contextSize?: number | null; + /** + * The name of the latest conversation message used to compile suggestion for. Format: `projects//locations//conversations//messages/`. + */ + latestMessage?: string | null; + } + /** + * The request message for Participants.SuggestFaqAnswers. + */ + export interface Schema$GoogleCloudDialogflowV2beta1SuggestFaqAnswersRequest { + /** + * Optional. Max number of messages prior to and including [latest_message] to use as context when compiling the suggestion. By default 20 and at most 50. + */ + contextSize?: number | null; + /** + * Optional. The name of the latest conversation message to compile suggestion for. If empty, it will be the latest message of the conversation. Format: `projects//locations//conversations//messages/`. + */ + latestMessage?: string | null; + } + /** + * The request message for Participants.SuggestFaqAnswers. + */ + export interface Schema$GoogleCloudDialogflowV2beta1SuggestFaqAnswersResponse { + /** + * Number of messages prior to and including latest_message to compile the suggestion. It may be smaller than the SuggestFaqAnswersRequest.context_size field in the request if there aren't that many messages in the conversation. + */ + contextSize?: number | null; + /** + * Output only. Answers extracted from FAQ documents. + */ + faqAnswers?: Schema$GoogleCloudDialogflowV2beta1FaqAnswer[]; + /** + * The name of the latest conversation message used to compile suggestion for. Format: `projects//locations//conversations//messages/`. + */ + latestMessage?: string | null; + } + /** + * Represents a suggestion for a human agent. + */ + export interface Schema$GoogleCloudDialogflowV2beta1Suggestion { + /** + * Output only. Articles ordered by score in descending order. + */ + articles?: Schema$GoogleCloudDialogflowV2beta1SuggestionArticle[]; + /** + * Output only. The time the suggestion was created. + */ + createTime?: string | null; + /** + * Output only. Answers extracted from FAQ documents. + */ + faqAnswers?: Schema$GoogleCloudDialogflowV2beta1SuggestionFaqAnswer[]; + /** + * Output only. Latest message used as context to compile this suggestion. Format: `projects//locations//conversations//messages/`. + */ + latestMessage?: string | null; + /** + * Output only. The name of this suggestion. Format: `projects//locations//conversations//participants/x/suggestions/`. + */ + name?: string | null; + } + /** + * Represents suggested article. + */ + export interface Schema$GoogleCloudDialogflowV2beta1SuggestionArticle { + /** + * Output only. The name of answer record, in the format of "projects//locations//answerRecords/" + */ + answerRecord?: string | null; + /** + * Output only. A map that contains metadata about the answer and the document from which it originates. + */ + metadata?: {[key: string]: string} | null; + /** + * Output only. Article snippets. + */ + snippets?: string[] | null; + /** + * Output only. The article title. + */ + title?: string | null; + /** + * Output only. The article URI. + */ + uri?: string | null; + } + /** + * Represents suggested answer from "frequently asked questions". + */ + export interface Schema$GoogleCloudDialogflowV2beta1SuggestionFaqAnswer { + /** + * Output only. The piece of text from the `source` knowledge base document. + */ + answer?: string | null; + /** + * Output only. The name of answer record, in the format of "projects//locations//answerRecords/" + */ + answerRecord?: string | null; + /** + * The system's confidence score that this Knowledge answer is a good match for this conversational query, range from 0.0 (completely uncertain) to 1.0 (completely certain). + */ + confidence?: number | null; + /** + * Output only. A map that contains metadata about the answer and the document from which it originates. + */ + metadata?: {[key: string]: string} | null; + /** + * Output only. The corresponding FAQ question. + */ + question?: string | null; + /** + * Output only. Indicates which Knowledge Document this answer was extracted from. Format: `projects//locations//agent/knowledgeBases//documents/`. + */ + source?: string | null; + } + /** + * The type of Human Agent Assistant API suggestion to perform, and the maximum number of results to return for that type. Multiple `Feature` objects can be specified in the `features` list. + */ + export interface Schema$GoogleCloudDialogflowV2beta1SuggestionFeature { + /** + * Type of Human Agent Assistant API feature to request. + */ + type?: string | null; + } + /** + * One response of different type of suggestion response which is used in the response of Participants.AnalyzeContent and Participants.AnalyzeContent, as well as HumanAgentAssistantEvent. + */ + export interface Schema$GoogleCloudDialogflowV2beta1SuggestionResult { + /** + * Error status if the request failed. + */ + error?: Schema$GoogleRpcStatus; + /** + * SuggestArticlesResponse if request is for ARTICLE_SUGGESTION. + */ + suggestArticlesResponse?: Schema$GoogleCloudDialogflowV2beta1SuggestArticlesResponse; + /** + * SuggestFaqAnswersResponse if request is for FAQ_ANSWER. + */ + suggestFaqAnswersResponse?: Schema$GoogleCloudDialogflowV2beta1SuggestFaqAnswersResponse; + /** + * SuggestSmartRepliesResponse if request is for SMART_REPLY. + */ + suggestSmartRepliesResponse?: Schema$GoogleCloudDialogflowV2beta1SuggestSmartRepliesResponse; + } + /** + * The request message for Participants.SuggestSmartReplies. + */ + export interface Schema$GoogleCloudDialogflowV2beta1SuggestSmartRepliesRequest { + /** + * Optional. Max number of messages prior to and including [latest_message] to use as context when compiling the suggestion. By default 20 and at most 50. + */ + contextSize?: number | null; + /** + * The current natural language text segment to compile suggestion for. This provides a way for user to get follow up smart reply suggestion after a smart reply selection, without sending a text message. + */ + currentTextInput?: Schema$GoogleCloudDialogflowV2beta1TextInput; + /** + * The name of the latest conversation message to compile suggestion for. If empty, it will be the latest message of the conversation. Format: `projects//locations//conversations//messages/`. + */ + latestMessage?: string | null; + } + /** + * The response message for Participants.SuggestSmartReplies. + */ + export interface Schema$GoogleCloudDialogflowV2beta1SuggestSmartRepliesResponse { + /** + * Number of messages prior to and including latest_message to compile the suggestion. It may be smaller than the SuggestSmartRepliesRequest.context_size field in the request if there aren't that many messages in the conversation. + */ + contextSize?: number | null; + /** + * The name of the latest conversation message used to compile suggestion for. Format: `projects//locations//conversations//messages/`. + */ + latestMessage?: string | null; + /** + * Output only. Multiple reply options provided by smart reply service. The order is based on the rank of the model prediction. The maximum number of the returned replies is set in SmartReplyConfig. + */ + smartReplyAnswers?: Schema$GoogleCloudDialogflowV2beta1SmartReplyAnswer[]; + } /** * Configuration of how speech should be synthesized. */ @@ -4175,6 +5354,15 @@ export namespace dialogflow_v2beta1 { */ volumeGainDb?: number | null; } + /** + * A wrapper of repeated TelephonyDtmf digits. + */ + export interface Schema$GoogleCloudDialogflowV2beta1TelephonyDtmfEvents { + /** + * A sequence of TelephonyDtmf digits. + */ + dtmfEvents?: string[] | null; + } /** * Represents the natural language text to be processed. */ @@ -4276,6 +5464,10 @@ export namespace dialogflow_v2beta1 { * Optional. The text response message intended for the end-user. It is recommended to use `fulfillment_messages.text.text[0]` instead. When provided, Dialogflow uses this field to populate QueryResult.fulfillment_text sent to the integration or API caller. */ fulfillmentText?: string | null; + /** + * Indicates that a live agent should be brought in to handle the interaction with the user. In most cases, when you set this flag to true, you would also want to set end_interaction to true as well. Default is false. + */ + liveAgentHandoff?: boolean | null; /** * Optional. The collection of output contexts that will overwrite currently active contexts for the session and reset their lifespans. When provided, Dialogflow uses this field to populate QueryResult.output_contexts sent to the integration or API caller. */ @@ -4404,21 +5596,71 @@ export namespace dialogflow_v2beta1 { agentUri?: string | null; } /** - * An intent categorizes an end-user's intention for one conversation turn. For each agent, you define many intents, where your combined intents can handle a complete conversation. When an end-user writes or says something, referred to as an end-user expression or end-user input, Dialogflow matches the end-user input to the best intent in your agent. Matching an intent is also known as intent classification. For more information, see the [intent guide](https://cloud.google.com/dialogflow/docs/intents-overview). + * Represents answer from "frequently asked questions". */ - export interface Schema$GoogleCloudDialogflowV2Intent { + export interface Schema$GoogleCloudDialogflowV2FaqAnswer { /** - * Optional. The name of the action associated with the intent. Note: The action name must not contain whitespaces. + * The piece of text from the `source` knowledge base document. */ - action?: string | null; + answer?: string | null; /** - * Optional. The list of platforms for which the first responses will be copied from the messages in PLATFORM_UNSPECIFIED (i.e. default platform). + * The name of answer record, in the format of "projects//locations//answerRecords/" + */ + answerRecord?: string | null; + /** + * The system's confidence score that this Knowledge answer is a good match for this conversational query, range from 0.0 (completely uncertain) to 1.0 (completely certain). + */ + confidence?: number | null; + /** + * A map that contains metadata about the answer and the document from which it originates. + */ + metadata?: {[key: string]: string} | null; + /** + * The corresponding FAQ question. + */ + question?: string | null; + /** + * Indicates which Knowledge Document this answer was extracted from. Format: `projects//locations//agent/knowledgeBases//documents/`. + */ + source?: string | null; + } + /** + * Represents a notification sent to Cloud Pub/Sub subscribers for human agent assistant events in a specific conversation. + */ + export interface Schema$GoogleCloudDialogflowV2HumanAgentAssistantEvent { + /** + * The conversation this notification refers to. Format: `projects//conversations/`. + */ + conversation?: string | null; + /** + * The participant that the suggestion is compiled for. Format: `projects//conversations//participants/`. It will not be set in legacy workflow. + */ + participant?: string | null; + /** + * The suggestion results payload that this notification refers to. + */ + suggestionResults?: Schema$GoogleCloudDialogflowV2SuggestionResult[]; + } + /** + * An intent categorizes an end-user's intention for one conversation turn. For each agent, you define many intents, where your combined intents can handle a complete conversation. When an end-user writes or says something, referred to as an end-user expression or end-user input, Dialogflow matches the end-user input to the best intent in your agent. Matching an intent is also known as intent classification. For more information, see the [intent guide](https://cloud.google.com/dialogflow/docs/intents-overview). + */ + export interface Schema$GoogleCloudDialogflowV2Intent { + /** + * Optional. The name of the action associated with the intent. Note: The action name must not contain whitespaces. + */ + action?: string | null; + /** + * Optional. The list of platforms for which the first responses will be copied from the messages in PLATFORM_UNSPECIFIED (i.e. default platform). */ defaultResponsePlatforms?: string[] | null; /** * Required. The name of this intent. */ displayName?: string | null; + /** + * Optional. Indicates that this intent ends an interaction. Some integrations (e.g., Actions on Google or Dialogflow phone gateway) use this information to close interaction with an end user. Default is false. + */ + endInteraction?: boolean | null; /** * Optional. The collection of event names that trigger the intent. If the collection of input contexts is not empty, all of the contexts must be present in the active user session for an event to trigger this intent. Event names are limited to 150 characters. */ @@ -4435,6 +5677,10 @@ export namespace dialogflow_v2beta1 { * Optional. Indicates whether this is a fallback intent. */ isFallback?: boolean | null; + /** + * Optional. Indicates that a live agent should be brought in to handle the interaction with the user. In most cases, when you set this flag to true, you would also want to set end_interaction to true as well. Default is false. + */ + liveAgentHandoff?: boolean | null; /** * Optional. The collection of rich messages corresponding to the `Response` field in the Dialogflow console. */ @@ -5044,6 +6290,15 @@ export namespace dialogflow_v2beta1 { */ userDefined?: boolean | null; } + /** + * Metadata in google::longrunning::Operation for Knowledge operations. + */ + export interface Schema$GoogleCloudDialogflowV2KnowledgeOperationMetadata { + /** + * Output only. The current state of this operation. + */ + state?: string | null; + } /** * Represents a message posted into a conversation. */ @@ -5211,6 +6466,57 @@ export namespace dialogflow_v2beta1 { */ name?: string | null; } + /** + * The response message for Participants.SuggestArticles. + */ + export interface Schema$GoogleCloudDialogflowV2SuggestArticlesResponse { + /** + * Articles ordered by score in descending order. + */ + articleAnswers?: Schema$GoogleCloudDialogflowV2ArticleAnswer[]; + /** + * Number of messages prior to and including latest_message to compile the suggestion. It may be smaller than the SuggestArticlesRequest.context_size field in the request if there aren't that many messages in the conversation. + */ + contextSize?: number | null; + /** + * The name of the latest conversation message used to compile suggestion for. Format: `projects//locations//conversations//messages/`. + */ + latestMessage?: string | null; + } + /** + * The request message for Participants.SuggestFaqAnswers. + */ + export interface Schema$GoogleCloudDialogflowV2SuggestFaqAnswersResponse { + /** + * Number of messages prior to and including latest_message to compile the suggestion. It may be smaller than the SuggestFaqAnswersRequest.context_size field in the request if there aren't that many messages in the conversation. + */ + contextSize?: number | null; + /** + * Answers extracted from FAQ documents. + */ + faqAnswers?: Schema$GoogleCloudDialogflowV2FaqAnswer[]; + /** + * The name of the latest conversation message used to compile suggestion for. Format: `projects//locations//conversations//messages/`. + */ + latestMessage?: string | null; + } + /** + * One response of different type of suggestion response which is used in the response of Participants.AnalyzeContent and Participants.AnalyzeContent, as well as HumanAgentAssistantEvent. + */ + export interface Schema$GoogleCloudDialogflowV2SuggestionResult { + /** + * Error status if the request failed. + */ + error?: Schema$GoogleRpcStatus; + /** + * SuggestArticlesResponse if request is for ARTICLE_SUGGESTION. + */ + suggestArticlesResponse?: Schema$GoogleCloudDialogflowV2SuggestArticlesResponse; + /** + * SuggestFaqAnswersResponse if request is for FAQ_ANSWER. + */ + suggestFaqAnswersResponse?: Schema$GoogleCloudDialogflowV2SuggestFaqAnswersResponse; + } /** * The request message for a webhook call. */ @@ -5404,12 +6710,20 @@ export namespace dialogflow_v2beta1 { export class Resource$Projects { context: APIRequestContext; agent: Resource$Projects$Agent; + answerRecords: Resource$Projects$Answerrecords; + conversationProfiles: Resource$Projects$Conversationprofiles; + conversations: Resource$Projects$Conversations; knowledgeBases: Resource$Projects$Knowledgebases; locations: Resource$Projects$Locations; operations: Resource$Projects$Operations; constructor(context: APIRequestContext) { this.context = context; this.agent = new Resource$Projects$Agent(this.context); + this.answerRecords = new Resource$Projects$Answerrecords(this.context); + this.conversationProfiles = new Resource$Projects$Conversationprofiles( + this.context + ); + this.conversations = new Resource$Projects$Conversations(this.context); this.knowledgeBases = new Resource$Projects$Knowledgebases(this.context); this.locations = new Resource$Projects$Locations(this.context); this.operations = new Resource$Projects$Operations(this.context); @@ -6991,7 +8305,7 @@ export namespace dialogflow_v2beta1 { * * // Do the magic * const res = await dialogflow.projects.agent.updateFulfillment({ - * // Required. The unique identifier of the fulfillment. Supported formats: - `projects//agent/fulfillment` - `projects//locations//agent/fulfillment` + * // Required. The unique identifier of the fulfillment. Supported formats: - `projects//agent/fulfillment` - `projects//locations//agent/fulfillment` This field is not used for Fulfillment in an Environment. * name: 'projects/my-project/agent/fulfillment', * // Required. The mask to control which fields get updated. If the mask is not present, all fields will be updated. * updateMask: 'placeholder-value', @@ -7202,7 +8516,7 @@ export namespace dialogflow_v2beta1 { export interface Params$Resource$Projects$Agent$Updatefulfillment extends StandardParameters { /** - * Required. The unique identifier of the fulfillment. Supported formats: - `projects//agent/fulfillment` - `projects//locations//agent/fulfillment` + * Required. The unique identifier of the fulfillment. Supported formats: - `projects//agent/fulfillment` - `projects//locations//agent/fulfillment` This field is not used for Fulfillment in an Environment. */ name?: string; /** @@ -11537,6 +12851,7 @@ export namespace dialogflow_v2beta1 { * // "followupIntentInfo": [], * // "inputContextNames": [], * // "isFallback": false, + * // "liveAgentHandoff": false, * // "messages": [], * // "mlDisabled": false, * // "mlEnabled": false, @@ -11564,6 +12879,7 @@ export namespace dialogflow_v2beta1 { * // "followupIntentInfo": [], * // "inputContextNames": [], * // "isFallback": false, + * // "liveAgentHandoff": false, * // "messages": [], * // "mlDisabled": false, * // "mlEnabled": false, @@ -11858,6 +13174,7 @@ export namespace dialogflow_v2beta1 { * // "followupIntentInfo": [], * // "inputContextNames": [], * // "isFallback": false, + * // "liveAgentHandoff": false, * // "messages": [], * // "mlDisabled": false, * // "mlEnabled": false, @@ -12171,6 +13488,7 @@ export namespace dialogflow_v2beta1 { * // "followupIntentInfo": [], * // "inputContextNames": [], * // "isFallback": false, + * // "liveAgentHandoff": false, * // "messages": [], * // "mlDisabled": false, * // "mlEnabled": false, @@ -12198,6 +13516,7 @@ export namespace dialogflow_v2beta1 { * // "followupIntentInfo": [], * // "inputContextNames": [], * // "isFallback": false, + * // "liveAgentHandoff": false, * // "messages": [], * // "mlDisabled": false, * // "mlEnabled": false, @@ -13278,6 +14597,7 @@ export namespace dialogflow_v2beta1 { * // "enableAutoReload": false, * // "knowledgeTypes": [], * // "latestReloadStatus": {}, + * // "metadata": {}, * // "mimeType": "my_mimeType", * // "name": "my_name", * // "rawContent": "my_rawContent" @@ -13579,6 +14899,7 @@ export namespace dialogflow_v2beta1 { * // "enableAutoReload": false, * // "knowledgeTypes": [], * // "latestReloadStatus": {}, + * // "metadata": {}, * // "mimeType": "my_mimeType", * // "name": "my_name", * // "rawContent": "my_rawContent" @@ -13876,6 +15197,7 @@ export namespace dialogflow_v2beta1 { * // "enableAutoReload": false, * // "knowledgeTypes": [], * // "latestReloadStatus": {}, + * // "metadata": {}, * // "mimeType": "my_mimeType", * // "name": "my_name", * // "rawContent": "my_rawContent" @@ -16124,18 +17446,14 @@ export namespace dialogflow_v2beta1 { requestBody?: Schema$GoogleCloudDialogflowV2beta1SessionEntityType; } - export class Resource$Projects$Knowledgebases { + export class Resource$Projects$Answerrecords { context: APIRequestContext; - documents: Resource$Projects$Knowledgebases$Documents; constructor(context: APIRequestContext) { this.context = context; - this.documents = new Resource$Projects$Knowledgebases$Documents( - this.context - ); } /** - * Creates a knowledge base. Note: The `projects.agent.knowledgeBases` resource is deprecated; only use `projects.knowledgeBases`. + * Deprecated. Retrieves a specific answer record. * @example * ```js * // Before running the sample: @@ -16163,26 +17481,16 @@ export namespace dialogflow_v2beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.knowledgeBases.create({ - * // Required. The project to create a knowledge base for. Format: `projects//locations/`. - * parent: 'projects/my-project', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "displayName": "my_displayName", - * // "languageCode": "my_languageCode", - * // "name": "my_name" - * // } - * }, + * const res = await dialogflow.projects.answerRecords.get({ + * // Required. The name of the answer record to retrieve. Format: `projects//locations//answerRecords/`. + * name: 'projects/my-project/answerRecords/my-answerRecord', * }); * console.log(res.data); * * // Example response * // { - * // "displayName": "my_displayName", - * // "languageCode": "my_languageCode", + * // "agentAssistantRecord": {}, + * // "answerFeedback": {}, * // "name": "my_name" * // } * } @@ -16199,57 +17507,57 @@ export namespace dialogflow_v2beta1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - create( - params: Params$Resource$Projects$Knowledgebases$Create, + get( + params: Params$Resource$Projects$Answerrecords$Get, options: StreamMethodOptions ): GaxiosPromise; - create( - params?: Params$Resource$Projects$Knowledgebases$Create, + get( + params?: Params$Resource$Projects$Answerrecords$Get, options?: MethodOptions - ): GaxiosPromise; - create( - params: Params$Resource$Projects$Knowledgebases$Create, + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Answerrecords$Get, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - create( - params: Params$Resource$Projects$Knowledgebases$Create, + get( + params: Params$Resource$Projects$Answerrecords$Get, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - create( - params: Params$Resource$Projects$Knowledgebases$Create, - callback: BodyResponseCallback + get( + params: Params$Resource$Projects$Answerrecords$Get, + callback: BodyResponseCallback ): void; - create( - callback: BodyResponseCallback + get( + callback: BodyResponseCallback ): void; - create( + get( paramsOrCallback?: - | Params$Resource$Projects$Knowledgebases$Create - | BodyResponseCallback + | Params$Resource$Projects$Answerrecords$Get + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Knowledgebases$Create; + {}) as Params$Resource$Projects$Answerrecords$Get; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Knowledgebases$Create; + params = {} as Params$Resource$Projects$Answerrecords$Get; options = {}; } @@ -16262,33 +17570,30 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/knowledgeBases').replace( - /([^:]\/)\/+/g, - '$1' - ), - method: 'POST', + url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', }, options ), params, - requiredParams: ['parent'], - pathParams: ['parent'], + requiredParams: ['name'], + pathParams: ['name'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest( + return createAPIRequest( parameters ); } } /** - * Deletes the specified knowledge base. Note: The `projects.agent.knowledgeBases` resource is deprecated; only use `projects.knowledgeBases`. + * Returns the list of all answer records in the specified project in reverse chronological order. * @example * ```js * // Before running the sample: @@ -16316,16 +17621,21 @@ export namespace dialogflow_v2beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.knowledgeBases.delete({ - * // Optional. Force deletes the knowledge base. When set to true, any documents in the knowledge base are also deleted. - * force: 'placeholder-value', - * // Required. The name of the knowledge base to delete. Format: `projects//locations//knowledgeBases/`. - * name: 'projects/my-project/knowledgeBases/my-knowledgeBase', + * const res = await dialogflow.projects.answerRecords.list({ + * // Optional. The maximum number of records to return in a single page. The server may return fewer records than this. If unspecified, we use 10. The maximum is 100. + * pageSize: 'placeholder-value', + * // Optional. The ListAnswerRecordsResponse.next_page_token value returned from a previous list request used to continue listing on the next page. + * pageToken: 'placeholder-value', + * // Required. The project to list all answer records for in reverse chronological order. Format: `projects//locations/`. + * parent: 'projects/my-project', * }); * console.log(res.data); * * // Example response - * // {} + * // { + * // "answerRecords": [], + * // "nextPageToken": "my_nextPageToken" + * // } * } * * main().catch(e => { @@ -16340,53 +17650,57 @@ export namespace dialogflow_v2beta1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - delete( - params: Params$Resource$Projects$Knowledgebases$Delete, + list( + params: Params$Resource$Projects$Answerrecords$List, options: StreamMethodOptions ): GaxiosPromise; - delete( - params?: Params$Resource$Projects$Knowledgebases$Delete, + list( + params?: Params$Resource$Projects$Answerrecords$List, options?: MethodOptions - ): GaxiosPromise; - delete( - params: Params$Resource$Projects$Knowledgebases$Delete, + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Answerrecords$List, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - delete( - params: Params$Resource$Projects$Knowledgebases$Delete, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + list( + params: Params$Resource$Projects$Answerrecords$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - delete( - params: Params$Resource$Projects$Knowledgebases$Delete, - callback: BodyResponseCallback + list( + params: Params$Resource$Projects$Answerrecords$List, + callback: BodyResponseCallback ): void; - delete(callback: BodyResponseCallback): void; - delete( + list( + callback: BodyResponseCallback + ): void; + list( paramsOrCallback?: - | Params$Resource$Projects$Knowledgebases$Delete - | BodyResponseCallback + | Params$Resource$Projects$Answerrecords$List + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Knowledgebases$Delete; + {}) as Params$Resource$Projects$Answerrecords$List; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Knowledgebases$Delete; + params = {} as Params$Resource$Projects$Answerrecords$List; options = {}; } @@ -16399,28 +17713,33 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), - method: 'DELETE', + url: (rootUrl + '/v2beta1/{+parent}/answerRecords').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', }, options ), params, - requiredParams: ['name'], - pathParams: ['name'], + requiredParams: ['parent'], + pathParams: ['parent'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest( + parameters + ); } } /** - * Retrieves the specified knowledge base. Note: The `projects.agent.knowledgeBases` resource is deprecated; only use `projects.knowledgeBases`. + * Updates the specified answer record. * @example * ```js * // Before running the sample: @@ -16448,16 +17767,28 @@ export namespace dialogflow_v2beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.knowledgeBases.get({ - * // Required. The name of the knowledge base to retrieve. Format `projects//locations//knowledgeBases/`. - * name: 'projects/my-project/knowledgeBases/my-knowledgeBase', + * const res = await dialogflow.projects.answerRecords.patch({ + * // The unique identifier of this answer record. Required for AnswerRecords.UpdateAnswerRecord method. Format: `projects//locations//answerRecords/`. + * name: 'projects/my-project/answerRecords/my-answerRecord', + * // Required. The mask to control which fields get updated. + * updateMask: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "agentAssistantRecord": {}, + * // "answerFeedback": {}, + * // "name": "my_name" + * // } + * }, * }); * console.log(res.data); * * // Example response * // { - * // "displayName": "my_displayName", - * // "languageCode": "my_languageCode", + * // "agentAssistantRecord": {}, + * // "answerFeedback": {}, * // "name": "my_name" * // } * } @@ -16474,57 +17805,57 @@ export namespace dialogflow_v2beta1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - get( - params: Params$Resource$Projects$Knowledgebases$Get, + patch( + params: Params$Resource$Projects$Answerrecords$Patch, options: StreamMethodOptions ): GaxiosPromise; - get( - params?: Params$Resource$Projects$Knowledgebases$Get, + patch( + params?: Params$Resource$Projects$Answerrecords$Patch, options?: MethodOptions - ): GaxiosPromise; - get( - params: Params$Resource$Projects$Knowledgebases$Get, + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Answerrecords$Patch, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - get( - params: Params$Resource$Projects$Knowledgebases$Get, + patch( + params: Params$Resource$Projects$Answerrecords$Patch, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - get( - params: Params$Resource$Projects$Knowledgebases$Get, - callback: BodyResponseCallback + patch( + params: Params$Resource$Projects$Answerrecords$Patch, + callback: BodyResponseCallback ): void; - get( - callback: BodyResponseCallback + patch( + callback: BodyResponseCallback ): void; - get( + patch( paramsOrCallback?: - | Params$Resource$Projects$Knowledgebases$Get - | BodyResponseCallback + | Params$Resource$Projects$Answerrecords$Patch + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Knowledgebases$Get; + {}) as Params$Resource$Projects$Answerrecords$Patch; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Knowledgebases$Get; + params = {} as Params$Resource$Projects$Answerrecords$Patch; options = {}; } @@ -16538,7 +17869,7 @@ export namespace dialogflow_v2beta1 { options: Object.assign( { url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), - method: 'GET', + method: 'PATCH', }, options ), @@ -16548,20 +17879,66 @@ export namespace dialogflow_v2beta1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest( + return createAPIRequest( parameters ); } } + } + export interface Params$Resource$Projects$Answerrecords$Get + extends StandardParameters { /** - * Returns the list of all knowledge bases of the specified agent. Note: The `projects.agent.knowledgeBases` resource is deprecated; only use `projects.knowledgeBases`. - * @example + * Required. The name of the answer record to retrieve. Format: `projects//locations//answerRecords/`. + */ + name?: string; + } + export interface Params$Resource$Projects$Answerrecords$List + extends StandardParameters { + /** + * Optional. The maximum number of records to return in a single page. The server may return fewer records than this. If unspecified, we use 10. The maximum is 100. + */ + pageSize?: number; + /** + * Optional. The ListAnswerRecordsResponse.next_page_token value returned from a previous list request used to continue listing on the next page. + */ + pageToken?: string; + /** + * Required. The project to list all answer records for in reverse chronological order. Format: `projects//locations/`. + */ + parent?: string; + } + export interface Params$Resource$Projects$Answerrecords$Patch + extends StandardParameters { + /** + * The unique identifier of this answer record. Required for AnswerRecords.UpdateAnswerRecord method. Format: `projects//locations//answerRecords/`. + */ + name?: string; + /** + * Required. The mask to control which fields get updated. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1AnswerRecord; + } + + export class Resource$Projects$Conversationprofiles { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Creates a conversation profile in the specified project. ConversationProfile.CreateTime and ConversationProfile.UpdateTime aren't populated in the response. You can retrieve them via GetConversationProfile API. + * @example * ```js * // Before running the sample: * // - Enable the API at: @@ -16588,22 +17965,43 @@ export namespace dialogflow_v2beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.knowledgeBases.list({ - * // The filter expression used to filter knowledge bases returned by the list method. The expression has the following syntax: [AND ] ... The following fields and operators are supported: * display_name with has(:) operator * language_code with equals(=) operator Examples: * 'language_code=en-us' matches knowledge bases with en-us language code. * 'display_name:articles' matches knowledge bases whose display name contains "articles". * 'display_name:"Best Articles"' matches knowledge bases whose display name contains "Best Articles". * 'language_code=en-gb AND display_name=articles' matches all knowledge bases whose display name contains "articles" and whose language code is "en-gb". Note: An empty filter string (i.e. "") is a no-op and will result in no filtering. For more information about filtering, see [API Filtering](https://aip.dev/160). - * filter: 'placeholder-value', - * // The maximum number of items to return in a single page. By default 10 and at most 100. - * pageSize: 'placeholder-value', - * // The next_page_token value returned from a previous list request. - * pageToken: 'placeholder-value', - * // Required. The project to list of knowledge bases for. Format: `projects//locations/`. + * const res = await dialogflow.projects.conversationProfiles.create({ + * // Required. The project to create a conversation profile for. Format: `projects//locations/`. * parent: 'projects/my-project', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "automatedAgentConfig": {}, + * // "createTime": "my_createTime", + * // "displayName": "my_displayName", + * // "humanAgentAssistantConfig": {}, + * // "languageCode": "my_languageCode", + * // "loggingConfig": {}, + * // "name": "my_name", + * // "newMessageEventNotificationConfig": {}, + * // "notificationConfig": {}, + * // "sttConfig": {}, + * // "updateTime": "my_updateTime" + * // } + * }, * }); * console.log(res.data); * * // Example response * // { - * // "knowledgeBases": [], - * // "nextPageToken": "my_nextPageToken" + * // "automatedAgentConfig": {}, + * // "createTime": "my_createTime", + * // "displayName": "my_displayName", + * // "humanAgentAssistantConfig": {}, + * // "languageCode": "my_languageCode", + * // "loggingConfig": {}, + * // "name": "my_name", + * // "newMessageEventNotificationConfig": {}, + * // "notificationConfig": {}, + * // "sttConfig": {}, + * // "updateTime": "my_updateTime" * // } * } * @@ -16619,57 +18017,57 @@ export namespace dialogflow_v2beta1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - list( - params: Params$Resource$Projects$Knowledgebases$List, + create( + params: Params$Resource$Projects$Conversationprofiles$Create, options: StreamMethodOptions ): GaxiosPromise; - list( - params?: Params$Resource$Projects$Knowledgebases$List, + create( + params?: Params$Resource$Projects$Conversationprofiles$Create, options?: MethodOptions - ): GaxiosPromise; - list( - params: Params$Resource$Projects$Knowledgebases$List, + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Conversationprofiles$Create, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Projects$Knowledgebases$List, + create( + params: Params$Resource$Projects$Conversationprofiles$Create, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Projects$Knowledgebases$List, - callback: BodyResponseCallback + create( + params: Params$Resource$Projects$Conversationprofiles$Create, + callback: BodyResponseCallback ): void; - list( - callback: BodyResponseCallback + create( + callback: BodyResponseCallback ): void; - list( + create( paramsOrCallback?: - | Params$Resource$Projects$Knowledgebases$List - | BodyResponseCallback + | Params$Resource$Projects$Conversationprofiles$Create + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Knowledgebases$List; + {}) as Params$Resource$Projects$Conversationprofiles$Create; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Knowledgebases$List; + params = {} as Params$Resource$Projects$Conversationprofiles$Create; options = {}; } @@ -16682,11 +18080,11 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/knowledgeBases').replace( + url: (rootUrl + '/v2beta1/{+parent}/conversationProfiles').replace( /([^:]\/)\/+/g, '$1' ), - method: 'GET', + method: 'POST', }, options ), @@ -16696,19 +18094,19 @@ export namespace dialogflow_v2beta1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest( + return createAPIRequest( parameters ); } } /** - * Updates the specified knowledge base. Note: The `projects.agent.knowledgeBases` resource is deprecated; only use `projects.knowledgeBases`. + * Deletes the specified conversation profile. * @example * ```js * // Before running the sample: @@ -16736,30 +18134,14 @@ export namespace dialogflow_v2beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.knowledgeBases.patch({ - * // The knowledge base resource name. The name must be empty when creating a knowledge base. Format: `projects//locations//knowledgeBases/`. - * name: 'projects/my-project/knowledgeBases/my-knowledgeBase', - * // Optional. Not specified means `update all`. Currently, only `display_name` can be updated, an InvalidArgument will be returned for attempting to update other fields. - * updateMask: 'placeholder-value', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "displayName": "my_displayName", - * // "languageCode": "my_languageCode", - * // "name": "my_name" - * // } - * }, + * const res = await dialogflow.projects.conversationProfiles.delete({ + * // Required. The name of the conversation profile to delete. Format: `projects//locations//conversationProfiles/`. + * name: 'projects/my-project/conversationProfiles/my-conversationProfile', * }); * console.log(res.data); * * // Example response - * // { - * // "displayName": "my_displayName", - * // "languageCode": "my_languageCode", - * // "name": "my_name" - * // } + * // {} * } * * main().catch(e => { @@ -16774,57 +18156,53 @@ export namespace dialogflow_v2beta1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - patch( - params: Params$Resource$Projects$Knowledgebases$Patch, + delete( + params: Params$Resource$Projects$Conversationprofiles$Delete, options: StreamMethodOptions ): GaxiosPromise; - patch( - params?: Params$Resource$Projects$Knowledgebases$Patch, + delete( + params?: Params$Resource$Projects$Conversationprofiles$Delete, options?: MethodOptions - ): GaxiosPromise; - patch( - params: Params$Resource$Projects$Knowledgebases$Patch, + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Conversationprofiles$Delete, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - patch( - params: Params$Resource$Projects$Knowledgebases$Patch, - options: - | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - patch( - params: Params$Resource$Projects$Knowledgebases$Patch, - callback: BodyResponseCallback + delete( + params: Params$Resource$Projects$Conversationprofiles$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - patch( - callback: BodyResponseCallback + delete( + params: Params$Resource$Projects$Conversationprofiles$Delete, + callback: BodyResponseCallback ): void; - patch( + delete(callback: BodyResponseCallback): void; + delete( paramsOrCallback?: - | Params$Resource$Projects$Knowledgebases$Patch - | BodyResponseCallback + | Params$Resource$Projects$Conversationprofiles$Delete + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Knowledgebases$Patch; + {}) as Params$Resource$Projects$Conversationprofiles$Delete; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Knowledgebases$Patch; + params = {} as Params$Resource$Projects$Conversationprofiles$Delete; options = {}; } @@ -16838,7 +18216,7 @@ export namespace dialogflow_v2beta1 { options: Object.assign( { url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), - method: 'PATCH', + method: 'DELETE', }, options ), @@ -16848,92 +18226,17 @@ export namespace dialogflow_v2beta1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest( - parameters - ); + return createAPIRequest(parameters); } } - } - - export interface Params$Resource$Projects$Knowledgebases$Create - extends StandardParameters { - /** - * Required. The project to create a knowledge base for. Format: `projects//locations/`. - */ - parent?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$GoogleCloudDialogflowV2beta1KnowledgeBase; - } - export interface Params$Resource$Projects$Knowledgebases$Delete - extends StandardParameters { - /** - * Optional. Force deletes the knowledge base. When set to true, any documents in the knowledge base are also deleted. - */ - force?: boolean; - /** - * Required. The name of the knowledge base to delete. Format: `projects//locations//knowledgeBases/`. - */ - name?: string; - } - export interface Params$Resource$Projects$Knowledgebases$Get - extends StandardParameters { - /** - * Required. The name of the knowledge base to retrieve. Format `projects//locations//knowledgeBases/`. - */ - name?: string; - } - export interface Params$Resource$Projects$Knowledgebases$List - extends StandardParameters { - /** - * The filter expression used to filter knowledge bases returned by the list method. The expression has the following syntax: [AND ] ... The following fields and operators are supported: * display_name with has(:) operator * language_code with equals(=) operator Examples: * 'language_code=en-us' matches knowledge bases with en-us language code. * 'display_name:articles' matches knowledge bases whose display name contains "articles". * 'display_name:"Best Articles"' matches knowledge bases whose display name contains "Best Articles". * 'language_code=en-gb AND display_name=articles' matches all knowledge bases whose display name contains "articles" and whose language code is "en-gb". Note: An empty filter string (i.e. "") is a no-op and will result in no filtering. For more information about filtering, see [API Filtering](https://aip.dev/160). - */ - filter?: string; - /** - * The maximum number of items to return in a single page. By default 10 and at most 100. - */ - pageSize?: number; - /** - * The next_page_token value returned from a previous list request. - */ - pageToken?: string; - /** - * Required. The project to list of knowledge bases for. Format: `projects//locations/`. - */ - parent?: string; - } - export interface Params$Resource$Projects$Knowledgebases$Patch - extends StandardParameters { - /** - * The knowledge base resource name. The name must be empty when creating a knowledge base. Format: `projects//locations//knowledgeBases/`. - */ - name?: string; - /** - * Optional. Not specified means `update all`. Currently, only `display_name` can be updated, an InvalidArgument will be returned for attempting to update other fields. - */ - updateMask?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$GoogleCloudDialogflowV2beta1KnowledgeBase; - } - - export class Resource$Projects$Knowledgebases$Documents { - context: APIRequestContext; - constructor(context: APIRequestContext) { - this.context = context; - } /** - * Creates a new document. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`. + * Retrieves the specified conversation profile. * @example * ```js * // Before running the sample: @@ -16961,37 +18264,25 @@ export namespace dialogflow_v2beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.knowledgeBases.documents.create({ - * // Whether to import custom metadata from Google Cloud Storage. Only valid when the document source is Google Cloud Storage URI. - * importGcsCustomMetadata: 'placeholder-value', - * // Required. The knowledge base to create a document for. Format: `projects//locations//knowledgeBases/`. - * parent: 'projects/my-project/knowledgeBases/my-knowledgeBase', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "content": "my_content", - * // "contentUri": "my_contentUri", - * // "displayName": "my_displayName", - * // "enableAutoReload": false, - * // "knowledgeTypes": [], - * // "latestReloadStatus": {}, - * // "mimeType": "my_mimeType", - * // "name": "my_name", - * // "rawContent": "my_rawContent" - * // } - * }, - * }); - * console.log(res.data); + * const res = await dialogflow.projects.conversationProfiles.get({ + * // Required. The resource name of the conversation profile. Format: `projects//locations//conversationProfiles/`. + * name: 'projects/my-project/conversationProfiles/my-conversationProfile', + * }); + * console.log(res.data); * * // Example response * // { - * // "done": false, - * // "error": {}, - * // "metadata": {}, + * // "automatedAgentConfig": {}, + * // "createTime": "my_createTime", + * // "displayName": "my_displayName", + * // "humanAgentAssistantConfig": {}, + * // "languageCode": "my_languageCode", + * // "loggingConfig": {}, * // "name": "my_name", - * // "response": {} + * // "newMessageEventNotificationConfig": {}, + * // "notificationConfig": {}, + * // "sttConfig": {}, + * // "updateTime": "my_updateTime" * // } * } * @@ -17007,57 +18298,57 @@ export namespace dialogflow_v2beta1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - create( - params: Params$Resource$Projects$Knowledgebases$Documents$Create, + get( + params: Params$Resource$Projects$Conversationprofiles$Get, options: StreamMethodOptions ): GaxiosPromise; - create( - params?: Params$Resource$Projects$Knowledgebases$Documents$Create, + get( + params?: Params$Resource$Projects$Conversationprofiles$Get, options?: MethodOptions - ): GaxiosPromise; - create( - params: Params$Resource$Projects$Knowledgebases$Documents$Create, + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Conversationprofiles$Get, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - create( - params: Params$Resource$Projects$Knowledgebases$Documents$Create, + get( + params: Params$Resource$Projects$Conversationprofiles$Get, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - create( - params: Params$Resource$Projects$Knowledgebases$Documents$Create, - callback: BodyResponseCallback + get( + params: Params$Resource$Projects$Conversationprofiles$Get, + callback: BodyResponseCallback ): void; - create( - callback: BodyResponseCallback + get( + callback: BodyResponseCallback ): void; - create( + get( paramsOrCallback?: - | Params$Resource$Projects$Knowledgebases$Documents$Create - | BodyResponseCallback + | Params$Resource$Projects$Conversationprofiles$Get + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Knowledgebases$Documents$Create; + {}) as Params$Resource$Projects$Conversationprofiles$Get; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Knowledgebases$Documents$Create; + params = {} as Params$Resource$Projects$Conversationprofiles$Get; options = {}; } @@ -17070,31 +18361,30 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/documents').replace( - /([^:]\/)\/+/g, - '$1' - ), - method: 'POST', + url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', }, options ), params, - requiredParams: ['parent'], - pathParams: ['parent'], + requiredParams: ['name'], + pathParams: ['name'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest( + parameters + ); } } /** - * Deletes the specified document. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`. + * Returns the list of all conversation profiles in the specified project. * @example * ```js * // Before running the sample: @@ -17122,20 +18412,20 @@ export namespace dialogflow_v2beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.knowledgeBases.documents.delete({ - * // Required. The name of the document to delete. Format: `projects//locations//knowledgeBases//documents/`. - * name: - * 'projects/my-project/knowledgeBases/my-knowledgeBase/documents/my-document', + * const res = await dialogflow.projects.conversationProfiles.list({ + * // The maximum number of items to return in a single page. By default 100 and at most 1000. + * pageSize: 'placeholder-value', + * // The next_page_token value returned from a previous list request. + * pageToken: 'placeholder-value', + * // Required. The project to list all conversation profiles from. Format: `projects//locations/`. + * parent: 'projects/my-project', * }); * console.log(res.data); * * // Example response * // { - * // "done": false, - * // "error": {}, - * // "metadata": {}, - * // "name": "my_name", - * // "response": {} + * // "conversationProfiles": [], + * // "nextPageToken": "my_nextPageToken" * // } * } * @@ -17151,57 +18441,57 @@ export namespace dialogflow_v2beta1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - delete( - params: Params$Resource$Projects$Knowledgebases$Documents$Delete, + list( + params: Params$Resource$Projects$Conversationprofiles$List, options: StreamMethodOptions ): GaxiosPromise; - delete( - params?: Params$Resource$Projects$Knowledgebases$Documents$Delete, + list( + params?: Params$Resource$Projects$Conversationprofiles$List, options?: MethodOptions - ): GaxiosPromise; - delete( - params: Params$Resource$Projects$Knowledgebases$Documents$Delete, + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Conversationprofiles$List, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - delete( - params: Params$Resource$Projects$Knowledgebases$Documents$Delete, + list( + params: Params$Resource$Projects$Conversationprofiles$List, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - delete( - params: Params$Resource$Projects$Knowledgebases$Documents$Delete, - callback: BodyResponseCallback + list( + params: Params$Resource$Projects$Conversationprofiles$List, + callback: BodyResponseCallback ): void; - delete( - callback: BodyResponseCallback + list( + callback: BodyResponseCallback ): void; - delete( + list( paramsOrCallback?: - | Params$Resource$Projects$Knowledgebases$Documents$Delete - | BodyResponseCallback + | Params$Resource$Projects$Conversationprofiles$List + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Knowledgebases$Documents$Delete; + {}) as Params$Resource$Projects$Conversationprofiles$List; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Knowledgebases$Documents$Delete; + params = {} as Params$Resource$Projects$Conversationprofiles$List; options = {}; } @@ -17214,28 +18504,33 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), - method: 'DELETE', + url: (rootUrl + '/v2beta1/{+parent}/conversationProfiles').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', }, options ), params, - requiredParams: ['name'], - pathParams: ['name'], + requiredParams: ['parent'], + pathParams: ['parent'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest( + parameters + ); } } /** - * Retrieves the specified document. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`. + * Updates the specified conversation profile. ConversationProfile.CreateTime and ConversationProfile.UpdateTime aren't populated in the response. You can retrieve them via GetConversationProfile API. * @example * ```js * // Before running the sample: @@ -17263,24 +18558,45 @@ export namespace dialogflow_v2beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.knowledgeBases.documents.get({ - * // Required. The name of the document to retrieve. Format `projects//locations//knowledgeBases//documents/`. - * name: - * 'projects/my-project/knowledgeBases/my-knowledgeBase/documents/my-document', + * const res = await dialogflow.projects.conversationProfiles.patch({ + * // The unique identifier of this conversation profile. Format: `projects//locations//conversationProfiles/`. + * name: 'projects/my-project/conversationProfiles/my-conversationProfile', + * // Required. The mask to control which fields to update. + * updateMask: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "automatedAgentConfig": {}, + * // "createTime": "my_createTime", + * // "displayName": "my_displayName", + * // "humanAgentAssistantConfig": {}, + * // "languageCode": "my_languageCode", + * // "loggingConfig": {}, + * // "name": "my_name", + * // "newMessageEventNotificationConfig": {}, + * // "notificationConfig": {}, + * // "sttConfig": {}, + * // "updateTime": "my_updateTime" + * // } + * }, * }); * console.log(res.data); * * // Example response * // { - * // "content": "my_content", - * // "contentUri": "my_contentUri", + * // "automatedAgentConfig": {}, + * // "createTime": "my_createTime", * // "displayName": "my_displayName", - * // "enableAutoReload": false, - * // "knowledgeTypes": [], - * // "latestReloadStatus": {}, - * // "mimeType": "my_mimeType", + * // "humanAgentAssistantConfig": {}, + * // "languageCode": "my_languageCode", + * // "loggingConfig": {}, * // "name": "my_name", - * // "rawContent": "my_rawContent" + * // "newMessageEventNotificationConfig": {}, + * // "notificationConfig": {}, + * // "sttConfig": {}, + * // "updateTime": "my_updateTime" * // } * } * @@ -17296,57 +18612,57 @@ export namespace dialogflow_v2beta1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - get( - params: Params$Resource$Projects$Knowledgebases$Documents$Get, + patch( + params: Params$Resource$Projects$Conversationprofiles$Patch, options: StreamMethodOptions ): GaxiosPromise; - get( - params?: Params$Resource$Projects$Knowledgebases$Documents$Get, + patch( + params?: Params$Resource$Projects$Conversationprofiles$Patch, options?: MethodOptions - ): GaxiosPromise; - get( - params: Params$Resource$Projects$Knowledgebases$Documents$Get, + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Conversationprofiles$Patch, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - get( - params: Params$Resource$Projects$Knowledgebases$Documents$Get, + patch( + params: Params$Resource$Projects$Conversationprofiles$Patch, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - get( - params: Params$Resource$Projects$Knowledgebases$Documents$Get, - callback: BodyResponseCallback + patch( + params: Params$Resource$Projects$Conversationprofiles$Patch, + callback: BodyResponseCallback ): void; - get( - callback: BodyResponseCallback + patch( + callback: BodyResponseCallback ): void; - get( + patch( paramsOrCallback?: - | Params$Resource$Projects$Knowledgebases$Documents$Get - | BodyResponseCallback + | Params$Resource$Projects$Conversationprofiles$Patch + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Knowledgebases$Documents$Get; + {}) as Params$Resource$Projects$Conversationprofiles$Patch; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Knowledgebases$Documents$Get; + params = {} as Params$Resource$Projects$Conversationprofiles$Patch; options = {}; } @@ -17360,7 +18676,7 @@ export namespace dialogflow_v2beta1 { options: Object.assign( { url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), - method: 'GET', + method: 'PATCH', }, options ), @@ -17370,19 +18686,92 @@ export namespace dialogflow_v2beta1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest( + return createAPIRequest( parameters ); } } + } + export interface Params$Resource$Projects$Conversationprofiles$Create + extends StandardParameters { /** - * Returns the list of all documents of the knowledge base. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`. + * Required. The project to create a conversation profile for. Format: `projects//locations/`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1ConversationProfile; + } + export interface Params$Resource$Projects$Conversationprofiles$Delete + extends StandardParameters { + /** + * Required. The name of the conversation profile to delete. Format: `projects//locations//conversationProfiles/`. + */ + name?: string; + } + export interface Params$Resource$Projects$Conversationprofiles$Get + extends StandardParameters { + /** + * Required. The resource name of the conversation profile. Format: `projects//locations//conversationProfiles/`. + */ + name?: string; + } + export interface Params$Resource$Projects$Conversationprofiles$List + extends StandardParameters { + /** + * The maximum number of items to return in a single page. By default 100 and at most 1000. + */ + pageSize?: number; + /** + * The next_page_token value returned from a previous list request. + */ + pageToken?: string; + /** + * Required. The project to list all conversation profiles from. Format: `projects//locations/`. + */ + parent?: string; + } + export interface Params$Resource$Projects$Conversationprofiles$Patch + extends StandardParameters { + /** + * The unique identifier of this conversation profile. Format: `projects//locations//conversationProfiles/`. + */ + name?: string; + /** + * Required. The mask to control which fields to update. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1ConversationProfile; + } + + export class Resource$Projects$Conversations { + context: APIRequestContext; + messages: Resource$Projects$Conversations$Messages; + participants: Resource$Projects$Conversations$Participants; + constructor(context: APIRequestContext) { + this.context = context; + this.messages = new Resource$Projects$Conversations$Messages( + this.context + ); + this.participants = new Resource$Projects$Conversations$Participants( + this.context + ); + } + + /** + * Completes the specified conversation. Finished conversations are purged from the database after 30 days. * @example * ```js * // Before running the sample: @@ -17410,22 +18799,27 @@ export namespace dialogflow_v2beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.knowledgeBases.documents.list({ - * // The filter expression used to filter documents returned by the list method. The expression has the following syntax: [AND ] ... The following fields and operators are supported: * knowledge_types with has(:) operator * display_name with has(:) operator * state with equals(=) operator Examples: * "knowledge_types:FAQ" matches documents with FAQ knowledge type. * "display_name:customer" matches documents whose display name contains "customer". * "state=ACTIVE" matches documents with ACTIVE state. * "knowledge_types:FAQ AND state=ACTIVE" matches all active FAQ documents. For more information about filtering, see [API Filtering](https://aip.dev/160). - * filter: 'placeholder-value', - * // The maximum number of items to return in a single page. By default 10 and at most 100. - * pageSize: 'placeholder-value', - * // The next_page_token value returned from a previous list request. - * pageToken: 'placeholder-value', - * // Required. The knowledge base to list all documents for. Format: `projects//locations//knowledgeBases/`. - * parent: 'projects/my-project/knowledgeBases/my-knowledgeBase', + * const res = await dialogflow.projects.conversations.complete({ + * // Required. Resource identifier of the conversation to close. Format: `projects//locations//conversations/`. + * name: 'projects/my-project/conversations/my-conversation', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // {} + * }, * }); * console.log(res.data); * * // Example response * // { - * // "documents": [], - * // "nextPageToken": "my_nextPageToken" + * // "conversationProfile": "my_conversationProfile", + * // "conversationStage": "my_conversationStage", + * // "endTime": "my_endTime", + * // "lifecycleState": "my_lifecycleState", + * // "name": "my_name", + * // "phoneNumber": {}, + * // "startTime": "my_startTime" * // } * } * @@ -17441,57 +18835,57 @@ export namespace dialogflow_v2beta1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - list( - params: Params$Resource$Projects$Knowledgebases$Documents$List, + complete( + params: Params$Resource$Projects$Conversations$Complete, options: StreamMethodOptions ): GaxiosPromise; - list( - params?: Params$Resource$Projects$Knowledgebases$Documents$List, + complete( + params?: Params$Resource$Projects$Conversations$Complete, options?: MethodOptions - ): GaxiosPromise; - list( - params: Params$Resource$Projects$Knowledgebases$Documents$List, + ): GaxiosPromise; + complete( + params: Params$Resource$Projects$Conversations$Complete, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Projects$Knowledgebases$Documents$List, + complete( + params: Params$Resource$Projects$Conversations$Complete, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Projects$Knowledgebases$Documents$List, - callback: BodyResponseCallback + complete( + params: Params$Resource$Projects$Conversations$Complete, + callback: BodyResponseCallback ): void; - list( - callback: BodyResponseCallback + complete( + callback: BodyResponseCallback ): void; - list( + complete( paramsOrCallback?: - | Params$Resource$Projects$Knowledgebases$Documents$List - | BodyResponseCallback + | Params$Resource$Projects$Conversations$Complete + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Knowledgebases$Documents$List; + {}) as Params$Resource$Projects$Conversations$Complete; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Knowledgebases$Documents$List; + params = {} as Params$Resource$Projects$Conversations$Complete; options = {}; } @@ -17504,33 +18898,33 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/documents').replace( + url: (rootUrl + '/v2beta1/{+name}:complete').replace( /([^:]\/)\/+/g, '$1' ), - method: 'GET', + method: 'POST', }, options ), params, - requiredParams: ['parent'], - pathParams: ['parent'], + requiredParams: ['name'], + pathParams: ['name'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest( + return createAPIRequest( parameters ); } } /** - * Updates the specified document. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`. + * Creates a new conversation. Conversations are auto-completed after 24 hours. Conversation Lifecycle: There are two stages during a conversation: Automated Agent Stage and Assist Stage. For Automated Agent Stage, there will be a dialogflow agent responding to user queries. For Assist Stage, there's no dialogflow agent responding to user queries. But we will provide suggestions which are generated from conversation. If Conversation.conversation_profile is configured for a dialogflow agent, conversation will start from `Automated Agent Stage`, otherwise, it will start from `Assist Stage`. And during `Automated Agent Stage`, once an Intent with Intent.live_agent_handoff is triggered, conversation will transfer to Assist Stage. * @example * ```js * // Before running the sample: @@ -17558,26 +18952,23 @@ export namespace dialogflow_v2beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.knowledgeBases.documents.patch({ - * // Optional. The document resource name. The name must be empty when creating a document. Format: `projects//locations//knowledgeBases//documents/`. - * name: - * 'projects/my-project/knowledgeBases/my-knowledgeBase/documents/my-document', - * // Optional. Not specified means `update all`. Currently, only `display_name` can be updated, an InvalidArgument will be returned for attempting to update other fields. - * updateMask: 'placeholder-value', + * const res = await dialogflow.projects.conversations.create({ + * // Optional. Identifier of the conversation. Generally it's auto generated by Google. Only set it if you cannot wait for the response to return a auto-generated one to you. The conversation ID must be compliant with the regression fomula "a-zA-Z*" with the characters length in range of [3,64]. If the field is provided, the caller is resposible for 1. the uniqueness of the ID, otherwise the request will be rejected. 2. the consistency for whether to use custom ID or not under a project to better ensure uniqueness. + * conversationId: 'placeholder-value', + * // Required. Resource identifier of the project creating the conversation. Format: `projects//locations/`. + * parent: 'projects/my-project', * * // Request body metadata * requestBody: { * // request body parameters * // { - * // "content": "my_content", - * // "contentUri": "my_contentUri", - * // "displayName": "my_displayName", - * // "enableAutoReload": false, - * // "knowledgeTypes": [], - * // "latestReloadStatus": {}, - * // "mimeType": "my_mimeType", + * // "conversationProfile": "my_conversationProfile", + * // "conversationStage": "my_conversationStage", + * // "endTime": "my_endTime", + * // "lifecycleState": "my_lifecycleState", * // "name": "my_name", - * // "rawContent": "my_rawContent" + * // "phoneNumber": {}, + * // "startTime": "my_startTime" * // } * }, * }); @@ -17585,11 +18976,13 @@ export namespace dialogflow_v2beta1 { * * // Example response * // { - * // "done": false, - * // "error": {}, - * // "metadata": {}, + * // "conversationProfile": "my_conversationProfile", + * // "conversationStage": "my_conversationStage", + * // "endTime": "my_endTime", + * // "lifecycleState": "my_lifecycleState", * // "name": "my_name", - * // "response": {} + * // "phoneNumber": {}, + * // "startTime": "my_startTime" * // } * } * @@ -17605,57 +18998,57 @@ export namespace dialogflow_v2beta1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - patch( - params: Params$Resource$Projects$Knowledgebases$Documents$Patch, + create( + params: Params$Resource$Projects$Conversations$Create, options: StreamMethodOptions ): GaxiosPromise; - patch( - params?: Params$Resource$Projects$Knowledgebases$Documents$Patch, + create( + params?: Params$Resource$Projects$Conversations$Create, options?: MethodOptions - ): GaxiosPromise; - patch( - params: Params$Resource$Projects$Knowledgebases$Documents$Patch, + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Conversations$Create, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - patch( - params: Params$Resource$Projects$Knowledgebases$Documents$Patch, + create( + params: Params$Resource$Projects$Conversations$Create, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - patch( - params: Params$Resource$Projects$Knowledgebases$Documents$Patch, - callback: BodyResponseCallback + create( + params: Params$Resource$Projects$Conversations$Create, + callback: BodyResponseCallback ): void; - patch( - callback: BodyResponseCallback + create( + callback: BodyResponseCallback ): void; - patch( + create( paramsOrCallback?: - | Params$Resource$Projects$Knowledgebases$Documents$Patch - | BodyResponseCallback + | Params$Resource$Projects$Conversations$Create + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Knowledgebases$Documents$Patch; + {}) as Params$Resource$Projects$Conversations$Create; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Knowledgebases$Documents$Patch; + params = {} as Params$Resource$Projects$Conversations$Create; options = {}; } @@ -17668,28 +19061,33 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), - method: 'PATCH', + url: (rootUrl + '/v2beta1/{+parent}/conversations').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', }, options ), params, - requiredParams: ['name'], - pathParams: ['name'], + requiredParams: ['parent'], + pathParams: ['parent'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest( + parameters + ); } } /** - * Reloads the specified document from its specified source, content_uri or content. The previously loaded content of the document will be deleted. Note: Even when the content of the document has not changed, there still may be side effects because of internal implementation changes. Note: If the document source is Google Cloud Storage URI, its metadata will be replaced with the custom metadata from Google Cloud Storage if the `import_gcs_custom_metadata` field is set to true in the request. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`. + * Retrieves the specific conversation. * @example * ```js * // Before running the sample: @@ -17717,29 +19115,21 @@ export namespace dialogflow_v2beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.knowledgeBases.documents.reload({ - * // Required. The name of the document to reload. Format: `projects//locations//knowledgeBases//documents/` - * name: - * 'projects/my-project/knowledgeBases/my-knowledgeBase/documents/my-document', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "gcsSource": {}, - * // "importGcsCustomMetadata": false - * // } - * }, + * const res = await dialogflow.projects.conversations.get({ + * // Required. The name of the conversation. Format: `projects//locations//conversations/`. + * name: 'projects/my-project/conversations/my-conversation', * }); * console.log(res.data); * * // Example response * // { - * // "done": false, - * // "error": {}, - * // "metadata": {}, + * // "conversationProfile": "my_conversationProfile", + * // "conversationStage": "my_conversationStage", + * // "endTime": "my_endTime", + * // "lifecycleState": "my_lifecycleState", * // "name": "my_name", - * // "response": {} + * // "phoneNumber": {}, + * // "startTime": "my_startTime" * // } * } * @@ -17755,57 +19145,57 @@ export namespace dialogflow_v2beta1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - reload( - params: Params$Resource$Projects$Knowledgebases$Documents$Reload, + get( + params: Params$Resource$Projects$Conversations$Get, options: StreamMethodOptions ): GaxiosPromise; - reload( - params?: Params$Resource$Projects$Knowledgebases$Documents$Reload, + get( + params?: Params$Resource$Projects$Conversations$Get, options?: MethodOptions - ): GaxiosPromise; - reload( - params: Params$Resource$Projects$Knowledgebases$Documents$Reload, + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Conversations$Get, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - reload( - params: Params$Resource$Projects$Knowledgebases$Documents$Reload, + get( + params: Params$Resource$Projects$Conversations$Get, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - reload( - params: Params$Resource$Projects$Knowledgebases$Documents$Reload, - callback: BodyResponseCallback + get( + params: Params$Resource$Projects$Conversations$Get, + callback: BodyResponseCallback ): void; - reload( - callback: BodyResponseCallback + get( + callback: BodyResponseCallback ): void; - reload( + get( paramsOrCallback?: - | Params$Resource$Projects$Knowledgebases$Documents$Reload - | BodyResponseCallback + | Params$Resource$Projects$Conversations$Get + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Knowledgebases$Documents$Reload; + {}) as Params$Resource$Projects$Conversations$Get; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Knowledgebases$Documents$Reload; + params = {} as Params$Resource$Projects$Conversations$Get; options = {}; } @@ -17818,11 +19208,8 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+name}:reload').replace( - /([^:]\/)\/+/g, - '$1' - ), - method: 'POST', + url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', }, options ), @@ -17832,112 +19219,19 @@ export namespace dialogflow_v2beta1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest( + parameters + ); } } - } - - export interface Params$Resource$Projects$Knowledgebases$Documents$Create - extends StandardParameters { - /** - * Whether to import custom metadata from Google Cloud Storage. Only valid when the document source is Google Cloud Storage URI. - */ - importGcsCustomMetadata?: boolean; - /** - * Required. The knowledge base to create a document for. Format: `projects//locations//knowledgeBases/`. - */ - parent?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$GoogleCloudDialogflowV2beta1Document; - } - export interface Params$Resource$Projects$Knowledgebases$Documents$Delete - extends StandardParameters { - /** - * Required. The name of the document to delete. Format: `projects//locations//knowledgeBases//documents/`. - */ - name?: string; - } - export interface Params$Resource$Projects$Knowledgebases$Documents$Get - extends StandardParameters { - /** - * Required. The name of the document to retrieve. Format `projects//locations//knowledgeBases//documents/`. - */ - name?: string; - } - export interface Params$Resource$Projects$Knowledgebases$Documents$List - extends StandardParameters { - /** - * The filter expression used to filter documents returned by the list method. The expression has the following syntax: [AND ] ... The following fields and operators are supported: * knowledge_types with has(:) operator * display_name with has(:) operator * state with equals(=) operator Examples: * "knowledge_types:FAQ" matches documents with FAQ knowledge type. * "display_name:customer" matches documents whose display name contains "customer". * "state=ACTIVE" matches documents with ACTIVE state. * "knowledge_types:FAQ AND state=ACTIVE" matches all active FAQ documents. For more information about filtering, see [API Filtering](https://aip.dev/160). - */ - filter?: string; - /** - * The maximum number of items to return in a single page. By default 10 and at most 100. - */ - pageSize?: number; - /** - * The next_page_token value returned from a previous list request. - */ - pageToken?: string; - /** - * Required. The knowledge base to list all documents for. Format: `projects//locations//knowledgeBases/`. - */ - parent?: string; - } - export interface Params$Resource$Projects$Knowledgebases$Documents$Patch - extends StandardParameters { - /** - * Optional. The document resource name. The name must be empty when creating a document. Format: `projects//locations//knowledgeBases//documents/`. - */ - name?: string; - /** - * Optional. Not specified means `update all`. Currently, only `display_name` can be updated, an InvalidArgument will be returned for attempting to update other fields. - */ - updateMask?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$GoogleCloudDialogflowV2beta1Document; - } - export interface Params$Resource$Projects$Knowledgebases$Documents$Reload - extends StandardParameters { - /** - * Required. The name of the document to reload. Format: `projects//locations//knowledgeBases//documents/` - */ - name?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$GoogleCloudDialogflowV2beta1ReloadDocumentRequest; - } - - export class Resource$Projects$Locations { - context: APIRequestContext; - agent: Resource$Projects$Locations$Agent; - knowledgeBases: Resource$Projects$Locations$Knowledgebases; - operations: Resource$Projects$Locations$Operations; - constructor(context: APIRequestContext) { - this.context = context; - this.agent = new Resource$Projects$Locations$Agent(this.context); - this.knowledgeBases = new Resource$Projects$Locations$Knowledgebases( - this.context - ); - this.operations = new Resource$Projects$Locations$Operations( - this.context - ); - } /** - * Deletes the specified agent. + * Returns the list of all conversations in the specified project. * @example * ```js * // Before running the sample: @@ -17965,14 +19259,23 @@ export namespace dialogflow_v2beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.locations.deleteAgent({ - * // Required. The project that the agent to delete is associated with. Format: `projects/` or `projects//locations/`. - * parent: 'projects/my-project/locations/my-location', - * }); - * console.log(res.data); - * + * const res = await dialogflow.projects.conversations.list({ + * // A filter expression that filters conversations listed in the response. In general, the expression must specify the field name, a comparison operator, and the value to use for filtering: - The value must be a string, a number, or a boolean. - The comparison operator must be either `=`,`!=`, `\>`, or `<`. - To filter on multiple expressions, separate the expressions with `AND` or `OR` (omitting both implies `AND`). - For clarity, expressions can be enclosed in parentheses. Only `lifecycle_state` can be filtered on in this way. For example, the following expression only returns `COMPLETED` conversations: `lifecycle_state = "COMPLETED"` For more information about filtering, see [API Filtering](https://aip.dev/160). + * filter: 'placeholder-value', + * // Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. + * pageSize: 'placeholder-value', + * // Optional. The next_page_token value returned from a previous list request. + * pageToken: 'placeholder-value', + * // Required. The project from which to list all conversation. Format: `projects//locations/`. + * parent: 'projects/my-project', + * }); + * console.log(res.data); + * * // Example response - * // {} + * // { + * // "conversations": [], + * // "nextPageToken": "my_nextPageToken" + * // } * } * * main().catch(e => { @@ -17987,55 +19290,57 @@ export namespace dialogflow_v2beta1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - deleteAgent( - params: Params$Resource$Projects$Locations$Deleteagent, + list( + params: Params$Resource$Projects$Conversations$List, options: StreamMethodOptions ): GaxiosPromise; - deleteAgent( - params?: Params$Resource$Projects$Locations$Deleteagent, + list( + params?: Params$Resource$Projects$Conversations$List, options?: MethodOptions - ): GaxiosPromise; - deleteAgent( - params: Params$Resource$Projects$Locations$Deleteagent, + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Conversations$List, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - deleteAgent( - params: Params$Resource$Projects$Locations$Deleteagent, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + list( + params: Params$Resource$Projects$Conversations$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - deleteAgent( - params: Params$Resource$Projects$Locations$Deleteagent, - callback: BodyResponseCallback + list( + params: Params$Resource$Projects$Conversations$List, + callback: BodyResponseCallback ): void; - deleteAgent( - callback: BodyResponseCallback + list( + callback: BodyResponseCallback ): void; - deleteAgent( + list( paramsOrCallback?: - | Params$Resource$Projects$Locations$Deleteagent - | BodyResponseCallback + | Params$Resource$Projects$Conversations$List + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Locations$Deleteagent; + {}) as Params$Resource$Projects$Conversations$List; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Locations$Deleteagent; + params = {} as Params$Resource$Projects$Conversations$List; options = {}; } @@ -18048,11 +19353,11 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/agent').replace( + url: (rootUrl + '/v2beta1/{+parent}/conversations').replace( /([^:]\/)\/+/g, '$1' ), - method: 'DELETE', + method: 'GET', }, options ), @@ -18062,17 +19367,81 @@ export namespace dialogflow_v2beta1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest( + parameters + ); } } + } + export interface Params$Resource$Projects$Conversations$Complete + extends StandardParameters { /** - * Retrieves the specified agent. + * Required. Resource identifier of the conversation to close. Format: `projects//locations//conversations/`. + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1CompleteConversationRequest; + } + export interface Params$Resource$Projects$Conversations$Create + extends StandardParameters { + /** + * Optional. Identifier of the conversation. Generally it's auto generated by Google. Only set it if you cannot wait for the response to return a auto-generated one to you. The conversation ID must be compliant with the regression fomula "a-zA-Z*" with the characters length in range of [3,64]. If the field is provided, the caller is resposible for 1. the uniqueness of the ID, otherwise the request will be rejected. 2. the consistency for whether to use custom ID or not under a project to better ensure uniqueness. + */ + conversationId?: string; + /** + * Required. Resource identifier of the project creating the conversation. Format: `projects//locations/`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1Conversation; + } + export interface Params$Resource$Projects$Conversations$Get + extends StandardParameters { + /** + * Required. The name of the conversation. Format: `projects//locations//conversations/`. + */ + name?: string; + } + export interface Params$Resource$Projects$Conversations$List + extends StandardParameters { + /** + * A filter expression that filters conversations listed in the response. In general, the expression must specify the field name, a comparison operator, and the value to use for filtering: - The value must be a string, a number, or a boolean. - The comparison operator must be either `=`,`!=`, `\>`, or `<`. - To filter on multiple expressions, separate the expressions with `AND` or `OR` (omitting both implies `AND`). - For clarity, expressions can be enclosed in parentheses. Only `lifecycle_state` can be filtered on in this way. For example, the following expression only returns `COMPLETED` conversations: `lifecycle_state = "COMPLETED"` For more information about filtering, see [API Filtering](https://aip.dev/160). + */ + filter?: string; + /** + * Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. + */ + pageSize?: number; + /** + * Optional. The next_page_token value returned from a previous list request. + */ + pageToken?: string; + /** + * Required. The project from which to list all conversation. Format: `projects//locations/`. + */ + parent?: string; + } + + export class Resource$Projects$Conversations$Messages { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Batch ingests messages to conversation. Customers can use this RPC to ingest historical messages to conversation. * @example * ```js * // Before running the sample: @@ -18100,26 +19469,23 @@ export namespace dialogflow_v2beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.locations.getAgent({ - * // Required. The project that the agent to fetch is associated with. Format: `projects/` or `projects//locations/`. - * parent: 'projects/my-project/locations/my-location', + * const res = await dialogflow.projects.conversations.messages.batchCreate({ + * // Required. Resource identifier of the conversation to create message. Format: `projects//locations//conversations/`. + * parent: 'projects/my-project/conversations/my-conversation', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "requests": [] + * // } + * }, * }); * console.log(res.data); * * // Example response * // { - * // "apiVersion": "my_apiVersion", - * // "avatarUri": "my_avatarUri", - * // "classificationThreshold": {}, - * // "defaultLanguageCode": "my_defaultLanguageCode", - * // "description": "my_description", - * // "displayName": "my_displayName", - * // "enableLogging": false, - * // "matchMode": "my_matchMode", - * // "parent": "my_parent", - * // "supportedLanguageCodes": [], - * // "tier": "my_tier", - * // "timeZone": "my_timeZone" + * // "messages": [] * // } * } * @@ -18135,57 +19501,57 @@ export namespace dialogflow_v2beta1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - getAgent( - params: Params$Resource$Projects$Locations$Getagent, + batchCreate( + params: Params$Resource$Projects$Conversations$Messages$Batchcreate, options: StreamMethodOptions ): GaxiosPromise; - getAgent( - params?: Params$Resource$Projects$Locations$Getagent, + batchCreate( + params?: Params$Resource$Projects$Conversations$Messages$Batchcreate, options?: MethodOptions - ): GaxiosPromise; - getAgent( - params: Params$Resource$Projects$Locations$Getagent, + ): GaxiosPromise; + batchCreate( + params: Params$Resource$Projects$Conversations$Messages$Batchcreate, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - getAgent( - params: Params$Resource$Projects$Locations$Getagent, + batchCreate( + params: Params$Resource$Projects$Conversations$Messages$Batchcreate, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - getAgent( - params: Params$Resource$Projects$Locations$Getagent, - callback: BodyResponseCallback + batchCreate( + params: Params$Resource$Projects$Conversations$Messages$Batchcreate, + callback: BodyResponseCallback ): void; - getAgent( - callback: BodyResponseCallback + batchCreate( + callback: BodyResponseCallback ): void; - getAgent( + batchCreate( paramsOrCallback?: - | Params$Resource$Projects$Locations$Getagent - | BodyResponseCallback + | Params$Resource$Projects$Conversations$Messages$Batchcreate + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Locations$Getagent; + {}) as Params$Resource$Projects$Conversations$Messages$Batchcreate; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Locations$Getagent; + params = {} as Params$Resource$Projects$Conversations$Messages$Batchcreate; options = {}; } @@ -18198,11 +19564,11 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/agent').replace( + url: (rootUrl + '/v2beta1/{+parent}/messages:batchCreate').replace( /([^:]\/)\/+/g, '$1' ), - method: 'GET', + method: 'POST', }, options ), @@ -18212,19 +19578,19 @@ export namespace dialogflow_v2beta1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest( + return createAPIRequest( parameters ); } } /** - * Creates/updates the specified agent. + * Lists messages that belong to a given conversation. `messages` are ordered by `create_time` in descending order. To fetch updates without duplication, send request with filter `create_time_epoch_microseconds \> [first item's create_time of previous request]` and empty page_token. * @example * ```js * // Before running the sample: @@ -18252,47 +19618,22 @@ export namespace dialogflow_v2beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.locations.setAgent({ - * // Required. The project of this agent. Format: `projects/` or `projects//locations/` - * parent: 'projects/my-project/locations/my-location', - * // Optional. The mask to control which fields get updated. - * updateMask: 'placeholder-value', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "apiVersion": "my_apiVersion", - * // "avatarUri": "my_avatarUri", - * // "classificationThreshold": {}, - * // "defaultLanguageCode": "my_defaultLanguageCode", - * // "description": "my_description", - * // "displayName": "my_displayName", - * // "enableLogging": false, - * // "matchMode": "my_matchMode", - * // "parent": "my_parent", - * // "supportedLanguageCodes": [], - * // "tier": "my_tier", - * // "timeZone": "my_timeZone" - * // } - * }, + * const res = await dialogflow.projects.conversations.messages.list({ + * // Optional. Filter on message fields. Currently predicates on `create_time` and `create_time_epoch_microseconds` are supported. `create_time` only support milliseconds accuracy. E.g., `create_time_epoch_microseconds \> 1551790877964485` or `create_time \> 2017-01-15T01:30:15.01Z`. For more information about filtering, see [API Filtering](https://aip.dev/160). + * filter: 'placeholder-value', + * // Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. + * pageSize: 'placeholder-value', + * // Optional. The next_page_token value returned from a previous list request. + * pageToken: 'placeholder-value', + * // Required. The name of the conversation to list messages for. Format: `projects//locations//conversations/` + * parent: 'projects/my-project/conversations/my-conversation', * }); * console.log(res.data); * * // Example response * // { - * // "apiVersion": "my_apiVersion", - * // "avatarUri": "my_avatarUri", - * // "classificationThreshold": {}, - * // "defaultLanguageCode": "my_defaultLanguageCode", - * // "description": "my_description", - * // "displayName": "my_displayName", - * // "enableLogging": false, - * // "matchMode": "my_matchMode", - * // "parent": "my_parent", - * // "supportedLanguageCodes": [], - * // "tier": "my_tier", - * // "timeZone": "my_timeZone" + * // "messages": [], + * // "nextPageToken": "my_nextPageToken" * // } * } * @@ -18308,57 +19649,57 @@ export namespace dialogflow_v2beta1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - setAgent( - params: Params$Resource$Projects$Locations$Setagent, + list( + params: Params$Resource$Projects$Conversations$Messages$List, options: StreamMethodOptions ): GaxiosPromise; - setAgent( - params?: Params$Resource$Projects$Locations$Setagent, + list( + params?: Params$Resource$Projects$Conversations$Messages$List, options?: MethodOptions - ): GaxiosPromise; - setAgent( - params: Params$Resource$Projects$Locations$Setagent, + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Conversations$Messages$List, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - setAgent( - params: Params$Resource$Projects$Locations$Setagent, + list( + params: Params$Resource$Projects$Conversations$Messages$List, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - setAgent( - params: Params$Resource$Projects$Locations$Setagent, - callback: BodyResponseCallback + list( + params: Params$Resource$Projects$Conversations$Messages$List, + callback: BodyResponseCallback ): void; - setAgent( - callback: BodyResponseCallback + list( + callback: BodyResponseCallback ): void; - setAgent( + list( paramsOrCallback?: - | Params$Resource$Projects$Locations$Setagent - | BodyResponseCallback + | Params$Resource$Projects$Conversations$Messages$List + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Locations$Setagent; + {}) as Params$Resource$Projects$Conversations$Messages$List; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Locations$Setagent; + params = {} as Params$Resource$Projects$Conversations$Messages$List; options = {}; } @@ -18371,11 +19712,11 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/agent').replace( + url: (rootUrl + '/v2beta1/{+parent}/messages').replace( /([^:]\/)\/+/g, '$1' ), - method: 'POST', + method: 'GET', }, options ), @@ -18385,73 +19726,62 @@ export namespace dialogflow_v2beta1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest( + return createAPIRequest( parameters ); } } } - export interface Params$Resource$Projects$Locations$Deleteagent + export interface Params$Resource$Projects$Conversations$Messages$Batchcreate extends StandardParameters { /** - * Required. The project that the agent to delete is associated with. Format: `projects/` or `projects//locations/`. + * Required. Resource identifier of the conversation to create message. Format: `projects//locations//conversations/`. */ parent?: string; - } - export interface Params$Resource$Projects$Locations$Getagent - extends StandardParameters { + /** - * Required. The project that the agent to fetch is associated with. Format: `projects/` or `projects//locations/`. + * Request body metadata */ - parent?: string; + requestBody?: Schema$GoogleCloudDialogflowV2beta1BatchCreateMessagesRequest; } - export interface Params$Resource$Projects$Locations$Setagent + export interface Params$Resource$Projects$Conversations$Messages$List extends StandardParameters { /** - * Required. The project of this agent. Format: `projects/` or `projects//locations/` + * Optional. Filter on message fields. Currently predicates on `create_time` and `create_time_epoch_microseconds` are supported. `create_time` only support milliseconds accuracy. E.g., `create_time_epoch_microseconds \> 1551790877964485` or `create_time \> 2017-01-15T01:30:15.01Z`. For more information about filtering, see [API Filtering](https://aip.dev/160). */ - parent?: string; + filter?: string; /** - * Optional. The mask to control which fields get updated. + * Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. */ - updateMask?: string; - + pageSize?: number; /** - * Request body metadata + * Optional. The next_page_token value returned from a previous list request. */ - requestBody?: Schema$GoogleCloudDialogflowV2beta1Agent; + pageToken?: string; + /** + * Required. The name of the conversation to list messages for. Format: `projects//locations//conversations/` + */ + parent?: string; } - export class Resource$Projects$Locations$Agent { + export class Resource$Projects$Conversations$Participants { context: APIRequestContext; - entityTypes: Resource$Projects$Locations$Agent$Entitytypes; - environments: Resource$Projects$Locations$Agent$Environments; - intents: Resource$Projects$Locations$Agent$Intents; - sessions: Resource$Projects$Locations$Agent$Sessions; + suggestions: Resource$Projects$Conversations$Participants$Suggestions; constructor(context: APIRequestContext) { this.context = context; - this.entityTypes = new Resource$Projects$Locations$Agent$Entitytypes( - this.context - ); - this.environments = new Resource$Projects$Locations$Agent$Environments( - this.context - ); - this.intents = new Resource$Projects$Locations$Agent$Intents( - this.context - ); - this.sessions = new Resource$Projects$Locations$Agent$Sessions( + this.suggestions = new Resource$Projects$Conversations$Participants$Suggestions( this.context ); } /** - * Exports the specified agent to a ZIP file. Operation + * Adds a text (chat, for example), or audio (phone recording, for example) message from a participant into the conversation. Note: Always use agent versions for production traffic sent to virtual agents. See [Versions and environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). * @example * ```js * // Before running the sample: @@ -18479,27 +19809,37 @@ export namespace dialogflow_v2beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.locations.agent.export({ - * // Required. The project that the agent to export is associated with. Format: `projects/` or `projects//locations/`. - * parent: 'projects/my-project/locations/my-location', + * const res = await dialogflow.projects.conversations.participants.analyzeContent( + * { + * // Required. The name of the participant this text comes from. Format: `projects//locations//conversations//participants/`. + * participant: + * 'projects/my-project/conversations/my-conversation/participants/my-participant', * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "agentUri": "my_agentUri" - * // } - * }, - * }); + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "eventInput": {}, + * // "messageSendTime": "my_messageSendTime", + * // "queryParams": {}, + * // "replyAudioConfig": {}, + * // "requestId": "my_requestId", + * // "textInput": {} + * // } + * }, + * } + * ); * console.log(res.data); * * // Example response * // { - * // "done": false, - * // "error": {}, - * // "metadata": {}, - * // "name": "my_name", - * // "response": {} + * // "automatedAgentReply": {}, + * // "dtmfParameters": {}, + * // "endUserSuggestionResults": [], + * // "humanAgentSuggestionResults": [], + * // "message": {}, + * // "replyAudio": {}, + * // "replyText": "my_replyText" * // } * } * @@ -18515,57 +19855,57 @@ export namespace dialogflow_v2beta1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - export( - params: Params$Resource$Projects$Locations$Agent$Export, + analyzeContent( + params: Params$Resource$Projects$Conversations$Participants$Analyzecontent, options: StreamMethodOptions ): GaxiosPromise; - export( - params?: Params$Resource$Projects$Locations$Agent$Export, + analyzeContent( + params?: Params$Resource$Projects$Conversations$Participants$Analyzecontent, options?: MethodOptions - ): GaxiosPromise; - export( - params: Params$Resource$Projects$Locations$Agent$Export, + ): GaxiosPromise; + analyzeContent( + params: Params$Resource$Projects$Conversations$Participants$Analyzecontent, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - export( - params: Params$Resource$Projects$Locations$Agent$Export, + analyzeContent( + params: Params$Resource$Projects$Conversations$Participants$Analyzecontent, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - export( - params: Params$Resource$Projects$Locations$Agent$Export, - callback: BodyResponseCallback + analyzeContent( + params: Params$Resource$Projects$Conversations$Participants$Analyzecontent, + callback: BodyResponseCallback ): void; - export( - callback: BodyResponseCallback + analyzeContent( + callback: BodyResponseCallback ): void; - export( + analyzeContent( paramsOrCallback?: - | Params$Resource$Projects$Locations$Agent$Export - | BodyResponseCallback + | Params$Resource$Projects$Conversations$Participants$Analyzecontent + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Locations$Agent$Export; + {}) as Params$Resource$Projects$Conversations$Participants$Analyzecontent; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Locations$Agent$Export; + params = {} as Params$Resource$Projects$Conversations$Participants$Analyzecontent; options = {}; } @@ -18578,7 +19918,7 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/agent:export').replace( + url: (rootUrl + '/v2beta1/{+participant}:analyzeContent').replace( /([^:]\/)\/+/g, '$1' ), @@ -18587,22 +19927,24 @@ export namespace dialogflow_v2beta1 { options ), params, - requiredParams: ['parent'], - pathParams: ['parent'], + requiredParams: ['participant'], + pathParams: ['participant'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest( + parameters + ); } } /** - * Retrieves the fulfillment. + * Creates a new participant in a conversation. * @example * ```js * // Before running the sample: @@ -18630,19 +19972,27 @@ export namespace dialogflow_v2beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.locations.agent.getFulfillment({ - * // Required. The name of the fulfillment. Supported formats: - `projects//agent/fulfillment` - `projects//locations//agent/fulfillment` - * name: 'projects/my-project/locations/my-location/agent/fulfillment', + * const res = await dialogflow.projects.conversations.participants.create({ + * // Required. Resource identifier of the conversation adding the participant. Format: `projects//locations//conversations/`. + * parent: 'projects/my-project/conversations/my-conversation', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "name": "my_name", + * // "obfuscatedExternalUserId": "my_obfuscatedExternalUserId", + * // "role": "my_role" + * // } + * }, * }); * console.log(res.data); * * // Example response * // { - * // "displayName": "my_displayName", - * // "enabled": false, - * // "features": [], - * // "genericWebService": {}, - * // "name": "my_name" + * // "name": "my_name", + * // "obfuscatedExternalUserId": "my_obfuscatedExternalUserId", + * // "role": "my_role" * // } * } * @@ -18658,57 +20008,57 @@ export namespace dialogflow_v2beta1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - getFulfillment( - params: Params$Resource$Projects$Locations$Agent$Getfulfillment, + create( + params: Params$Resource$Projects$Conversations$Participants$Create, options: StreamMethodOptions ): GaxiosPromise; - getFulfillment( - params?: Params$Resource$Projects$Locations$Agent$Getfulfillment, + create( + params?: Params$Resource$Projects$Conversations$Participants$Create, options?: MethodOptions - ): GaxiosPromise; - getFulfillment( - params: Params$Resource$Projects$Locations$Agent$Getfulfillment, + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Conversations$Participants$Create, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - getFulfillment( - params: Params$Resource$Projects$Locations$Agent$Getfulfillment, + create( + params: Params$Resource$Projects$Conversations$Participants$Create, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - getFulfillment( - params: Params$Resource$Projects$Locations$Agent$Getfulfillment, - callback: BodyResponseCallback + create( + params: Params$Resource$Projects$Conversations$Participants$Create, + callback: BodyResponseCallback ): void; - getFulfillment( - callback: BodyResponseCallback + create( + callback: BodyResponseCallback ): void; - getFulfillment( + create( paramsOrCallback?: - | Params$Resource$Projects$Locations$Agent$Getfulfillment - | BodyResponseCallback + | Params$Resource$Projects$Conversations$Participants$Create + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Locations$Agent$Getfulfillment; + {}) as Params$Resource$Projects$Conversations$Participants$Create; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Locations$Agent$Getfulfillment; + params = {} as Params$Resource$Projects$Conversations$Participants$Create; options = {}; } @@ -18721,30 +20071,33 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), - method: 'GET', + url: (rootUrl + '/v2beta1/{+parent}/participants').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', }, options ), params, - requiredParams: ['name'], - pathParams: ['name'], + requiredParams: ['parent'], + pathParams: ['parent'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest( + return createAPIRequest( parameters ); } } /** - * Gets agent validation result. Agent validation is performed during training time and is updated automatically when training is completed. + * Retrieves a conversation participant. * @example * ```js * // Before running the sample: @@ -18772,17 +20125,18 @@ export namespace dialogflow_v2beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.locations.agent.getValidationResult({ - * // Optional. The language for which you want a validation result. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. - * languageCode: 'placeholder-value', - * // Required. The project that the agent is associated with. Format: `projects/` or `projects//locations/`. - * parent: 'projects/my-project/locations/my-location', + * const res = await dialogflow.projects.conversations.participants.get({ + * // Required. The name of the participant. Format: `projects//locations//conversations//participants/`. + * name: + * 'projects/my-project/conversations/my-conversation/participants/my-participant', * }); * console.log(res.data); * * // Example response * // { - * // "validationErrors": [] + * // "name": "my_name", + * // "obfuscatedExternalUserId": "my_obfuscatedExternalUserId", + * // "role": "my_role" * // } * } * @@ -18798,57 +20152,57 @@ export namespace dialogflow_v2beta1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - getValidationResult( - params: Params$Resource$Projects$Locations$Agent$Getvalidationresult, + get( + params: Params$Resource$Projects$Conversations$Participants$Get, options: StreamMethodOptions ): GaxiosPromise; - getValidationResult( - params?: Params$Resource$Projects$Locations$Agent$Getvalidationresult, + get( + params?: Params$Resource$Projects$Conversations$Participants$Get, options?: MethodOptions - ): GaxiosPromise; - getValidationResult( - params: Params$Resource$Projects$Locations$Agent$Getvalidationresult, + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Conversations$Participants$Get, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - getValidationResult( - params: Params$Resource$Projects$Locations$Agent$Getvalidationresult, + get( + params: Params$Resource$Projects$Conversations$Participants$Get, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - getValidationResult( - params: Params$Resource$Projects$Locations$Agent$Getvalidationresult, - callback: BodyResponseCallback + get( + params: Params$Resource$Projects$Conversations$Participants$Get, + callback: BodyResponseCallback ): void; - getValidationResult( - callback: BodyResponseCallback + get( + callback: BodyResponseCallback ): void; - getValidationResult( + get( paramsOrCallback?: - | Params$Resource$Projects$Locations$Agent$Getvalidationresult - | BodyResponseCallback + | Params$Resource$Projects$Conversations$Participants$Get + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Locations$Agent$Getvalidationresult; + {}) as Params$Resource$Projects$Conversations$Participants$Get; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Locations$Agent$Getvalidationresult; + params = {} as Params$Resource$Projects$Conversations$Participants$Get; options = {}; } @@ -18861,32 +20215,30 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: ( - rootUrl + '/v2beta1/{+parent}/agent/validationResult' - ).replace(/([^:]\/)\/+/g, '$1'), + url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), method: 'GET', }, options ), params, - requiredParams: ['parent'], - pathParams: ['parent'], + requiredParams: ['name'], + pathParams: ['name'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest( + return createAPIRequest( parameters ); } } /** - * Imports the specified agent from a ZIP file. Uploads new intents and entity types without deleting the existing ones. Intents and entity types with the same name are replaced with the new versions from ImportAgentRequest. After the import, the imported draft agent will be trained automatically (unless disabled in agent settings). However, once the import is done, training may not be completed yet. Please call TrainAgent and wait for the operation it returns in order to train explicitly. Operation An operation which tracks when importing is complete. It only tracks when the draft agent is updated not when it is done training. + * Returns the list of all participants in the specified conversation. * @example * ```js * // Before running the sample: @@ -18914,28 +20266,20 @@ export namespace dialogflow_v2beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.locations.agent.import({ - * // Required. The project that the agent to import is associated with. Format: `projects/` or `projects//locations/`. - * parent: 'projects/my-project/locations/my-location', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "agentContent": "my_agentContent", - * // "agentUri": "my_agentUri" - * // } - * }, + * const res = await dialogflow.projects.conversations.participants.list({ + * // Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. + * pageSize: 'placeholder-value', + * // Optional. The next_page_token value returned from a previous list request. + * pageToken: 'placeholder-value', + * // Required. The conversation to list all participants from. Format: `projects//locations//conversations/`. + * parent: 'projects/my-project/conversations/my-conversation', * }); * console.log(res.data); * * // Example response * // { - * // "done": false, - * // "error": {}, - * // "metadata": {}, - * // "name": "my_name", - * // "response": {} + * // "nextPageToken": "my_nextPageToken", + * // "participants": [] * // } * } * @@ -18951,57 +20295,57 @@ export namespace dialogflow_v2beta1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - import( - params: Params$Resource$Projects$Locations$Agent$Import, + list( + params: Params$Resource$Projects$Conversations$Participants$List, options: StreamMethodOptions ): GaxiosPromise; - import( - params?: Params$Resource$Projects$Locations$Agent$Import, + list( + params?: Params$Resource$Projects$Conversations$Participants$List, options?: MethodOptions - ): GaxiosPromise; - import( - params: Params$Resource$Projects$Locations$Agent$Import, + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Conversations$Participants$List, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - import( - params: Params$Resource$Projects$Locations$Agent$Import, + list( + params: Params$Resource$Projects$Conversations$Participants$List, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - import( - params: Params$Resource$Projects$Locations$Agent$Import, - callback: BodyResponseCallback + list( + params: Params$Resource$Projects$Conversations$Participants$List, + callback: BodyResponseCallback ): void; - import( - callback: BodyResponseCallback + list( + callback: BodyResponseCallback ): void; - import( + list( paramsOrCallback?: - | Params$Resource$Projects$Locations$Agent$Import - | BodyResponseCallback + | Params$Resource$Projects$Conversations$Participants$List + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Locations$Agent$Import; + {}) as Params$Resource$Projects$Conversations$Participants$List; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Locations$Agent$Import; + params = {} as Params$Resource$Projects$Conversations$Participants$List; options = {}; } @@ -19014,11 +20358,11 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/agent:import').replace( + url: (rootUrl + '/v2beta1/{+parent}/participants').replace( /([^:]\/)\/+/g, '$1' ), - method: 'POST', + method: 'GET', }, options ), @@ -19028,17 +20372,19 @@ export namespace dialogflow_v2beta1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest( + parameters + ); } } /** - * Restores the specified agent from a ZIP file. Replaces the current agent version with a new one. All the intents and entity types in the older version are deleted. After the restore, the restored draft agent will be trained automatically (unless disabled in agent settings). However, once the restore is done, training may not be completed yet. Please call TrainAgent and wait for the operation it returns in order to train explicitly. Operation An operation which tracks when restoring is complete. It only tracks when the draft agent is updated not when it is done training. + * Updates the specified participant. * @example * ```js * // Before running the sample: @@ -19066,16 +20412,20 @@ export namespace dialogflow_v2beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.locations.agent.restore({ - * // Required. The project that the agent to restore is associated with. Format: `projects/` or `projects//locations/`. - * parent: 'projects/my-project/locations/my-location', + * const res = await dialogflow.projects.conversations.participants.patch({ + * // Optional. The unique identifier of this participant. Format: `projects//locations//conversations//participants/`. + * name: + * 'projects/my-project/conversations/my-conversation/participants/my-participant', + * // Required. The mask to specify which fields to update. + * updateMask: 'placeholder-value', * * // Request body metadata * requestBody: { * // request body parameters * // { - * // "agentContent": "my_agentContent", - * // "agentUri": "my_agentUri" + * // "name": "my_name", + * // "obfuscatedExternalUserId": "my_obfuscatedExternalUserId", + * // "role": "my_role" * // } * }, * }); @@ -19083,11 +20433,9 @@ export namespace dialogflow_v2beta1 { * * // Example response * // { - * // "done": false, - * // "error": {}, - * // "metadata": {}, * // "name": "my_name", - * // "response": {} + * // "obfuscatedExternalUserId": "my_obfuscatedExternalUserId", + * // "role": "my_role" * // } * } * @@ -19103,57 +20451,57 @@ export namespace dialogflow_v2beta1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - restore( - params: Params$Resource$Projects$Locations$Agent$Restore, + patch( + params: Params$Resource$Projects$Conversations$Participants$Patch, options: StreamMethodOptions ): GaxiosPromise; - restore( - params?: Params$Resource$Projects$Locations$Agent$Restore, + patch( + params?: Params$Resource$Projects$Conversations$Participants$Patch, options?: MethodOptions - ): GaxiosPromise; - restore( - params: Params$Resource$Projects$Locations$Agent$Restore, + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Conversations$Participants$Patch, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - restore( - params: Params$Resource$Projects$Locations$Agent$Restore, + patch( + params: Params$Resource$Projects$Conversations$Participants$Patch, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - restore( - params: Params$Resource$Projects$Locations$Agent$Restore, - callback: BodyResponseCallback + patch( + params: Params$Resource$Projects$Conversations$Participants$Patch, + callback: BodyResponseCallback ): void; - restore( - callback: BodyResponseCallback + patch( + callback: BodyResponseCallback ): void; - restore( + patch( paramsOrCallback?: - | Params$Resource$Projects$Locations$Agent$Restore - | BodyResponseCallback + | Params$Resource$Projects$Conversations$Participants$Patch + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Locations$Agent$Restore; + {}) as Params$Resource$Projects$Conversations$Participants$Patch; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Locations$Agent$Restore; + params = {} as Params$Resource$Projects$Conversations$Participants$Patch; options = {}; } @@ -19166,31 +20514,100 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/agent:restore').replace( - /([^:]\/)\/+/g, - '$1' - ), - method: 'POST', + url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', }, options ), params, - requiredParams: ['parent'], - pathParams: ['parent'], + requiredParams: ['name'], + pathParams: ['name'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest( + parameters + ); } } + } + export interface Params$Resource$Projects$Conversations$Participants$Analyzecontent + extends StandardParameters { /** - * Returns the list of agents. Since there is at most one conversational agent per project, this method is useful primarily for listing all agents across projects the caller has access to. One can achieve that with a wildcard project collection id "-". Refer to [List Sub-Collections](https://cloud.google.com/apis/design/design_patterns#list_sub-collections). + * Required. The name of the participant this text comes from. Format: `projects//locations//conversations//participants/`. + */ + participant?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1AnalyzeContentRequest; + } + export interface Params$Resource$Projects$Conversations$Participants$Create + extends StandardParameters { + /** + * Required. Resource identifier of the conversation adding the participant. Format: `projects//locations//conversations/`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1Participant; + } + export interface Params$Resource$Projects$Conversations$Participants$Get + extends StandardParameters { + /** + * Required. The name of the participant. Format: `projects//locations//conversations//participants/`. + */ + name?: string; + } + export interface Params$Resource$Projects$Conversations$Participants$List + extends StandardParameters { + /** + * Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. + */ + pageSize?: number; + /** + * Optional. The next_page_token value returned from a previous list request. + */ + pageToken?: string; + /** + * Required. The conversation to list all participants from. Format: `projects//locations//conversations/`. + */ + parent?: string; + } + export interface Params$Resource$Projects$Conversations$Participants$Patch + extends StandardParameters { + /** + * Optional. The unique identifier of this participant. Format: `projects//locations//conversations//participants/`. + */ + name?: string; + /** + * Required. The mask to specify which fields to update. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1Participant; + } + + export class Resource$Projects$Conversations$Participants$Suggestions { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Deprecated. use SuggestArticles and SuggestFaqAnswers instead. Gets suggestions for a participant based on specific historical messages. Note that ListSuggestions will only list the auto-generated suggestions, while CompileSuggestion will try to compile suggestion based on the provided conversation context in the real time. * @example * ```js * // Before running the sample: @@ -19218,20 +20635,29 @@ export namespace dialogflow_v2beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.locations.agent.search({ - * // Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. - * pageSize: 'placeholder-value', - * // Optional. The next_page_token value returned from a previous list request. - * pageToken: 'placeholder-value', - * // Required. The project to list agents from. Format: `projects/` or `projects//locations/`. - * parent: 'projects/my-project/locations/my-location', - * }); + * const res = await dialogflow.projects.conversations.participants.suggestions.compile( + * { + * // Required. The name of the participant to fetch suggestion for. Format: `projects//locations//conversations//participants/`. + * parent: + * 'projects/my-project/conversations/my-conversation/participants/my-participant', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "contextSize": 0, + * // "latestMessage": "my_latestMessage" + * // } + * }, + * } + * ); * console.log(res.data); * * // Example response * // { - * // "agents": [], - * // "nextPageToken": "my_nextPageToken" + * // "contextSize": 0, + * // "latestMessage": "my_latestMessage", + * // "suggestion": {} * // } * } * @@ -19247,57 +20673,57 @@ export namespace dialogflow_v2beta1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - search( - params: Params$Resource$Projects$Locations$Agent$Search, + compile( + params: Params$Resource$Projects$Conversations$Participants$Suggestions$Compile, options: StreamMethodOptions ): GaxiosPromise; - search( - params?: Params$Resource$Projects$Locations$Agent$Search, + compile( + params?: Params$Resource$Projects$Conversations$Participants$Suggestions$Compile, options?: MethodOptions - ): GaxiosPromise; - search( - params: Params$Resource$Projects$Locations$Agent$Search, + ): GaxiosPromise; + compile( + params: Params$Resource$Projects$Conversations$Participants$Suggestions$Compile, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - search( - params: Params$Resource$Projects$Locations$Agent$Search, + compile( + params: Params$Resource$Projects$Conversations$Participants$Suggestions$Compile, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - search( - params: Params$Resource$Projects$Locations$Agent$Search, - callback: BodyResponseCallback + compile( + params: Params$Resource$Projects$Conversations$Participants$Suggestions$Compile, + callback: BodyResponseCallback ): void; - search( - callback: BodyResponseCallback + compile( + callback: BodyResponseCallback ): void; - search( + compile( paramsOrCallback?: - | Params$Resource$Projects$Locations$Agent$Search - | BodyResponseCallback + | Params$Resource$Projects$Conversations$Participants$Suggestions$Compile + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Locations$Agent$Search; + {}) as Params$Resource$Projects$Conversations$Participants$Suggestions$Compile; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Locations$Agent$Search; + params = {} as Params$Resource$Projects$Conversations$Participants$Suggestions$Compile; options = {}; } @@ -19310,11 +20736,11 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/agent:search').replace( + url: (rootUrl + '/v2beta1/{+parent}/suggestions:compile').replace( /([^:]\/)\/+/g, '$1' ), - method: 'GET', + method: 'POST', }, options ), @@ -19324,19 +20750,19 @@ export namespace dialogflow_v2beta1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest( + return createAPIRequest( parameters ); } } /** - * Trains the specified agent. Operation + * Deprecated: Use inline suggestion, event based suggestion or Suggestion* API instead. See HumanAgentAssistantConfig.name for more details. Removal Date: 2020-09-01. Retrieves suggestions for live agents. This method should be used by human agent client software to fetch auto generated suggestions in real-time, while the conversation with an end user is in progress. The functionality is implemented in terms of the [list pagination](/apis/design/design_patterns#list_pagination) design pattern. The client app should use the `next_page_token` field to fetch the next batch of suggestions. `suggestions` are sorted by `create_time` in descending order. To fetch latest suggestion, just set `page_size` to 1. To fetch new suggestions without duplication, send request with filter `create_time_epoch_microseconds \> [first item's create_time of previous request]` and empty page_token. * @example * ```js * // Before running the sample: @@ -19364,25 +20790,25 @@ export namespace dialogflow_v2beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.locations.agent.train({ - * // Required. The project that the agent to train is associated with. Format: `projects/` or `projects//locations/`. - * parent: 'projects/my-project/locations/my-location', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // {} - * }, - * }); + * const res = await dialogflow.projects.conversations.participants.suggestions.list( + * { + * // Optional. Filter on suggestions fields. Currently predicates on `create_time` and `create_time_epoch_microseconds` are supported. `create_time` only support milliseconds accuracy. E.g., `create_time_epoch_microseconds \> 1551790877964485` or `create_time \> 2017-01-15T01:30:15.01Z` For more information about filtering, see [API Filtering](https://aip.dev/160). + * filter: 'placeholder-value', + * // Optional. The maximum number of items to return in a single page. The default value is 100; the maximum value is 1000. + * pageSize: 'placeholder-value', + * // Optional. The next_page_token value returned from a previous list request. + * pageToken: 'placeholder-value', + * // Required. The name of the participant to fetch suggestions for. Format: `projects//locations//conversations//participants/`. + * parent: + * 'projects/my-project/conversations/my-conversation/participants/my-participant', + * } + * ); * console.log(res.data); * * // Example response * // { - * // "done": false, - * // "error": {}, - * // "metadata": {}, - * // "name": "my_name", - * // "response": {} + * // "nextPageToken": "my_nextPageToken", + * // "suggestions": [] * // } * } * @@ -19398,57 +20824,57 @@ export namespace dialogflow_v2beta1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - train( - params: Params$Resource$Projects$Locations$Agent$Train, + list( + params: Params$Resource$Projects$Conversations$Participants$Suggestions$List, options: StreamMethodOptions ): GaxiosPromise; - train( - params?: Params$Resource$Projects$Locations$Agent$Train, + list( + params?: Params$Resource$Projects$Conversations$Participants$Suggestions$List, options?: MethodOptions - ): GaxiosPromise; - train( - params: Params$Resource$Projects$Locations$Agent$Train, + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Conversations$Participants$Suggestions$List, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - train( - params: Params$Resource$Projects$Locations$Agent$Train, + list( + params: Params$Resource$Projects$Conversations$Participants$Suggestions$List, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - train( - params: Params$Resource$Projects$Locations$Agent$Train, - callback: BodyResponseCallback + list( + params: Params$Resource$Projects$Conversations$Participants$Suggestions$List, + callback: BodyResponseCallback ): void; - train( - callback: BodyResponseCallback + list( + callback: BodyResponseCallback ): void; - train( + list( paramsOrCallback?: - | Params$Resource$Projects$Locations$Agent$Train - | BodyResponseCallback + | Params$Resource$Projects$Conversations$Participants$Suggestions$List + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Locations$Agent$Train; + {}) as Params$Resource$Projects$Conversations$Participants$Suggestions$List; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Locations$Agent$Train; + params = {} as Params$Resource$Projects$Conversations$Participants$Suggestions$List; options = {}; } @@ -19461,11 +20887,11 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/agent:train').replace( + url: (rootUrl + '/v2beta1/{+parent}/suggestions').replace( /([^:]\/)\/+/g, '$1' ), - method: 'POST', + method: 'GET', }, options ), @@ -19475,17 +20901,19 @@ export namespace dialogflow_v2beta1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest( + parameters + ); } } /** - * Updates the fulfillment. + * Gets suggested articles for a participant based on specific historical messages. Note that ListSuggestions will only list the auto-generated suggestions, while CompileSuggestion will try to compile suggestion based on the provided conversation context in the real time. * @example * ```js * // Before running the sample: @@ -19513,33 +20941,29 @@ export namespace dialogflow_v2beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.locations.agent.updateFulfillment({ - * // Required. The unique identifier of the fulfillment. Supported formats: - `projects//agent/fulfillment` - `projects//locations//agent/fulfillment` - * name: 'projects/my-project/locations/my-location/agent/fulfillment', - * // Required. The mask to control which fields get updated. If the mask is not present, all fields will be updated. - * updateMask: 'placeholder-value', + * const res = await dialogflow.projects.conversations.participants.suggestions.suggestArticles( + * { + * // Required. The name of the participant to fetch suggestion for. Format: `projects//locations//conversations//participants/`. + * parent: + * 'projects/my-project/conversations/my-conversation/participants/my-participant', * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "displayName": "my_displayName", - * // "enabled": false, - * // "features": [], - * // "genericWebService": {}, - * // "name": "my_name" - * // } - * }, - * }); + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "contextSize": 0, + * // "latestMessage": "my_latestMessage" + * // } + * }, + * } + * ); * console.log(res.data); * * // Example response * // { - * // "displayName": "my_displayName", - * // "enabled": false, - * // "features": [], - * // "genericWebService": {}, - * // "name": "my_name" + * // "articleAnswers": [], + * // "contextSize": 0, + * // "latestMessage": "my_latestMessage" * // } * } * @@ -19555,57 +20979,57 @@ export namespace dialogflow_v2beta1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - updateFulfillment( - params: Params$Resource$Projects$Locations$Agent$Updatefulfillment, + suggestArticles( + params: Params$Resource$Projects$Conversations$Participants$Suggestions$Suggestarticles, options: StreamMethodOptions ): GaxiosPromise; - updateFulfillment( - params?: Params$Resource$Projects$Locations$Agent$Updatefulfillment, + suggestArticles( + params?: Params$Resource$Projects$Conversations$Participants$Suggestions$Suggestarticles, options?: MethodOptions - ): GaxiosPromise; - updateFulfillment( - params: Params$Resource$Projects$Locations$Agent$Updatefulfillment, + ): GaxiosPromise; + suggestArticles( + params: Params$Resource$Projects$Conversations$Participants$Suggestions$Suggestarticles, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - updateFulfillment( - params: Params$Resource$Projects$Locations$Agent$Updatefulfillment, + suggestArticles( + params: Params$Resource$Projects$Conversations$Participants$Suggestions$Suggestarticles, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - updateFulfillment( - params: Params$Resource$Projects$Locations$Agent$Updatefulfillment, - callback: BodyResponseCallback + suggestArticles( + params: Params$Resource$Projects$Conversations$Participants$Suggestions$Suggestarticles, + callback: BodyResponseCallback ): void; - updateFulfillment( - callback: BodyResponseCallback + suggestArticles( + callback: BodyResponseCallback ): void; - updateFulfillment( + suggestArticles( paramsOrCallback?: - | Params$Resource$Projects$Locations$Agent$Updatefulfillment - | BodyResponseCallback + | Params$Resource$Projects$Conversations$Participants$Suggestions$Suggestarticles + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Locations$Agent$Updatefulfillment; + {}) as Params$Resource$Projects$Conversations$Participants$Suggestions$Suggestarticles; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Locations$Agent$Updatefulfillment; + params = {} as Params$Resource$Projects$Conversations$Participants$Suggestions$Suggestarticles; options = {}; } @@ -19618,139 +21042,32 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), - method: 'PATCH', + url: ( + rootUrl + '/v2beta1/{+parent}/suggestions:suggestArticles' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', }, options ), params, - requiredParams: ['name'], - pathParams: ['name'], + requiredParams: ['parent'], + pathParams: ['parent'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest( + return createAPIRequest( parameters ); } } - } - - export interface Params$Resource$Projects$Locations$Agent$Export - extends StandardParameters { - /** - * Required. The project that the agent to export is associated with. Format: `projects/` or `projects//locations/`. - */ - parent?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$GoogleCloudDialogflowV2beta1ExportAgentRequest; - } - export interface Params$Resource$Projects$Locations$Agent$Getfulfillment - extends StandardParameters { - /** - * Required. The name of the fulfillment. Supported formats: - `projects//agent/fulfillment` - `projects//locations//agent/fulfillment` - */ - name?: string; - } - export interface Params$Resource$Projects$Locations$Agent$Getvalidationresult - extends StandardParameters { - /** - * Optional. The language for which you want a validation result. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. - */ - languageCode?: string; - /** - * Required. The project that the agent is associated with. Format: `projects/` or `projects//locations/`. - */ - parent?: string; - } - export interface Params$Resource$Projects$Locations$Agent$Import - extends StandardParameters { - /** - * Required. The project that the agent to import is associated with. Format: `projects/` or `projects//locations/`. - */ - parent?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$GoogleCloudDialogflowV2beta1ImportAgentRequest; - } - export interface Params$Resource$Projects$Locations$Agent$Restore - extends StandardParameters { - /** - * Required. The project that the agent to restore is associated with. Format: `projects/` or `projects//locations/`. - */ - parent?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$GoogleCloudDialogflowV2beta1RestoreAgentRequest; - } - export interface Params$Resource$Projects$Locations$Agent$Search - extends StandardParameters { - /** - * Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. - */ - pageSize?: number; - /** - * Optional. The next_page_token value returned from a previous list request. - */ - pageToken?: string; - /** - * Required. The project to list agents from. Format: `projects/` or `projects//locations/`. - */ - parent?: string; - } - export interface Params$Resource$Projects$Locations$Agent$Train - extends StandardParameters { - /** - * Required. The project that the agent to train is associated with. Format: `projects/` or `projects//locations/`. - */ - parent?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$GoogleCloudDialogflowV2beta1TrainAgentRequest; - } - export interface Params$Resource$Projects$Locations$Agent$Updatefulfillment - extends StandardParameters { - /** - * Required. The unique identifier of the fulfillment. Supported formats: - `projects//agent/fulfillment` - `projects//locations//agent/fulfillment` - */ - name?: string; - /** - * Required. The mask to control which fields get updated. If the mask is not present, all fields will be updated. - */ - updateMask?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$GoogleCloudDialogflowV2beta1Fulfillment; - } - - export class Resource$Projects$Locations$Agent$Entitytypes { - context: APIRequestContext; - entities: Resource$Projects$Locations$Agent$Entitytypes$Entities; - constructor(context: APIRequestContext) { - this.context = context; - this.entities = new Resource$Projects$Locations$Agent$Entitytypes$Entities( - this.context - ); - } /** - * Deletes entity types in the specified agent. Operation + * Gets suggested faq answers for a participant based on specific historical messages. * @example * ```js * // Before running the sample: @@ -19778,16 +21095,18 @@ export namespace dialogflow_v2beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.locations.agent.entityTypes.batchDelete( + * const res = await dialogflow.projects.conversations.participants.suggestions.suggestFaqAnswers( * { - * // Required. The name of the agent to delete all entities types for. Supported formats: - `projects//agent`, - `projects//locations//agent`. - * parent: 'projects/my-project/locations/my-location/agent', + * // Required. The name of the participant to fetch suggestion for. Format: `projects//locations//conversations//participants/`. + * parent: + * 'projects/my-project/conversations/my-conversation/participants/my-participant', * * // Request body metadata * requestBody: { * // request body parameters * // { - * // "entityTypeNames": [] + * // "contextSize": 0, + * // "latestMessage": "my_latestMessage" * // } * }, * } @@ -19796,11 +21115,9 @@ export namespace dialogflow_v2beta1 { * * // Example response * // { - * // "done": false, - * // "error": {}, - * // "metadata": {}, - * // "name": "my_name", - * // "response": {} + * // "contextSize": 0, + * // "faqAnswers": [], + * // "latestMessage": "my_latestMessage" * // } * } * @@ -19816,57 +21133,57 @@ export namespace dialogflow_v2beta1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - batchDelete( - params: Params$Resource$Projects$Locations$Agent$Entitytypes$Batchdelete, + suggestFaqAnswers( + params: Params$Resource$Projects$Conversations$Participants$Suggestions$Suggestfaqanswers, options: StreamMethodOptions ): GaxiosPromise; - batchDelete( - params?: Params$Resource$Projects$Locations$Agent$Entitytypes$Batchdelete, + suggestFaqAnswers( + params?: Params$Resource$Projects$Conversations$Participants$Suggestions$Suggestfaqanswers, options?: MethodOptions - ): GaxiosPromise; - batchDelete( - params: Params$Resource$Projects$Locations$Agent$Entitytypes$Batchdelete, + ): GaxiosPromise; + suggestFaqAnswers( + params: Params$Resource$Projects$Conversations$Participants$Suggestions$Suggestfaqanswers, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - batchDelete( - params: Params$Resource$Projects$Locations$Agent$Entitytypes$Batchdelete, + suggestFaqAnswers( + params: Params$Resource$Projects$Conversations$Participants$Suggestions$Suggestfaqanswers, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - batchDelete( - params: Params$Resource$Projects$Locations$Agent$Entitytypes$Batchdelete, - callback: BodyResponseCallback + suggestFaqAnswers( + params: Params$Resource$Projects$Conversations$Participants$Suggestions$Suggestfaqanswers, + callback: BodyResponseCallback ): void; - batchDelete( - callback: BodyResponseCallback + suggestFaqAnswers( + callback: BodyResponseCallback ): void; - batchDelete( + suggestFaqAnswers( paramsOrCallback?: - | Params$Resource$Projects$Locations$Agent$Entitytypes$Batchdelete - | BodyResponseCallback + | Params$Resource$Projects$Conversations$Participants$Suggestions$Suggestfaqanswers + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Locations$Agent$Entitytypes$Batchdelete; + {}) as Params$Resource$Projects$Conversations$Participants$Suggestions$Suggestfaqanswers; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Locations$Agent$Entitytypes$Batchdelete; + params = {} as Params$Resource$Projects$Conversations$Participants$Suggestions$Suggestfaqanswers; options = {}; } @@ -19880,7 +21197,7 @@ export namespace dialogflow_v2beta1 { options: Object.assign( { url: ( - rootUrl + '/v2beta1/{+parent}/entityTypes:batchDelete' + rootUrl + '/v2beta1/{+parent}/suggestions:suggestFaqAnswers' ).replace(/([^:]\/)\/+/g, '$1'), method: 'POST', }, @@ -19892,17 +21209,19 @@ export namespace dialogflow_v2beta1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest( + parameters + ); } } /** - * Updates/Creates multiple entity types in the specified agent. Operation + * Gets smart replies for a participant based on specific historical messages. * @example * ```js * // Before running the sample: @@ -19930,19 +21249,19 @@ export namespace dialogflow_v2beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.locations.agent.entityTypes.batchUpdate( + * const res = await dialogflow.projects.conversations.participants.suggestions.suggestSmartReplies( * { - * // Required. The name of the agent to update or create entity types in. Supported formats: - `projects//agent` - `projects//locations//agent` - * parent: 'projects/my-project/locations/my-location/agent', + * // Required. The name of the participant to fetch suggestion for. Format: `projects//locations//conversations//participants/`. + * parent: + * 'projects/my-project/conversations/my-conversation/participants/my-participant', * * // Request body metadata * requestBody: { * // request body parameters * // { - * // "entityTypeBatchInline": {}, - * // "entityTypeBatchUri": "my_entityTypeBatchUri", - * // "languageCode": "my_languageCode", - * // "updateMask": "my_updateMask" + * // "contextSize": 0, + * // "currentTextInput": {}, + * // "latestMessage": "my_latestMessage" * // } * }, * } @@ -19951,11 +21270,9 @@ export namespace dialogflow_v2beta1 { * * // Example response * // { - * // "done": false, - * // "error": {}, - * // "metadata": {}, - * // "name": "my_name", - * // "response": {} + * // "contextSize": 0, + * // "latestMessage": "my_latestMessage", + * // "smartReplyAnswers": [] * // } * } * @@ -19971,57 +21288,57 @@ export namespace dialogflow_v2beta1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - batchUpdate( - params: Params$Resource$Projects$Locations$Agent$Entitytypes$Batchupdate, + suggestSmartReplies( + params: Params$Resource$Projects$Conversations$Participants$Suggestions$Suggestsmartreplies, options: StreamMethodOptions ): GaxiosPromise; - batchUpdate( - params?: Params$Resource$Projects$Locations$Agent$Entitytypes$Batchupdate, + suggestSmartReplies( + params?: Params$Resource$Projects$Conversations$Participants$Suggestions$Suggestsmartreplies, options?: MethodOptions - ): GaxiosPromise; - batchUpdate( - params: Params$Resource$Projects$Locations$Agent$Entitytypes$Batchupdate, + ): GaxiosPromise; + suggestSmartReplies( + params: Params$Resource$Projects$Conversations$Participants$Suggestions$Suggestsmartreplies, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - batchUpdate( - params: Params$Resource$Projects$Locations$Agent$Entitytypes$Batchupdate, + suggestSmartReplies( + params: Params$Resource$Projects$Conversations$Participants$Suggestions$Suggestsmartreplies, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - batchUpdate( - params: Params$Resource$Projects$Locations$Agent$Entitytypes$Batchupdate, - callback: BodyResponseCallback + suggestSmartReplies( + params: Params$Resource$Projects$Conversations$Participants$Suggestions$Suggestsmartreplies, + callback: BodyResponseCallback ): void; - batchUpdate( - callback: BodyResponseCallback + suggestSmartReplies( + callback: BodyResponseCallback ): void; - batchUpdate( + suggestSmartReplies( paramsOrCallback?: - | Params$Resource$Projects$Locations$Agent$Entitytypes$Batchupdate - | BodyResponseCallback + | Params$Resource$Projects$Conversations$Participants$Suggestions$Suggestsmartreplies + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Locations$Agent$Entitytypes$Batchupdate; + {}) as Params$Resource$Projects$Conversations$Participants$Suggestions$Suggestsmartreplies; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Locations$Agent$Entitytypes$Batchupdate; + params = {} as Params$Resource$Projects$Conversations$Participants$Suggestions$Suggestsmartreplies; options = {}; } @@ -20035,7 +21352,7 @@ export namespace dialogflow_v2beta1 { options: Object.assign( { url: ( - rootUrl + '/v2beta1/{+parent}/entityTypes:batchUpdate' + rootUrl + '/v2beta1/{+parent}/suggestions:suggestSmartReplies' ).replace(/([^:]\/)\/+/g, '$1'), method: 'POST', }, @@ -20047,59 +21364,135 @@ export namespace dialogflow_v2beta1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest( + parameters + ); } } + } + export interface Params$Resource$Projects$Conversations$Participants$Suggestions$Compile + extends StandardParameters { /** - * Creates an entity type in the specified agent. - * @example - * ```js - * // Before running the sample: - * // - Enable the API at: - * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com - * // - Login into gcloud by running: - * // `$ gcloud auth application-default login` - * // - Install the npm module by running: - * // `$ npm install googleapis` - * - * const {google} = require('googleapis'); - * const dialogflow = google.dialogflow('v2beta1'); - * - * async function main() { - * const auth = new google.auth.GoogleAuth({ - * // Scopes can be specified either as an array or as a single, space-delimited string. - * scopes: [ - * 'https://www.googleapis.com/auth/cloud-platform', - * 'https://www.googleapis.com/auth/dialogflow', - * ], - * }); - * - * // Acquire an auth client, and bind it to all future calls - * const authClient = await auth.getClient(); - * google.options({auth: authClient}); - * - * // Do the magic - * const res = await dialogflow.projects.locations.agent.entityTypes.create({ - * // Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * languageCode: 'placeholder-value', - * // Required. The agent to create a entity type for. Supported formats: - `projects//agent` - `projects//locations//agent` - * parent: 'projects/my-project/locations/my-location/agent', + * Required. The name of the participant to fetch suggestion for. Format: `projects//locations//conversations//participants/`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1CompileSuggestionRequest; + } + export interface Params$Resource$Projects$Conversations$Participants$Suggestions$List + extends StandardParameters { + /** + * Optional. Filter on suggestions fields. Currently predicates on `create_time` and `create_time_epoch_microseconds` are supported. `create_time` only support milliseconds accuracy. E.g., `create_time_epoch_microseconds \> 1551790877964485` or `create_time \> 2017-01-15T01:30:15.01Z` For more information about filtering, see [API Filtering](https://aip.dev/160). + */ + filter?: string; + /** + * Optional. The maximum number of items to return in a single page. The default value is 100; the maximum value is 1000. + */ + pageSize?: number; + /** + * Optional. The next_page_token value returned from a previous list request. + */ + pageToken?: string; + /** + * Required. The name of the participant to fetch suggestions for. Format: `projects//locations//conversations//participants/`. + */ + parent?: string; + } + export interface Params$Resource$Projects$Conversations$Participants$Suggestions$Suggestarticles + extends StandardParameters { + /** + * Required. The name of the participant to fetch suggestion for. Format: `projects//locations//conversations//participants/`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1SuggestArticlesRequest; + } + export interface Params$Resource$Projects$Conversations$Participants$Suggestions$Suggestfaqanswers + extends StandardParameters { + /** + * Required. The name of the participant to fetch suggestion for. Format: `projects//locations//conversations//participants/`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1SuggestFaqAnswersRequest; + } + export interface Params$Resource$Projects$Conversations$Participants$Suggestions$Suggestsmartreplies + extends StandardParameters { + /** + * Required. The name of the participant to fetch suggestion for. Format: `projects//locations//conversations//participants/`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1SuggestSmartRepliesRequest; + } + + export class Resource$Projects$Knowledgebases { + context: APIRequestContext; + documents: Resource$Projects$Knowledgebases$Documents; + constructor(context: APIRequestContext) { + this.context = context; + this.documents = new Resource$Projects$Knowledgebases$Documents( + this.context + ); + } + + /** + * Creates a knowledge base. Note: The `projects.agent.knowledgeBases` resource is deprecated; only use `projects.knowledgeBases`. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.knowledgeBases.create({ + * // Required. The project to create a knowledge base for. Format: `projects//locations/`. + * parent: 'projects/my-project', * * // Request body metadata * requestBody: { * // request body parameters * // { - * // "autoExpansionMode": "my_autoExpansionMode", * // "displayName": "my_displayName", - * // "enableFuzzyExtraction": false, - * // "entities": [], - * // "kind": "my_kind", + * // "languageCode": "my_languageCode", * // "name": "my_name" * // } * }, @@ -20108,11 +21501,8 @@ export namespace dialogflow_v2beta1 { * * // Example response * // { - * // "autoExpansionMode": "my_autoExpansionMode", * // "displayName": "my_displayName", - * // "enableFuzzyExtraction": false, - * // "entities": [], - * // "kind": "my_kind", + * // "languageCode": "my_languageCode", * // "name": "my_name" * // } * } @@ -20130,56 +21520,56 @@ export namespace dialogflow_v2beta1 { * @returns A promise if used with async/await, or void if used with a callback. */ create( - params: Params$Resource$Projects$Locations$Agent$Entitytypes$Create, + params: Params$Resource$Projects$Knowledgebases$Create, options: StreamMethodOptions ): GaxiosPromise; create( - params?: Params$Resource$Projects$Locations$Agent$Entitytypes$Create, + params?: Params$Resource$Projects$Knowledgebases$Create, options?: MethodOptions - ): GaxiosPromise; + ): GaxiosPromise; create( - params: Params$Resource$Projects$Locations$Agent$Entitytypes$Create, + params: Params$Resource$Projects$Knowledgebases$Create, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; create( - params: Params$Resource$Projects$Locations$Agent$Entitytypes$Create, + params: Params$Resource$Projects$Knowledgebases$Create, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; create( - params: Params$Resource$Projects$Locations$Agent$Entitytypes$Create, - callback: BodyResponseCallback + params: Params$Resource$Projects$Knowledgebases$Create, + callback: BodyResponseCallback ): void; create( - callback: BodyResponseCallback + callback: BodyResponseCallback ): void; create( paramsOrCallback?: - | Params$Resource$Projects$Locations$Agent$Entitytypes$Create - | BodyResponseCallback + | Params$Resource$Projects$Knowledgebases$Create + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Locations$Agent$Entitytypes$Create; + {}) as Params$Resource$Projects$Knowledgebases$Create; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Locations$Agent$Entitytypes$Create; + params = {} as Params$Resource$Projects$Knowledgebases$Create; options = {}; } @@ -20192,7 +21582,7 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/entityTypes').replace( + url: (rootUrl + '/v2beta1/{+parent}/knowledgeBases').replace( /([^:]\/)\/+/g, '$1' ), @@ -20206,19 +21596,19 @@ export namespace dialogflow_v2beta1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest( + return createAPIRequest( parameters ); } } /** - * Deletes the specified entity type. + * Deletes the specified knowledge base. Note: The `projects.agent.knowledgeBases` resource is deprecated; only use `projects.knowledgeBases`. * @example * ```js * // Before running the sample: @@ -20246,10 +21636,11 @@ export namespace dialogflow_v2beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.locations.agent.entityTypes.delete({ - * // Required. The name of the entity type to delete. Supported formats: - `projects//agent/entityTypes/` - `projects//locations//agent/entityTypes/` - * name: - * 'projects/my-project/locations/my-location/agent/entityTypes/my-entityType', + * const res = await dialogflow.projects.knowledgeBases.delete({ + * // Optional. Force deletes the knowledge base. When set to true, any documents in the knowledge base are also deleted. + * force: 'placeholder-value', + * // Required. The name of the knowledge base to delete. Format: `projects//locations//knowledgeBases/`. + * name: 'projects/my-project/knowledgeBases/my-knowledgeBase', * }); * console.log(res.data); * @@ -20270,31 +21661,31 @@ export namespace dialogflow_v2beta1 { * @returns A promise if used with async/await, or void if used with a callback. */ delete( - params: Params$Resource$Projects$Locations$Agent$Entitytypes$Delete, + params: Params$Resource$Projects$Knowledgebases$Delete, options: StreamMethodOptions ): GaxiosPromise; delete( - params?: Params$Resource$Projects$Locations$Agent$Entitytypes$Delete, + params?: Params$Resource$Projects$Knowledgebases$Delete, options?: MethodOptions ): GaxiosPromise; delete( - params: Params$Resource$Projects$Locations$Agent$Entitytypes$Delete, + params: Params$Resource$Projects$Knowledgebases$Delete, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; delete( - params: Params$Resource$Projects$Locations$Agent$Entitytypes$Delete, + params: Params$Resource$Projects$Knowledgebases$Delete, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; delete( - params: Params$Resource$Projects$Locations$Agent$Entitytypes$Delete, + params: Params$Resource$Projects$Knowledgebases$Delete, callback: BodyResponseCallback ): void; delete(callback: BodyResponseCallback): void; delete( paramsOrCallback?: - | Params$Resource$Projects$Locations$Agent$Entitytypes$Delete + | Params$Resource$Projects$Knowledgebases$Delete | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -20310,12 +21701,12 @@ export namespace dialogflow_v2beta1 { | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Locations$Agent$Entitytypes$Delete; + {}) as Params$Resource$Projects$Knowledgebases$Delete; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Locations$Agent$Entitytypes$Delete; + params = {} as Params$Resource$Projects$Knowledgebases$Delete; options = {}; } @@ -20349,7 +21740,7 @@ export namespace dialogflow_v2beta1 { } /** - * Retrieves the specified entity type. + * Retrieves the specified knowledge base. Note: The `projects.agent.knowledgeBases` resource is deprecated; only use `projects.knowledgeBases`. * @example * ```js * // Before running the sample: @@ -20377,22 +21768,16 @@ export namespace dialogflow_v2beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.locations.agent.entityTypes.get({ - * // Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * languageCode: 'placeholder-value', - * // Required. The name of the entity type. Supported formats: - `projects//agent/entityTypes/` - `projects//locations//agent/entityTypes/` - * name: - * 'projects/my-project/locations/my-location/agent/entityTypes/my-entityType', + * const res = await dialogflow.projects.knowledgeBases.get({ + * // Required. The name of the knowledge base to retrieve. Format `projects//locations//knowledgeBases/`. + * name: 'projects/my-project/knowledgeBases/my-knowledgeBase', * }); * console.log(res.data); * * // Example response * // { - * // "autoExpansionMode": "my_autoExpansionMode", * // "displayName": "my_displayName", - * // "enableFuzzyExtraction": false, - * // "entities": [], - * // "kind": "my_kind", + * // "languageCode": "my_languageCode", * // "name": "my_name" * // } * } @@ -20410,56 +21795,56 @@ export namespace dialogflow_v2beta1 { * @returns A promise if used with async/await, or void if used with a callback. */ get( - params: Params$Resource$Projects$Locations$Agent$Entitytypes$Get, + params: Params$Resource$Projects$Knowledgebases$Get, options: StreamMethodOptions ): GaxiosPromise; get( - params?: Params$Resource$Projects$Locations$Agent$Entitytypes$Get, + params?: Params$Resource$Projects$Knowledgebases$Get, options?: MethodOptions - ): GaxiosPromise; + ): GaxiosPromise; get( - params: Params$Resource$Projects$Locations$Agent$Entitytypes$Get, + params: Params$Resource$Projects$Knowledgebases$Get, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; get( - params: Params$Resource$Projects$Locations$Agent$Entitytypes$Get, + params: Params$Resource$Projects$Knowledgebases$Get, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; get( - params: Params$Resource$Projects$Locations$Agent$Entitytypes$Get, - callback: BodyResponseCallback + params: Params$Resource$Projects$Knowledgebases$Get, + callback: BodyResponseCallback ): void; get( - callback: BodyResponseCallback + callback: BodyResponseCallback ): void; get( paramsOrCallback?: - | Params$Resource$Projects$Locations$Agent$Entitytypes$Get - | BodyResponseCallback + | Params$Resource$Projects$Knowledgebases$Get + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Locations$Agent$Entitytypes$Get; + {}) as Params$Resource$Projects$Knowledgebases$Get; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Locations$Agent$Entitytypes$Get; + params = {} as Params$Resource$Projects$Knowledgebases$Get; options = {}; } @@ -20483,19 +21868,19 @@ export namespace dialogflow_v2beta1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest( + return createAPIRequest( parameters ); } } /** - * Returns the list of all entity types in the specified agent. + * Returns the list of all knowledge bases of the specified agent. Note: The `projects.agent.knowledgeBases` resource is deprecated; only use `projects.knowledgeBases`. * @example * ```js * // Before running the sample: @@ -20523,21 +21908,21 @@ export namespace dialogflow_v2beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.locations.agent.entityTypes.list({ - * // Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * languageCode: 'placeholder-value', - * // Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. + * const res = await dialogflow.projects.knowledgeBases.list({ + * // The filter expression used to filter knowledge bases returned by the list method. The expression has the following syntax: [AND ] ... The following fields and operators are supported: * display_name with has(:) operator * language_code with equals(=) operator Examples: * 'language_code=en-us' matches knowledge bases with en-us language code. * 'display_name:articles' matches knowledge bases whose display name contains "articles". * 'display_name:"Best Articles"' matches knowledge bases whose display name contains "Best Articles". * 'language_code=en-gb AND display_name=articles' matches all knowledge bases whose display name contains "articles" and whose language code is "en-gb". Note: An empty filter string (i.e. "") is a no-op and will result in no filtering. For more information about filtering, see [API Filtering](https://aip.dev/160). + * filter: 'placeholder-value', + * // The maximum number of items to return in a single page. By default 10 and at most 100. * pageSize: 'placeholder-value', - * // Optional. The next_page_token value returned from a previous list request. + * // The next_page_token value returned from a previous list request. * pageToken: 'placeholder-value', - * // Required. The agent to list all entity types from. Supported formats: - `projects//agent` - `projects//locations//agent` - * parent: 'projects/my-project/locations/my-location/agent', + * // Required. The project to list of knowledge bases for. Format: `projects//locations/`. + * parent: 'projects/my-project', * }); * console.log(res.data); * * // Example response * // { - * // "entityTypes": [], + * // "knowledgeBases": [], * // "nextPageToken": "my_nextPageToken" * // } * } @@ -20555,56 +21940,56 @@ export namespace dialogflow_v2beta1 { * @returns A promise if used with async/await, or void if used with a callback. */ list( - params: Params$Resource$Projects$Locations$Agent$Entitytypes$List, + params: Params$Resource$Projects$Knowledgebases$List, options: StreamMethodOptions ): GaxiosPromise; list( - params?: Params$Resource$Projects$Locations$Agent$Entitytypes$List, + params?: Params$Resource$Projects$Knowledgebases$List, options?: MethodOptions - ): GaxiosPromise; + ): GaxiosPromise; list( - params: Params$Resource$Projects$Locations$Agent$Entitytypes$List, + params: Params$Resource$Projects$Knowledgebases$List, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; list( - params: Params$Resource$Projects$Locations$Agent$Entitytypes$List, + params: Params$Resource$Projects$Knowledgebases$List, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; list( - params: Params$Resource$Projects$Locations$Agent$Entitytypes$List, - callback: BodyResponseCallback + params: Params$Resource$Projects$Knowledgebases$List, + callback: BodyResponseCallback ): void; list( - callback: BodyResponseCallback + callback: BodyResponseCallback ): void; list( paramsOrCallback?: - | Params$Resource$Projects$Locations$Agent$Entitytypes$List - | BodyResponseCallback + | Params$Resource$Projects$Knowledgebases$List + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Locations$Agent$Entitytypes$List; + {}) as Params$Resource$Projects$Knowledgebases$List; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Locations$Agent$Entitytypes$List; + params = {} as Params$Resource$Projects$Knowledgebases$List; options = {}; } @@ -20617,7 +22002,7 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/entityTypes').replace( + url: (rootUrl + '/v2beta1/{+parent}/knowledgeBases').replace( /([^:]\/)\/+/g, '$1' ), @@ -20631,19 +22016,19 @@ export namespace dialogflow_v2beta1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest( + return createAPIRequest( parameters ); } } /** - * Updates the specified entity type. + * Updates the specified knowledge base. Note: The `projects.agent.knowledgeBases` resource is deprecated; only use `projects.knowledgeBases`. * @example * ```js * // Before running the sample: @@ -20671,24 +22056,18 @@ export namespace dialogflow_v2beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.locations.agent.entityTypes.patch({ - * // Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * languageCode: 'placeholder-value', - * // The unique identifier of the entity type. Required for EntityTypes.UpdateEntityType and EntityTypes.BatchUpdateEntityTypes methods. Supported formats: - `projects//agent/entityTypes/` - `projects//locations//agent/entityTypes/` - * name: - * 'projects/my-project/locations/my-location/agent/entityTypes/my-entityType', - * // Optional. The mask to control which fields get updated. + * const res = await dialogflow.projects.knowledgeBases.patch({ + * // The knowledge base resource name. The name must be empty when creating a knowledge base. Format: `projects//locations//knowledgeBases/`. + * name: 'projects/my-project/knowledgeBases/my-knowledgeBase', + * // Optional. Not specified means `update all`. Currently, only `display_name` can be updated, an InvalidArgument will be returned for attempting to update other fields. * updateMask: 'placeholder-value', * * // Request body metadata * requestBody: { * // request body parameters * // { - * // "autoExpansionMode": "my_autoExpansionMode", * // "displayName": "my_displayName", - * // "enableFuzzyExtraction": false, - * // "entities": [], - * // "kind": "my_kind", + * // "languageCode": "my_languageCode", * // "name": "my_name" * // } * }, @@ -20697,11 +22076,8 @@ export namespace dialogflow_v2beta1 { * * // Example response * // { - * // "autoExpansionMode": "my_autoExpansionMode", * // "displayName": "my_displayName", - * // "enableFuzzyExtraction": false, - * // "entities": [], - * // "kind": "my_kind", + * // "languageCode": "my_languageCode", * // "name": "my_name" * // } * } @@ -20719,56 +22095,56 @@ export namespace dialogflow_v2beta1 { * @returns A promise if used with async/await, or void if used with a callback. */ patch( - params: Params$Resource$Projects$Locations$Agent$Entitytypes$Patch, + params: Params$Resource$Projects$Knowledgebases$Patch, options: StreamMethodOptions ): GaxiosPromise; patch( - params?: Params$Resource$Projects$Locations$Agent$Entitytypes$Patch, + params?: Params$Resource$Projects$Knowledgebases$Patch, options?: MethodOptions - ): GaxiosPromise; + ): GaxiosPromise; patch( - params: Params$Resource$Projects$Locations$Agent$Entitytypes$Patch, + params: Params$Resource$Projects$Knowledgebases$Patch, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; patch( - params: Params$Resource$Projects$Locations$Agent$Entitytypes$Patch, + params: Params$Resource$Projects$Knowledgebases$Patch, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; patch( - params: Params$Resource$Projects$Locations$Agent$Entitytypes$Patch, - callback: BodyResponseCallback + params: Params$Resource$Projects$Knowledgebases$Patch, + callback: BodyResponseCallback ): void; patch( - callback: BodyResponseCallback + callback: BodyResponseCallback ): void; patch( paramsOrCallback?: - | Params$Resource$Projects$Locations$Agent$Entitytypes$Patch - | BodyResponseCallback + | Params$Resource$Projects$Knowledgebases$Patch + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Locations$Agent$Entitytypes$Patch; + {}) as Params$Resource$Projects$Knowledgebases$Patch; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Locations$Agent$Entitytypes$Patch; + params = {} as Params$Resource$Projects$Knowledgebases$Patch; options = {}; } @@ -20792,124 +22168,92 @@ export namespace dialogflow_v2beta1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest( + return createAPIRequest( parameters ); } } } - export interface Params$Resource$Projects$Locations$Agent$Entitytypes$Batchdelete - extends StandardParameters { - /** - * Required. The name of the agent to delete all entities types for. Supported formats: - `projects//agent`, - `projects//locations//agent`. - */ - parent?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$GoogleCloudDialogflowV2beta1BatchDeleteEntityTypesRequest; - } - export interface Params$Resource$Projects$Locations$Agent$Entitytypes$Batchupdate + export interface Params$Resource$Projects$Knowledgebases$Create extends StandardParameters { /** - * Required. The name of the agent to update or create entity types in. Supported formats: - `projects//agent` - `projects//locations//agent` + * Required. The project to create a knowledge base for. Format: `projects//locations/`. */ parent?: string; /** * Request body metadata */ - requestBody?: Schema$GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesRequest; + requestBody?: Schema$GoogleCloudDialogflowV2beta1KnowledgeBase; } - export interface Params$Resource$Projects$Locations$Agent$Entitytypes$Create + export interface Params$Resource$Projects$Knowledgebases$Delete extends StandardParameters { /** - * Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - */ - languageCode?: string; - /** - * Required. The agent to create a entity type for. Supported formats: - `projects//agent` - `projects//locations//agent` - */ - parent?: string; - - /** - * Request body metadata + * Optional. Force deletes the knowledge base. When set to true, any documents in the knowledge base are also deleted. */ - requestBody?: Schema$GoogleCloudDialogflowV2beta1EntityType; - } - export interface Params$Resource$Projects$Locations$Agent$Entitytypes$Delete - extends StandardParameters { + force?: boolean; /** - * Required. The name of the entity type to delete. Supported formats: - `projects//agent/entityTypes/` - `projects//locations//agent/entityTypes/` + * Required. The name of the knowledge base to delete. Format: `projects//locations//knowledgeBases/`. */ name?: string; } - export interface Params$Resource$Projects$Locations$Agent$Entitytypes$Get + export interface Params$Resource$Projects$Knowledgebases$Get extends StandardParameters { /** - * Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - */ - languageCode?: string; - /** - * Required. The name of the entity type. Supported formats: - `projects//agent/entityTypes/` - `projects//locations//agent/entityTypes/` + * Required. The name of the knowledge base to retrieve. Format `projects//locations//knowledgeBases/`. */ name?: string; } - export interface Params$Resource$Projects$Locations$Agent$Entitytypes$List + export interface Params$Resource$Projects$Knowledgebases$List extends StandardParameters { /** - * Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * The filter expression used to filter knowledge bases returned by the list method. The expression has the following syntax: [AND ] ... The following fields and operators are supported: * display_name with has(:) operator * language_code with equals(=) operator Examples: * 'language_code=en-us' matches knowledge bases with en-us language code. * 'display_name:articles' matches knowledge bases whose display name contains "articles". * 'display_name:"Best Articles"' matches knowledge bases whose display name contains "Best Articles". * 'language_code=en-gb AND display_name=articles' matches all knowledge bases whose display name contains "articles" and whose language code is "en-gb". Note: An empty filter string (i.e. "") is a no-op and will result in no filtering. For more information about filtering, see [API Filtering](https://aip.dev/160). */ - languageCode?: string; + filter?: string; /** - * Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. + * The maximum number of items to return in a single page. By default 10 and at most 100. */ pageSize?: number; /** - * Optional. The next_page_token value returned from a previous list request. + * The next_page_token value returned from a previous list request. */ pageToken?: string; /** - * Required. The agent to list all entity types from. Supported formats: - `projects//agent` - `projects//locations//agent` + * Required. The project to list of knowledge bases for. Format: `projects//locations/`. */ parent?: string; } - export interface Params$Resource$Projects$Locations$Agent$Entitytypes$Patch + export interface Params$Resource$Projects$Knowledgebases$Patch extends StandardParameters { /** - * Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - */ - languageCode?: string; - /** - * The unique identifier of the entity type. Required for EntityTypes.UpdateEntityType and EntityTypes.BatchUpdateEntityTypes methods. Supported formats: - `projects//agent/entityTypes/` - `projects//locations//agent/entityTypes/` + * The knowledge base resource name. The name must be empty when creating a knowledge base. Format: `projects//locations//knowledgeBases/`. */ name?: string; /** - * Optional. The mask to control which fields get updated. + * Optional. Not specified means `update all`. Currently, only `display_name` can be updated, an InvalidArgument will be returned for attempting to update other fields. */ updateMask?: string; /** * Request body metadata */ - requestBody?: Schema$GoogleCloudDialogflowV2beta1EntityType; + requestBody?: Schema$GoogleCloudDialogflowV2beta1KnowledgeBase; } - export class Resource$Projects$Locations$Agent$Entitytypes$Entities { + export class Resource$Projects$Knowledgebases$Documents { context: APIRequestContext; constructor(context: APIRequestContext) { this.context = context; } /** - * Creates multiple new entities in the specified entity type. Operation + * Creates a new document. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`. * @example * ```js * // Before running the sample: @@ -20937,22 +22281,29 @@ export namespace dialogflow_v2beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.locations.agent.entityTypes.entities.batchCreate( - * { - * // Required. The name of the entity type to create entities in. Supported formats: - `projects//agent/entityTypes/` - `projects//locations//agent/entityTypes/` - * parent: - * 'projects/my-project/locations/my-location/agent/entityTypes/my-entityType', + * const res = await dialogflow.projects.knowledgeBases.documents.create({ + * // Whether to import custom metadata from Google Cloud Storage. Only valid when the document source is Google Cloud Storage URI. + * importGcsCustomMetadata: 'placeholder-value', + * // Required. The knowledge base to create a document for. Format: `projects//locations//knowledgeBases/`. + * parent: 'projects/my-project/knowledgeBases/my-knowledgeBase', * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "entities": [], - * // "languageCode": "my_languageCode" - * // } - * }, - * } - * ); + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "content": "my_content", + * // "contentUri": "my_contentUri", + * // "displayName": "my_displayName", + * // "enableAutoReload": false, + * // "knowledgeTypes": [], + * // "latestReloadStatus": {}, + * // "metadata": {}, + * // "mimeType": "my_mimeType", + * // "name": "my_name", + * // "rawContent": "my_rawContent" + * // } + * }, + * }); * console.log(res.data); * * // Example response @@ -20977,36 +22328,36 @@ export namespace dialogflow_v2beta1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - batchCreate( - params: Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchcreate, + create( + params: Params$Resource$Projects$Knowledgebases$Documents$Create, options: StreamMethodOptions ): GaxiosPromise; - batchCreate( - params?: Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchcreate, + create( + params?: Params$Resource$Projects$Knowledgebases$Documents$Create, options?: MethodOptions ): GaxiosPromise; - batchCreate( - params: Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchcreate, + create( + params: Params$Resource$Projects$Knowledgebases$Documents$Create, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - batchCreate( - params: Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchcreate, + create( + params: Params$Resource$Projects$Knowledgebases$Documents$Create, options: | MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - batchCreate( - params: Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchcreate, + create( + params: Params$Resource$Projects$Knowledgebases$Documents$Create, callback: BodyResponseCallback ): void; - batchCreate( + create( callback: BodyResponseCallback ): void; - batchCreate( + create( paramsOrCallback?: - | Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchcreate + | Params$Resource$Projects$Knowledgebases$Documents$Create | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -21022,12 +22373,12 @@ export namespace dialogflow_v2beta1 { | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchcreate; + {}) as Params$Resource$Projects$Knowledgebases$Documents$Create; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchcreate; + params = {} as Params$Resource$Projects$Knowledgebases$Documents$Create; options = {}; } @@ -21040,7 +22391,7 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/entities:batchCreate').replace( + url: (rootUrl + '/v2beta1/{+parent}/documents').replace( /([^:]\/)\/+/g, '$1' ), @@ -21064,7 +22415,7 @@ export namespace dialogflow_v2beta1 { } /** - * Deletes entities in the specified entity type. Operation + * Deletes the specified document. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`. * @example * ```js * // Before running the sample: @@ -21092,22 +22443,11 @@ export namespace dialogflow_v2beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.locations.agent.entityTypes.entities.batchDelete( - * { - * // Required. The name of the entity type to delete entries for. Supported formats: - `projects//agent/entityTypes/` - `projects//locations//agent/entityTypes/` - * parent: - * 'projects/my-project/locations/my-location/agent/entityTypes/my-entityType', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "entityValues": [], - * // "languageCode": "my_languageCode" - * // } - * }, - * } - * ); + * const res = await dialogflow.projects.knowledgeBases.documents.delete({ + * // Required. The name of the document to delete. Format: `projects//locations//knowledgeBases//documents/`. + * name: + * 'projects/my-project/knowledgeBases/my-knowledgeBase/documents/my-document', + * }); * console.log(res.data); * * // Example response @@ -21132,36 +22472,36 @@ export namespace dialogflow_v2beta1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - batchDelete( - params: Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchdelete, + delete( + params: Params$Resource$Projects$Knowledgebases$Documents$Delete, options: StreamMethodOptions ): GaxiosPromise; - batchDelete( - params?: Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchdelete, + delete( + params?: Params$Resource$Projects$Knowledgebases$Documents$Delete, options?: MethodOptions ): GaxiosPromise; - batchDelete( - params: Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchdelete, + delete( + params: Params$Resource$Projects$Knowledgebases$Documents$Delete, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - batchDelete( - params: Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchdelete, + delete( + params: Params$Resource$Projects$Knowledgebases$Documents$Delete, options: | MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - batchDelete( - params: Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchdelete, + delete( + params: Params$Resource$Projects$Knowledgebases$Documents$Delete, callback: BodyResponseCallback ): void; - batchDelete( + delete( callback: BodyResponseCallback ): void; - batchDelete( + delete( paramsOrCallback?: - | Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchdelete + | Params$Resource$Projects$Knowledgebases$Documents$Delete | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -21177,12 +22517,12 @@ export namespace dialogflow_v2beta1 { | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchdelete; + {}) as Params$Resource$Projects$Knowledgebases$Documents$Delete; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchdelete; + params = {} as Params$Resource$Projects$Knowledgebases$Documents$Delete; options = {}; } @@ -21195,17 +22535,14 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/entities:batchDelete').replace( - /([^:]\/)\/+/g, - '$1' - ), - method: 'POST', + url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', }, options ), params, - requiredParams: ['parent'], - pathParams: ['parent'], + requiredParams: ['name'], + pathParams: ['name'], context: this.context, }; if (callback) { @@ -21219,7 +22556,7 @@ export namespace dialogflow_v2beta1 { } /** - * Updates or creates multiple entities in the specified entity type. This method does not affect entities in the entity type that aren't explicitly specified in the request. Operation + * Retrieves the specified document. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`. * @example * ```js * // Before running the sample: @@ -21247,32 +22584,25 @@ export namespace dialogflow_v2beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.locations.agent.entityTypes.entities.batchUpdate( - * { - * // Required. The name of the entity type to update or create entities in. Supported formats: - `projects//agent/entityTypes/` - `projects//locations//agent/entityTypes/` - * parent: - * 'projects/my-project/locations/my-location/agent/entityTypes/my-entityType', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "entities": [], - * // "languageCode": "my_languageCode", - * // "updateMask": "my_updateMask" - * // } - * }, - * } - * ); + * const res = await dialogflow.projects.knowledgeBases.documents.get({ + * // Required. The name of the document to retrieve. Format `projects//locations//knowledgeBases//documents/`. + * name: + * 'projects/my-project/knowledgeBases/my-knowledgeBase/documents/my-document', + * }); * console.log(res.data); * * // Example response * // { - * // "done": false, - * // "error": {}, + * // "content": "my_content", + * // "contentUri": "my_contentUri", + * // "displayName": "my_displayName", + * // "enableAutoReload": false, + * // "knowledgeTypes": [], + * // "latestReloadStatus": {}, * // "metadata": {}, + * // "mimeType": "my_mimeType", * // "name": "my_name", - * // "response": {} + * // "rawContent": "my_rawContent" * // } * } * @@ -21288,57 +22618,57 @@ export namespace dialogflow_v2beta1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - batchUpdate( - params: Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchupdate, + get( + params: Params$Resource$Projects$Knowledgebases$Documents$Get, options: StreamMethodOptions ): GaxiosPromise; - batchUpdate( - params?: Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchupdate, + get( + params?: Params$Resource$Projects$Knowledgebases$Documents$Get, options?: MethodOptions - ): GaxiosPromise; - batchUpdate( - params: Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchupdate, + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Knowledgebases$Documents$Get, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - batchUpdate( - params: Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchupdate, + get( + params: Params$Resource$Projects$Knowledgebases$Documents$Get, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - batchUpdate( - params: Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchupdate, - callback: BodyResponseCallback + get( + params: Params$Resource$Projects$Knowledgebases$Documents$Get, + callback: BodyResponseCallback ): void; - batchUpdate( - callback: BodyResponseCallback + get( + callback: BodyResponseCallback ): void; - batchUpdate( + get( paramsOrCallback?: - | Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchupdate - | BodyResponseCallback + | Params$Resource$Projects$Knowledgebases$Documents$Get + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchupdate; + {}) as Params$Resource$Projects$Knowledgebases$Documents$Get; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchupdate; + params = {} as Params$Resource$Projects$Knowledgebases$Documents$Get; options = {}; } @@ -21351,79 +22681,30 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/entities:batchUpdate').replace( - /([^:]\/)\/+/g, - '$1' - ), - method: 'POST', + url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', }, options ), params, - requiredParams: ['parent'], - pathParams: ['parent'], + requiredParams: ['name'], + pathParams: ['name'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest( + parameters + ); } } - } - - export interface Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchcreate - extends StandardParameters { - /** - * Required. The name of the entity type to create entities in. Supported formats: - `projects//agent/entityTypes/` - `projects//locations//agent/entityTypes/` - */ - parent?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$GoogleCloudDialogflowV2beta1BatchCreateEntitiesRequest; - } - export interface Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchdelete - extends StandardParameters { - /** - * Required. The name of the entity type to delete entries for. Supported formats: - `projects//agent/entityTypes/` - `projects//locations//agent/entityTypes/` - */ - parent?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$GoogleCloudDialogflowV2beta1BatchDeleteEntitiesRequest; - } - export interface Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchupdate - extends StandardParameters { - /** - * Required. The name of the entity type to update or create entities in. Supported formats: - `projects//agent/entityTypes/` - `projects//locations//agent/entityTypes/` - */ - parent?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$GoogleCloudDialogflowV2beta1BatchUpdateEntitiesRequest; - } - - export class Resource$Projects$Locations$Agent$Environments { - context: APIRequestContext; - users: Resource$Projects$Locations$Agent$Environments$Users; - constructor(context: APIRequestContext) { - this.context = context; - this.users = new Resource$Projects$Locations$Agent$Environments$Users( - this.context - ); - } /** - * Returns the list of all non-draft environments of the specified agent. + * Create documents by importing data from external sources. * @example * ```js * // Before running the sample: @@ -21451,20 +22732,29 @@ export namespace dialogflow_v2beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.locations.agent.environments.list({ - * // Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. - * pageSize: 'placeholder-value', - * // Optional. The next_page_token value returned from a previous list request. - * pageToken: 'placeholder-value', - * // Required. The agent to list all environments from. Format: - `projects//agent` - `projects//locations//agent` - * parent: 'projects/my-project/locations/my-location/agent', + * const res = await dialogflow.projects.knowledgeBases.documents.import({ + * // Required. The knowledge base to import documents into. Format: `projects//locations//knowledgeBases/`. + * parent: 'projects/my-project/knowledgeBases/my-knowledgeBase', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "documentTemplate": {}, + * // "gcsSource": {}, + * // "importGcsCustomMetadata": false + * // } + * }, * }); * console.log(res.data); * * // Example response * // { - * // "environments": [], - * // "nextPageToken": "my_nextPageToken" + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} * // } * } * @@ -21480,57 +22770,57 @@ export namespace dialogflow_v2beta1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - list( - params: Params$Resource$Projects$Locations$Agent$Environments$List, + import( + params: Params$Resource$Projects$Knowledgebases$Documents$Import, options: StreamMethodOptions ): GaxiosPromise; - list( - params?: Params$Resource$Projects$Locations$Agent$Environments$List, + import( + params?: Params$Resource$Projects$Knowledgebases$Documents$Import, options?: MethodOptions - ): GaxiosPromise; - list( - params: Params$Resource$Projects$Locations$Agent$Environments$List, + ): GaxiosPromise; + import( + params: Params$Resource$Projects$Knowledgebases$Documents$Import, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Projects$Locations$Agent$Environments$List, + import( + params: Params$Resource$Projects$Knowledgebases$Documents$Import, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Projects$Locations$Agent$Environments$List, - callback: BodyResponseCallback + import( + params: Params$Resource$Projects$Knowledgebases$Documents$Import, + callback: BodyResponseCallback ): void; - list( - callback: BodyResponseCallback + import( + callback: BodyResponseCallback ): void; - list( + import( paramsOrCallback?: - | Params$Resource$Projects$Locations$Agent$Environments$List - | BodyResponseCallback + | Params$Resource$Projects$Knowledgebases$Documents$Import + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Locations$Agent$Environments$List; + {}) as Params$Resource$Projects$Knowledgebases$Documents$Import; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Locations$Agent$Environments$List; + params = {} as Params$Resource$Projects$Knowledgebases$Documents$Import; options = {}; } @@ -21543,11 +22833,11 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/environments').replace( + url: (rootUrl + '/v2beta1/{+parent}/documents:import').replace( /([^:]\/)\/+/g, '$1' ), - method: 'GET', + method: 'POST', }, options ), @@ -21557,61 +22847,17 @@ export namespace dialogflow_v2beta1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest( - parameters - ); + return createAPIRequest(parameters); } } - } - - export interface Params$Resource$Projects$Locations$Agent$Environments$List - extends StandardParameters { - /** - * Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. - */ - pageSize?: number; - /** - * Optional. The next_page_token value returned from a previous list request. - */ - pageToken?: string; - /** - * Required. The agent to list all environments from. Format: - `projects//agent` - `projects//locations//agent` - */ - parent?: string; - } - - export class Resource$Projects$Locations$Agent$Environments$Users { - context: APIRequestContext; - sessions: Resource$Projects$Locations$Agent$Environments$Users$Sessions; - constructor(context: APIRequestContext) { - this.context = context; - this.sessions = new Resource$Projects$Locations$Agent$Environments$Users$Sessions( - this.context - ); - } - } - - export class Resource$Projects$Locations$Agent$Environments$Users$Sessions { - context: APIRequestContext; - contexts: Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts; - entityTypes: Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes; - constructor(context: APIRequestContext) { - this.context = context; - this.contexts = new Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts( - this.context - ); - this.entityTypes = new Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes( - this.context - ); - } /** - * Deletes all active contexts in the specified session. + * Returns the list of all documents of the knowledge base. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`. * @example * ```js * // Before running the sample: @@ -21639,17 +22885,23 @@ export namespace dialogflow_v2beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.locations.agent.environments.users.sessions.deleteContexts( - * { - * // Required. The name of the session to delete all contexts from. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. - * parent: - * 'projects/my-project/locations/my-location/agent/environments/my-environment/users/my-user/sessions/my-session', - * } - * ); + * const res = await dialogflow.projects.knowledgeBases.documents.list({ + * // The filter expression used to filter documents returned by the list method. The expression has the following syntax: [AND ] ... The following fields and operators are supported: * knowledge_types with has(:) operator * display_name with has(:) operator * state with equals(=) operator Examples: * "knowledge_types:FAQ" matches documents with FAQ knowledge type. * "display_name:customer" matches documents whose display name contains "customer". * "state=ACTIVE" matches documents with ACTIVE state. * "knowledge_types:FAQ AND state=ACTIVE" matches all active FAQ documents. For more information about filtering, see [API Filtering](https://aip.dev/160). + * filter: 'placeholder-value', + * // The maximum number of items to return in a single page. By default 10 and at most 100. + * pageSize: 'placeholder-value', + * // The next_page_token value returned from a previous list request. + * pageToken: 'placeholder-value', + * // Required. The knowledge base to list all documents for. Format: `projects//locations//knowledgeBases/`. + * parent: 'projects/my-project/knowledgeBases/my-knowledgeBase', + * }); * console.log(res.data); * * // Example response - * // {} + * // { + * // "documents": [], + * // "nextPageToken": "my_nextPageToken" + * // } * } * * main().catch(e => { @@ -21664,55 +22916,57 @@ export namespace dialogflow_v2beta1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - deleteContexts( - params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Deletecontexts, + list( + params: Params$Resource$Projects$Knowledgebases$Documents$List, options: StreamMethodOptions ): GaxiosPromise; - deleteContexts( - params?: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Deletecontexts, + list( + params?: Params$Resource$Projects$Knowledgebases$Documents$List, options?: MethodOptions - ): GaxiosPromise; - deleteContexts( - params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Deletecontexts, + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Knowledgebases$Documents$List, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - deleteContexts( - params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Deletecontexts, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + list( + params: Params$Resource$Projects$Knowledgebases$Documents$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - deleteContexts( - params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Deletecontexts, - callback: BodyResponseCallback + list( + params: Params$Resource$Projects$Knowledgebases$Documents$List, + callback: BodyResponseCallback ): void; - deleteContexts( - callback: BodyResponseCallback + list( + callback: BodyResponseCallback ): void; - deleteContexts( + list( paramsOrCallback?: - | Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Deletecontexts - | BodyResponseCallback + | Params$Resource$Projects$Knowledgebases$Documents$List + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Deletecontexts; + {}) as Params$Resource$Projects$Knowledgebases$Documents$List; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Deletecontexts; + params = {} as Params$Resource$Projects$Knowledgebases$Documents$List; options = {}; } @@ -21725,11 +22979,11 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/contexts').replace( + url: (rootUrl + '/v2beta1/{+parent}/documents').replace( /([^:]\/)\/+/g, '$1' ), - method: 'DELETE', + method: 'GET', }, options ), @@ -21739,17 +22993,19 @@ export namespace dialogflow_v2beta1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest( + parameters + ); } } /** - * Processes a natural language query and returns structured, actionable data as a result. This method is not idempotent, because it may cause contexts and session entity types to be updated, which in turn might affect results of future queries. Note: Always use agent versions for production traffic. See [Versions and environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). + * Updates the specified document. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`. * @example * ```js * // Before running the sample: @@ -21777,35 +23033,39 @@ export namespace dialogflow_v2beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.locations.agent.environments.users.sessions.detectIntent( - * { - * // Required. The name of the session this query is sent to. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment (`Environment ID` might be referred to as environment name at some places). If `User ID` is not specified, we are using "-". It's up to the API caller to choose an appropriate `Session ID` and `User Id`. They can be a random number or some type of user and session identifiers (preferably hashed). The length of the `Session ID` and `User ID` must not exceed 36 characters. For more information, see the [API interactions guide](https://cloud.google.com/dialogflow/docs/api-overview). Note: Always use agent versions for production traffic. See [Versions and environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). - * session: - * 'projects/my-project/locations/my-location/agent/environments/my-environment/users/my-user/sessions/my-session', + * const res = await dialogflow.projects.knowledgeBases.documents.patch({ + * // Optional. The document resource name. The name must be empty when creating a document. Format: `projects//locations//knowledgeBases//documents/`. + * name: + * 'projects/my-project/knowledgeBases/my-knowledgeBase/documents/my-document', + * // Optional. Not specified means `update all`. Currently, only `display_name` can be updated, an InvalidArgument will be returned for attempting to update other fields. + * updateMask: 'placeholder-value', * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "inputAudio": "my_inputAudio", - * // "outputAudioConfig": {}, - * // "outputAudioConfigMask": "my_outputAudioConfigMask", - * // "queryInput": {}, - * // "queryParams": {} - * // } - * }, - * } - * ); + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "content": "my_content", + * // "contentUri": "my_contentUri", + * // "displayName": "my_displayName", + * // "enableAutoReload": false, + * // "knowledgeTypes": [], + * // "latestReloadStatus": {}, + * // "metadata": {}, + * // "mimeType": "my_mimeType", + * // "name": "my_name", + * // "rawContent": "my_rawContent" + * // } + * }, + * }); * console.log(res.data); * * // Example response * // { - * // "alternativeQueryResults": [], - * // "outputAudio": "my_outputAudio", - * // "outputAudioConfig": {}, - * // "queryResult": {}, - * // "responseId": "my_responseId", - * // "webhookStatus": {} + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} * // } * } * @@ -21821,57 +23081,57 @@ export namespace dialogflow_v2beta1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - detectIntent( - params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Detectintent, + patch( + params: Params$Resource$Projects$Knowledgebases$Documents$Patch, options: StreamMethodOptions ): GaxiosPromise; - detectIntent( - params?: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Detectintent, + patch( + params?: Params$Resource$Projects$Knowledgebases$Documents$Patch, options?: MethodOptions - ): GaxiosPromise; - detectIntent( - params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Detectintent, + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Knowledgebases$Documents$Patch, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - detectIntent( - params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Detectintent, + patch( + params: Params$Resource$Projects$Knowledgebases$Documents$Patch, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - detectIntent( - params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Detectintent, - callback: BodyResponseCallback + patch( + params: Params$Resource$Projects$Knowledgebases$Documents$Patch, + callback: BodyResponseCallback ): void; - detectIntent( - callback: BodyResponseCallback + patch( + callback: BodyResponseCallback ): void; - detectIntent( + patch( paramsOrCallback?: - | Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Detectintent - | BodyResponseCallback + | Params$Resource$Projects$Knowledgebases$Documents$Patch + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Detectintent; + {}) as Params$Resource$Projects$Knowledgebases$Documents$Patch; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Detectintent; + params = {} as Params$Resource$Projects$Knowledgebases$Documents$Patch; options = {}; } @@ -21884,60 +23144,28 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+session}:detectIntent').replace( - /([^:]\/)\/+/g, - '$1' - ), - method: 'POST', + url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', }, options ), params, - requiredParams: ['session'], - pathParams: ['session'], + requiredParams: ['name'], + pathParams: ['name'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest( - parameters - ); + return createAPIRequest(parameters); } } - } - export interface Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Deletecontexts - extends StandardParameters { /** - * Required. The name of the session to delete all contexts from. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. - */ - parent?: string; - } - export interface Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Detectintent - extends StandardParameters { - /** - * Required. The name of the session this query is sent to. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment (`Environment ID` might be referred to as environment name at some places). If `User ID` is not specified, we are using "-". It's up to the API caller to choose an appropriate `Session ID` and `User Id`. They can be a random number or some type of user and session identifiers (preferably hashed). The length of the `Session ID` and `User ID` must not exceed 36 characters. For more information, see the [API interactions guide](https://cloud.google.com/dialogflow/docs/api-overview). Note: Always use agent versions for production traffic. See [Versions and environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). - */ - session?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$GoogleCloudDialogflowV2beta1DetectIntentRequest; - } - - export class Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts { - context: APIRequestContext; - constructor(context: APIRequestContext) { - this.context = context; - } - - /** - * Creates a context. If the specified context already exists, overrides the context. + * Reloads the specified document from its specified source, content_uri or content. The previously loaded content of the document will be deleted. Note: Even when the content of the document has not changed, there still may be side effects because of internal implementation changes. Note: If the document source is Google Cloud Storage URI, its metadata will be replaced with the custom metadata from Google Cloud Storage if the `import_gcs_custom_metadata` field is set to true in the request. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`. * @example * ```js * // Before running the sample: @@ -21965,30 +23193,29 @@ export namespace dialogflow_v2beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.locations.agent.environments.users.sessions.contexts.create( - * { - * // Required. The session to create a context for. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. - * parent: - * 'projects/my-project/locations/my-location/agent/environments/my-environment/users/my-user/sessions/my-session', + * const res = await dialogflow.projects.knowledgeBases.documents.reload({ + * // Required. The name of the document to reload. Format: `projects//locations//knowledgeBases//documents/` + * name: + * 'projects/my-project/knowledgeBases/my-knowledgeBase/documents/my-document', * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "lifespanCount": 0, - * // "name": "my_name", - * // "parameters": {} - * // } - * }, - * } - * ); + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "gcsSource": {}, + * // "importGcsCustomMetadata": false + * // } + * }, + * }); * console.log(res.data); * * // Example response * // { - * // "lifespanCount": 0, + * // "done": false, + * // "error": {}, + * // "metadata": {}, * // "name": "my_name", - * // "parameters": {} + * // "response": {} * // } * } * @@ -22004,57 +23231,57 @@ export namespace dialogflow_v2beta1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - create( - params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Create, + reload( + params: Params$Resource$Projects$Knowledgebases$Documents$Reload, options: StreamMethodOptions ): GaxiosPromise; - create( - params?: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Create, + reload( + params?: Params$Resource$Projects$Knowledgebases$Documents$Reload, options?: MethodOptions - ): GaxiosPromise; - create( - params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Create, + ): GaxiosPromise; + reload( + params: Params$Resource$Projects$Knowledgebases$Documents$Reload, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - create( - params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Create, + reload( + params: Params$Resource$Projects$Knowledgebases$Documents$Reload, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - create( - params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Create, - callback: BodyResponseCallback + reload( + params: Params$Resource$Projects$Knowledgebases$Documents$Reload, + callback: BodyResponseCallback ): void; - create( - callback: BodyResponseCallback + reload( + callback: BodyResponseCallback ): void; - create( + reload( paramsOrCallback?: - | Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Create - | BodyResponseCallback + | Params$Resource$Projects$Knowledgebases$Documents$Reload + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Create; + {}) as Params$Resource$Projects$Knowledgebases$Documents$Reload; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Create; + params = {} as Params$Resource$Projects$Knowledgebases$Documents$Reload; options = {}; } @@ -22067,7 +23294,7 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/contexts').replace( + url: (rootUrl + '/v2beta1/{+name}:reload').replace( /([^:]\/)\/+/g, '$1' ), @@ -22076,24 +23303,141 @@ export namespace dialogflow_v2beta1 { options ), params, - requiredParams: ['parent'], - pathParams: ['parent'], + requiredParams: ['name'], + pathParams: ['name'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest( - parameters - ); + return createAPIRequest(parameters); } } + } + export interface Params$Resource$Projects$Knowledgebases$Documents$Create + extends StandardParameters { /** - * Deletes the specified context. + * Whether to import custom metadata from Google Cloud Storage. Only valid when the document source is Google Cloud Storage URI. + */ + importGcsCustomMetadata?: boolean; + /** + * Required. The knowledge base to create a document for. Format: `projects//locations//knowledgeBases/`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1Document; + } + export interface Params$Resource$Projects$Knowledgebases$Documents$Delete + extends StandardParameters { + /** + * Required. The name of the document to delete. Format: `projects//locations//knowledgeBases//documents/`. + */ + name?: string; + } + export interface Params$Resource$Projects$Knowledgebases$Documents$Get + extends StandardParameters { + /** + * Required. The name of the document to retrieve. Format `projects//locations//knowledgeBases//documents/`. + */ + name?: string; + } + export interface Params$Resource$Projects$Knowledgebases$Documents$Import + extends StandardParameters { + /** + * Required. The knowledge base to import documents into. Format: `projects//locations//knowledgeBases/`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1ImportDocumentsRequest; + } + export interface Params$Resource$Projects$Knowledgebases$Documents$List + extends StandardParameters { + /** + * The filter expression used to filter documents returned by the list method. The expression has the following syntax: [AND ] ... The following fields and operators are supported: * knowledge_types with has(:) operator * display_name with has(:) operator * state with equals(=) operator Examples: * "knowledge_types:FAQ" matches documents with FAQ knowledge type. * "display_name:customer" matches documents whose display name contains "customer". * "state=ACTIVE" matches documents with ACTIVE state. * "knowledge_types:FAQ AND state=ACTIVE" matches all active FAQ documents. For more information about filtering, see [API Filtering](https://aip.dev/160). + */ + filter?: string; + /** + * The maximum number of items to return in a single page. By default 10 and at most 100. + */ + pageSize?: number; + /** + * The next_page_token value returned from a previous list request. + */ + pageToken?: string; + /** + * Required. The knowledge base to list all documents for. Format: `projects//locations//knowledgeBases/`. + */ + parent?: string; + } + export interface Params$Resource$Projects$Knowledgebases$Documents$Patch + extends StandardParameters { + /** + * Optional. The document resource name. The name must be empty when creating a document. Format: `projects//locations//knowledgeBases//documents/`. + */ + name?: string; + /** + * Optional. Not specified means `update all`. Currently, only `display_name` can be updated, an InvalidArgument will be returned for attempting to update other fields. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1Document; + } + export interface Params$Resource$Projects$Knowledgebases$Documents$Reload + extends StandardParameters { + /** + * Required. The name of the document to reload. Format: `projects//locations//knowledgeBases//documents/` + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1ReloadDocumentRequest; + } + + export class Resource$Projects$Locations { + context: APIRequestContext; + agent: Resource$Projects$Locations$Agent; + answerRecords: Resource$Projects$Locations$Answerrecords; + conversationProfiles: Resource$Projects$Locations$Conversationprofiles; + conversations: Resource$Projects$Locations$Conversations; + knowledgeBases: Resource$Projects$Locations$Knowledgebases; + operations: Resource$Projects$Locations$Operations; + constructor(context: APIRequestContext) { + this.context = context; + this.agent = new Resource$Projects$Locations$Agent(this.context); + this.answerRecords = new Resource$Projects$Locations$Answerrecords( + this.context + ); + this.conversationProfiles = new Resource$Projects$Locations$Conversationprofiles( + this.context + ); + this.conversations = new Resource$Projects$Locations$Conversations( + this.context + ); + this.knowledgeBases = new Resource$Projects$Locations$Knowledgebases( + this.context + ); + this.operations = new Resource$Projects$Locations$Operations( + this.context + ); + } + + /** + * Deletes the specified agent. * @example * ```js * // Before running the sample: @@ -22121,13 +23465,10 @@ export namespace dialogflow_v2beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.locations.agent.environments.users.sessions.contexts.delete( - * { - * // Required. The name of the context to delete. Supported formats: - `projects//agent/sessions//contexts/`, - `projects//locations//agent/sessions//contexts/`, - `projects//agent/environments//users//sessions//contexts/`, - `projects//locations//agent/environments//users//sessions//contexts/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. - * name: - * 'projects/my-project/locations/my-location/agent/environments/my-environment/users/my-user/sessions/my-session/contexts/my-context', - * } - * ); + * const res = await dialogflow.projects.locations.deleteAgent({ + * // Required. The project that the agent to delete is associated with. Format: `projects/` or `projects//locations/`. + * parent: 'projects/my-project/locations/my-location', + * }); * console.log(res.data); * * // Example response @@ -22146,32 +23487,34 @@ export namespace dialogflow_v2beta1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - delete( - params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Delete, + deleteAgent( + params: Params$Resource$Projects$Locations$Deleteagent, options: StreamMethodOptions ): GaxiosPromise; - delete( - params?: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Delete, + deleteAgent( + params?: Params$Resource$Projects$Locations$Deleteagent, options?: MethodOptions ): GaxiosPromise; - delete( - params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Delete, + deleteAgent( + params: Params$Resource$Projects$Locations$Deleteagent, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - delete( - params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Delete, + deleteAgent( + params: Params$Resource$Projects$Locations$Deleteagent, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - delete( - params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Delete, + deleteAgent( + params: Params$Resource$Projects$Locations$Deleteagent, callback: BodyResponseCallback ): void; - delete(callback: BodyResponseCallback): void; - delete( + deleteAgent( + callback: BodyResponseCallback + ): void; + deleteAgent( paramsOrCallback?: - | Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Delete + | Params$Resource$Projects$Locations$Deleteagent | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -22187,12 +23530,12 @@ export namespace dialogflow_v2beta1 { | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Delete; + {}) as Params$Resource$Projects$Locations$Deleteagent; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Delete; + params = {} as Params$Resource$Projects$Locations$Deleteagent; options = {}; } @@ -22205,14 +23548,17 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + url: (rootUrl + '/v2beta1/{+parent}/agent').replace( + /([^:]\/)\/+/g, + '$1' + ), method: 'DELETE', }, options ), params, - requiredParams: ['name'], - pathParams: ['name'], + requiredParams: ['parent'], + pathParams: ['parent'], context: this.context, }; if (callback) { @@ -22226,7 +23572,7 @@ export namespace dialogflow_v2beta1 { } /** - * Retrieves the specified context. + * Retrieves the specified agent. * @example * ```js * // Before running the sample: @@ -22254,20 +23600,26 @@ export namespace dialogflow_v2beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.locations.agent.environments.users.sessions.contexts.get( - * { - * // Required. The name of the context. Supported formats: - `projects//agent/sessions//contexts/`, - `projects//locations//agent/sessions//contexts/`, - `projects//agent/environments//users//sessions//contexts/`, - `projects//locations//agent/environments//users//sessions//contexts/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. - * name: - * 'projects/my-project/locations/my-location/agent/environments/my-environment/users/my-user/sessions/my-session/contexts/my-context', - * } - * ); + * const res = await dialogflow.projects.locations.getAgent({ + * // Required. The project that the agent to fetch is associated with. Format: `projects/` or `projects//locations/`. + * parent: 'projects/my-project/locations/my-location', + * }); * console.log(res.data); * * // Example response * // { - * // "lifespanCount": 0, - * // "name": "my_name", - * // "parameters": {} + * // "apiVersion": "my_apiVersion", + * // "avatarUri": "my_avatarUri", + * // "classificationThreshold": {}, + * // "defaultLanguageCode": "my_defaultLanguageCode", + * // "description": "my_description", + * // "displayName": "my_displayName", + * // "enableLogging": false, + * // "matchMode": "my_matchMode", + * // "parent": "my_parent", + * // "supportedLanguageCodes": [], + * // "tier": "my_tier", + * // "timeZone": "my_timeZone" * // } * } * @@ -22283,57 +23635,57 @@ export namespace dialogflow_v2beta1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - get( - params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Get, + getAgent( + params: Params$Resource$Projects$Locations$Getagent, options: StreamMethodOptions ): GaxiosPromise; - get( - params?: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Get, + getAgent( + params?: Params$Resource$Projects$Locations$Getagent, options?: MethodOptions - ): GaxiosPromise; - get( - params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Get, + ): GaxiosPromise; + getAgent( + params: Params$Resource$Projects$Locations$Getagent, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - get( - params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Get, + getAgent( + params: Params$Resource$Projects$Locations$Getagent, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - get( - params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Get, - callback: BodyResponseCallback + getAgent( + params: Params$Resource$Projects$Locations$Getagent, + callback: BodyResponseCallback ): void; - get( - callback: BodyResponseCallback + getAgent( + callback: BodyResponseCallback ): void; - get( + getAgent( paramsOrCallback?: - | Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Get - | BodyResponseCallback + | Params$Resource$Projects$Locations$Getagent + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Get; + {}) as Params$Resource$Projects$Locations$Getagent; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Get; + params = {} as Params$Resource$Projects$Locations$Getagent; options = {}; } @@ -22346,30 +23698,33 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + url: (rootUrl + '/v2beta1/{+parent}/agent').replace( + /([^:]\/)\/+/g, + '$1' + ), method: 'GET', }, options ), params, - requiredParams: ['name'], - pathParams: ['name'], + requiredParams: ['parent'], + pathParams: ['parent'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest( + return createAPIRequest( parameters ); } } /** - * Returns the list of all contexts in the specified session. + * Creates/updates the specified agent. * @example * ```js * // Before running the sample: @@ -22397,23 +23752,47 @@ export namespace dialogflow_v2beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.locations.agent.environments.users.sessions.contexts.list( - * { - * // Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. - * pageSize: 'placeholder-value', - * // Optional. The next_page_token value returned from a previous list request. - * pageToken: 'placeholder-value', - * // Required. The session to list all contexts from. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. - * parent: - * 'projects/my-project/locations/my-location/agent/environments/my-environment/users/my-user/sessions/my-session', - * } - * ); + * const res = await dialogflow.projects.locations.setAgent({ + * // Required. The project of this agent. Format: `projects/` or `projects//locations/` + * parent: 'projects/my-project/locations/my-location', + * // Optional. The mask to control which fields get updated. + * updateMask: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "apiVersion": "my_apiVersion", + * // "avatarUri": "my_avatarUri", + * // "classificationThreshold": {}, + * // "defaultLanguageCode": "my_defaultLanguageCode", + * // "description": "my_description", + * // "displayName": "my_displayName", + * // "enableLogging": false, + * // "matchMode": "my_matchMode", + * // "parent": "my_parent", + * // "supportedLanguageCodes": [], + * // "tier": "my_tier", + * // "timeZone": "my_timeZone" + * // } + * }, + * }); * console.log(res.data); * * // Example response * // { - * // "contexts": [], - * // "nextPageToken": "my_nextPageToken" + * // "apiVersion": "my_apiVersion", + * // "avatarUri": "my_avatarUri", + * // "classificationThreshold": {}, + * // "defaultLanguageCode": "my_defaultLanguageCode", + * // "description": "my_description", + * // "displayName": "my_displayName", + * // "enableLogging": false, + * // "matchMode": "my_matchMode", + * // "parent": "my_parent", + * // "supportedLanguageCodes": [], + * // "tier": "my_tier", + * // "timeZone": "my_timeZone" * // } * } * @@ -22429,57 +23808,57 @@ export namespace dialogflow_v2beta1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - list( - params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$List, + setAgent( + params: Params$Resource$Projects$Locations$Setagent, options: StreamMethodOptions ): GaxiosPromise; - list( - params?: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$List, + setAgent( + params?: Params$Resource$Projects$Locations$Setagent, options?: MethodOptions - ): GaxiosPromise; - list( - params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$List, + ): GaxiosPromise; + setAgent( + params: Params$Resource$Projects$Locations$Setagent, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$List, + setAgent( + params: Params$Resource$Projects$Locations$Setagent, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$List, - callback: BodyResponseCallback + setAgent( + params: Params$Resource$Projects$Locations$Setagent, + callback: BodyResponseCallback ): void; - list( - callback: BodyResponseCallback + setAgent( + callback: BodyResponseCallback ): void; - list( + setAgent( paramsOrCallback?: - | Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$List - | BodyResponseCallback + | Params$Resource$Projects$Locations$Setagent + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$List; + {}) as Params$Resource$Projects$Locations$Setagent; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$List; + params = {} as Params$Resource$Projects$Locations$Setagent; options = {}; } @@ -22492,11 +23871,11 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/contexts').replace( + url: (rootUrl + '/v2beta1/{+parent}/agent').replace( /([^:]\/)\/+/g, '$1' ), - method: 'GET', + method: 'POST', }, options ), @@ -22506,72 +23885,7874 @@ export namespace dialogflow_v2beta1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest( + return createAPIRequest( parameters ); } } + } + export interface Params$Resource$Projects$Locations$Deleteagent + extends StandardParameters { /** - * Updates the specified context. - * @example - * ```js - * // Before running the sample: - * // - Enable the API at: - * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com - * // - Login into gcloud by running: - * // `$ gcloud auth application-default login` - * // - Install the npm module by running: - * // `$ npm install googleapis` - * - * const {google} = require('googleapis'); - * const dialogflow = google.dialogflow('v2beta1'); - * - * async function main() { - * const auth = new google.auth.GoogleAuth({ - * // Scopes can be specified either as an array or as a single, space-delimited string. - * scopes: [ - * 'https://www.googleapis.com/auth/cloud-platform', - * 'https://www.googleapis.com/auth/dialogflow', - * ], - * }); - * - * // Acquire an auth client, and bind it to all future calls - * const authClient = await auth.getClient(); - * google.options({auth: authClient}); - * - * // Do the magic - * const res = await dialogflow.projects.locations.agent.environments.users.sessions.contexts.patch( + * Required. The project that the agent to delete is associated with. Format: `projects/` or `projects//locations/`. + */ + parent?: string; + } + export interface Params$Resource$Projects$Locations$Getagent + extends StandardParameters { + /** + * Required. The project that the agent to fetch is associated with. Format: `projects/` or `projects//locations/`. + */ + parent?: string; + } + export interface Params$Resource$Projects$Locations$Setagent + extends StandardParameters { + /** + * Required. The project of this agent. Format: `projects/` or `projects//locations/` + */ + parent?: string; + /** + * Optional. The mask to control which fields get updated. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1Agent; + } + + export class Resource$Projects$Locations$Agent { + context: APIRequestContext; + entityTypes: Resource$Projects$Locations$Agent$Entitytypes; + environments: Resource$Projects$Locations$Agent$Environments; + intents: Resource$Projects$Locations$Agent$Intents; + sessions: Resource$Projects$Locations$Agent$Sessions; + constructor(context: APIRequestContext) { + this.context = context; + this.entityTypes = new Resource$Projects$Locations$Agent$Entitytypes( + this.context + ); + this.environments = new Resource$Projects$Locations$Agent$Environments( + this.context + ); + this.intents = new Resource$Projects$Locations$Agent$Intents( + this.context + ); + this.sessions = new Resource$Projects$Locations$Agent$Sessions( + this.context + ); + } + + /** + * Exports the specified agent to a ZIP file. Operation + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.export({ + * // Required. The project that the agent to export is associated with. Format: `projects/` or `projects//locations/`. + * parent: 'projects/my-project/locations/my-location', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "agentUri": "my_agentUri" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + export( + params: Params$Resource$Projects$Locations$Agent$Export, + options: StreamMethodOptions + ): GaxiosPromise; + export( + params?: Params$Resource$Projects$Locations$Agent$Export, + options?: MethodOptions + ): GaxiosPromise; + export( + params: Params$Resource$Projects$Locations$Agent$Export, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + export( + params: Params$Resource$Projects$Locations$Agent$Export, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + export( + params: Params$Resource$Projects$Locations$Agent$Export, + callback: BodyResponseCallback + ): void; + export( + callback: BodyResponseCallback + ): void; + export( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Export + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Export; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Export; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+parent}/agent:export').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Retrieves the fulfillment. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.getFulfillment({ + * // Required. The name of the fulfillment. Supported formats: - `projects//agent/fulfillment` - `projects//locations//agent/fulfillment` + * name: 'projects/my-project/locations/my-location/agent/fulfillment', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "displayName": "my_displayName", + * // "enabled": false, + * // "features": [], + * // "genericWebService": {}, + * // "name": "my_name" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + getFulfillment( + params: Params$Resource$Projects$Locations$Agent$Getfulfillment, + options: StreamMethodOptions + ): GaxiosPromise; + getFulfillment( + params?: Params$Resource$Projects$Locations$Agent$Getfulfillment, + options?: MethodOptions + ): GaxiosPromise; + getFulfillment( + params: Params$Resource$Projects$Locations$Agent$Getfulfillment, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getFulfillment( + params: Params$Resource$Projects$Locations$Agent$Getfulfillment, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getFulfillment( + params: Params$Resource$Projects$Locations$Agent$Getfulfillment, + callback: BodyResponseCallback + ): void; + getFulfillment( + callback: BodyResponseCallback + ): void; + getFulfillment( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Getfulfillment + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Getfulfillment; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Getfulfillment; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Gets agent validation result. Agent validation is performed during training time and is updated automatically when training is completed. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.getValidationResult({ + * // Optional. The language for which you want a validation result. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. + * languageCode: 'placeholder-value', + * // Required. The project that the agent is associated with. Format: `projects/` or `projects//locations/`. + * parent: 'projects/my-project/locations/my-location', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "validationErrors": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + getValidationResult( + params: Params$Resource$Projects$Locations$Agent$Getvalidationresult, + options: StreamMethodOptions + ): GaxiosPromise; + getValidationResult( + params?: Params$Resource$Projects$Locations$Agent$Getvalidationresult, + options?: MethodOptions + ): GaxiosPromise; + getValidationResult( + params: Params$Resource$Projects$Locations$Agent$Getvalidationresult, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getValidationResult( + params: Params$Resource$Projects$Locations$Agent$Getvalidationresult, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getValidationResult( + params: Params$Resource$Projects$Locations$Agent$Getvalidationresult, + callback: BodyResponseCallback + ): void; + getValidationResult( + callback: BodyResponseCallback + ): void; + getValidationResult( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Getvalidationresult + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Getvalidationresult; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Getvalidationresult; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + '/v2beta1/{+parent}/agent/validationResult' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Imports the specified agent from a ZIP file. Uploads new intents and entity types without deleting the existing ones. Intents and entity types with the same name are replaced with the new versions from ImportAgentRequest. After the import, the imported draft agent will be trained automatically (unless disabled in agent settings). However, once the import is done, training may not be completed yet. Please call TrainAgent and wait for the operation it returns in order to train explicitly. Operation An operation which tracks when importing is complete. It only tracks when the draft agent is updated not when it is done training. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.import({ + * // Required. The project that the agent to import is associated with. Format: `projects/` or `projects//locations/`. + * parent: 'projects/my-project/locations/my-location', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "agentContent": "my_agentContent", + * // "agentUri": "my_agentUri" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + import( + params: Params$Resource$Projects$Locations$Agent$Import, + options: StreamMethodOptions + ): GaxiosPromise; + import( + params?: Params$Resource$Projects$Locations$Agent$Import, + options?: MethodOptions + ): GaxiosPromise; + import( + params: Params$Resource$Projects$Locations$Agent$Import, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + import( + params: Params$Resource$Projects$Locations$Agent$Import, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + import( + params: Params$Resource$Projects$Locations$Agent$Import, + callback: BodyResponseCallback + ): void; + import( + callback: BodyResponseCallback + ): void; + import( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Import + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Import; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Import; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+parent}/agent:import').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Restores the specified agent from a ZIP file. Replaces the current agent version with a new one. All the intents and entity types in the older version are deleted. After the restore, the restored draft agent will be trained automatically (unless disabled in agent settings). However, once the restore is done, training may not be completed yet. Please call TrainAgent and wait for the operation it returns in order to train explicitly. Operation An operation which tracks when restoring is complete. It only tracks when the draft agent is updated not when it is done training. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.restore({ + * // Required. The project that the agent to restore is associated with. Format: `projects/` or `projects//locations/`. + * parent: 'projects/my-project/locations/my-location', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "agentContent": "my_agentContent", + * // "agentUri": "my_agentUri" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + restore( + params: Params$Resource$Projects$Locations$Agent$Restore, + options: StreamMethodOptions + ): GaxiosPromise; + restore( + params?: Params$Resource$Projects$Locations$Agent$Restore, + options?: MethodOptions + ): GaxiosPromise; + restore( + params: Params$Resource$Projects$Locations$Agent$Restore, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + restore( + params: Params$Resource$Projects$Locations$Agent$Restore, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + restore( + params: Params$Resource$Projects$Locations$Agent$Restore, + callback: BodyResponseCallback + ): void; + restore( + callback: BodyResponseCallback + ): void; + restore( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Restore + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Restore; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Restore; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+parent}/agent:restore').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Returns the list of agents. Since there is at most one conversational agent per project, this method is useful primarily for listing all agents across projects the caller has access to. One can achieve that with a wildcard project collection id "-". Refer to [List Sub-Collections](https://cloud.google.com/apis/design/design_patterns#list_sub-collections). + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.search({ + * // Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. + * pageSize: 'placeholder-value', + * // Optional. The next_page_token value returned from a previous list request. + * pageToken: 'placeholder-value', + * // Required. The project to list agents from. Format: `projects/` or `projects//locations/`. + * parent: 'projects/my-project/locations/my-location', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "agents": [], + * // "nextPageToken": "my_nextPageToken" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + search( + params: Params$Resource$Projects$Locations$Agent$Search, + options: StreamMethodOptions + ): GaxiosPromise; + search( + params?: Params$Resource$Projects$Locations$Agent$Search, + options?: MethodOptions + ): GaxiosPromise; + search( + params: Params$Resource$Projects$Locations$Agent$Search, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + search( + params: Params$Resource$Projects$Locations$Agent$Search, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + search( + params: Params$Resource$Projects$Locations$Agent$Search, + callback: BodyResponseCallback + ): void; + search( + callback: BodyResponseCallback + ): void; + search( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Search + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Search; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Search; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+parent}/agent:search').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Trains the specified agent. Operation + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.train({ + * // Required. The project that the agent to train is associated with. Format: `projects/` or `projects//locations/`. + * parent: 'projects/my-project/locations/my-location', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // {} + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + train( + params: Params$Resource$Projects$Locations$Agent$Train, + options: StreamMethodOptions + ): GaxiosPromise; + train( + params?: Params$Resource$Projects$Locations$Agent$Train, + options?: MethodOptions + ): GaxiosPromise; + train( + params: Params$Resource$Projects$Locations$Agent$Train, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + train( + params: Params$Resource$Projects$Locations$Agent$Train, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + train( + params: Params$Resource$Projects$Locations$Agent$Train, + callback: BodyResponseCallback + ): void; + train( + callback: BodyResponseCallback + ): void; + train( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Train + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Train; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Train; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+parent}/agent:train').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Updates the fulfillment. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.updateFulfillment({ + * // Required. The unique identifier of the fulfillment. Supported formats: - `projects//agent/fulfillment` - `projects//locations//agent/fulfillment` This field is not used for Fulfillment in an Environment. + * name: 'projects/my-project/locations/my-location/agent/fulfillment', + * // Required. The mask to control which fields get updated. If the mask is not present, all fields will be updated. + * updateMask: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "displayName": "my_displayName", + * // "enabled": false, + * // "features": [], + * // "genericWebService": {}, + * // "name": "my_name" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "displayName": "my_displayName", + * // "enabled": false, + * // "features": [], + * // "genericWebService": {}, + * // "name": "my_name" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + updateFulfillment( + params: Params$Resource$Projects$Locations$Agent$Updatefulfillment, + options: StreamMethodOptions + ): GaxiosPromise; + updateFulfillment( + params?: Params$Resource$Projects$Locations$Agent$Updatefulfillment, + options?: MethodOptions + ): GaxiosPromise; + updateFulfillment( + params: Params$Resource$Projects$Locations$Agent$Updatefulfillment, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + updateFulfillment( + params: Params$Resource$Projects$Locations$Agent$Updatefulfillment, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + updateFulfillment( + params: Params$Resource$Projects$Locations$Agent$Updatefulfillment, + callback: BodyResponseCallback + ): void; + updateFulfillment( + callback: BodyResponseCallback + ): void; + updateFulfillment( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Updatefulfillment + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Updatefulfillment; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Updatefulfillment; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + } + + export interface Params$Resource$Projects$Locations$Agent$Export + extends StandardParameters { + /** + * Required. The project that the agent to export is associated with. Format: `projects/` or `projects//locations/`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1ExportAgentRequest; + } + export interface Params$Resource$Projects$Locations$Agent$Getfulfillment + extends StandardParameters { + /** + * Required. The name of the fulfillment. Supported formats: - `projects//agent/fulfillment` - `projects//locations//agent/fulfillment` + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Agent$Getvalidationresult + extends StandardParameters { + /** + * Optional. The language for which you want a validation result. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. + */ + languageCode?: string; + /** + * Required. The project that the agent is associated with. Format: `projects/` or `projects//locations/`. + */ + parent?: string; + } + export interface Params$Resource$Projects$Locations$Agent$Import + extends StandardParameters { + /** + * Required. The project that the agent to import is associated with. Format: `projects/` or `projects//locations/`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1ImportAgentRequest; + } + export interface Params$Resource$Projects$Locations$Agent$Restore + extends StandardParameters { + /** + * Required. The project that the agent to restore is associated with. Format: `projects/` or `projects//locations/`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1RestoreAgentRequest; + } + export interface Params$Resource$Projects$Locations$Agent$Search + extends StandardParameters { + /** + * Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. + */ + pageSize?: number; + /** + * Optional. The next_page_token value returned from a previous list request. + */ + pageToken?: string; + /** + * Required. The project to list agents from. Format: `projects/` or `projects//locations/`. + */ + parent?: string; + } + export interface Params$Resource$Projects$Locations$Agent$Train + extends StandardParameters { + /** + * Required. The project that the agent to train is associated with. Format: `projects/` or `projects//locations/`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1TrainAgentRequest; + } + export interface Params$Resource$Projects$Locations$Agent$Updatefulfillment + extends StandardParameters { + /** + * Required. The unique identifier of the fulfillment. Supported formats: - `projects//agent/fulfillment` - `projects//locations//agent/fulfillment` This field is not used for Fulfillment in an Environment. + */ + name?: string; + /** + * Required. The mask to control which fields get updated. If the mask is not present, all fields will be updated. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1Fulfillment; + } + + export class Resource$Projects$Locations$Agent$Entitytypes { + context: APIRequestContext; + entities: Resource$Projects$Locations$Agent$Entitytypes$Entities; + constructor(context: APIRequestContext) { + this.context = context; + this.entities = new Resource$Projects$Locations$Agent$Entitytypes$Entities( + this.context + ); + } + + /** + * Deletes entity types in the specified agent. Operation + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.entityTypes.batchDelete( + * { + * // Required. The name of the agent to delete all entities types for. Supported formats: - `projects//agent`, - `projects//locations//agent`. + * parent: 'projects/my-project/locations/my-location/agent', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "entityTypeNames": [] + * // } + * }, + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + batchDelete( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Batchdelete, + options: StreamMethodOptions + ): GaxiosPromise; + batchDelete( + params?: Params$Resource$Projects$Locations$Agent$Entitytypes$Batchdelete, + options?: MethodOptions + ): GaxiosPromise; + batchDelete( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Batchdelete, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + batchDelete( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Batchdelete, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + batchDelete( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Batchdelete, + callback: BodyResponseCallback + ): void; + batchDelete( + callback: BodyResponseCallback + ): void; + batchDelete( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Entitytypes$Batchdelete + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Entitytypes$Batchdelete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Entitytypes$Batchdelete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + '/v2beta1/{+parent}/entityTypes:batchDelete' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Updates/Creates multiple entity types in the specified agent. Operation + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.entityTypes.batchUpdate( + * { + * // Required. The name of the agent to update or create entity types in. Supported formats: - `projects//agent` - `projects//locations//agent` + * parent: 'projects/my-project/locations/my-location/agent', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "entityTypeBatchInline": {}, + * // "entityTypeBatchUri": "my_entityTypeBatchUri", + * // "languageCode": "my_languageCode", + * // "updateMask": "my_updateMask" + * // } + * }, + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + batchUpdate( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Batchupdate, + options: StreamMethodOptions + ): GaxiosPromise; + batchUpdate( + params?: Params$Resource$Projects$Locations$Agent$Entitytypes$Batchupdate, + options?: MethodOptions + ): GaxiosPromise; + batchUpdate( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Batchupdate, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + batchUpdate( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Batchupdate, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + batchUpdate( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Batchupdate, + callback: BodyResponseCallback + ): void; + batchUpdate( + callback: BodyResponseCallback + ): void; + batchUpdate( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Entitytypes$Batchupdate + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Entitytypes$Batchupdate; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Entitytypes$Batchupdate; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + '/v2beta1/{+parent}/entityTypes:batchUpdate' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Creates an entity type in the specified agent. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.entityTypes.create({ + * // Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * languageCode: 'placeholder-value', + * // Required. The agent to create a entity type for. Supported formats: - `projects//agent` - `projects//locations//agent` + * parent: 'projects/my-project/locations/my-location/agent', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "autoExpansionMode": "my_autoExpansionMode", + * // "displayName": "my_displayName", + * // "enableFuzzyExtraction": false, + * // "entities": [], + * // "kind": "my_kind", + * // "name": "my_name" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "autoExpansionMode": "my_autoExpansionMode", + * // "displayName": "my_displayName", + * // "enableFuzzyExtraction": false, + * // "entities": [], + * // "kind": "my_kind", + * // "name": "my_name" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + create( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Create, + options: StreamMethodOptions + ): GaxiosPromise; + create( + params?: Params$Resource$Projects$Locations$Agent$Entitytypes$Create, + options?: MethodOptions + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Create, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Create, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Create, + callback: BodyResponseCallback + ): void; + create( + callback: BodyResponseCallback + ): void; + create( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Entitytypes$Create + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Entitytypes$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Entitytypes$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+parent}/entityTypes').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Deletes the specified entity type. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.entityTypes.delete({ + * // Required. The name of the entity type to delete. Supported formats: - `projects//agent/entityTypes/` - `projects//locations//agent/entityTypes/` + * name: + * 'projects/my-project/locations/my-location/agent/entityTypes/my-entityType', + * }); + * console.log(res.data); + * + * // Example response + * // {} + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + delete( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Delete, + options: StreamMethodOptions + ): GaxiosPromise; + delete( + params?: Params$Resource$Projects$Locations$Agent$Entitytypes$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Delete, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Entitytypes$Delete + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Entitytypes$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Entitytypes$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Retrieves the specified entity type. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.entityTypes.get({ + * // Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * languageCode: 'placeholder-value', + * // Required. The name of the entity type. Supported formats: - `projects//agent/entityTypes/` - `projects//locations//agent/entityTypes/` + * name: + * 'projects/my-project/locations/my-location/agent/entityTypes/my-entityType', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "autoExpansionMode": "my_autoExpansionMode", + * // "displayName": "my_displayName", + * // "enableFuzzyExtraction": false, + * // "entities": [], + * // "kind": "my_kind", + * // "name": "my_name" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Projects$Locations$Agent$Entitytypes$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Get, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Get, + callback: BodyResponseCallback + ): void; + get( + callback: BodyResponseCallback + ): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Entitytypes$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Entitytypes$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Entitytypes$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Returns the list of all entity types in the specified agent. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.entityTypes.list({ + * // Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * languageCode: 'placeholder-value', + * // Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. + * pageSize: 'placeholder-value', + * // Optional. The next_page_token value returned from a previous list request. + * pageToken: 'placeholder-value', + * // Required. The agent to list all entity types from. Supported formats: - `projects//agent` - `projects//locations//agent` + * parent: 'projects/my-project/locations/my-location/agent', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "entityTypes": [], + * // "nextPageToken": "my_nextPageToken" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Projects$Locations$Agent$Entitytypes$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$List, + callback: BodyResponseCallback + ): void; + list( + callback: BodyResponseCallback + ): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Entitytypes$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Entitytypes$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Entitytypes$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+parent}/entityTypes').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Updates the specified entity type. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.entityTypes.patch({ + * // Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * languageCode: 'placeholder-value', + * // The unique identifier of the entity type. Required for EntityTypes.UpdateEntityType and EntityTypes.BatchUpdateEntityTypes methods. Supported formats: - `projects//agent/entityTypes/` - `projects//locations//agent/entityTypes/` + * name: + * 'projects/my-project/locations/my-location/agent/entityTypes/my-entityType', + * // Optional. The mask to control which fields get updated. + * updateMask: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "autoExpansionMode": "my_autoExpansionMode", + * // "displayName": "my_displayName", + * // "enableFuzzyExtraction": false, + * // "entities": [], + * // "kind": "my_kind", + * // "name": "my_name" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "autoExpansionMode": "my_autoExpansionMode", + * // "displayName": "my_displayName", + * // "enableFuzzyExtraction": false, + * // "entities": [], + * // "kind": "my_kind", + * // "name": "my_name" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + patch( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Patch, + options: StreamMethodOptions + ): GaxiosPromise; + patch( + params?: Params$Resource$Projects$Locations$Agent$Entitytypes$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Patch, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Patch, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Patch, + callback: BodyResponseCallback + ): void; + patch( + callback: BodyResponseCallback + ): void; + patch( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Entitytypes$Patch + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Entitytypes$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Entitytypes$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + } + + export interface Params$Resource$Projects$Locations$Agent$Entitytypes$Batchdelete + extends StandardParameters { + /** + * Required. The name of the agent to delete all entities types for. Supported formats: - `projects//agent`, - `projects//locations//agent`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1BatchDeleteEntityTypesRequest; + } + export interface Params$Resource$Projects$Locations$Agent$Entitytypes$Batchupdate + extends StandardParameters { + /** + * Required. The name of the agent to update or create entity types in. Supported formats: - `projects//agent` - `projects//locations//agent` + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesRequest; + } + export interface Params$Resource$Projects$Locations$Agent$Entitytypes$Create + extends StandardParameters { + /** + * Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + */ + languageCode?: string; + /** + * Required. The agent to create a entity type for. Supported formats: - `projects//agent` - `projects//locations//agent` + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1EntityType; + } + export interface Params$Resource$Projects$Locations$Agent$Entitytypes$Delete + extends StandardParameters { + /** + * Required. The name of the entity type to delete. Supported formats: - `projects//agent/entityTypes/` - `projects//locations//agent/entityTypes/` + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Agent$Entitytypes$Get + extends StandardParameters { + /** + * Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + */ + languageCode?: string; + /** + * Required. The name of the entity type. Supported formats: - `projects//agent/entityTypes/` - `projects//locations//agent/entityTypes/` + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Agent$Entitytypes$List + extends StandardParameters { + /** + * Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + */ + languageCode?: string; + /** + * Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. + */ + pageSize?: number; + /** + * Optional. The next_page_token value returned from a previous list request. + */ + pageToken?: string; + /** + * Required. The agent to list all entity types from. Supported formats: - `projects//agent` - `projects//locations//agent` + */ + parent?: string; + } + export interface Params$Resource$Projects$Locations$Agent$Entitytypes$Patch + extends StandardParameters { + /** + * Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + */ + languageCode?: string; + /** + * The unique identifier of the entity type. Required for EntityTypes.UpdateEntityType and EntityTypes.BatchUpdateEntityTypes methods. Supported formats: - `projects//agent/entityTypes/` - `projects//locations//agent/entityTypes/` + */ + name?: string; + /** + * Optional. The mask to control which fields get updated. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1EntityType; + } + + export class Resource$Projects$Locations$Agent$Entitytypes$Entities { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Creates multiple new entities in the specified entity type. Operation + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.entityTypes.entities.batchCreate( + * { + * // Required. The name of the entity type to create entities in. Supported formats: - `projects//agent/entityTypes/` - `projects//locations//agent/entityTypes/` + * parent: + * 'projects/my-project/locations/my-location/agent/entityTypes/my-entityType', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "entities": [], + * // "languageCode": "my_languageCode" + * // } + * }, + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + batchCreate( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchcreate, + options: StreamMethodOptions + ): GaxiosPromise; + batchCreate( + params?: Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchcreate, + options?: MethodOptions + ): GaxiosPromise; + batchCreate( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchcreate, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + batchCreate( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchcreate, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + batchCreate( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchcreate, + callback: BodyResponseCallback + ): void; + batchCreate( + callback: BodyResponseCallback + ): void; + batchCreate( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchcreate + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchcreate; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchcreate; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+parent}/entities:batchCreate').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Deletes entities in the specified entity type. Operation + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.entityTypes.entities.batchDelete( + * { + * // Required. The name of the entity type to delete entries for. Supported formats: - `projects//agent/entityTypes/` - `projects//locations//agent/entityTypes/` + * parent: + * 'projects/my-project/locations/my-location/agent/entityTypes/my-entityType', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "entityValues": [], + * // "languageCode": "my_languageCode" + * // } + * }, + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + batchDelete( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchdelete, + options: StreamMethodOptions + ): GaxiosPromise; + batchDelete( + params?: Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchdelete, + options?: MethodOptions + ): GaxiosPromise; + batchDelete( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchdelete, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + batchDelete( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchdelete, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + batchDelete( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchdelete, + callback: BodyResponseCallback + ): void; + batchDelete( + callback: BodyResponseCallback + ): void; + batchDelete( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchdelete + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchdelete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchdelete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+parent}/entities:batchDelete').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Updates or creates multiple entities in the specified entity type. This method does not affect entities in the entity type that aren't explicitly specified in the request. Operation + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.entityTypes.entities.batchUpdate( + * { + * // Required. The name of the entity type to update or create entities in. Supported formats: - `projects//agent/entityTypes/` - `projects//locations//agent/entityTypes/` + * parent: + * 'projects/my-project/locations/my-location/agent/entityTypes/my-entityType', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "entities": [], + * // "languageCode": "my_languageCode", + * // "updateMask": "my_updateMask" + * // } + * }, + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + batchUpdate( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchupdate, + options: StreamMethodOptions + ): GaxiosPromise; + batchUpdate( + params?: Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchupdate, + options?: MethodOptions + ): GaxiosPromise; + batchUpdate( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchupdate, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + batchUpdate( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchupdate, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + batchUpdate( + params: Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchupdate, + callback: BodyResponseCallback + ): void; + batchUpdate( + callback: BodyResponseCallback + ): void; + batchUpdate( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchupdate + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchupdate; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchupdate; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+parent}/entities:batchUpdate').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchcreate + extends StandardParameters { + /** + * Required. The name of the entity type to create entities in. Supported formats: - `projects//agent/entityTypes/` - `projects//locations//agent/entityTypes/` + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1BatchCreateEntitiesRequest; + } + export interface Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchdelete + extends StandardParameters { + /** + * Required. The name of the entity type to delete entries for. Supported formats: - `projects//agent/entityTypes/` - `projects//locations//agent/entityTypes/` + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1BatchDeleteEntitiesRequest; + } + export interface Params$Resource$Projects$Locations$Agent$Entitytypes$Entities$Batchupdate + extends StandardParameters { + /** + * Required. The name of the entity type to update or create entities in. Supported formats: - `projects//agent/entityTypes/` - `projects//locations//agent/entityTypes/` + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1BatchUpdateEntitiesRequest; + } + + export class Resource$Projects$Locations$Agent$Environments { + context: APIRequestContext; + users: Resource$Projects$Locations$Agent$Environments$Users; + constructor(context: APIRequestContext) { + this.context = context; + this.users = new Resource$Projects$Locations$Agent$Environments$Users( + this.context + ); + } + + /** + * Returns the list of all non-draft environments of the specified agent. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.environments.list({ + * // Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. + * pageSize: 'placeholder-value', + * // Optional. The next_page_token value returned from a previous list request. + * pageToken: 'placeholder-value', + * // Required. The agent to list all environments from. Format: - `projects//agent` - `projects//locations//agent` + * parent: 'projects/my-project/locations/my-location/agent', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "environments": [], + * // "nextPageToken": "my_nextPageToken" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Projects$Locations$Agent$Environments$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Projects$Locations$Agent$Environments$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$Agent$Environments$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Agent$Environments$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Agent$Environments$List, + callback: BodyResponseCallback + ): void; + list( + callback: BodyResponseCallback + ): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Environments$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Environments$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Environments$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+parent}/environments').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + } + + export interface Params$Resource$Projects$Locations$Agent$Environments$List + extends StandardParameters { + /** + * Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. + */ + pageSize?: number; + /** + * Optional. The next_page_token value returned from a previous list request. + */ + pageToken?: string; + /** + * Required. The agent to list all environments from. Format: - `projects//agent` - `projects//locations//agent` + */ + parent?: string; + } + + export class Resource$Projects$Locations$Agent$Environments$Users { + context: APIRequestContext; + sessions: Resource$Projects$Locations$Agent$Environments$Users$Sessions; + constructor(context: APIRequestContext) { + this.context = context; + this.sessions = new Resource$Projects$Locations$Agent$Environments$Users$Sessions( + this.context + ); + } + } + + export class Resource$Projects$Locations$Agent$Environments$Users$Sessions { + context: APIRequestContext; + contexts: Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts; + entityTypes: Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes; + constructor(context: APIRequestContext) { + this.context = context; + this.contexts = new Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts( + this.context + ); + this.entityTypes = new Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes( + this.context + ); + } + + /** + * Deletes all active contexts in the specified session. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.environments.users.sessions.deleteContexts( + * { + * // Required. The name of the session to delete all contexts from. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * parent: + * 'projects/my-project/locations/my-location/agent/environments/my-environment/users/my-user/sessions/my-session', + * } + * ); + * console.log(res.data); + * + * // Example response + * // {} + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + deleteContexts( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Deletecontexts, + options: StreamMethodOptions + ): GaxiosPromise; + deleteContexts( + params?: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Deletecontexts, + options?: MethodOptions + ): GaxiosPromise; + deleteContexts( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Deletecontexts, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + deleteContexts( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Deletecontexts, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + deleteContexts( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Deletecontexts, + callback: BodyResponseCallback + ): void; + deleteContexts( + callback: BodyResponseCallback + ): void; + deleteContexts( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Deletecontexts + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Deletecontexts; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Deletecontexts; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+parent}/contexts').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Processes a natural language query and returns structured, actionable data as a result. This method is not idempotent, because it may cause contexts and session entity types to be updated, which in turn might affect results of future queries. Note: Always use agent versions for production traffic. See [Versions and environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.environments.users.sessions.detectIntent( + * { + * // Required. The name of the session this query is sent to. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment (`Environment ID` might be referred to as environment name at some places). If `User ID` is not specified, we are using "-". It's up to the API caller to choose an appropriate `Session ID` and `User Id`. They can be a random number or some type of user and session identifiers (preferably hashed). The length of the `Session ID` and `User ID` must not exceed 36 characters. For more information, see the [API interactions guide](https://cloud.google.com/dialogflow/docs/api-overview). Note: Always use agent versions for production traffic. See [Versions and environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). + * session: + * 'projects/my-project/locations/my-location/agent/environments/my-environment/users/my-user/sessions/my-session', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "inputAudio": "my_inputAudio", + * // "outputAudioConfig": {}, + * // "outputAudioConfigMask": "my_outputAudioConfigMask", + * // "queryInput": {}, + * // "queryParams": {} + * // } + * }, + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "alternativeQueryResults": [], + * // "outputAudio": "my_outputAudio", + * // "outputAudioConfig": {}, + * // "queryResult": {}, + * // "responseId": "my_responseId", + * // "webhookStatus": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + detectIntent( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Detectintent, + options: StreamMethodOptions + ): GaxiosPromise; + detectIntent( + params?: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Detectintent, + options?: MethodOptions + ): GaxiosPromise; + detectIntent( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Detectintent, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + detectIntent( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Detectintent, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + detectIntent( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Detectintent, + callback: BodyResponseCallback + ): void; + detectIntent( + callback: BodyResponseCallback + ): void; + detectIntent( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Detectintent + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Detectintent; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Detectintent; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+session}:detectIntent').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['session'], + pathParams: ['session'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + } + + export interface Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Deletecontexts + extends StandardParameters { + /** + * Required. The name of the session to delete all contexts from. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + */ + parent?: string; + } + export interface Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Detectintent + extends StandardParameters { + /** + * Required. The name of the session this query is sent to. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment (`Environment ID` might be referred to as environment name at some places). If `User ID` is not specified, we are using "-". It's up to the API caller to choose an appropriate `Session ID` and `User Id`. They can be a random number or some type of user and session identifiers (preferably hashed). The length of the `Session ID` and `User ID` must not exceed 36 characters. For more information, see the [API interactions guide](https://cloud.google.com/dialogflow/docs/api-overview). Note: Always use agent versions for production traffic. See [Versions and environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). + */ + session?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1DetectIntentRequest; + } + + export class Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Creates a context. If the specified context already exists, overrides the context. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.environments.users.sessions.contexts.create( + * { + * // Required. The session to create a context for. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * parent: + * 'projects/my-project/locations/my-location/agent/environments/my-environment/users/my-user/sessions/my-session', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "lifespanCount": 0, + * // "name": "my_name", + * // "parameters": {} + * // } + * }, + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "lifespanCount": 0, + * // "name": "my_name", + * // "parameters": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + create( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Create, + options: StreamMethodOptions + ): GaxiosPromise; + create( + params?: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Create, + options?: MethodOptions + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Create, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Create, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Create, + callback: BodyResponseCallback + ): void; + create( + callback: BodyResponseCallback + ): void; + create( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Create + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+parent}/contexts').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Deletes the specified context. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.environments.users.sessions.contexts.delete( + * { + * // Required. The name of the context to delete. Supported formats: - `projects//agent/sessions//contexts/`, - `projects//locations//agent/sessions//contexts/`, - `projects//agent/environments//users//sessions//contexts/`, - `projects//locations//agent/environments//users//sessions//contexts/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * name: + * 'projects/my-project/locations/my-location/agent/environments/my-environment/users/my-user/sessions/my-session/contexts/my-context', + * } + * ); + * console.log(res.data); + * + * // Example response + * // {} + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + delete( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Delete, + options: StreamMethodOptions + ): GaxiosPromise; + delete( + params?: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Delete, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Delete + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Retrieves the specified context. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.environments.users.sessions.contexts.get( + * { + * // Required. The name of the context. Supported formats: - `projects//agent/sessions//contexts/`, - `projects//locations//agent/sessions//contexts/`, - `projects//agent/environments//users//sessions//contexts/`, - `projects//locations//agent/environments//users//sessions//contexts/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * name: + * 'projects/my-project/locations/my-location/agent/environments/my-environment/users/my-user/sessions/my-session/contexts/my-context', + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "lifespanCount": 0, + * // "name": "my_name", + * // "parameters": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Get, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Get, + callback: BodyResponseCallback + ): void; + get( + callback: BodyResponseCallback + ): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Returns the list of all contexts in the specified session. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.environments.users.sessions.contexts.list( + * { + * // Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. + * pageSize: 'placeholder-value', + * // Optional. The next_page_token value returned from a previous list request. + * pageToken: 'placeholder-value', + * // Required. The session to list all contexts from. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * parent: + * 'projects/my-project/locations/my-location/agent/environments/my-environment/users/my-user/sessions/my-session', + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "contexts": [], + * // "nextPageToken": "my_nextPageToken" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$List, + callback: BodyResponseCallback + ): void; + list( + callback: BodyResponseCallback + ): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+parent}/contexts').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Updates the specified context. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.environments.users.sessions.contexts.patch( + * { + * // Required. The unique identifier of the context. Supported formats: - `projects//agent/sessions//contexts/`, - `projects//locations//agent/sessions//contexts/`, - `projects//agent/environments//users//sessions//contexts/`, - `projects//locations//agent/environments//users//sessions//contexts/`, The `Context ID` is always converted to lowercase, may only contain characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. The following context names are reserved for internal use by Dialogflow. You should not use these contexts or create contexts with these names: * `__system_counters__` * `*_id_dialog_context` * `*_dialog_params_size` + * name: + * 'projects/my-project/locations/my-location/agent/environments/my-environment/users/my-user/sessions/my-session/contexts/my-context', + * // Optional. The mask to control which fields get updated. + * updateMask: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "lifespanCount": 0, + * // "name": "my_name", + * // "parameters": {} + * // } + * }, + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "lifespanCount": 0, + * // "name": "my_name", + * // "parameters": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + patch( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Patch, + options: StreamMethodOptions + ): GaxiosPromise; + patch( + params?: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Patch, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Patch, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Patch, + callback: BodyResponseCallback + ): void; + patch( + callback: BodyResponseCallback + ): void; + patch( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Patch + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + } + + export interface Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Create + extends StandardParameters { + /** + * Required. The session to create a context for. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1Context; + } + export interface Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Delete + extends StandardParameters { + /** + * Required. The name of the context to delete. Supported formats: - `projects//agent/sessions//contexts/`, - `projects//locations//agent/sessions//contexts/`, - `projects//agent/environments//users//sessions//contexts/`, - `projects//locations//agent/environments//users//sessions//contexts/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Get + extends StandardParameters { + /** + * Required. The name of the context. Supported formats: - `projects//agent/sessions//contexts/`, - `projects//locations//agent/sessions//contexts/`, - `projects//agent/environments//users//sessions//contexts/`, - `projects//locations//agent/environments//users//sessions//contexts/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$List + extends StandardParameters { + /** + * Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. + */ + pageSize?: number; + /** + * Optional. The next_page_token value returned from a previous list request. + */ + pageToken?: string; + /** + * Required. The session to list all contexts from. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + */ + parent?: string; + } + export interface Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Patch + extends StandardParameters { + /** + * Required. The unique identifier of the context. Supported formats: - `projects//agent/sessions//contexts/`, - `projects//locations//agent/sessions//contexts/`, - `projects//agent/environments//users//sessions//contexts/`, - `projects//locations//agent/environments//users//sessions//contexts/`, The `Context ID` is always converted to lowercase, may only contain characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. The following context names are reserved for internal use by Dialogflow. You should not use these contexts or create contexts with these names: * `__system_counters__` * `*_id_dialog_context` * `*_dialog_params_size` + */ + name?: string; + /** + * Optional. The mask to control which fields get updated. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1Context; + } + + export class Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Creates a session entity type. If the specified session entity type already exists, overrides the session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.create( + * { + * // Required. The session to create a session entity type for. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * parent: + * 'projects/my-project/locations/my-location/agent/environments/my-environment/users/my-user/sessions/my-session', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "entities": [], + * // "entityOverrideMode": "my_entityOverrideMode", + * // "name": "my_name" + * // } + * }, + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "entities": [], + * // "entityOverrideMode": "my_entityOverrideMode", + * // "name": "my_name" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + create( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Create, + options: StreamMethodOptions + ): GaxiosPromise; + create( + params?: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Create, + options?: MethodOptions + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Create, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Create, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Create, + callback: BodyResponseCallback + ): void; + create( + callback: BodyResponseCallback + ): void; + create( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Create + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+parent}/entityTypes').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Deletes the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.delete( + * { + * // Required. The name of the entity type to delete. Supported formats: - `projects//agent/sessions//entityTypes/` - `projects//locations//agent/sessions//entityTypes/` - `projects//agent/environments//users//sessions//entityTypes/` - `projects//locations//agent/environments/ /users//sessions//entityTypes/` If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * name: + * 'projects/my-project/locations/my-location/agent/environments/my-environment/users/my-user/sessions/my-session/entityTypes/my-entityType', + * } + * ); + * console.log(res.data); + * + * // Example response + * // {} + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + delete( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Delete, + options: StreamMethodOptions + ): GaxiosPromise; + delete( + params?: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Delete, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Delete + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Retrieves the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.get( + * { + * // Required. The name of the session entity type. Supported formats: - `projects//agent/sessions//entityTypes/` - `projects//locations//agent/sessions//entityTypes/` - `projects//agent/environments//users//sessions//entityTypes/` - `projects//locations//agent/environments/ /users//sessions//entityTypes/` If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * name: + * 'projects/my-project/locations/my-location/agent/environments/my-environment/users/my-user/sessions/my-session/entityTypes/my-entityType', + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "entities": [], + * // "entityOverrideMode": "my_entityOverrideMode", + * // "name": "my_name" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Get, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Get, + callback: BodyResponseCallback + ): void; + get( + callback: BodyResponseCallback + ): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Returns the list of all session entity types in the specified session. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.list( + * { + * // Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. + * pageSize: 'placeholder-value', + * // Optional. The next_page_token value returned from a previous list request. + * pageToken: 'placeholder-value', + * // Required. The session to list all session entity types from. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * parent: + * 'projects/my-project/locations/my-location/agent/environments/my-environment/users/my-user/sessions/my-session', + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "nextPageToken": "my_nextPageToken", + * // "sessionEntityTypes": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$List, + callback: BodyResponseCallback + ): void; + list( + callback: BodyResponseCallback + ): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+parent}/entityTypes').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Updates the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.patch( + * { + * // Required. The unique identifier of this session entity type. Supported formats: - `projects//agent/sessions//entityTypes/` - `projects//locations//agent/sessions//entityTypes/` - `projects//agent/environments//users//sessions//entityTypes/` - `projects//locations//agent/environments/ /users//sessions//entityTypes/` If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. `` must be the display name of an existing entity type in the same agent that will be overridden or supplemented. + * name: + * 'projects/my-project/locations/my-location/agent/environments/my-environment/users/my-user/sessions/my-session/entityTypes/my-entityType', + * // Optional. The mask to control which fields get updated. + * updateMask: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "entities": [], + * // "entityOverrideMode": "my_entityOverrideMode", + * // "name": "my_name" + * // } + * }, + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "entities": [], + * // "entityOverrideMode": "my_entityOverrideMode", + * // "name": "my_name" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + patch( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Patch, + options: StreamMethodOptions + ): GaxiosPromise; + patch( + params?: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Patch, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Patch, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Patch, + callback: BodyResponseCallback + ): void; + patch( + callback: BodyResponseCallback + ): void; + patch( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Patch + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + } + + export interface Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Create + extends StandardParameters { + /** + * Required. The session to create a session entity type for. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1SessionEntityType; + } + export interface Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Delete + extends StandardParameters { + /** + * Required. The name of the entity type to delete. Supported formats: - `projects//agent/sessions//entityTypes/` - `projects//locations//agent/sessions//entityTypes/` - `projects//agent/environments//users//sessions//entityTypes/` - `projects//locations//agent/environments/ /users//sessions//entityTypes/` If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Get + extends StandardParameters { + /** + * Required. The name of the session entity type. Supported formats: - `projects//agent/sessions//entityTypes/` - `projects//locations//agent/sessions//entityTypes/` - `projects//agent/environments//users//sessions//entityTypes/` - `projects//locations//agent/environments/ /users//sessions//entityTypes/` If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$List + extends StandardParameters { + /** + * Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. + */ + pageSize?: number; + /** + * Optional. The next_page_token value returned from a previous list request. + */ + pageToken?: string; + /** + * Required. The session to list all session entity types from. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + */ + parent?: string; + } + export interface Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Patch + extends StandardParameters { + /** + * Required. The unique identifier of this session entity type. Supported formats: - `projects//agent/sessions//entityTypes/` - `projects//locations//agent/sessions//entityTypes/` - `projects//agent/environments//users//sessions//entityTypes/` - `projects//locations//agent/environments/ /users//sessions//entityTypes/` If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. `` must be the display name of an existing entity type in the same agent that will be overridden or supplemented. + */ + name?: string; + /** + * Optional. The mask to control which fields get updated. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1SessionEntityType; + } + + export class Resource$Projects$Locations$Agent$Intents { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Deletes intents in the specified agent. Operation + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.intents.batchDelete({ + * // Required. The name of the agent to delete all entities types for. Supported formats: - `projects//agent` - `projects//locations//agent` + * parent: 'projects/my-project/locations/my-location/agent', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "intents": [] + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + batchDelete( + params: Params$Resource$Projects$Locations$Agent$Intents$Batchdelete, + options: StreamMethodOptions + ): GaxiosPromise; + batchDelete( + params?: Params$Resource$Projects$Locations$Agent$Intents$Batchdelete, + options?: MethodOptions + ): GaxiosPromise; + batchDelete( + params: Params$Resource$Projects$Locations$Agent$Intents$Batchdelete, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + batchDelete( + params: Params$Resource$Projects$Locations$Agent$Intents$Batchdelete, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + batchDelete( + params: Params$Resource$Projects$Locations$Agent$Intents$Batchdelete, + callback: BodyResponseCallback + ): void; + batchDelete( + callback: BodyResponseCallback + ): void; + batchDelete( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Intents$Batchdelete + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Intents$Batchdelete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Intents$Batchdelete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+parent}/intents:batchDelete').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Updates/Creates multiple intents in the specified agent. Operation + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.intents.batchUpdate({ + * // Required. The name of the agent to update or create intents in. Supported formats: - `projects//agent` - `projects//locations//agent` + * parent: 'projects/my-project/locations/my-location/agent', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "intentBatchInline": {}, + * // "intentBatchUri": "my_intentBatchUri", + * // "intentView": "my_intentView", + * // "languageCode": "my_languageCode", + * // "updateMask": "my_updateMask" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + batchUpdate( + params: Params$Resource$Projects$Locations$Agent$Intents$Batchupdate, + options: StreamMethodOptions + ): GaxiosPromise; + batchUpdate( + params?: Params$Resource$Projects$Locations$Agent$Intents$Batchupdate, + options?: MethodOptions + ): GaxiosPromise; + batchUpdate( + params: Params$Resource$Projects$Locations$Agent$Intents$Batchupdate, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + batchUpdate( + params: Params$Resource$Projects$Locations$Agent$Intents$Batchupdate, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + batchUpdate( + params: Params$Resource$Projects$Locations$Agent$Intents$Batchupdate, + callback: BodyResponseCallback + ): void; + batchUpdate( + callback: BodyResponseCallback + ): void; + batchUpdate( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Intents$Batchupdate + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Intents$Batchupdate; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Intents$Batchupdate; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+parent}/intents:batchUpdate').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Creates an intent in the specified agent. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.intents.create({ + * // Optional. The resource view to apply to the returned intent. + * intentView: 'placeholder-value', + * // Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * languageCode: 'placeholder-value', + * // Required. The agent to create a intent for. Supported formats: - `projects//agent` - `projects//locations//agent` + * parent: 'projects/my-project/locations/my-location/agent', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "action": "my_action", + * // "defaultResponsePlatforms": [], + * // "displayName": "my_displayName", + * // "endInteraction": false, + * // "events": [], + * // "followupIntentInfo": [], + * // "inputContextNames": [], + * // "isFallback": false, + * // "liveAgentHandoff": false, + * // "messages": [], + * // "mlDisabled": false, + * // "mlEnabled": false, + * // "name": "my_name", + * // "outputContexts": [], + * // "parameters": [], + * // "parentFollowupIntentName": "my_parentFollowupIntentName", + * // "priority": 0, + * // "resetContexts": false, + * // "rootFollowupIntentName": "my_rootFollowupIntentName", + * // "trainingPhrases": [], + * // "webhookState": "my_webhookState" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "action": "my_action", + * // "defaultResponsePlatforms": [], + * // "displayName": "my_displayName", + * // "endInteraction": false, + * // "events": [], + * // "followupIntentInfo": [], + * // "inputContextNames": [], + * // "isFallback": false, + * // "liveAgentHandoff": false, + * // "messages": [], + * // "mlDisabled": false, + * // "mlEnabled": false, + * // "name": "my_name", + * // "outputContexts": [], + * // "parameters": [], + * // "parentFollowupIntentName": "my_parentFollowupIntentName", + * // "priority": 0, + * // "resetContexts": false, + * // "rootFollowupIntentName": "my_rootFollowupIntentName", + * // "trainingPhrases": [], + * // "webhookState": "my_webhookState" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + create( + params: Params$Resource$Projects$Locations$Agent$Intents$Create, + options: StreamMethodOptions + ): GaxiosPromise; + create( + params?: Params$Resource$Projects$Locations$Agent$Intents$Create, + options?: MethodOptions + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Locations$Agent$Intents$Create, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Locations$Agent$Intents$Create, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Locations$Agent$Intents$Create, + callback: BodyResponseCallback + ): void; + create( + callback: BodyResponseCallback + ): void; + create( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Intents$Create + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Intents$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Intents$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+parent}/intents').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Deletes the specified intent and its direct or indirect followup intents. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.intents.delete({ + * // Required. The name of the intent to delete. If this intent has direct or indirect followup intents, we also delete them. Supported formats: - `projects//agent/intents/` - `projects//locations//agent/intents/` + * name: 'projects/my-project/locations/my-location/agent/intents/my-intent', + * }); + * console.log(res.data); + * + * // Example response + * // {} + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + delete( + params: Params$Resource$Projects$Locations$Agent$Intents$Delete, + options: StreamMethodOptions + ): GaxiosPromise; + delete( + params?: Params$Resource$Projects$Locations$Agent$Intents$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Locations$Agent$Intents$Delete, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Agent$Intents$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Agent$Intents$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Intents$Delete + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Intents$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Intents$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Retrieves the specified intent. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.intents.get({ + * // Optional. The resource view to apply to the returned intent. + * intentView: 'placeholder-value', + * // Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * languageCode: 'placeholder-value', + * // Required. The name of the intent. Supported formats: - `projects//agent/intents/` - `projects//locations//agent/intents/` + * name: 'projects/my-project/locations/my-location/agent/intents/my-intent', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "action": "my_action", + * // "defaultResponsePlatforms": [], + * // "displayName": "my_displayName", + * // "endInteraction": false, + * // "events": [], + * // "followupIntentInfo": [], + * // "inputContextNames": [], + * // "isFallback": false, + * // "liveAgentHandoff": false, + * // "messages": [], + * // "mlDisabled": false, + * // "mlEnabled": false, + * // "name": "my_name", + * // "outputContexts": [], + * // "parameters": [], + * // "parentFollowupIntentName": "my_parentFollowupIntentName", + * // "priority": 0, + * // "resetContexts": false, + * // "rootFollowupIntentName": "my_rootFollowupIntentName", + * // "trainingPhrases": [], + * // "webhookState": "my_webhookState" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Projects$Locations$Agent$Intents$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Projects$Locations$Agent$Intents$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Agent$Intents$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Agent$Intents$Get, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Agent$Intents$Get, + callback: BodyResponseCallback + ): void; + get( + callback: BodyResponseCallback + ): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Intents$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Intents$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Intents$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Returns the list of all intents in the specified agent. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.intents.list({ + * // Optional. The resource view to apply to the returned intent. + * intentView: 'placeholder-value', + * // Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * languageCode: 'placeholder-value', + * // Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. + * pageSize: 'placeholder-value', + * // Optional. The next_page_token value returned from a previous list request. + * pageToken: 'placeholder-value', + * // Required. The agent to list all intents from. Format: `projects//agent`. + * parent: 'projects/my-project/locations/my-location/agent', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "intents": [], + * // "nextPageToken": "my_nextPageToken" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Projects$Locations$Agent$Intents$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Projects$Locations$Agent$Intents$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$Agent$Intents$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Agent$Intents$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Agent$Intents$List, + callback: BodyResponseCallback + ): void; + list( + callback: BodyResponseCallback + ): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Intents$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Intents$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Intents$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+parent}/intents').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Updates the specified intent. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.intents.patch({ + * // Optional. The resource view to apply to the returned intent. + * intentView: 'placeholder-value', + * // Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * languageCode: 'placeholder-value', + * // Optional. The unique identifier of this intent. Required for Intents.UpdateIntent and Intents.BatchUpdateIntents methods. Supported formats: - `projects//agent/intents/` - `projects//locations//agent/intents/` + * name: 'projects/my-project/locations/my-location/agent/intents/my-intent', + * // Optional. The mask to control which fields get updated. + * updateMask: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "action": "my_action", + * // "defaultResponsePlatforms": [], + * // "displayName": "my_displayName", + * // "endInteraction": false, + * // "events": [], + * // "followupIntentInfo": [], + * // "inputContextNames": [], + * // "isFallback": false, + * // "liveAgentHandoff": false, + * // "messages": [], + * // "mlDisabled": false, + * // "mlEnabled": false, + * // "name": "my_name", + * // "outputContexts": [], + * // "parameters": [], + * // "parentFollowupIntentName": "my_parentFollowupIntentName", + * // "priority": 0, + * // "resetContexts": false, + * // "rootFollowupIntentName": "my_rootFollowupIntentName", + * // "trainingPhrases": [], + * // "webhookState": "my_webhookState" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "action": "my_action", + * // "defaultResponsePlatforms": [], + * // "displayName": "my_displayName", + * // "endInteraction": false, + * // "events": [], + * // "followupIntentInfo": [], + * // "inputContextNames": [], + * // "isFallback": false, + * // "liveAgentHandoff": false, + * // "messages": [], + * // "mlDisabled": false, + * // "mlEnabled": false, + * // "name": "my_name", + * // "outputContexts": [], + * // "parameters": [], + * // "parentFollowupIntentName": "my_parentFollowupIntentName", + * // "priority": 0, + * // "resetContexts": false, + * // "rootFollowupIntentName": "my_rootFollowupIntentName", + * // "trainingPhrases": [], + * // "webhookState": "my_webhookState" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + patch( + params: Params$Resource$Projects$Locations$Agent$Intents$Patch, + options: StreamMethodOptions + ): GaxiosPromise; + patch( + params?: Params$Resource$Projects$Locations$Agent$Intents$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Locations$Agent$Intents$Patch, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Locations$Agent$Intents$Patch, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Locations$Agent$Intents$Patch, + callback: BodyResponseCallback + ): void; + patch( + callback: BodyResponseCallback + ): void; + patch( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Intents$Patch + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Intents$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Intents$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + } + + export interface Params$Resource$Projects$Locations$Agent$Intents$Batchdelete + extends StandardParameters { + /** + * Required. The name of the agent to delete all entities types for. Supported formats: - `projects//agent` - `projects//locations//agent` + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1BatchDeleteIntentsRequest; + } + export interface Params$Resource$Projects$Locations$Agent$Intents$Batchupdate + extends StandardParameters { + /** + * Required. The name of the agent to update or create intents in. Supported formats: - `projects//agent` - `projects//locations//agent` + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1BatchUpdateIntentsRequest; + } + export interface Params$Resource$Projects$Locations$Agent$Intents$Create + extends StandardParameters { + /** + * Optional. The resource view to apply to the returned intent. + */ + intentView?: string; + /** + * Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + */ + languageCode?: string; + /** + * Required. The agent to create a intent for. Supported formats: - `projects//agent` - `projects//locations//agent` + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1Intent; + } + export interface Params$Resource$Projects$Locations$Agent$Intents$Delete + extends StandardParameters { + /** + * Required. The name of the intent to delete. If this intent has direct or indirect followup intents, we also delete them. Supported formats: - `projects//agent/intents/` - `projects//locations//agent/intents/` + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Agent$Intents$Get + extends StandardParameters { + /** + * Optional. The resource view to apply to the returned intent. + */ + intentView?: string; + /** + * Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + */ + languageCode?: string; + /** + * Required. The name of the intent. Supported formats: - `projects//agent/intents/` - `projects//locations//agent/intents/` + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Agent$Intents$List + extends StandardParameters { + /** + * Optional. The resource view to apply to the returned intent. + */ + intentView?: string; + /** + * Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + */ + languageCode?: string; + /** + * Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. + */ + pageSize?: number; + /** + * Optional. The next_page_token value returned from a previous list request. + */ + pageToken?: string; + /** + * Required. The agent to list all intents from. Format: `projects//agent`. + */ + parent?: string; + } + export interface Params$Resource$Projects$Locations$Agent$Intents$Patch + extends StandardParameters { + /** + * Optional. The resource view to apply to the returned intent. + */ + intentView?: string; + /** + * Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + */ + languageCode?: string; + /** + * Optional. The unique identifier of this intent. Required for Intents.UpdateIntent and Intents.BatchUpdateIntents methods. Supported formats: - `projects//agent/intents/` - `projects//locations//agent/intents/` + */ + name?: string; + /** + * Optional. The mask to control which fields get updated. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1Intent; + } + + export class Resource$Projects$Locations$Agent$Sessions { + context: APIRequestContext; + contexts: Resource$Projects$Locations$Agent$Sessions$Contexts; + entityTypes: Resource$Projects$Locations$Agent$Sessions$Entitytypes; + constructor(context: APIRequestContext) { + this.context = context; + this.contexts = new Resource$Projects$Locations$Agent$Sessions$Contexts( + this.context + ); + this.entityTypes = new Resource$Projects$Locations$Agent$Sessions$Entitytypes( + this.context + ); + } + + /** + * Deletes all active contexts in the specified session. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.sessions.deleteContexts( + * { + * // Required. The name of the session to delete all contexts from. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * parent: + * 'projects/my-project/locations/my-location/agent/sessions/my-session', + * } + * ); + * console.log(res.data); + * + * // Example response + * // {} + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + deleteContexts( + params: Params$Resource$Projects$Locations$Agent$Sessions$Deletecontexts, + options: StreamMethodOptions + ): GaxiosPromise; + deleteContexts( + params?: Params$Resource$Projects$Locations$Agent$Sessions$Deletecontexts, + options?: MethodOptions + ): GaxiosPromise; + deleteContexts( + params: Params$Resource$Projects$Locations$Agent$Sessions$Deletecontexts, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + deleteContexts( + params: Params$Resource$Projects$Locations$Agent$Sessions$Deletecontexts, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + deleteContexts( + params: Params$Resource$Projects$Locations$Agent$Sessions$Deletecontexts, + callback: BodyResponseCallback + ): void; + deleteContexts( + callback: BodyResponseCallback + ): void; + deleteContexts( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Sessions$Deletecontexts + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Sessions$Deletecontexts; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Sessions$Deletecontexts; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+parent}/contexts').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Processes a natural language query and returns structured, actionable data as a result. This method is not idempotent, because it may cause contexts and session entity types to be updated, which in turn might affect results of future queries. Note: Always use agent versions for production traffic. See [Versions and environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.sessions.detectIntent({ + * // Required. The name of the session this query is sent to. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment (`Environment ID` might be referred to as environment name at some places). If `User ID` is not specified, we are using "-". It's up to the API caller to choose an appropriate `Session ID` and `User Id`. They can be a random number or some type of user and session identifiers (preferably hashed). The length of the `Session ID` and `User ID` must not exceed 36 characters. For more information, see the [API interactions guide](https://cloud.google.com/dialogflow/docs/api-overview). Note: Always use agent versions for production traffic. See [Versions and environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). + * session: + * 'projects/my-project/locations/my-location/agent/sessions/my-session', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "inputAudio": "my_inputAudio", + * // "outputAudioConfig": {}, + * // "outputAudioConfigMask": "my_outputAudioConfigMask", + * // "queryInput": {}, + * // "queryParams": {} + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "alternativeQueryResults": [], + * // "outputAudio": "my_outputAudio", + * // "outputAudioConfig": {}, + * // "queryResult": {}, + * // "responseId": "my_responseId", + * // "webhookStatus": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + detectIntent( + params: Params$Resource$Projects$Locations$Agent$Sessions$Detectintent, + options: StreamMethodOptions + ): GaxiosPromise; + detectIntent( + params?: Params$Resource$Projects$Locations$Agent$Sessions$Detectintent, + options?: MethodOptions + ): GaxiosPromise; + detectIntent( + params: Params$Resource$Projects$Locations$Agent$Sessions$Detectintent, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + detectIntent( + params: Params$Resource$Projects$Locations$Agent$Sessions$Detectintent, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + detectIntent( + params: Params$Resource$Projects$Locations$Agent$Sessions$Detectintent, + callback: BodyResponseCallback + ): void; + detectIntent( + callback: BodyResponseCallback + ): void; + detectIntent( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Sessions$Detectintent + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Sessions$Detectintent; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Sessions$Detectintent; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+session}:detectIntent').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['session'], + pathParams: ['session'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + } + + export interface Params$Resource$Projects$Locations$Agent$Sessions$Deletecontexts + extends StandardParameters { + /** + * Required. The name of the session to delete all contexts from. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + */ + parent?: string; + } + export interface Params$Resource$Projects$Locations$Agent$Sessions$Detectintent + extends StandardParameters { + /** + * Required. The name of the session this query is sent to. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment (`Environment ID` might be referred to as environment name at some places). If `User ID` is not specified, we are using "-". It's up to the API caller to choose an appropriate `Session ID` and `User Id`. They can be a random number or some type of user and session identifiers (preferably hashed). The length of the `Session ID` and `User ID` must not exceed 36 characters. For more information, see the [API interactions guide](https://cloud.google.com/dialogflow/docs/api-overview). Note: Always use agent versions for production traffic. See [Versions and environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). + */ + session?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1DetectIntentRequest; + } + + export class Resource$Projects$Locations$Agent$Sessions$Contexts { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Creates a context. If the specified context already exists, overrides the context. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.sessions.contexts.create( + * { + * // Required. The session to create a context for. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * parent: + * 'projects/my-project/locations/my-location/agent/sessions/my-session', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "lifespanCount": 0, + * // "name": "my_name", + * // "parameters": {} + * // } + * }, + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "lifespanCount": 0, + * // "name": "my_name", + * // "parameters": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + create( + params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Create, + options: StreamMethodOptions + ): GaxiosPromise; + create( + params?: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Create, + options?: MethodOptions + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Create, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Create, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Create, + callback: BodyResponseCallback + ): void; + create( + callback: BodyResponseCallback + ): void; + create( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Create + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+parent}/contexts').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Deletes the specified context. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.sessions.contexts.delete( + * { + * // Required. The name of the context to delete. Supported formats: - `projects//agent/sessions//contexts/`, - `projects//locations//agent/sessions//contexts/`, - `projects//agent/environments//users//sessions//contexts/`, - `projects//locations//agent/environments//users//sessions//contexts/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * name: + * 'projects/my-project/locations/my-location/agent/sessions/my-session/contexts/my-context', + * } + * ); + * console.log(res.data); + * + * // Example response + * // {} + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + delete( + params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Delete, + options: StreamMethodOptions + ): GaxiosPromise; + delete( + params?: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Delete, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Delete + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Retrieves the specified context. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.sessions.contexts.get({ + * // Required. The name of the context. Supported formats: - `projects//agent/sessions//contexts/`, - `projects//locations//agent/sessions//contexts/`, - `projects//agent/environments//users//sessions//contexts/`, - `projects//locations//agent/environments//users//sessions//contexts/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * name: + * 'projects/my-project/locations/my-location/agent/sessions/my-session/contexts/my-context', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "lifespanCount": 0, + * // "name": "my_name", + * // "parameters": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Get, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Get, + callback: BodyResponseCallback + ): void; + get( + callback: BodyResponseCallback + ): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Returns the list of all contexts in the specified session. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.sessions.contexts.list({ + * // Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. + * pageSize: 'placeholder-value', + * // Optional. The next_page_token value returned from a previous list request. + * pageToken: 'placeholder-value', + * // Required. The session to list all contexts from. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * parent: + * 'projects/my-project/locations/my-location/agent/sessions/my-session', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "contexts": [], + * // "nextPageToken": "my_nextPageToken" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$List, + callback: BodyResponseCallback + ): void; + list( + callback: BodyResponseCallback + ): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Sessions$Contexts$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Sessions$Contexts$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Sessions$Contexts$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+parent}/contexts').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Updates the specified context. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.sessions.contexts.patch( + * { + * // Required. The unique identifier of the context. Supported formats: - `projects//agent/sessions//contexts/`, - `projects//locations//agent/sessions//contexts/`, - `projects//agent/environments//users//sessions//contexts/`, - `projects//locations//agent/environments//users//sessions//contexts/`, The `Context ID` is always converted to lowercase, may only contain characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. The following context names are reserved for internal use by Dialogflow. You should not use these contexts or create contexts with these names: * `__system_counters__` * `*_id_dialog_context` * `*_dialog_params_size` + * name: + * 'projects/my-project/locations/my-location/agent/sessions/my-session/contexts/my-context', + * // Optional. The mask to control which fields get updated. + * updateMask: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "lifespanCount": 0, + * // "name": "my_name", + * // "parameters": {} + * // } + * }, + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "lifespanCount": 0, + * // "name": "my_name", + * // "parameters": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + patch( + params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Patch, + options: StreamMethodOptions + ): GaxiosPromise; + patch( + params?: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Patch, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Patch, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Patch, + callback: BodyResponseCallback + ): void; + patch( + callback: BodyResponseCallback + ): void; + patch( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Patch + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + } + + export interface Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Create + extends StandardParameters { + /** + * Required. The session to create a context for. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1Context; + } + export interface Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Delete + extends StandardParameters { + /** + * Required. The name of the context to delete. Supported formats: - `projects//agent/sessions//contexts/`, - `projects//locations//agent/sessions//contexts/`, - `projects//agent/environments//users//sessions//contexts/`, - `projects//locations//agent/environments//users//sessions//contexts/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Get + extends StandardParameters { + /** + * Required. The name of the context. Supported formats: - `projects//agent/sessions//contexts/`, - `projects//locations//agent/sessions//contexts/`, - `projects//agent/environments//users//sessions//contexts/`, - `projects//locations//agent/environments//users//sessions//contexts/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Agent$Sessions$Contexts$List + extends StandardParameters { + /** + * Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. + */ + pageSize?: number; + /** + * Optional. The next_page_token value returned from a previous list request. + */ + pageToken?: string; + /** + * Required. The session to list all contexts from. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + */ + parent?: string; + } + export interface Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Patch + extends StandardParameters { + /** + * Required. The unique identifier of the context. Supported formats: - `projects//agent/sessions//contexts/`, - `projects//locations//agent/sessions//contexts/`, - `projects//agent/environments//users//sessions//contexts/`, - `projects//locations//agent/environments//users//sessions//contexts/`, The `Context ID` is always converted to lowercase, may only contain characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. The following context names are reserved for internal use by Dialogflow. You should not use these contexts or create contexts with these names: * `__system_counters__` * `*_id_dialog_context` * `*_dialog_params_size` + */ + name?: string; + /** + * Optional. The mask to control which fields get updated. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1Context; + } + + export class Resource$Projects$Locations$Agent$Sessions$Entitytypes { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Creates a session entity type. If the specified session entity type already exists, overrides the session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.sessions.entityTypes.create( + * { + * // Required. The session to create a session entity type for. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * parent: + * 'projects/my-project/locations/my-location/agent/sessions/my-session', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "entities": [], + * // "entityOverrideMode": "my_entityOverrideMode", + * // "name": "my_name" + * // } + * }, + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "entities": [], + * // "entityOverrideMode": "my_entityOverrideMode", + * // "name": "my_name" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + create( + params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Create, + options: StreamMethodOptions + ): GaxiosPromise; + create( + params?: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Create, + options?: MethodOptions + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Create, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Create, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Create, + callback: BodyResponseCallback + ): void; + create( + callback: BodyResponseCallback + ): void; + create( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Create + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+parent}/entityTypes').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Deletes the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.sessions.entityTypes.delete( * { - * // Required. The unique identifier of the context. Supported formats: - `projects//agent/sessions//contexts/`, - `projects//locations//agent/sessions//contexts/`, - `projects//agent/environments//users//sessions//contexts/`, - `projects//locations//agent/environments//users//sessions//contexts/`, The `Context ID` is always converted to lowercase, may only contain characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. The following context names are reserved for internal use by Dialogflow. You should not use these contexts or create contexts with these names: * `__system_counters__` * `*_id_dialog_context` * `*_dialog_params_size` + * // Required. The name of the entity type to delete. Supported formats: - `projects//agent/sessions//entityTypes/` - `projects//locations//agent/sessions//entityTypes/` - `projects//agent/environments//users//sessions//entityTypes/` - `projects//locations//agent/environments/ /users//sessions//entityTypes/` If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. * name: - * 'projects/my-project/locations/my-location/agent/environments/my-environment/users/my-user/sessions/my-session/contexts/my-context', - * // Optional. The mask to control which fields get updated. - * updateMask: 'placeholder-value', + * 'projects/my-project/locations/my-location/agent/sessions/my-session/entityTypes/my-entityType', + * } + * ); + * console.log(res.data); * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "lifespanCount": 0, - * // "name": "my_name", - * // "parameters": {} - * // } - * }, + * // Example response + * // {} + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + delete( + params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Delete, + options: StreamMethodOptions + ): GaxiosPromise; + delete( + params?: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Delete, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Delete + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Retrieves the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agent.sessions.entityTypes.get( + * { + * // Required. The name of the session entity type. Supported formats: - `projects//agent/sessions//entityTypes/` - `projects//locations//agent/sessions//entityTypes/` - `projects//agent/environments//users//sessions//entityTypes/` - `projects//locations//agent/environments/ /users//sessions//entityTypes/` If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * name: + * 'projects/my-project/locations/my-location/agent/sessions/my-session/entityTypes/my-entityType', * } * ); * console.log(res.data); * * // Example response * // { - * // "lifespanCount": 0, - * // "name": "my_name", - * // "parameters": {} + * // "entities": [], + * // "entityOverrideMode": "my_entityOverrideMode", + * // "name": "my_name" * // } * } * @@ -22587,57 +31768,57 @@ export namespace dialogflow_v2beta1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - patch( - params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Patch, + get( + params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Get, options: StreamMethodOptions ): GaxiosPromise; - patch( - params?: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Patch, + get( + params?: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Get, options?: MethodOptions - ): GaxiosPromise; - patch( - params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Patch, + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Get, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - patch( - params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Patch, + get( + params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Get, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - patch( - params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Patch, - callback: BodyResponseCallback + get( + params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Get, + callback: BodyResponseCallback ): void; - patch( - callback: BodyResponseCallback + get( + callback: BodyResponseCallback ): void; - patch( + get( paramsOrCallback?: - | Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Patch - | BodyResponseCallback + | Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Get + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Patch; + {}) as Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Get; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Patch; + params = {} as Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Get; options = {}; } @@ -22651,7 +31832,7 @@ export namespace dialogflow_v2beta1 { options: Object.assign( { url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), - method: 'PATCH', + method: 'GET', }, options ), @@ -22661,84 +31842,19 @@ export namespace dialogflow_v2beta1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest( + return createAPIRequest( parameters ); } } - } - - export interface Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Create - extends StandardParameters { - /** - * Required. The session to create a context for. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. - */ - parent?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$GoogleCloudDialogflowV2beta1Context; - } - export interface Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Delete - extends StandardParameters { - /** - * Required. The name of the context to delete. Supported formats: - `projects//agent/sessions//contexts/`, - `projects//locations//agent/sessions//contexts/`, - `projects//agent/environments//users//sessions//contexts/`, - `projects//locations//agent/environments//users//sessions//contexts/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. - */ - name?: string; - } - export interface Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Get - extends StandardParameters { - /** - * Required. The name of the context. Supported formats: - `projects//agent/sessions//contexts/`, - `projects//locations//agent/sessions//contexts/`, - `projects//agent/environments//users//sessions//contexts/`, - `projects//locations//agent/environments//users//sessions//contexts/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. - */ - name?: string; - } - export interface Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$List - extends StandardParameters { - /** - * Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. - */ - pageSize?: number; - /** - * Optional. The next_page_token value returned from a previous list request. - */ - pageToken?: string; - /** - * Required. The session to list all contexts from. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. - */ - parent?: string; - } - export interface Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Contexts$Patch - extends StandardParameters { - /** - * Required. The unique identifier of the context. Supported formats: - `projects//agent/sessions//contexts/`, - `projects//locations//agent/sessions//contexts/`, - `projects//agent/environments//users//sessions//contexts/`, - `projects//locations//agent/environments//users//sessions//contexts/`, The `Context ID` is always converted to lowercase, may only contain characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. The following context names are reserved for internal use by Dialogflow. You should not use these contexts or create contexts with these names: * `__system_counters__` * `*_id_dialog_context` * `*_dialog_params_size` - */ - name?: string; - /** - * Optional. The mask to control which fields get updated. - */ - updateMask?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$GoogleCloudDialogflowV2beta1Context; - } - - export class Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes { - context: APIRequestContext; - constructor(context: APIRequestContext) { - this.context = context; - } /** - * Creates a session entity type. If the specified session entity type already exists, overrides the session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration. + * Returns the list of all session entity types in the specified session. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration. * @example * ```js * // Before running the sample: @@ -22766,30 +31882,23 @@ export namespace dialogflow_v2beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.create( + * const res = await dialogflow.projects.locations.agent.sessions.entityTypes.list( * { - * // Required. The session to create a session entity type for. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * // Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. + * pageSize: 'placeholder-value', + * // Optional. The next_page_token value returned from a previous list request. + * pageToken: 'placeholder-value', + * // Required. The session to list all session entity types from. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. * parent: - * 'projects/my-project/locations/my-location/agent/environments/my-environment/users/my-user/sessions/my-session', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "entities": [], - * // "entityOverrideMode": "my_entityOverrideMode", - * // "name": "my_name" - * // } - * }, + * 'projects/my-project/locations/my-location/agent/sessions/my-session', * } * ); * console.log(res.data); * * // Example response * // { - * // "entities": [], - * // "entityOverrideMode": "my_entityOverrideMode", - * // "name": "my_name" + * // "nextPageToken": "my_nextPageToken", + * // "sessionEntityTypes": [] * // } * } * @@ -22805,57 +31914,57 @@ export namespace dialogflow_v2beta1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - create( - params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Create, + list( + params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$List, options: StreamMethodOptions ): GaxiosPromise; - create( - params?: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Create, + list( + params?: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$List, options?: MethodOptions - ): GaxiosPromise; - create( - params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Create, + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$List, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - create( - params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Create, + list( + params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$List, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - create( - params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Create, - callback: BodyResponseCallback + list( + params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$List, + callback: BodyResponseCallback ): void; - create( - callback: BodyResponseCallback + list( + callback: BodyResponseCallback ): void; - create( + list( paramsOrCallback?: - | Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Create - | BodyResponseCallback + | Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$List + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Create; + {}) as Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$List; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Create; + params = {} as Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$List; options = {}; } @@ -22872,7 +31981,7 @@ export namespace dialogflow_v2beta1 { /([^:]\/)\/+/g, '$1' ), - method: 'POST', + method: 'GET', }, options ), @@ -22882,19 +31991,19 @@ export namespace dialogflow_v2beta1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest( + return createAPIRequest( parameters ); } } /** - * Deletes the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration. + * Updates the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration. * @example * ```js * // Before running the sample: @@ -22922,17 +32031,33 @@ export namespace dialogflow_v2beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.delete( + * const res = await dialogflow.projects.locations.agent.sessions.entityTypes.patch( * { - * // Required. The name of the entity type to delete. Supported formats: - `projects//agent/sessions//entityTypes/` - `projects//locations//agent/sessions//entityTypes/` - `projects//agent/environments//users//sessions//entityTypes/` - `projects//locations//agent/environments/ /users//sessions//entityTypes/` If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * // Required. The unique identifier of this session entity type. Supported formats: - `projects//agent/sessions//entityTypes/` - `projects//locations//agent/sessions//entityTypes/` - `projects//agent/environments//users//sessions//entityTypes/` - `projects//locations//agent/environments/ /users//sessions//entityTypes/` If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. `` must be the display name of an existing entity type in the same agent that will be overridden or supplemented. * name: - * 'projects/my-project/locations/my-location/agent/environments/my-environment/users/my-user/sessions/my-session/entityTypes/my-entityType', + * 'projects/my-project/locations/my-location/agent/sessions/my-session/entityTypes/my-entityType', + * // Optional. The mask to control which fields get updated. + * updateMask: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "entities": [], + * // "entityOverrideMode": "my_entityOverrideMode", + * // "name": "my_name" + * // } + * }, * } * ); * console.log(res.data); * * // Example response - * // {} + * // { + * // "entities": [], + * // "entityOverrideMode": "my_entityOverrideMode", + * // "name": "my_name" + * // } * } * * main().catch(e => { @@ -22947,53 +32072,57 @@ export namespace dialogflow_v2beta1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - delete( - params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Delete, + patch( + params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Patch, options: StreamMethodOptions ): GaxiosPromise; - delete( - params?: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Delete, + patch( + params?: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Patch, options?: MethodOptions - ): GaxiosPromise; - delete( - params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Delete, + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Patch, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - delete( - params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Delete, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + patch( + params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Patch, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - delete( - params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Delete, - callback: BodyResponseCallback + patch( + params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Patch, + callback: BodyResponseCallback ): void; - delete(callback: BodyResponseCallback): void; - delete( + patch( + callback: BodyResponseCallback + ): void; + patch( paramsOrCallback?: - | Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Delete - | BodyResponseCallback + | Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Patch + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Delete; + {}) as Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Patch; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Delete; + params = {} as Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Patch; options = {}; } @@ -23007,7 +32136,7 @@ export namespace dialogflow_v2beta1 { options: Object.assign( { url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), - method: 'DELETE', + method: 'PATCH', }, options ), @@ -23017,17 +32146,84 @@ export namespace dialogflow_v2beta1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest( + parameters + ); } } + } + + export interface Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Create + extends StandardParameters { + /** + * Required. The session to create a session entity type for. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + */ + parent?: string; /** - * Retrieves the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration. + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1SessionEntityType; + } + export interface Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Delete + extends StandardParameters { + /** + * Required. The name of the entity type to delete. Supported formats: - `projects//agent/sessions//entityTypes/` - `projects//locations//agent/sessions//entityTypes/` - `projects//agent/environments//users//sessions//entityTypes/` - `projects//locations//agent/environments/ /users//sessions//entityTypes/` If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Get + extends StandardParameters { + /** + * Required. The name of the session entity type. Supported formats: - `projects//agent/sessions//entityTypes/` - `projects//locations//agent/sessions//entityTypes/` - `projects//agent/environments//users//sessions//entityTypes/` - `projects//locations//agent/environments/ /users//sessions//entityTypes/` If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$List + extends StandardParameters { + /** + * Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. + */ + pageSize?: number; + /** + * Optional. The next_page_token value returned from a previous list request. + */ + pageToken?: string; + /** + * Required. The session to list all session entity types from. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + */ + parent?: string; + } + export interface Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Patch + extends StandardParameters { + /** + * Required. The unique identifier of this session entity type. Supported formats: - `projects//agent/sessions//entityTypes/` - `projects//locations//agent/sessions//entityTypes/` - `projects//agent/environments//users//sessions//entityTypes/` - `projects//locations//agent/environments/ /users//sessions//entityTypes/` If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. `` must be the display name of an existing entity type in the same agent that will be overridden or supplemented. + */ + name?: string; + /** + * Optional. The mask to control which fields get updated. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1SessionEntityType; + } + + export class Resource$Projects$Locations$Answerrecords { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Deprecated. Retrieves a specific answer record. * @example * ```js * // Before running the sample: @@ -23055,19 +32251,17 @@ export namespace dialogflow_v2beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.get( - * { - * // Required. The name of the session entity type. Supported formats: - `projects//agent/sessions//entityTypes/` - `projects//locations//agent/sessions//entityTypes/` - `projects//agent/environments//users//sessions//entityTypes/` - `projects//locations//agent/environments/ /users//sessions//entityTypes/` If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. - * name: - * 'projects/my-project/locations/my-location/agent/environments/my-environment/users/my-user/sessions/my-session/entityTypes/my-entityType', - * } - * ); + * const res = await dialogflow.projects.locations.answerRecords.get({ + * // Required. The name of the answer record to retrieve. Format: `projects//locations//answerRecords/`. + * name: + * 'projects/my-project/locations/my-location/answerRecords/my-answerRecord', + * }); * console.log(res.data); * * // Example response * // { - * // "entities": [], - * // "entityOverrideMode": "my_entityOverrideMode", + * // "agentAssistantRecord": {}, + * // "answerFeedback": {}, * // "name": "my_name" * // } * } @@ -23085,56 +32279,56 @@ export namespace dialogflow_v2beta1 { * @returns A promise if used with async/await, or void if used with a callback. */ get( - params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Get, + params: Params$Resource$Projects$Locations$Answerrecords$Get, options: StreamMethodOptions ): GaxiosPromise; get( - params?: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Get, + params?: Params$Resource$Projects$Locations$Answerrecords$Get, options?: MethodOptions - ): GaxiosPromise; + ): GaxiosPromise; get( - params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Get, + params: Params$Resource$Projects$Locations$Answerrecords$Get, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; get( - params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Get, + params: Params$Resource$Projects$Locations$Answerrecords$Get, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; get( - params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Get, - callback: BodyResponseCallback + params: Params$Resource$Projects$Locations$Answerrecords$Get, + callback: BodyResponseCallback ): void; get( - callback: BodyResponseCallback + callback: BodyResponseCallback ): void; get( paramsOrCallback?: - | Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Get - | BodyResponseCallback + | Params$Resource$Projects$Locations$Answerrecords$Get + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Get; + {}) as Params$Resource$Projects$Locations$Answerrecords$Get; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Get; + params = {} as Params$Resource$Projects$Locations$Answerrecords$Get; options = {}; } @@ -23158,19 +32352,19 @@ export namespace dialogflow_v2beta1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest( + return createAPIRequest( parameters ); } } /** - * Returns the list of all session entity types in the specified session. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration. + * Returns the list of all answer records in the specified project in reverse chronological order. * @example * ```js * // Before running the sample: @@ -23198,23 +32392,20 @@ export namespace dialogflow_v2beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.list( - * { - * // Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. - * pageSize: 'placeholder-value', - * // Optional. The next_page_token value returned from a previous list request. - * pageToken: 'placeholder-value', - * // Required. The session to list all session entity types from. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. - * parent: - * 'projects/my-project/locations/my-location/agent/environments/my-environment/users/my-user/sessions/my-session', - * } - * ); + * const res = await dialogflow.projects.locations.answerRecords.list({ + * // Optional. The maximum number of records to return in a single page. The server may return fewer records than this. If unspecified, we use 10. The maximum is 100. + * pageSize: 'placeholder-value', + * // Optional. The ListAnswerRecordsResponse.next_page_token value returned from a previous list request used to continue listing on the next page. + * pageToken: 'placeholder-value', + * // Required. The project to list all answer records for in reverse chronological order. Format: `projects//locations/`. + * parent: 'projects/my-project/locations/my-location', + * }); * console.log(res.data); * * // Example response * // { - * // "nextPageToken": "my_nextPageToken", - * // "sessionEntityTypes": [] + * // "answerRecords": [], + * // "nextPageToken": "my_nextPageToken" * // } * } * @@ -23231,56 +32422,56 @@ export namespace dialogflow_v2beta1 { * @returns A promise if used with async/await, or void if used with a callback. */ list( - params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$List, + params: Params$Resource$Projects$Locations$Answerrecords$List, options: StreamMethodOptions ): GaxiosPromise; list( - params?: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$List, + params?: Params$Resource$Projects$Locations$Answerrecords$List, options?: MethodOptions - ): GaxiosPromise; + ): GaxiosPromise; list( - params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$List, + params: Params$Resource$Projects$Locations$Answerrecords$List, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; list( - params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$List, + params: Params$Resource$Projects$Locations$Answerrecords$List, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; list( - params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$List, - callback: BodyResponseCallback + params: Params$Resource$Projects$Locations$Answerrecords$List, + callback: BodyResponseCallback ): void; list( - callback: BodyResponseCallback + callback: BodyResponseCallback ): void; list( paramsOrCallback?: - | Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$List - | BodyResponseCallback + | Params$Resource$Projects$Locations$Answerrecords$List + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$List; + {}) as Params$Resource$Projects$Locations$Answerrecords$List; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$List; + params = {} as Params$Resource$Projects$Locations$Answerrecords$List; options = {}; } @@ -23293,7 +32484,7 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/entityTypes').replace( + url: (rootUrl + '/v2beta1/{+parent}/answerRecords').replace( /([^:]\/)\/+/g, '$1' ), @@ -23307,19 +32498,19 @@ export namespace dialogflow_v2beta1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest( + return createAPIRequest( parameters ); } } /** - * Updates the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration. + * Updates the specified answer record. * @example * ```js * // Before running the sample: @@ -23347,31 +32538,29 @@ export namespace dialogflow_v2beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.locations.agent.environments.users.sessions.entityTypes.patch( - * { - * // Required. The unique identifier of this session entity type. Supported formats: - `projects//agent/sessions//entityTypes/` - `projects//locations//agent/sessions//entityTypes/` - `projects//agent/environments//users//sessions//entityTypes/` - `projects//locations//agent/environments/ /users//sessions//entityTypes/` If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. `` must be the display name of an existing entity type in the same agent that will be overridden or supplemented. - * name: - * 'projects/my-project/locations/my-location/agent/environments/my-environment/users/my-user/sessions/my-session/entityTypes/my-entityType', - * // Optional. The mask to control which fields get updated. - * updateMask: 'placeholder-value', + * const res = await dialogflow.projects.locations.answerRecords.patch({ + * // The unique identifier of this answer record. Required for AnswerRecords.UpdateAnswerRecord method. Format: `projects//locations//answerRecords/`. + * name: + * 'projects/my-project/locations/my-location/answerRecords/my-answerRecord', + * // Required. The mask to control which fields get updated. + * updateMask: 'placeholder-value', * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "entities": [], - * // "entityOverrideMode": "my_entityOverrideMode", - * // "name": "my_name" - * // } - * }, - * } - * ); + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "agentAssistantRecord": {}, + * // "answerFeedback": {}, + * // "name": "my_name" + * // } + * }, + * }); * console.log(res.data); * * // Example response * // { - * // "entities": [], - * // "entityOverrideMode": "my_entityOverrideMode", + * // "agentAssistantRecord": {}, + * // "answerFeedback": {}, * // "name": "my_name" * // } * } @@ -23389,56 +32578,56 @@ export namespace dialogflow_v2beta1 { * @returns A promise if used with async/await, or void if used with a callback. */ patch( - params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Patch, + params: Params$Resource$Projects$Locations$Answerrecords$Patch, options: StreamMethodOptions ): GaxiosPromise; patch( - params?: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Patch, + params?: Params$Resource$Projects$Locations$Answerrecords$Patch, options?: MethodOptions - ): GaxiosPromise; + ): GaxiosPromise; patch( - params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Patch, + params: Params$Resource$Projects$Locations$Answerrecords$Patch, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; patch( - params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Patch, + params: Params$Resource$Projects$Locations$Answerrecords$Patch, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; patch( - params: Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Patch, - callback: BodyResponseCallback + params: Params$Resource$Projects$Locations$Answerrecords$Patch, + callback: BodyResponseCallback ): void; patch( - callback: BodyResponseCallback + callback: BodyResponseCallback ): void; patch( paramsOrCallback?: - | Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Patch - | BodyResponseCallback + | Params$Resource$Projects$Locations$Answerrecords$Patch + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Patch; + {}) as Params$Resource$Projects$Locations$Answerrecords$Patch; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Patch; + params = {} as Params$Resource$Projects$Locations$Answerrecords$Patch; options = {}; } @@ -23462,84 +32651,65 @@ export namespace dialogflow_v2beta1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, - callback as BodyResponseCallback - ); - } else { - return createAPIRequest( - parameters - ); - } - } - } - - export interface Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Create - extends StandardParameters { - /** - * Required. The session to create a session entity type for. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. - */ - parent?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$GoogleCloudDialogflowV2beta1SessionEntityType; - } - export interface Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Delete - extends StandardParameters { - /** - * Required. The name of the entity type to delete. Supported formats: - `projects//agent/sessions//entityTypes/` - `projects//locations//agent/sessions//entityTypes/` - `projects//agent/environments//users//sessions//entityTypes/` - `projects//locations//agent/environments/ /users//sessions//entityTypes/` If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. - */ - name?: string; + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } } - export interface Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Get + + export interface Params$Resource$Projects$Locations$Answerrecords$Get extends StandardParameters { /** - * Required. The name of the session entity type. Supported formats: - `projects//agent/sessions//entityTypes/` - `projects//locations//agent/sessions//entityTypes/` - `projects//agent/environments//users//sessions//entityTypes/` - `projects//locations//agent/environments/ /users//sessions//entityTypes/` If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * Required. The name of the answer record to retrieve. Format: `projects//locations//answerRecords/`. */ name?: string; } - export interface Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$List + export interface Params$Resource$Projects$Locations$Answerrecords$List extends StandardParameters { /** - * Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. + * Optional. The maximum number of records to return in a single page. The server may return fewer records than this. If unspecified, we use 10. The maximum is 100. */ pageSize?: number; /** - * Optional. The next_page_token value returned from a previous list request. + * Optional. The ListAnswerRecordsResponse.next_page_token value returned from a previous list request used to continue listing on the next page. */ pageToken?: string; /** - * Required. The session to list all session entity types from. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * Required. The project to list all answer records for in reverse chronological order. Format: `projects//locations/`. */ parent?: string; } - export interface Params$Resource$Projects$Locations$Agent$Environments$Users$Sessions$Entitytypes$Patch + export interface Params$Resource$Projects$Locations$Answerrecords$Patch extends StandardParameters { /** - * Required. The unique identifier of this session entity type. Supported formats: - `projects//agent/sessions//entityTypes/` - `projects//locations//agent/sessions//entityTypes/` - `projects//agent/environments//users//sessions//entityTypes/` - `projects//locations//agent/environments/ /users//sessions//entityTypes/` If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. `` must be the display name of an existing entity type in the same agent that will be overridden or supplemented. + * The unique identifier of this answer record. Required for AnswerRecords.UpdateAnswerRecord method. Format: `projects//locations//answerRecords/`. */ name?: string; /** - * Optional. The mask to control which fields get updated. + * Required. The mask to control which fields get updated. */ updateMask?: string; /** * Request body metadata */ - requestBody?: Schema$GoogleCloudDialogflowV2beta1SessionEntityType; + requestBody?: Schema$GoogleCloudDialogflowV2beta1AnswerRecord; } - export class Resource$Projects$Locations$Agent$Intents { + export class Resource$Projects$Locations$Conversationprofiles { context: APIRequestContext; constructor(context: APIRequestContext) { this.context = context; } /** - * Deletes intents in the specified agent. Operation + * Creates a conversation profile in the specified project. ConversationProfile.CreateTime and ConversationProfile.UpdateTime aren't populated in the response. You can retrieve them via GetConversationProfile API. * @example * ```js * // Before running the sample: @@ -23567,15 +32737,25 @@ export namespace dialogflow_v2beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.locations.agent.intents.batchDelete({ - * // Required. The name of the agent to delete all entities types for. Supported formats: - `projects//agent` - `projects//locations//agent` - * parent: 'projects/my-project/locations/my-location/agent', + * const res = await dialogflow.projects.locations.conversationProfiles.create({ + * // Required. The project to create a conversation profile for. Format: `projects//locations/`. + * parent: 'projects/my-project/locations/my-location', * * // Request body metadata * requestBody: { * // request body parameters * // { - * // "intents": [] + * // "automatedAgentConfig": {}, + * // "createTime": "my_createTime", + * // "displayName": "my_displayName", + * // "humanAgentAssistantConfig": {}, + * // "languageCode": "my_languageCode", + * // "loggingConfig": {}, + * // "name": "my_name", + * // "newMessageEventNotificationConfig": {}, + * // "notificationConfig": {}, + * // "sttConfig": {}, + * // "updateTime": "my_updateTime" * // } * }, * }); @@ -23583,11 +32763,17 @@ export namespace dialogflow_v2beta1 { * * // Example response * // { - * // "done": false, - * // "error": {}, - * // "metadata": {}, + * // "automatedAgentConfig": {}, + * // "createTime": "my_createTime", + * // "displayName": "my_displayName", + * // "humanAgentAssistantConfig": {}, + * // "languageCode": "my_languageCode", + * // "loggingConfig": {}, * // "name": "my_name", - * // "response": {} + * // "newMessageEventNotificationConfig": {}, + * // "notificationConfig": {}, + * // "sttConfig": {}, + * // "updateTime": "my_updateTime" * // } * } * @@ -23603,57 +32789,57 @@ export namespace dialogflow_v2beta1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - batchDelete( - params: Params$Resource$Projects$Locations$Agent$Intents$Batchdelete, + create( + params: Params$Resource$Projects$Locations$Conversationprofiles$Create, options: StreamMethodOptions ): GaxiosPromise; - batchDelete( - params?: Params$Resource$Projects$Locations$Agent$Intents$Batchdelete, + create( + params?: Params$Resource$Projects$Locations$Conversationprofiles$Create, options?: MethodOptions - ): GaxiosPromise; - batchDelete( - params: Params$Resource$Projects$Locations$Agent$Intents$Batchdelete, + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Locations$Conversationprofiles$Create, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - batchDelete( - params: Params$Resource$Projects$Locations$Agent$Intents$Batchdelete, + create( + params: Params$Resource$Projects$Locations$Conversationprofiles$Create, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - batchDelete( - params: Params$Resource$Projects$Locations$Agent$Intents$Batchdelete, - callback: BodyResponseCallback + create( + params: Params$Resource$Projects$Locations$Conversationprofiles$Create, + callback: BodyResponseCallback ): void; - batchDelete( - callback: BodyResponseCallback + create( + callback: BodyResponseCallback ): void; - batchDelete( + create( paramsOrCallback?: - | Params$Resource$Projects$Locations$Agent$Intents$Batchdelete - | BodyResponseCallback + | Params$Resource$Projects$Locations$Conversationprofiles$Create + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Locations$Agent$Intents$Batchdelete; + {}) as Params$Resource$Projects$Locations$Conversationprofiles$Create; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Locations$Agent$Intents$Batchdelete; + params = {} as Params$Resource$Projects$Locations$Conversationprofiles$Create; options = {}; } @@ -23666,7 +32852,7 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/intents:batchDelete').replace( + url: (rootUrl + '/v2beta1/{+parent}/conversationProfiles').replace( /([^:]\/)\/+/g, '$1' ), @@ -23680,17 +32866,19 @@ export namespace dialogflow_v2beta1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest( + parameters + ); } } /** - * Updates/Creates multiple intents in the specified agent. Operation + * Deletes the specified conversation profile. * @example * ```js * // Before running the sample: @@ -23718,32 +32906,15 @@ export namespace dialogflow_v2beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.locations.agent.intents.batchUpdate({ - * // Required. The name of the agent to update or create intents in. Supported formats: - `projects//agent` - `projects//locations//agent` - * parent: 'projects/my-project/locations/my-location/agent', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "intentBatchInline": {}, - * // "intentBatchUri": "my_intentBatchUri", - * // "intentView": "my_intentView", - * // "languageCode": "my_languageCode", - * // "updateMask": "my_updateMask" - * // } - * }, + * const res = await dialogflow.projects.locations.conversationProfiles.delete({ + * // Required. The name of the conversation profile to delete. Format: `projects//locations//conversationProfiles/`. + * name: + * 'projects/my-project/locations/my-location/conversationProfiles/my-conversationProfile', * }); * console.log(res.data); * * // Example response - * // { - * // "done": false, - * // "error": {}, - * // "metadata": {}, - * // "name": "my_name", - * // "response": {} - * // } + * // {} * } * * main().catch(e => { @@ -23758,57 +32929,53 @@ export namespace dialogflow_v2beta1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - batchUpdate( - params: Params$Resource$Projects$Locations$Agent$Intents$Batchupdate, + delete( + params: Params$Resource$Projects$Locations$Conversationprofiles$Delete, options: StreamMethodOptions ): GaxiosPromise; - batchUpdate( - params?: Params$Resource$Projects$Locations$Agent$Intents$Batchupdate, + delete( + params?: Params$Resource$Projects$Locations$Conversationprofiles$Delete, options?: MethodOptions - ): GaxiosPromise; - batchUpdate( - params: Params$Resource$Projects$Locations$Agent$Intents$Batchupdate, + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Locations$Conversationprofiles$Delete, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - batchUpdate( - params: Params$Resource$Projects$Locations$Agent$Intents$Batchupdate, - options: - | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - batchUpdate( - params: Params$Resource$Projects$Locations$Agent$Intents$Batchupdate, - callback: BodyResponseCallback + delete( + params: Params$Resource$Projects$Locations$Conversationprofiles$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - batchUpdate( - callback: BodyResponseCallback + delete( + params: Params$Resource$Projects$Locations$Conversationprofiles$Delete, + callback: BodyResponseCallback ): void; - batchUpdate( + delete(callback: BodyResponseCallback): void; + delete( paramsOrCallback?: - | Params$Resource$Projects$Locations$Agent$Intents$Batchupdate - | BodyResponseCallback + | Params$Resource$Projects$Locations$Conversationprofiles$Delete + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Locations$Agent$Intents$Batchupdate; + {}) as Params$Resource$Projects$Locations$Conversationprofiles$Delete; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Locations$Agent$Intents$Batchupdate; + params = {} as Params$Resource$Projects$Locations$Conversationprofiles$Delete; options = {}; } @@ -23821,31 +32988,28 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/intents:batchUpdate').replace( - /([^:]\/)\/+/g, - '$1' - ), - method: 'POST', + url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', }, options ), params, - requiredParams: ['parent'], - pathParams: ['parent'], + requiredParams: ['name'], + pathParams: ['name'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Creates an intent in the specified agent. + * Retrieves the specified conversation profile. * @example * ```js * // Before running the sample: @@ -23873,65 +33037,26 @@ export namespace dialogflow_v2beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.locations.agent.intents.create({ - * // Optional. The resource view to apply to the returned intent. - * intentView: 'placeholder-value', - * // Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * languageCode: 'placeholder-value', - * // Required. The agent to create a intent for. Supported formats: - `projects//agent` - `projects//locations//agent` - * parent: 'projects/my-project/locations/my-location/agent', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "action": "my_action", - * // "defaultResponsePlatforms": [], - * // "displayName": "my_displayName", - * // "endInteraction": false, - * // "events": [], - * // "followupIntentInfo": [], - * // "inputContextNames": [], - * // "isFallback": false, - * // "messages": [], - * // "mlDisabled": false, - * // "mlEnabled": false, - * // "name": "my_name", - * // "outputContexts": [], - * // "parameters": [], - * // "parentFollowupIntentName": "my_parentFollowupIntentName", - * // "priority": 0, - * // "resetContexts": false, - * // "rootFollowupIntentName": "my_rootFollowupIntentName", - * // "trainingPhrases": [], - * // "webhookState": "my_webhookState" - * // } - * }, + * const res = await dialogflow.projects.locations.conversationProfiles.get({ + * // Required. The resource name of the conversation profile. Format: `projects//locations//conversationProfiles/`. + * name: + * 'projects/my-project/locations/my-location/conversationProfiles/my-conversationProfile', * }); * console.log(res.data); * * // Example response * // { - * // "action": "my_action", - * // "defaultResponsePlatforms": [], + * // "automatedAgentConfig": {}, + * // "createTime": "my_createTime", * // "displayName": "my_displayName", - * // "endInteraction": false, - * // "events": [], - * // "followupIntentInfo": [], - * // "inputContextNames": [], - * // "isFallback": false, - * // "messages": [], - * // "mlDisabled": false, - * // "mlEnabled": false, + * // "humanAgentAssistantConfig": {}, + * // "languageCode": "my_languageCode", + * // "loggingConfig": {}, * // "name": "my_name", - * // "outputContexts": [], - * // "parameters": [], - * // "parentFollowupIntentName": "my_parentFollowupIntentName", - * // "priority": 0, - * // "resetContexts": false, - * // "rootFollowupIntentName": "my_rootFollowupIntentName", - * // "trainingPhrases": [], - * // "webhookState": "my_webhookState" + * // "newMessageEventNotificationConfig": {}, + * // "notificationConfig": {}, + * // "sttConfig": {}, + * // "updateTime": "my_updateTime" * // } * } * @@ -23947,57 +33072,57 @@ export namespace dialogflow_v2beta1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - create( - params: Params$Resource$Projects$Locations$Agent$Intents$Create, + get( + params: Params$Resource$Projects$Locations$Conversationprofiles$Get, options: StreamMethodOptions ): GaxiosPromise; - create( - params?: Params$Resource$Projects$Locations$Agent$Intents$Create, + get( + params?: Params$Resource$Projects$Locations$Conversationprofiles$Get, options?: MethodOptions - ): GaxiosPromise; - create( - params: Params$Resource$Projects$Locations$Agent$Intents$Create, + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Conversationprofiles$Get, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - create( - params: Params$Resource$Projects$Locations$Agent$Intents$Create, + get( + params: Params$Resource$Projects$Locations$Conversationprofiles$Get, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - create( - params: Params$Resource$Projects$Locations$Agent$Intents$Create, - callback: BodyResponseCallback + get( + params: Params$Resource$Projects$Locations$Conversationprofiles$Get, + callback: BodyResponseCallback ): void; - create( - callback: BodyResponseCallback + get( + callback: BodyResponseCallback ): void; - create( + get( paramsOrCallback?: - | Params$Resource$Projects$Locations$Agent$Intents$Create - | BodyResponseCallback + | Params$Resource$Projects$Locations$Conversationprofiles$Get + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Locations$Agent$Intents$Create; + {}) as Params$Resource$Projects$Locations$Conversationprofiles$Get; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Locations$Agent$Intents$Create; + params = {} as Params$Resource$Projects$Locations$Conversationprofiles$Get; options = {}; } @@ -24010,33 +33135,30 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/intents').replace( - /([^:]\/)\/+/g, - '$1' - ), - method: 'POST', + url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', }, options ), params, - requiredParams: ['parent'], - pathParams: ['parent'], + requiredParams: ['name'], + pathParams: ['name'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest( + return createAPIRequest( parameters ); } } /** - * Deletes the specified intent and its direct or indirect followup intents. + * Returns the list of all conversation profiles in the specified project. * @example * ```js * // Before running the sample: @@ -24063,15 +33185,22 @@ export namespace dialogflow_v2beta1 { * const authClient = await auth.getClient(); * google.options({auth: authClient}); * - * // Do the magic - * const res = await dialogflow.projects.locations.agent.intents.delete({ - * // Required. The name of the intent to delete. If this intent has direct or indirect followup intents, we also delete them. Supported formats: - `projects//agent/intents/` - `projects//locations//agent/intents/` - * name: 'projects/my-project/locations/my-location/agent/intents/my-intent', + * // Do the magic + * const res = await dialogflow.projects.locations.conversationProfiles.list({ + * // The maximum number of items to return in a single page. By default 100 and at most 1000. + * pageSize: 'placeholder-value', + * // The next_page_token value returned from a previous list request. + * pageToken: 'placeholder-value', + * // Required. The project to list all conversation profiles from. Format: `projects//locations/`. + * parent: 'projects/my-project/locations/my-location', * }); * console.log(res.data); * * // Example response - * // {} + * // { + * // "conversationProfiles": [], + * // "nextPageToken": "my_nextPageToken" + * // } * } * * main().catch(e => { @@ -24086,53 +33215,57 @@ export namespace dialogflow_v2beta1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - delete( - params: Params$Resource$Projects$Locations$Agent$Intents$Delete, + list( + params: Params$Resource$Projects$Locations$Conversationprofiles$List, options: StreamMethodOptions ): GaxiosPromise; - delete( - params?: Params$Resource$Projects$Locations$Agent$Intents$Delete, + list( + params?: Params$Resource$Projects$Locations$Conversationprofiles$List, options?: MethodOptions - ): GaxiosPromise; - delete( - params: Params$Resource$Projects$Locations$Agent$Intents$Delete, + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$Conversationprofiles$List, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - delete( - params: Params$Resource$Projects$Locations$Agent$Intents$Delete, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + list( + params: Params$Resource$Projects$Locations$Conversationprofiles$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - delete( - params: Params$Resource$Projects$Locations$Agent$Intents$Delete, - callback: BodyResponseCallback + list( + params: Params$Resource$Projects$Locations$Conversationprofiles$List, + callback: BodyResponseCallback ): void; - delete(callback: BodyResponseCallback): void; - delete( + list( + callback: BodyResponseCallback + ): void; + list( paramsOrCallback?: - | Params$Resource$Projects$Locations$Agent$Intents$Delete - | BodyResponseCallback + | Params$Resource$Projects$Locations$Conversationprofiles$List + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Locations$Agent$Intents$Delete; + {}) as Params$Resource$Projects$Locations$Conversationprofiles$List; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Locations$Agent$Intents$Delete; + params = {} as Params$Resource$Projects$Locations$Conversationprofiles$List; options = {}; } @@ -24145,28 +33278,33 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), - method: 'DELETE', + url: (rootUrl + '/v2beta1/{+parent}/conversationProfiles').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', }, options ), params, - requiredParams: ['name'], - pathParams: ['name'], + requiredParams: ['parent'], + pathParams: ['parent'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest( + parameters + ); } } /** - * Retrieves the specified intent. + * Updates the specified conversation profile. ConversationProfile.CreateTime and ConversationProfile.UpdateTime aren't populated in the response. You can retrieve them via GetConversationProfile API. * @example * ```js * // Before running the sample: @@ -24194,38 +33332,46 @@ export namespace dialogflow_v2beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.locations.agent.intents.get({ - * // Optional. The resource view to apply to the returned intent. - * intentView: 'placeholder-value', - * // Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * languageCode: 'placeholder-value', - * // Required. The name of the intent. Supported formats: - `projects//agent/intents/` - `projects//locations//agent/intents/` - * name: 'projects/my-project/locations/my-location/agent/intents/my-intent', + * const res = await dialogflow.projects.locations.conversationProfiles.patch({ + * // The unique identifier of this conversation profile. Format: `projects//locations//conversationProfiles/`. + * name: + * 'projects/my-project/locations/my-location/conversationProfiles/my-conversationProfile', + * // Required. The mask to control which fields to update. + * updateMask: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "automatedAgentConfig": {}, + * // "createTime": "my_createTime", + * // "displayName": "my_displayName", + * // "humanAgentAssistantConfig": {}, + * // "languageCode": "my_languageCode", + * // "loggingConfig": {}, + * // "name": "my_name", + * // "newMessageEventNotificationConfig": {}, + * // "notificationConfig": {}, + * // "sttConfig": {}, + * // "updateTime": "my_updateTime" + * // } + * }, * }); * console.log(res.data); * * // Example response * // { - * // "action": "my_action", - * // "defaultResponsePlatforms": [], + * // "automatedAgentConfig": {}, + * // "createTime": "my_createTime", * // "displayName": "my_displayName", - * // "endInteraction": false, - * // "events": [], - * // "followupIntentInfo": [], - * // "inputContextNames": [], - * // "isFallback": false, - * // "messages": [], - * // "mlDisabled": false, - * // "mlEnabled": false, + * // "humanAgentAssistantConfig": {}, + * // "languageCode": "my_languageCode", + * // "loggingConfig": {}, * // "name": "my_name", - * // "outputContexts": [], - * // "parameters": [], - * // "parentFollowupIntentName": "my_parentFollowupIntentName", - * // "priority": 0, - * // "resetContexts": false, - * // "rootFollowupIntentName": "my_rootFollowupIntentName", - * // "trainingPhrases": [], - * // "webhookState": "my_webhookState" + * // "newMessageEventNotificationConfig": {}, + * // "notificationConfig": {}, + * // "sttConfig": {}, + * // "updateTime": "my_updateTime" * // } * } * @@ -24241,57 +33387,57 @@ export namespace dialogflow_v2beta1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - get( - params: Params$Resource$Projects$Locations$Agent$Intents$Get, + patch( + params: Params$Resource$Projects$Locations$Conversationprofiles$Patch, options: StreamMethodOptions ): GaxiosPromise; - get( - params?: Params$Resource$Projects$Locations$Agent$Intents$Get, + patch( + params?: Params$Resource$Projects$Locations$Conversationprofiles$Patch, options?: MethodOptions - ): GaxiosPromise; - get( - params: Params$Resource$Projects$Locations$Agent$Intents$Get, + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Locations$Conversationprofiles$Patch, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - get( - params: Params$Resource$Projects$Locations$Agent$Intents$Get, + patch( + params: Params$Resource$Projects$Locations$Conversationprofiles$Patch, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - get( - params: Params$Resource$Projects$Locations$Agent$Intents$Get, - callback: BodyResponseCallback + patch( + params: Params$Resource$Projects$Locations$Conversationprofiles$Patch, + callback: BodyResponseCallback ): void; - get( - callback: BodyResponseCallback + patch( + callback: BodyResponseCallback ): void; - get( + patch( paramsOrCallback?: - | Params$Resource$Projects$Locations$Agent$Intents$Get - | BodyResponseCallback + | Params$Resource$Projects$Locations$Conversationprofiles$Patch + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Locations$Agent$Intents$Get; + {}) as Params$Resource$Projects$Locations$Conversationprofiles$Patch; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Locations$Agent$Intents$Get; + params = {} as Params$Resource$Projects$Locations$Conversationprofiles$Patch; options = {}; } @@ -24305,7 +33451,7 @@ export namespace dialogflow_v2beta1 { options: Object.assign( { url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), - method: 'GET', + method: 'PATCH', }, options ), @@ -24315,19 +33461,92 @@ export namespace dialogflow_v2beta1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest( + return createAPIRequest( parameters ); } } + } + export interface Params$Resource$Projects$Locations$Conversationprofiles$Create + extends StandardParameters { /** - * Returns the list of all intents in the specified agent. + * Required. The project to create a conversation profile for. Format: `projects//locations/`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1ConversationProfile; + } + export interface Params$Resource$Projects$Locations$Conversationprofiles$Delete + extends StandardParameters { + /** + * Required. The name of the conversation profile to delete. Format: `projects//locations//conversationProfiles/`. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Conversationprofiles$Get + extends StandardParameters { + /** + * Required. The resource name of the conversation profile. Format: `projects//locations//conversationProfiles/`. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Conversationprofiles$List + extends StandardParameters { + /** + * The maximum number of items to return in a single page. By default 100 and at most 1000. + */ + pageSize?: number; + /** + * The next_page_token value returned from a previous list request. + */ + pageToken?: string; + /** + * Required. The project to list all conversation profiles from. Format: `projects//locations/`. + */ + parent?: string; + } + export interface Params$Resource$Projects$Locations$Conversationprofiles$Patch + extends StandardParameters { + /** + * The unique identifier of this conversation profile. Format: `projects//locations//conversationProfiles/`. + */ + name?: string; + /** + * Required. The mask to control which fields to update. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1ConversationProfile; + } + + export class Resource$Projects$Locations$Conversations { + context: APIRequestContext; + messages: Resource$Projects$Locations$Conversations$Messages; + participants: Resource$Projects$Locations$Conversations$Participants; + constructor(context: APIRequestContext) { + this.context = context; + this.messages = new Resource$Projects$Locations$Conversations$Messages( + this.context + ); + this.participants = new Resource$Projects$Locations$Conversations$Participants( + this.context + ); + } + + /** + * Completes the specified conversation. Finished conversations are purged from the database after 30 days. * @example * ```js * // Before running the sample: @@ -24355,24 +33574,28 @@ export namespace dialogflow_v2beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.locations.agent.intents.list({ - * // Optional. The resource view to apply to the returned intent. - * intentView: 'placeholder-value', - * // Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * languageCode: 'placeholder-value', - * // Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. - * pageSize: 'placeholder-value', - * // Optional. The next_page_token value returned from a previous list request. - * pageToken: 'placeholder-value', - * // Required. The agent to list all intents from. Format: `projects//agent`. - * parent: 'projects/my-project/locations/my-location/agent', + * const res = await dialogflow.projects.locations.conversations.complete({ + * // Required. Resource identifier of the conversation to close. Format: `projects//locations//conversations/`. + * name: + * 'projects/my-project/locations/my-location/conversations/my-conversation', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // {} + * }, * }); * console.log(res.data); * * // Example response * // { - * // "intents": [], - * // "nextPageToken": "my_nextPageToken" + * // "conversationProfile": "my_conversationProfile", + * // "conversationStage": "my_conversationStage", + * // "endTime": "my_endTime", + * // "lifecycleState": "my_lifecycleState", + * // "name": "my_name", + * // "phoneNumber": {}, + * // "startTime": "my_startTime" * // } * } * @@ -24388,57 +33611,57 @@ export namespace dialogflow_v2beta1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - list( - params: Params$Resource$Projects$Locations$Agent$Intents$List, + complete( + params: Params$Resource$Projects$Locations$Conversations$Complete, options: StreamMethodOptions ): GaxiosPromise; - list( - params?: Params$Resource$Projects$Locations$Agent$Intents$List, + complete( + params?: Params$Resource$Projects$Locations$Conversations$Complete, options?: MethodOptions - ): GaxiosPromise; - list( - params: Params$Resource$Projects$Locations$Agent$Intents$List, + ): GaxiosPromise; + complete( + params: Params$Resource$Projects$Locations$Conversations$Complete, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Projects$Locations$Agent$Intents$List, + complete( + params: Params$Resource$Projects$Locations$Conversations$Complete, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Projects$Locations$Agent$Intents$List, - callback: BodyResponseCallback + complete( + params: Params$Resource$Projects$Locations$Conversations$Complete, + callback: BodyResponseCallback ): void; - list( - callback: BodyResponseCallback + complete( + callback: BodyResponseCallback ): void; - list( + complete( paramsOrCallback?: - | Params$Resource$Projects$Locations$Agent$Intents$List - | BodyResponseCallback + | Params$Resource$Projects$Locations$Conversations$Complete + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Locations$Agent$Intents$List; + {}) as Params$Resource$Projects$Locations$Conversations$Complete; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Locations$Agent$Intents$List; + params = {} as Params$Resource$Projects$Locations$Conversations$Complete; options = {}; } @@ -24451,33 +33674,33 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/intents').replace( + url: (rootUrl + '/v2beta1/{+name}:complete').replace( /([^:]\/)\/+/g, '$1' ), - method: 'GET', + method: 'POST', }, options ), params, - requiredParams: ['parent'], - pathParams: ['parent'], + requiredParams: ['name'], + pathParams: ['name'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest( + return createAPIRequest( parameters ); } } /** - * Updates the specified intent. + * Creates a new conversation. Conversations are auto-completed after 24 hours. Conversation Lifecycle: There are two stages during a conversation: Automated Agent Stage and Assist Stage. For Automated Agent Stage, there will be a dialogflow agent responding to user queries. For Assist Stage, there's no dialogflow agent responding to user queries. But we will provide suggestions which are generated from conversation. If Conversation.conversation_profile is configured for a dialogflow agent, conversation will start from `Automated Agent Stage`, otherwise, it will start from `Assist Stage`. And during `Automated Agent Stage`, once an Intent with Intent.live_agent_handoff is triggered, conversation will transfer to Assist Stage. * @example * ```js * // Before running the sample: @@ -24498,47 +33721,30 @@ export namespace dialogflow_v2beta1 { * 'https://www.googleapis.com/auth/cloud-platform', * 'https://www.googleapis.com/auth/dialogflow', * ], - * }); - * - * // Acquire an auth client, and bind it to all future calls - * const authClient = await auth.getClient(); - * google.options({auth: authClient}); - * - * // Do the magic - * const res = await dialogflow.projects.locations.agent.intents.patch({ - * // Optional. The resource view to apply to the returned intent. - * intentView: 'placeholder-value', - * // Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * languageCode: 'placeholder-value', - * // Optional. The unique identifier of this intent. Required for Intents.UpdateIntent and Intents.BatchUpdateIntents methods. Supported formats: - `projects//agent/intents/` - `projects//locations//agent/intents/` - * name: 'projects/my-project/locations/my-location/agent/intents/my-intent', - * // Optional. The mask to control which fields get updated. - * updateMask: 'placeholder-value', + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.conversations.create({ + * // Optional. Identifier of the conversation. Generally it's auto generated by Google. Only set it if you cannot wait for the response to return a auto-generated one to you. The conversation ID must be compliant with the regression fomula "a-zA-Z*" with the characters length in range of [3,64]. If the field is provided, the caller is resposible for 1. the uniqueness of the ID, otherwise the request will be rejected. 2. the consistency for whether to use custom ID or not under a project to better ensure uniqueness. + * conversationId: 'placeholder-value', + * // Required. Resource identifier of the project creating the conversation. Format: `projects//locations/`. + * parent: 'projects/my-project/locations/my-location', * * // Request body metadata * requestBody: { * // request body parameters * // { - * // "action": "my_action", - * // "defaultResponsePlatforms": [], - * // "displayName": "my_displayName", - * // "endInteraction": false, - * // "events": [], - * // "followupIntentInfo": [], - * // "inputContextNames": [], - * // "isFallback": false, - * // "messages": [], - * // "mlDisabled": false, - * // "mlEnabled": false, + * // "conversationProfile": "my_conversationProfile", + * // "conversationStage": "my_conversationStage", + * // "endTime": "my_endTime", + * // "lifecycleState": "my_lifecycleState", * // "name": "my_name", - * // "outputContexts": [], - * // "parameters": [], - * // "parentFollowupIntentName": "my_parentFollowupIntentName", - * // "priority": 0, - * // "resetContexts": false, - * // "rootFollowupIntentName": "my_rootFollowupIntentName", - * // "trainingPhrases": [], - * // "webhookState": "my_webhookState" + * // "phoneNumber": {}, + * // "startTime": "my_startTime" * // } * }, * }); @@ -24546,26 +33752,13 @@ export namespace dialogflow_v2beta1 { * * // Example response * // { - * // "action": "my_action", - * // "defaultResponsePlatforms": [], - * // "displayName": "my_displayName", - * // "endInteraction": false, - * // "events": [], - * // "followupIntentInfo": [], - * // "inputContextNames": [], - * // "isFallback": false, - * // "messages": [], - * // "mlDisabled": false, - * // "mlEnabled": false, + * // "conversationProfile": "my_conversationProfile", + * // "conversationStage": "my_conversationStage", + * // "endTime": "my_endTime", + * // "lifecycleState": "my_lifecycleState", * // "name": "my_name", - * // "outputContexts": [], - * // "parameters": [], - * // "parentFollowupIntentName": "my_parentFollowupIntentName", - * // "priority": 0, - * // "resetContexts": false, - * // "rootFollowupIntentName": "my_rootFollowupIntentName", - * // "trainingPhrases": [], - * // "webhookState": "my_webhookState" + * // "phoneNumber": {}, + * // "startTime": "my_startTime" * // } * } * @@ -24581,57 +33774,57 @@ export namespace dialogflow_v2beta1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - patch( - params: Params$Resource$Projects$Locations$Agent$Intents$Patch, + create( + params: Params$Resource$Projects$Locations$Conversations$Create, options: StreamMethodOptions ): GaxiosPromise; - patch( - params?: Params$Resource$Projects$Locations$Agent$Intents$Patch, + create( + params?: Params$Resource$Projects$Locations$Conversations$Create, options?: MethodOptions - ): GaxiosPromise; - patch( - params: Params$Resource$Projects$Locations$Agent$Intents$Patch, + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Locations$Conversations$Create, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - patch( - params: Params$Resource$Projects$Locations$Agent$Intents$Patch, + create( + params: Params$Resource$Projects$Locations$Conversations$Create, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - patch( - params: Params$Resource$Projects$Locations$Agent$Intents$Patch, - callback: BodyResponseCallback + create( + params: Params$Resource$Projects$Locations$Conversations$Create, + callback: BodyResponseCallback ): void; - patch( - callback: BodyResponseCallback + create( + callback: BodyResponseCallback ): void; - patch( + create( paramsOrCallback?: - | Params$Resource$Projects$Locations$Agent$Intents$Patch - | BodyResponseCallback + | Params$Resource$Projects$Locations$Conversations$Create + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Locations$Agent$Intents$Patch; + {}) as Params$Resource$Projects$Locations$Conversations$Create; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Locations$Agent$Intents$Patch; + params = {} as Params$Resource$Projects$Locations$Conversations$Create; options = {}; } @@ -24644,159 +33837,33 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), - method: 'PATCH', + url: (rootUrl + '/v2beta1/{+parent}/conversations').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', }, options ), params, - requiredParams: ['name'], - pathParams: ['name'], + requiredParams: ['parent'], + pathParams: ['parent'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest( + return createAPIRequest( parameters ); } } - } - - export interface Params$Resource$Projects$Locations$Agent$Intents$Batchdelete - extends StandardParameters { - /** - * Required. The name of the agent to delete all entities types for. Supported formats: - `projects//agent` - `projects//locations//agent` - */ - parent?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$GoogleCloudDialogflowV2beta1BatchDeleteIntentsRequest; - } - export interface Params$Resource$Projects$Locations$Agent$Intents$Batchupdate - extends StandardParameters { - /** - * Required. The name of the agent to update or create intents in. Supported formats: - `projects//agent` - `projects//locations//agent` - */ - parent?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$GoogleCloudDialogflowV2beta1BatchUpdateIntentsRequest; - } - export interface Params$Resource$Projects$Locations$Agent$Intents$Create - extends StandardParameters { - /** - * Optional. The resource view to apply to the returned intent. - */ - intentView?: string; - /** - * Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - */ - languageCode?: string; - /** - * Required. The agent to create a intent for. Supported formats: - `projects//agent` - `projects//locations//agent` - */ - parent?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$GoogleCloudDialogflowV2beta1Intent; - } - export interface Params$Resource$Projects$Locations$Agent$Intents$Delete - extends StandardParameters { - /** - * Required. The name of the intent to delete. If this intent has direct or indirect followup intents, we also delete them. Supported formats: - `projects//agent/intents/` - `projects//locations//agent/intents/` - */ - name?: string; - } - export interface Params$Resource$Projects$Locations$Agent$Intents$Get - extends StandardParameters { - /** - * Optional. The resource view to apply to the returned intent. - */ - intentView?: string; - /** - * Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - */ - languageCode?: string; - /** - * Required. The name of the intent. Supported formats: - `projects//agent/intents/` - `projects//locations//agent/intents/` - */ - name?: string; - } - export interface Params$Resource$Projects$Locations$Agent$Intents$List - extends StandardParameters { - /** - * Optional. The resource view to apply to the returned intent. - */ - intentView?: string; - /** - * Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - */ - languageCode?: string; - /** - * Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. - */ - pageSize?: number; - /** - * Optional. The next_page_token value returned from a previous list request. - */ - pageToken?: string; - /** - * Required. The agent to list all intents from. Format: `projects//agent`. - */ - parent?: string; - } - export interface Params$Resource$Projects$Locations$Agent$Intents$Patch - extends StandardParameters { - /** - * Optional. The resource view to apply to the returned intent. - */ - intentView?: string; - /** - * Optional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - */ - languageCode?: string; - /** - * Optional. The unique identifier of this intent. Required for Intents.UpdateIntent and Intents.BatchUpdateIntents methods. Supported formats: - `projects//agent/intents/` - `projects//locations//agent/intents/` - */ - name?: string; - /** - * Optional. The mask to control which fields get updated. - */ - updateMask?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$GoogleCloudDialogflowV2beta1Intent; - } - - export class Resource$Projects$Locations$Agent$Sessions { - context: APIRequestContext; - contexts: Resource$Projects$Locations$Agent$Sessions$Contexts; - entityTypes: Resource$Projects$Locations$Agent$Sessions$Entitytypes; - constructor(context: APIRequestContext) { - this.context = context; - this.contexts = new Resource$Projects$Locations$Agent$Sessions$Contexts( - this.context - ); - this.entityTypes = new Resource$Projects$Locations$Agent$Sessions$Entitytypes( - this.context - ); - } /** - * Deletes all active contexts in the specified session. + * Retrieves the specific conversation. * @example * ```js * // Before running the sample: @@ -24824,17 +33891,23 @@ export namespace dialogflow_v2beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.locations.agent.sessions.deleteContexts( - * { - * // Required. The name of the session to delete all contexts from. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. - * parent: - * 'projects/my-project/locations/my-location/agent/sessions/my-session', - * } - * ); + * const res = await dialogflow.projects.locations.conversations.get({ + * // Required. The name of the conversation. Format: `projects//locations//conversations/`. + * name: + * 'projects/my-project/locations/my-location/conversations/my-conversation', + * }); * console.log(res.data); * * // Example response - * // {} + * // { + * // "conversationProfile": "my_conversationProfile", + * // "conversationStage": "my_conversationStage", + * // "endTime": "my_endTime", + * // "lifecycleState": "my_lifecycleState", + * // "name": "my_name", + * // "phoneNumber": {}, + * // "startTime": "my_startTime" + * // } * } * * main().catch(e => { @@ -24849,55 +33922,57 @@ export namespace dialogflow_v2beta1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - deleteContexts( - params: Params$Resource$Projects$Locations$Agent$Sessions$Deletecontexts, + get( + params: Params$Resource$Projects$Locations$Conversations$Get, options: StreamMethodOptions ): GaxiosPromise; - deleteContexts( - params?: Params$Resource$Projects$Locations$Agent$Sessions$Deletecontexts, + get( + params?: Params$Resource$Projects$Locations$Conversations$Get, options?: MethodOptions - ): GaxiosPromise; - deleteContexts( - params: Params$Resource$Projects$Locations$Agent$Sessions$Deletecontexts, + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Conversations$Get, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - deleteContexts( - params: Params$Resource$Projects$Locations$Agent$Sessions$Deletecontexts, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + get( + params: Params$Resource$Projects$Locations$Conversations$Get, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - deleteContexts( - params: Params$Resource$Projects$Locations$Agent$Sessions$Deletecontexts, - callback: BodyResponseCallback + get( + params: Params$Resource$Projects$Locations$Conversations$Get, + callback: BodyResponseCallback ): void; - deleteContexts( - callback: BodyResponseCallback + get( + callback: BodyResponseCallback ): void; - deleteContexts( + get( paramsOrCallback?: - | Params$Resource$Projects$Locations$Agent$Sessions$Deletecontexts - | BodyResponseCallback + | Params$Resource$Projects$Locations$Conversations$Get + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Locations$Agent$Sessions$Deletecontexts; + {}) as Params$Resource$Projects$Locations$Conversations$Get; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Locations$Agent$Sessions$Deletecontexts; + params = {} as Params$Resource$Projects$Locations$Conversations$Get; options = {}; } @@ -24910,31 +33985,30 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/contexts').replace( - /([^:]\/)\/+/g, - '$1' - ), - method: 'DELETE', + url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', }, options ), params, - requiredParams: ['parent'], - pathParams: ['parent'], + requiredParams: ['name'], + pathParams: ['name'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest( + parameters + ); } } /** - * Processes a natural language query and returns structured, actionable data as a result. This method is not idempotent, because it may cause contexts and session entity types to be updated, which in turn might affect results of future queries. Note: Always use agent versions for production traffic. See [Versions and environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). + * Returns the list of all conversations in the specified project. * @example * ```js * // Before running the sample: @@ -24962,33 +34036,22 @@ export namespace dialogflow_v2beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.locations.agent.sessions.detectIntent({ - * // Required. The name of the session this query is sent to. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment (`Environment ID` might be referred to as environment name at some places). If `User ID` is not specified, we are using "-". It's up to the API caller to choose an appropriate `Session ID` and `User Id`. They can be a random number or some type of user and session identifiers (preferably hashed). The length of the `Session ID` and `User ID` must not exceed 36 characters. For more information, see the [API interactions guide](https://cloud.google.com/dialogflow/docs/api-overview). Note: Always use agent versions for production traffic. See [Versions and environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). - * session: - * 'projects/my-project/locations/my-location/agent/sessions/my-session', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "inputAudio": "my_inputAudio", - * // "outputAudioConfig": {}, - * // "outputAudioConfigMask": "my_outputAudioConfigMask", - * // "queryInput": {}, - * // "queryParams": {} - * // } - * }, + * const res = await dialogflow.projects.locations.conversations.list({ + * // A filter expression that filters conversations listed in the response. In general, the expression must specify the field name, a comparison operator, and the value to use for filtering: - The value must be a string, a number, or a boolean. - The comparison operator must be either `=`,`!=`, `\>`, or `<`. - To filter on multiple expressions, separate the expressions with `AND` or `OR` (omitting both implies `AND`). - For clarity, expressions can be enclosed in parentheses. Only `lifecycle_state` can be filtered on in this way. For example, the following expression only returns `COMPLETED` conversations: `lifecycle_state = "COMPLETED"` For more information about filtering, see [API Filtering](https://aip.dev/160). + * filter: 'placeholder-value', + * // Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. + * pageSize: 'placeholder-value', + * // Optional. The next_page_token value returned from a previous list request. + * pageToken: 'placeholder-value', + * // Required. The project from which to list all conversation. Format: `projects//locations/`. + * parent: 'projects/my-project/locations/my-location', * }); * console.log(res.data); * * // Example response * // { - * // "alternativeQueryResults": [], - * // "outputAudio": "my_outputAudio", - * // "outputAudioConfig": {}, - * // "queryResult": {}, - * // "responseId": "my_responseId", - * // "webhookStatus": {} + * // "conversations": [], + * // "nextPageToken": "my_nextPageToken" * // } * } * @@ -25004,57 +34067,57 @@ export namespace dialogflow_v2beta1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - detectIntent( - params: Params$Resource$Projects$Locations$Agent$Sessions$Detectintent, + list( + params: Params$Resource$Projects$Locations$Conversations$List, options: StreamMethodOptions ): GaxiosPromise; - detectIntent( - params?: Params$Resource$Projects$Locations$Agent$Sessions$Detectintent, + list( + params?: Params$Resource$Projects$Locations$Conversations$List, options?: MethodOptions - ): GaxiosPromise; - detectIntent( - params: Params$Resource$Projects$Locations$Agent$Sessions$Detectintent, + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$Conversations$List, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - detectIntent( - params: Params$Resource$Projects$Locations$Agent$Sessions$Detectintent, + list( + params: Params$Resource$Projects$Locations$Conversations$List, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - detectIntent( - params: Params$Resource$Projects$Locations$Agent$Sessions$Detectintent, - callback: BodyResponseCallback + list( + params: Params$Resource$Projects$Locations$Conversations$List, + callback: BodyResponseCallback ): void; - detectIntent( - callback: BodyResponseCallback + list( + callback: BodyResponseCallback ): void; - detectIntent( + list( paramsOrCallback?: - | Params$Resource$Projects$Locations$Agent$Sessions$Detectintent - | BodyResponseCallback + | Params$Resource$Projects$Locations$Conversations$List + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Locations$Agent$Sessions$Detectintent; + {}) as Params$Resource$Projects$Locations$Conversations$List; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Locations$Agent$Sessions$Detectintent; + params = {} as Params$Resource$Projects$Locations$Conversations$List; options = {}; } @@ -25067,60 +34130,95 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+session}:detectIntent').replace( + url: (rootUrl + '/v2beta1/{+parent}/conversations').replace( /([^:]\/)\/+/g, '$1' ), - method: 'POST', + method: 'GET', }, options ), params, - requiredParams: ['session'], - pathParams: ['session'], + requiredParams: ['parent'], + pathParams: ['parent'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest( + return createAPIRequest( parameters ); } } } - export interface Params$Resource$Projects$Locations$Agent$Sessions$Deletecontexts + export interface Params$Resource$Projects$Locations$Conversations$Complete extends StandardParameters { /** - * Required. The name of the session to delete all contexts from. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * Required. Resource identifier of the conversation to close. Format: `projects//locations//conversations/`. */ - parent?: string; + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1CompleteConversationRequest; } - export interface Params$Resource$Projects$Locations$Agent$Sessions$Detectintent + export interface Params$Resource$Projects$Locations$Conversations$Create extends StandardParameters { /** - * Required. The name of the session this query is sent to. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment (`Environment ID` might be referred to as environment name at some places). If `User ID` is not specified, we are using "-". It's up to the API caller to choose an appropriate `Session ID` and `User Id`. They can be a random number or some type of user and session identifiers (preferably hashed). The length of the `Session ID` and `User ID` must not exceed 36 characters. For more information, see the [API interactions guide](https://cloud.google.com/dialogflow/docs/api-overview). Note: Always use agent versions for production traffic. See [Versions and environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). + * Optional. Identifier of the conversation. Generally it's auto generated by Google. Only set it if you cannot wait for the response to return a auto-generated one to you. The conversation ID must be compliant with the regression fomula "a-zA-Z*" with the characters length in range of [3,64]. If the field is provided, the caller is resposible for 1. the uniqueness of the ID, otherwise the request will be rejected. 2. the consistency for whether to use custom ID or not under a project to better ensure uniqueness. */ - session?: string; + conversationId?: string; + /** + * Required. Resource identifier of the project creating the conversation. Format: `projects//locations/`. + */ + parent?: string; /** * Request body metadata */ - requestBody?: Schema$GoogleCloudDialogflowV2beta1DetectIntentRequest; + requestBody?: Schema$GoogleCloudDialogflowV2beta1Conversation; + } + export interface Params$Resource$Projects$Locations$Conversations$Get + extends StandardParameters { + /** + * Required. The name of the conversation. Format: `projects//locations//conversations/`. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Conversations$List + extends StandardParameters { + /** + * A filter expression that filters conversations listed in the response. In general, the expression must specify the field name, a comparison operator, and the value to use for filtering: - The value must be a string, a number, or a boolean. - The comparison operator must be either `=`,`!=`, `\>`, or `<`. - To filter on multiple expressions, separate the expressions with `AND` or `OR` (omitting both implies `AND`). - For clarity, expressions can be enclosed in parentheses. Only `lifecycle_state` can be filtered on in this way. For example, the following expression only returns `COMPLETED` conversations: `lifecycle_state = "COMPLETED"` For more information about filtering, see [API Filtering](https://aip.dev/160). + */ + filter?: string; + /** + * Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. + */ + pageSize?: number; + /** + * Optional. The next_page_token value returned from a previous list request. + */ + pageToken?: string; + /** + * Required. The project from which to list all conversation. Format: `projects//locations/`. + */ + parent?: string; } - export class Resource$Projects$Locations$Agent$Sessions$Contexts { + export class Resource$Projects$Locations$Conversations$Messages { context: APIRequestContext; constructor(context: APIRequestContext) { this.context = context; } /** - * Creates a context. If the specified context already exists, overrides the context. + * Batch ingests messages to conversation. Customers can use this RPC to ingest historical messages to conversation. * @example * ```js * // Before running the sample: @@ -25148,19 +34246,17 @@ export namespace dialogflow_v2beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.locations.agent.sessions.contexts.create( + * const res = await dialogflow.projects.locations.conversations.messages.batchCreate( * { - * // Required. The session to create a context for. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * // Required. Resource identifier of the conversation to create message. Format: `projects//locations//conversations/`. * parent: - * 'projects/my-project/locations/my-location/agent/sessions/my-session', + * 'projects/my-project/locations/my-location/conversations/my-conversation', * * // Request body metadata * requestBody: { * // request body parameters * // { - * // "lifespanCount": 0, - * // "name": "my_name", - * // "parameters": {} + * // "requests": [] * // } * }, * } @@ -25169,9 +34265,7 @@ export namespace dialogflow_v2beta1 { * * // Example response * // { - * // "lifespanCount": 0, - * // "name": "my_name", - * // "parameters": {} + * // "messages": [] * // } * } * @@ -25187,57 +34281,57 @@ export namespace dialogflow_v2beta1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - create( - params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Create, + batchCreate( + params: Params$Resource$Projects$Locations$Conversations$Messages$Batchcreate, options: StreamMethodOptions ): GaxiosPromise; - create( - params?: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Create, + batchCreate( + params?: Params$Resource$Projects$Locations$Conversations$Messages$Batchcreate, options?: MethodOptions - ): GaxiosPromise; - create( - params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Create, + ): GaxiosPromise; + batchCreate( + params: Params$Resource$Projects$Locations$Conversations$Messages$Batchcreate, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - create( - params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Create, + batchCreate( + params: Params$Resource$Projects$Locations$Conversations$Messages$Batchcreate, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - create( - params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Create, - callback: BodyResponseCallback + batchCreate( + params: Params$Resource$Projects$Locations$Conversations$Messages$Batchcreate, + callback: BodyResponseCallback ): void; - create( - callback: BodyResponseCallback + batchCreate( + callback: BodyResponseCallback ): void; - create( + batchCreate( paramsOrCallback?: - | Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Create - | BodyResponseCallback + | Params$Resource$Projects$Locations$Conversations$Messages$Batchcreate + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Create; + {}) as Params$Resource$Projects$Locations$Conversations$Messages$Batchcreate; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Create; + params = {} as Params$Resource$Projects$Locations$Conversations$Messages$Batchcreate; options = {}; } @@ -25250,7 +34344,7 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/contexts').replace( + url: (rootUrl + '/v2beta1/{+parent}/messages:batchCreate').replace( /([^:]\/)\/+/g, '$1' ), @@ -25264,19 +34358,19 @@ export namespace dialogflow_v2beta1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest( + return createAPIRequest( parameters ); } } /** - * Deletes the specified context. + * Lists messages that belong to a given conversation. `messages` are ordered by `create_time` in descending order. To fetch updates without duplication, send request with filter `create_time_epoch_microseconds \> [first item's create_time of previous request]` and empty page_token. * @example * ```js * // Before running the sample: @@ -25304,17 +34398,24 @@ export namespace dialogflow_v2beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.locations.agent.sessions.contexts.delete( - * { - * // Required. The name of the context to delete. Supported formats: - `projects//agent/sessions//contexts/`, - `projects//locations//agent/sessions//contexts/`, - `projects//agent/environments//users//sessions//contexts/`, - `projects//locations//agent/environments//users//sessions//contexts/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. - * name: - * 'projects/my-project/locations/my-location/agent/sessions/my-session/contexts/my-context', - * } - * ); + * const res = await dialogflow.projects.locations.conversations.messages.list({ + * // Optional. Filter on message fields. Currently predicates on `create_time` and `create_time_epoch_microseconds` are supported. `create_time` only support milliseconds accuracy. E.g., `create_time_epoch_microseconds \> 1551790877964485` or `create_time \> 2017-01-15T01:30:15.01Z`. For more information about filtering, see [API Filtering](https://aip.dev/160). + * filter: 'placeholder-value', + * // Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. + * pageSize: 'placeholder-value', + * // Optional. The next_page_token value returned from a previous list request. + * pageToken: 'placeholder-value', + * // Required. The name of the conversation to list messages for. Format: `projects//locations//conversations/` + * parent: + * 'projects/my-project/locations/my-location/conversations/my-conversation', + * }); * console.log(res.data); * * // Example response - * // {} + * // { + * // "messages": [], + * // "nextPageToken": "my_nextPageToken" + * // } * } * * main().catch(e => { @@ -25329,53 +34430,57 @@ export namespace dialogflow_v2beta1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - delete( - params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Delete, + list( + params: Params$Resource$Projects$Locations$Conversations$Messages$List, options: StreamMethodOptions ): GaxiosPromise; - delete( - params?: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Delete, + list( + params?: Params$Resource$Projects$Locations$Conversations$Messages$List, options?: MethodOptions - ): GaxiosPromise; - delete( - params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Delete, + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$Conversations$Messages$List, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - delete( - params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Delete, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + list( + params: Params$Resource$Projects$Locations$Conversations$Messages$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - delete( - params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Delete, - callback: BodyResponseCallback + list( + params: Params$Resource$Projects$Locations$Conversations$Messages$List, + callback: BodyResponseCallback ): void; - delete(callback: BodyResponseCallback): void; - delete( + list( + callback: BodyResponseCallback + ): void; + list( paramsOrCallback?: - | Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Delete - | BodyResponseCallback + | Params$Resource$Projects$Locations$Conversations$Messages$List + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Delete; + {}) as Params$Resource$Projects$Locations$Conversations$Messages$List; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Delete; + params = {} as Params$Resource$Projects$Locations$Conversations$Messages$List; options = {}; } @@ -25388,28 +34493,76 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), - method: 'DELETE', + url: (rootUrl + '/v2beta1/{+parent}/messages').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', }, options ), params, - requiredParams: ['name'], - pathParams: ['name'], + requiredParams: ['parent'], + pathParams: ['parent'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest( + parameters + ); } } + } + + export interface Params$Resource$Projects$Locations$Conversations$Messages$Batchcreate + extends StandardParameters { + /** + * Required. Resource identifier of the conversation to create message. Format: `projects//locations//conversations/`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1BatchCreateMessagesRequest; + } + export interface Params$Resource$Projects$Locations$Conversations$Messages$List + extends StandardParameters { + /** + * Optional. Filter on message fields. Currently predicates on `create_time` and `create_time_epoch_microseconds` are supported. `create_time` only support milliseconds accuracy. E.g., `create_time_epoch_microseconds \> 1551790877964485` or `create_time \> 2017-01-15T01:30:15.01Z`. For more information about filtering, see [API Filtering](https://aip.dev/160). + */ + filter?: string; + /** + * Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. + */ + pageSize?: number; + /** + * Optional. The next_page_token value returned from a previous list request. + */ + pageToken?: string; + /** + * Required. The name of the conversation to list messages for. Format: `projects//locations//conversations/` + */ + parent?: string; + } + + export class Resource$Projects$Locations$Conversations$Participants { + context: APIRequestContext; + suggestions: Resource$Projects$Locations$Conversations$Participants$Suggestions; + constructor(context: APIRequestContext) { + this.context = context; + this.suggestions = new Resource$Projects$Locations$Conversations$Participants$Suggestions( + this.context + ); + } /** - * Retrieves the specified context. + * Adds a text (chat, for example), or audio (phone recording, for example) message from a participant into the conversation. Note: Always use agent versions for production traffic sent to virtual agents. See [Versions and environments](https://cloud.google.com/dialogflow/es/docs/agents-versions). * @example * ```js * // Before running the sample: @@ -25437,18 +34590,37 @@ export namespace dialogflow_v2beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.locations.agent.sessions.contexts.get({ - * // Required. The name of the context. Supported formats: - `projects//agent/sessions//contexts/`, - `projects//locations//agent/sessions//contexts/`, - `projects//agent/environments//users//sessions//contexts/`, - `projects//locations//agent/environments//users//sessions//contexts/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. - * name: - * 'projects/my-project/locations/my-location/agent/sessions/my-session/contexts/my-context', - * }); + * const res = await dialogflow.projects.locations.conversations.participants.analyzeContent( + * { + * // Required. The name of the participant this text comes from. Format: `projects//locations//conversations//participants/`. + * participant: + * 'projects/my-project/locations/my-location/conversations/my-conversation/participants/my-participant', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "eventInput": {}, + * // "messageSendTime": "my_messageSendTime", + * // "queryParams": {}, + * // "replyAudioConfig": {}, + * // "requestId": "my_requestId", + * // "textInput": {} + * // } + * }, + * } + * ); * console.log(res.data); * * // Example response * // { - * // "lifespanCount": 0, - * // "name": "my_name", - * // "parameters": {} + * // "automatedAgentReply": {}, + * // "dtmfParameters": {}, + * // "endUserSuggestionResults": [], + * // "humanAgentSuggestionResults": [], + * // "message": {}, + * // "replyAudio": {}, + * // "replyText": "my_replyText" * // } * } * @@ -25464,57 +34636,57 @@ export namespace dialogflow_v2beta1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - get( - params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Get, + analyzeContent( + params: Params$Resource$Projects$Locations$Conversations$Participants$Analyzecontent, options: StreamMethodOptions ): GaxiosPromise; - get( - params?: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Get, + analyzeContent( + params?: Params$Resource$Projects$Locations$Conversations$Participants$Analyzecontent, options?: MethodOptions - ): GaxiosPromise; - get( - params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Get, + ): GaxiosPromise; + analyzeContent( + params: Params$Resource$Projects$Locations$Conversations$Participants$Analyzecontent, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - get( - params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Get, + analyzeContent( + params: Params$Resource$Projects$Locations$Conversations$Participants$Analyzecontent, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - get( - params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Get, - callback: BodyResponseCallback + analyzeContent( + params: Params$Resource$Projects$Locations$Conversations$Participants$Analyzecontent, + callback: BodyResponseCallback ): void; - get( - callback: BodyResponseCallback + analyzeContent( + callback: BodyResponseCallback ): void; - get( + analyzeContent( paramsOrCallback?: - | Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Get - | BodyResponseCallback + | Params$Resource$Projects$Locations$Conversations$Participants$Analyzecontent + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Get; + {}) as Params$Resource$Projects$Locations$Conversations$Participants$Analyzecontent; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Get; + params = {} as Params$Resource$Projects$Locations$Conversations$Participants$Analyzecontent; options = {}; } @@ -25527,30 +34699,33 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), - method: 'GET', + url: (rootUrl + '/v2beta1/{+participant}:analyzeContent').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', }, options ), params, - requiredParams: ['name'], - pathParams: ['name'], + requiredParams: ['participant'], + pathParams: ['participant'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest( + return createAPIRequest( parameters ); } } /** - * Returns the list of all contexts in the specified session. + * Creates a new participant in a conversation. * @example * ```js * // Before running the sample: @@ -25578,21 +34753,30 @@ export namespace dialogflow_v2beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.locations.agent.sessions.contexts.list({ - * // Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. - * pageSize: 'placeholder-value', - * // Optional. The next_page_token value returned from a previous list request. - * pageToken: 'placeholder-value', - * // Required. The session to list all contexts from. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. - * parent: - * 'projects/my-project/locations/my-location/agent/sessions/my-session', - * }); + * const res = await dialogflow.projects.locations.conversations.participants.create( + * { + * // Required. Resource identifier of the conversation adding the participant. Format: `projects//locations//conversations/`. + * parent: + * 'projects/my-project/locations/my-location/conversations/my-conversation', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "name": "my_name", + * // "obfuscatedExternalUserId": "my_obfuscatedExternalUserId", + * // "role": "my_role" + * // } + * }, + * } + * ); * console.log(res.data); * * // Example response * // { - * // "contexts": [], - * // "nextPageToken": "my_nextPageToken" + * // "name": "my_name", + * // "obfuscatedExternalUserId": "my_obfuscatedExternalUserId", + * // "role": "my_role" * // } * } * @@ -25608,57 +34792,57 @@ export namespace dialogflow_v2beta1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - list( - params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$List, + create( + params: Params$Resource$Projects$Locations$Conversations$Participants$Create, options: StreamMethodOptions ): GaxiosPromise; - list( - params?: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$List, + create( + params?: Params$Resource$Projects$Locations$Conversations$Participants$Create, options?: MethodOptions - ): GaxiosPromise; - list( - params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$List, + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Locations$Conversations$Participants$Create, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$List, + create( + params: Params$Resource$Projects$Locations$Conversations$Participants$Create, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$List, - callback: BodyResponseCallback + create( + params: Params$Resource$Projects$Locations$Conversations$Participants$Create, + callback: BodyResponseCallback ): void; - list( - callback: BodyResponseCallback + create( + callback: BodyResponseCallback ): void; - list( + create( paramsOrCallback?: - | Params$Resource$Projects$Locations$Agent$Sessions$Contexts$List - | BodyResponseCallback + | Params$Resource$Projects$Locations$Conversations$Participants$Create + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Locations$Agent$Sessions$Contexts$List; + {}) as Params$Resource$Projects$Locations$Conversations$Participants$Create; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Locations$Agent$Sessions$Contexts$List; + params = {} as Params$Resource$Projects$Locations$Conversations$Participants$Create; options = {}; } @@ -25671,11 +34855,11 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/contexts').replace( + url: (rootUrl + '/v2beta1/{+parent}/participants').replace( /([^:]\/)\/+/g, '$1' ), - method: 'GET', + method: 'POST', }, options ), @@ -25685,19 +34869,19 @@ export namespace dialogflow_v2beta1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest( + return createAPIRequest( parameters ); } } /** - * Updates the specified context. + * Retrieves a conversation participant. * @example * ```js * // Before running the sample: @@ -25725,32 +34909,20 @@ export namespace dialogflow_v2beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.locations.agent.sessions.contexts.patch( + * const res = await dialogflow.projects.locations.conversations.participants.get( * { - * // Required. The unique identifier of the context. Supported formats: - `projects//agent/sessions//contexts/`, - `projects//locations//agent/sessions//contexts/`, - `projects//agent/environments//users//sessions//contexts/`, - `projects//locations//agent/environments//users//sessions//contexts/`, The `Context ID` is always converted to lowercase, may only contain characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. The following context names are reserved for internal use by Dialogflow. You should not use these contexts or create contexts with these names: * `__system_counters__` * `*_id_dialog_context` * `*_dialog_params_size` + * // Required. The name of the participant. Format: `projects//locations//conversations//participants/`. * name: - * 'projects/my-project/locations/my-location/agent/sessions/my-session/contexts/my-context', - * // Optional. The mask to control which fields get updated. - * updateMask: 'placeholder-value', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "lifespanCount": 0, - * // "name": "my_name", - * // "parameters": {} - * // } - * }, + * 'projects/my-project/locations/my-location/conversations/my-conversation/participants/my-participant', * } * ); * console.log(res.data); * * // Example response * // { - * // "lifespanCount": 0, * // "name": "my_name", - * // "parameters": {} + * // "obfuscatedExternalUserId": "my_obfuscatedExternalUserId", + * // "role": "my_role" * // } * } * @@ -25766,57 +34938,57 @@ export namespace dialogflow_v2beta1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - patch( - params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Patch, + get( + params: Params$Resource$Projects$Locations$Conversations$Participants$Get, options: StreamMethodOptions ): GaxiosPromise; - patch( - params?: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Patch, + get( + params?: Params$Resource$Projects$Locations$Conversations$Participants$Get, options?: MethodOptions - ): GaxiosPromise; - patch( - params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Patch, + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Conversations$Participants$Get, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - patch( - params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Patch, + get( + params: Params$Resource$Projects$Locations$Conversations$Participants$Get, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - patch( - params: Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Patch, - callback: BodyResponseCallback + get( + params: Params$Resource$Projects$Locations$Conversations$Participants$Get, + callback: BodyResponseCallback ): void; - patch( - callback: BodyResponseCallback + get( + callback: BodyResponseCallback ): void; - patch( + get( paramsOrCallback?: - | Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Patch - | BodyResponseCallback + | Params$Resource$Projects$Locations$Conversations$Participants$Get + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Patch; + {}) as Params$Resource$Projects$Locations$Conversations$Participants$Get; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Patch; + params = {} as Params$Resource$Projects$Locations$Conversations$Participants$Get; options = {}; } @@ -25830,7 +35002,7 @@ export namespace dialogflow_v2beta1 { options: Object.assign( { url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), - method: 'PATCH', + method: 'GET', }, options ), @@ -25840,84 +35012,19 @@ export namespace dialogflow_v2beta1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); - } else { - return createAPIRequest( - parameters - ); - } - } - } - - export interface Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Create - extends StandardParameters { - /** - * Required. The session to create a context for. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. - */ - parent?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$GoogleCloudDialogflowV2beta1Context; - } - export interface Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Delete - extends StandardParameters { - /** - * Required. The name of the context to delete. Supported formats: - `projects//agent/sessions//contexts/`, - `projects//locations//agent/sessions//contexts/`, - `projects//agent/environments//users//sessions//contexts/`, - `projects//locations//agent/environments//users//sessions//contexts/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. - */ - name?: string; - } - export interface Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Get - extends StandardParameters { - /** - * Required. The name of the context. Supported formats: - `projects//agent/sessions//contexts/`, - `projects//locations//agent/sessions//contexts/`, - `projects//agent/environments//users//sessions//contexts/`, - `projects//locations//agent/environments//users//sessions//contexts/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. - */ - name?: string; - } - export interface Params$Resource$Projects$Locations$Agent$Sessions$Contexts$List - extends StandardParameters { - /** - * Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. - */ - pageSize?: number; - /** - * Optional. The next_page_token value returned from a previous list request. - */ - pageToken?: string; - /** - * Required. The session to list all contexts from. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. - */ - parent?: string; - } - export interface Params$Resource$Projects$Locations$Agent$Sessions$Contexts$Patch - extends StandardParameters { - /** - * Required. The unique identifier of the context. Supported formats: - `projects//agent/sessions//contexts/`, - `projects//locations//agent/sessions//contexts/`, - `projects//agent/environments//users//sessions//contexts/`, - `projects//locations//agent/environments//users//sessions//contexts/`, The `Context ID` is always converted to lowercase, may only contain characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. The following context names are reserved for internal use by Dialogflow. You should not use these contexts or create contexts with these names: * `__system_counters__` * `*_id_dialog_context` * `*_dialog_params_size` - */ - name?: string; - /** - * Optional. The mask to control which fields get updated. - */ - updateMask?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$GoogleCloudDialogflowV2beta1Context; - } - - export class Resource$Projects$Locations$Agent$Sessions$Entitytypes { - context: APIRequestContext; - constructor(context: APIRequestContext) { - this.context = context; + } else { + return createAPIRequest( + parameters + ); + } } /** - * Creates a session entity type. If the specified session entity type already exists, overrides the session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration. + * Returns the list of all participants in the specified conversation. * @example * ```js * // Before running the sample: @@ -25945,30 +35052,23 @@ export namespace dialogflow_v2beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.locations.agent.sessions.entityTypes.create( + * const res = await dialogflow.projects.locations.conversations.participants.list( * { - * // Required. The session to create a session entity type for. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * // Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. + * pageSize: 'placeholder-value', + * // Optional. The next_page_token value returned from a previous list request. + * pageToken: 'placeholder-value', + * // Required. The conversation to list all participants from. Format: `projects//locations//conversations/`. * parent: - * 'projects/my-project/locations/my-location/agent/sessions/my-session', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "entities": [], - * // "entityOverrideMode": "my_entityOverrideMode", - * // "name": "my_name" - * // } - * }, + * 'projects/my-project/locations/my-location/conversations/my-conversation', * } * ); * console.log(res.data); * * // Example response * // { - * // "entities": [], - * // "entityOverrideMode": "my_entityOverrideMode", - * // "name": "my_name" + * // "nextPageToken": "my_nextPageToken", + * // "participants": [] * // } * } * @@ -25984,57 +35084,57 @@ export namespace dialogflow_v2beta1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - create( - params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Create, + list( + params: Params$Resource$Projects$Locations$Conversations$Participants$List, options: StreamMethodOptions ): GaxiosPromise; - create( - params?: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Create, + list( + params?: Params$Resource$Projects$Locations$Conversations$Participants$List, options?: MethodOptions - ): GaxiosPromise; - create( - params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Create, + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$Conversations$Participants$List, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - create( - params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Create, + list( + params: Params$Resource$Projects$Locations$Conversations$Participants$List, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - create( - params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Create, - callback: BodyResponseCallback + list( + params: Params$Resource$Projects$Locations$Conversations$Participants$List, + callback: BodyResponseCallback ): void; - create( - callback: BodyResponseCallback + list( + callback: BodyResponseCallback ): void; - create( + list( paramsOrCallback?: - | Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Create - | BodyResponseCallback + | Params$Resource$Projects$Locations$Conversations$Participants$List + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Create; + {}) as Params$Resource$Projects$Locations$Conversations$Participants$List; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Create; + params = {} as Params$Resource$Projects$Locations$Conversations$Participants$List; options = {}; } @@ -26047,11 +35147,11 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/entityTypes').replace( + url: (rootUrl + '/v2beta1/{+parent}/participants').replace( /([^:]\/)\/+/g, '$1' ), - method: 'POST', + method: 'GET', }, options ), @@ -26061,19 +35161,19 @@ export namespace dialogflow_v2beta1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest( + return createAPIRequest( parameters ); } } /** - * Deletes the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration. + * Updates the specified participant. * @example * ```js * // Before running the sample: @@ -26101,17 +35201,33 @@ export namespace dialogflow_v2beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.locations.agent.sessions.entityTypes.delete( + * const res = await dialogflow.projects.locations.conversations.participants.patch( * { - * // Required. The name of the entity type to delete. Supported formats: - `projects//agent/sessions//entityTypes/` - `projects//locations//agent/sessions//entityTypes/` - `projects//agent/environments//users//sessions//entityTypes/` - `projects//locations//agent/environments/ /users//sessions//entityTypes/` If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * // Optional. The unique identifier of this participant. Format: `projects//locations//conversations//participants/`. * name: - * 'projects/my-project/locations/my-location/agent/sessions/my-session/entityTypes/my-entityType', + * 'projects/my-project/locations/my-location/conversations/my-conversation/participants/my-participant', + * // Required. The mask to specify which fields to update. + * updateMask: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "name": "my_name", + * // "obfuscatedExternalUserId": "my_obfuscatedExternalUserId", + * // "role": "my_role" + * // } + * }, * } * ); * console.log(res.data); * * // Example response - * // {} + * // { + * // "name": "my_name", + * // "obfuscatedExternalUserId": "my_obfuscatedExternalUserId", + * // "role": "my_role" + * // } * } * * main().catch(e => { @@ -26126,53 +35242,57 @@ export namespace dialogflow_v2beta1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - delete( - params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Delete, + patch( + params: Params$Resource$Projects$Locations$Conversations$Participants$Patch, options: StreamMethodOptions ): GaxiosPromise; - delete( - params?: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Delete, + patch( + params?: Params$Resource$Projects$Locations$Conversations$Participants$Patch, options?: MethodOptions - ): GaxiosPromise; - delete( - params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Delete, + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Locations$Conversations$Participants$Patch, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - delete( - params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Delete, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + patch( + params: Params$Resource$Projects$Locations$Conversations$Participants$Patch, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - delete( - params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Delete, - callback: BodyResponseCallback + patch( + params: Params$Resource$Projects$Locations$Conversations$Participants$Patch, + callback: BodyResponseCallback ): void; - delete(callback: BodyResponseCallback): void; - delete( + patch( + callback: BodyResponseCallback + ): void; + patch( paramsOrCallback?: - | Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Delete - | BodyResponseCallback + | Params$Resource$Projects$Locations$Conversations$Participants$Patch + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Delete; + {}) as Params$Resource$Projects$Locations$Conversations$Participants$Patch; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Delete; + params = {} as Params$Resource$Projects$Locations$Conversations$Participants$Patch; options = {}; } @@ -26186,7 +35306,7 @@ export namespace dialogflow_v2beta1 { options: Object.assign( { url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), - method: 'DELETE', + method: 'PATCH', }, options ), @@ -26196,17 +35316,89 @@ export namespace dialogflow_v2beta1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest( + parameters + ); } } + } + + export interface Params$Resource$Projects$Locations$Conversations$Participants$Analyzecontent + extends StandardParameters { + /** + * Required. The name of the participant this text comes from. Format: `projects//locations//conversations//participants/`. + */ + participant?: string; /** - * Retrieves the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration. + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1AnalyzeContentRequest; + } + export interface Params$Resource$Projects$Locations$Conversations$Participants$Create + extends StandardParameters { + /** + * Required. Resource identifier of the conversation adding the participant. Format: `projects//locations//conversations/`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1Participant; + } + export interface Params$Resource$Projects$Locations$Conversations$Participants$Get + extends StandardParameters { + /** + * Required. The name of the participant. Format: `projects//locations//conversations//participants/`. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Conversations$Participants$List + extends StandardParameters { + /** + * Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. + */ + pageSize?: number; + /** + * Optional. The next_page_token value returned from a previous list request. + */ + pageToken?: string; + /** + * Required. The conversation to list all participants from. Format: `projects//locations//conversations/`. + */ + parent?: string; + } + export interface Params$Resource$Projects$Locations$Conversations$Participants$Patch + extends StandardParameters { + /** + * Optional. The unique identifier of this participant. Format: `projects//locations//conversations//participants/`. + */ + name?: string; + /** + * Required. The mask to specify which fields to update. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1Participant; + } + + export class Resource$Projects$Locations$Conversations$Participants$Suggestions { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Gets suggested articles for a participant based on specific historical messages. Note that ListSuggestions will only list the auto-generated suggestions, while CompileSuggestion will try to compile suggestion based on the provided conversation context in the real time. * @example * ```js * // Before running the sample: @@ -26234,20 +35426,29 @@ export namespace dialogflow_v2beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.locations.agent.sessions.entityTypes.get( + * const res = await dialogflow.projects.locations.conversations.participants.suggestions.suggestArticles( * { - * // Required. The name of the session entity type. Supported formats: - `projects//agent/sessions//entityTypes/` - `projects//locations//agent/sessions//entityTypes/` - `projects//agent/environments//users//sessions//entityTypes/` - `projects//locations//agent/environments/ /users//sessions//entityTypes/` If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. - * name: - * 'projects/my-project/locations/my-location/agent/sessions/my-session/entityTypes/my-entityType', + * // Required. The name of the participant to fetch suggestion for. Format: `projects//locations//conversations//participants/`. + * parent: + * 'projects/my-project/locations/my-location/conversations/my-conversation/participants/my-participant', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "contextSize": 0, + * // "latestMessage": "my_latestMessage" + * // } + * }, * } * ); * console.log(res.data); * * // Example response * // { - * // "entities": [], - * // "entityOverrideMode": "my_entityOverrideMode", - * // "name": "my_name" + * // "articleAnswers": [], + * // "contextSize": 0, + * // "latestMessage": "my_latestMessage" * // } * } * @@ -26263,57 +35464,57 @@ export namespace dialogflow_v2beta1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - get( - params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Get, + suggestArticles( + params: Params$Resource$Projects$Locations$Conversations$Participants$Suggestions$Suggestarticles, options: StreamMethodOptions ): GaxiosPromise; - get( - params?: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Get, + suggestArticles( + params?: Params$Resource$Projects$Locations$Conversations$Participants$Suggestions$Suggestarticles, options?: MethodOptions - ): GaxiosPromise; - get( - params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Get, + ): GaxiosPromise; + suggestArticles( + params: Params$Resource$Projects$Locations$Conversations$Participants$Suggestions$Suggestarticles, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - get( - params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Get, + suggestArticles( + params: Params$Resource$Projects$Locations$Conversations$Participants$Suggestions$Suggestarticles, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - get( - params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Get, - callback: BodyResponseCallback + suggestArticles( + params: Params$Resource$Projects$Locations$Conversations$Participants$Suggestions$Suggestarticles, + callback: BodyResponseCallback ): void; - get( - callback: BodyResponseCallback + suggestArticles( + callback: BodyResponseCallback ): void; - get( + suggestArticles( paramsOrCallback?: - | Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Get - | BodyResponseCallback + | Params$Resource$Projects$Locations$Conversations$Participants$Suggestions$Suggestarticles + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Get; + {}) as Params$Resource$Projects$Locations$Conversations$Participants$Suggestions$Suggestarticles; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Get; + params = {} as Params$Resource$Projects$Locations$Conversations$Participants$Suggestions$Suggestarticles; options = {}; } @@ -26326,30 +35527,32 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), - method: 'GET', + url: ( + rootUrl + '/v2beta1/{+parent}/suggestions:suggestArticles' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', }, options ), params, - requiredParams: ['name'], - pathParams: ['name'], + requiredParams: ['parent'], + pathParams: ['parent'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest( + return createAPIRequest( parameters ); } } /** - * Returns the list of all session entity types in the specified session. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration. + * Gets suggested faq answers for a participant based on specific historical messages. * @example * ```js * // Before running the sample: @@ -26377,23 +35580,29 @@ export namespace dialogflow_v2beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.locations.agent.sessions.entityTypes.list( + * const res = await dialogflow.projects.locations.conversations.participants.suggestions.suggestFaqAnswers( * { - * // Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. - * pageSize: 'placeholder-value', - * // Optional. The next_page_token value returned from a previous list request. - * pageToken: 'placeholder-value', - * // Required. The session to list all session entity types from. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * // Required. The name of the participant to fetch suggestion for. Format: `projects//locations//conversations//participants/`. * parent: - * 'projects/my-project/locations/my-location/agent/sessions/my-session', + * 'projects/my-project/locations/my-location/conversations/my-conversation/participants/my-participant', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "contextSize": 0, + * // "latestMessage": "my_latestMessage" + * // } + * }, * } * ); * console.log(res.data); * * // Example response * // { - * // "nextPageToken": "my_nextPageToken", - * // "sessionEntityTypes": [] + * // "contextSize": 0, + * // "faqAnswers": [], + * // "latestMessage": "my_latestMessage" * // } * } * @@ -26409,57 +35618,57 @@ export namespace dialogflow_v2beta1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - list( - params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$List, + suggestFaqAnswers( + params: Params$Resource$Projects$Locations$Conversations$Participants$Suggestions$Suggestfaqanswers, options: StreamMethodOptions ): GaxiosPromise; - list( - params?: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$List, + suggestFaqAnswers( + params?: Params$Resource$Projects$Locations$Conversations$Participants$Suggestions$Suggestfaqanswers, options?: MethodOptions - ): GaxiosPromise; - list( - params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$List, + ): GaxiosPromise; + suggestFaqAnswers( + params: Params$Resource$Projects$Locations$Conversations$Participants$Suggestions$Suggestfaqanswers, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$List, + suggestFaqAnswers( + params: Params$Resource$Projects$Locations$Conversations$Participants$Suggestions$Suggestfaqanswers, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$List, - callback: BodyResponseCallback + suggestFaqAnswers( + params: Params$Resource$Projects$Locations$Conversations$Participants$Suggestions$Suggestfaqanswers, + callback: BodyResponseCallback ): void; - list( - callback: BodyResponseCallback + suggestFaqAnswers( + callback: BodyResponseCallback ): void; - list( + suggestFaqAnswers( paramsOrCallback?: - | Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$List - | BodyResponseCallback + | Params$Resource$Projects$Locations$Conversations$Participants$Suggestions$Suggestfaqanswers + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$List; + {}) as Params$Resource$Projects$Locations$Conversations$Participants$Suggestions$Suggestfaqanswers; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$List; + params = {} as Params$Resource$Projects$Locations$Conversations$Participants$Suggestions$Suggestfaqanswers; options = {}; } @@ -26472,11 +35681,10 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+parent}/entityTypes').replace( - /([^:]\/)\/+/g, - '$1' - ), - method: 'GET', + url: ( + rootUrl + '/v2beta1/{+parent}/suggestions:suggestFaqAnswers' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', }, options ), @@ -26486,19 +35694,19 @@ export namespace dialogflow_v2beta1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest( + return createAPIRequest( parameters ); } } /** - * Updates the specified session entity type. This method doesn't work with Google Assistant integration. Contact Dialogflow support if you need to use session entities with Google Assistant integration. + * Gets smart replies for a participant based on specific historical messages. * @example * ```js * // Before running the sample: @@ -26526,21 +35734,19 @@ export namespace dialogflow_v2beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await dialogflow.projects.locations.agent.sessions.entityTypes.patch( + * const res = await dialogflow.projects.locations.conversations.participants.suggestions.suggestSmartReplies( * { - * // Required. The unique identifier of this session entity type. Supported formats: - `projects//agent/sessions//entityTypes/` - `projects//locations//agent/sessions//entityTypes/` - `projects//agent/environments//users//sessions//entityTypes/` - `projects//locations//agent/environments/ /users//sessions//entityTypes/` If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. `` must be the display name of an existing entity type in the same agent that will be overridden or supplemented. - * name: - * 'projects/my-project/locations/my-location/agent/sessions/my-session/entityTypes/my-entityType', - * // Optional. The mask to control which fields get updated. - * updateMask: 'placeholder-value', + * // Required. The name of the participant to fetch suggestion for. Format: `projects//locations//conversations//participants/`. + * parent: + * 'projects/my-project/locations/my-location/conversations/my-conversation/participants/my-participant', * * // Request body metadata * requestBody: { * // request body parameters * // { - * // "entities": [], - * // "entityOverrideMode": "my_entityOverrideMode", - * // "name": "my_name" + * // "contextSize": 0, + * // "currentTextInput": {}, + * // "latestMessage": "my_latestMessage" * // } * }, * } @@ -26549,9 +35755,9 @@ export namespace dialogflow_v2beta1 { * * // Example response * // { - * // "entities": [], - * // "entityOverrideMode": "my_entityOverrideMode", - * // "name": "my_name" + * // "contextSize": 0, + * // "latestMessage": "my_latestMessage", + * // "smartReplyAnswers": [] * // } * } * @@ -26567,57 +35773,57 @@ export namespace dialogflow_v2beta1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - patch( - params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Patch, + suggestSmartReplies( + params: Params$Resource$Projects$Locations$Conversations$Participants$Suggestions$Suggestsmartreplies, options: StreamMethodOptions ): GaxiosPromise; - patch( - params?: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Patch, + suggestSmartReplies( + params?: Params$Resource$Projects$Locations$Conversations$Participants$Suggestions$Suggestsmartreplies, options?: MethodOptions - ): GaxiosPromise; - patch( - params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Patch, + ): GaxiosPromise; + suggestSmartReplies( + params: Params$Resource$Projects$Locations$Conversations$Participants$Suggestions$Suggestsmartreplies, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - patch( - params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Patch, + suggestSmartReplies( + params: Params$Resource$Projects$Locations$Conversations$Participants$Suggestions$Suggestsmartreplies, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - patch( - params: Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Patch, - callback: BodyResponseCallback + suggestSmartReplies( + params: Params$Resource$Projects$Locations$Conversations$Participants$Suggestions$Suggestsmartreplies, + callback: BodyResponseCallback ): void; - patch( - callback: BodyResponseCallback + suggestSmartReplies( + callback: BodyResponseCallback ): void; - patch( + suggestSmartReplies( paramsOrCallback?: - | Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Patch - | BodyResponseCallback + | Params$Resource$Projects$Locations$Conversations$Participants$Suggestions$Suggestsmartreplies + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Patch; + {}) as Params$Resource$Projects$Locations$Conversations$Participants$Suggestions$Suggestsmartreplies; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Patch; + params = {} as Params$Resource$Projects$Locations$Conversations$Participants$Suggestions$Suggestsmartreplies; options = {}; } @@ -26630,85 +35836,66 @@ export namespace dialogflow_v2beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v2beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), - method: 'PATCH', + url: ( + rootUrl + '/v2beta1/{+parent}/suggestions:suggestSmartReplies' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', }, options ), params, - requiredParams: ['name'], - pathParams: ['name'], + requiredParams: ['parent'], + pathParams: ['parent'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest( + return createAPIRequest( parameters ); } } } - export interface Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Create + export interface Params$Resource$Projects$Locations$Conversations$Participants$Suggestions$Suggestarticles extends StandardParameters { /** - * Required. The session to create a session entity type for. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * Required. The name of the participant to fetch suggestion for. Format: `projects//locations//conversations//participants/`. */ parent?: string; /** * Request body metadata */ - requestBody?: Schema$GoogleCloudDialogflowV2beta1SessionEntityType; + requestBody?: Schema$GoogleCloudDialogflowV2beta1SuggestArticlesRequest; } - export interface Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Delete + export interface Params$Resource$Projects$Locations$Conversations$Participants$Suggestions$Suggestfaqanswers extends StandardParameters { /** - * Required. The name of the entity type to delete. Supported formats: - `projects//agent/sessions//entityTypes/` - `projects//locations//agent/sessions//entityTypes/` - `projects//agent/environments//users//sessions//entityTypes/` - `projects//locations//agent/environments/ /users//sessions//entityTypes/` If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * Required. The name of the participant to fetch suggestion for. Format: `projects//locations//conversations//participants/`. */ - name?: string; - } - export interface Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Get - extends StandardParameters { + parent?: string; + /** - * Required. The name of the session entity type. Supported formats: - `projects//agent/sessions//entityTypes/` - `projects//locations//agent/sessions//entityTypes/` - `projects//agent/environments//users//sessions//entityTypes/` - `projects//locations//agent/environments/ /users//sessions//entityTypes/` If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * Request body metadata */ - name?: string; + requestBody?: Schema$GoogleCloudDialogflowV2beta1SuggestFaqAnswersRequest; } - export interface Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$List + export interface Params$Resource$Projects$Locations$Conversations$Participants$Suggestions$Suggestsmartreplies extends StandardParameters { /** - * Optional. The maximum number of items to return in a single page. By default 100 and at most 1000. - */ - pageSize?: number; - /** - * Optional. The next_page_token value returned from a previous list request. - */ - pageToken?: string; - /** - * Required. The session to list all session entity types from. Supported formats: - `projects//agent/sessions/, - `projects//locations//agent/sessions/`, - `projects//agent/environments//users//sessions/`, - `projects//locations//agent/environments//users//sessions/`, If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. + * Required. The name of the participant to fetch suggestion for. Format: `projects//locations//conversations//participants/`. */ parent?: string; - } - export interface Params$Resource$Projects$Locations$Agent$Sessions$Entitytypes$Patch - extends StandardParameters { - /** - * Required. The unique identifier of this session entity type. Supported formats: - `projects//agent/sessions//entityTypes/` - `projects//locations//agent/sessions//entityTypes/` - `projects//agent/environments//users//sessions//entityTypes/` - `projects//locations//agent/environments/ /users//sessions//entityTypes/` If `Location ID` is not specified we assume default 'us' location. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. `` must be the display name of an existing entity type in the same agent that will be overridden or supplemented. - */ - name?: string; - /** - * Optional. The mask to control which fields get updated. - */ - updateMask?: string; /** * Request body metadata */ - requestBody?: Schema$GoogleCloudDialogflowV2beta1SessionEntityType; + requestBody?: Schema$GoogleCloudDialogflowV2beta1SuggestSmartRepliesRequest; } export class Resource$Projects$Locations$Knowledgebases { @@ -27569,6 +36756,7 @@ export namespace dialogflow_v2beta1 { * // "enableAutoReload": false, * // "knowledgeTypes": [], * // "latestReloadStatus": {}, + * // "metadata": {}, * // "mimeType": "my_mimeType", * // "name": "my_name", * // "rawContent": "my_rawContent" @@ -27873,6 +37061,7 @@ export namespace dialogflow_v2beta1 { * // "enableAutoReload": false, * // "knowledgeTypes": [], * // "latestReloadStatus": {}, + * // "metadata": {}, * // "mimeType": "my_mimeType", * // "name": "my_name", * // "rawContent": "my_rawContent" @@ -27976,6 +37165,162 @@ export namespace dialogflow_v2beta1 { } } + /** + * Create documents by importing data from external sources. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v2beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.knowledgeBases.documents.import( + * { + * // Required. The knowledge base to import documents into. Format: `projects//locations//knowledgeBases/`. + * parent: + * 'projects/my-project/locations/my-location/knowledgeBases/my-knowledgeBase', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "documentTemplate": {}, + * // "gcsSource": {}, + * // "importGcsCustomMetadata": false + * // } + * }, + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + import( + params: Params$Resource$Projects$Locations$Knowledgebases$Documents$Import, + options: StreamMethodOptions + ): GaxiosPromise; + import( + params?: Params$Resource$Projects$Locations$Knowledgebases$Documents$Import, + options?: MethodOptions + ): GaxiosPromise; + import( + params: Params$Resource$Projects$Locations$Knowledgebases$Documents$Import, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + import( + params: Params$Resource$Projects$Locations$Knowledgebases$Documents$Import, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + import( + params: Params$Resource$Projects$Locations$Knowledgebases$Documents$Import, + callback: BodyResponseCallback + ): void; + import( + callback: BodyResponseCallback + ): void; + import( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Knowledgebases$Documents$Import + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Knowledgebases$Documents$Import; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Knowledgebases$Documents$Import; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2beta1/{+parent}/documents:import').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + /** * Returns the list of all documents of the knowledge base. Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`. * @example @@ -28174,6 +37519,7 @@ export namespace dialogflow_v2beta1 { * // "enableAutoReload": false, * // "knowledgeTypes": [], * // "latestReloadStatus": {}, + * // "metadata": {}, * // "mimeType": "my_mimeType", * // "name": "my_name", * // "rawContent": "my_rawContent" @@ -28474,6 +37820,18 @@ export namespace dialogflow_v2beta1 { */ name?: string; } + export interface Params$Resource$Projects$Locations$Knowledgebases$Documents$Import + extends StandardParameters { + /** + * Required. The knowledge base to import documents into. Format: `projects//locations//knowledgeBases/`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudDialogflowV2beta1ImportDocumentsRequest; + } export interface Params$Resource$Projects$Locations$Knowledgebases$Documents$List extends StandardParameters { /** diff --git a/src/apis/dialogflow/v3.ts b/src/apis/dialogflow/v3.ts index 3bf1ef2f677..21fa80e01fb 100644 --- a/src/apis/dialogflow/v3.ts +++ b/src/apis/dialogflow/v3.ts @@ -1179,7 +1179,7 @@ export namespace dialogflow_v3 { genericMetadata?: Schema$GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata; } /** - * The request message for a webhook call. + * The request message for a webhook call. The request is sent as a JSON object and the field names will be presented in camel cases. */ export interface Schema$GoogleCloudDialogflowCxV3beta1WebhookRequest { /** @@ -1631,7 +1631,7 @@ export namespace dialogflow_v3 { */ endTime?: string | null; /** - * Maximum number of days to run the experiment. + * Maximum number of days to run the experiment/rollout. If auto-rollout is not enabled, default value and maximum will be 30 days. If auto-rollout is enabled, default value and maximum will be 6 days. */ experimentLength?: string | null; /** @@ -2493,7 +2493,7 @@ export namespace dialogflow_v3 { */ text?: string | null; /** - * If natural language speech audio was provided as input, this field will contain the trascript for the audio. + * If natural language speech audio was provided as input, this field will contain the transcript for the audio. */ transcript?: string | null; /** @@ -2501,7 +2501,7 @@ export namespace dialogflow_v3 { */ triggerEvent?: string | null; /** - * If an intent was provided as input, this field will contain a copy of the intent identifier. + * If an intent was provided as input, this field will contain a copy of the intent identifier. Format: `projects//locations//agents//intents/`. */ triggerIntent?: string | null; } @@ -2730,7 +2730,7 @@ export namespace dialogflow_v3 { */ text?: string | null; /** - * If natural language speech audio was provided as input, this field will contain the trascript for the audio. + * If natural language speech audio was provided as input, this field will contain the transcript for the audio. */ transcript?: string | null; /** @@ -2738,7 +2738,7 @@ export namespace dialogflow_v3 { */ triggerEvent?: string | null; /** - * If an intent was provided as input, this field will contain a copy of the intent identifier. + * If an intent was provided as input, this field will contain a copy of the intent identifier. Format: `projects//locations//agents//intents/`. */ triggerIntent?: string | null; /** @@ -2912,6 +2912,10 @@ export namespace dialogflow_v3 { * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI to restore agent from. The format of this URI must be `gs:///`. */ agentUri?: string | null; + /** + * Agent restore mode. If not specified, `KEEP` is assumed. + */ + restoreOption?: string | null; } /** * Metadata returned for the TestCases.RunTestCase long running operation. @@ -3508,7 +3512,7 @@ export namespace dialogflow_v3 { username?: string | null; } /** - * The request message for a webhook call. + * The request message for a webhook call. The request is sent as a JSON object and the field names will be presented in camel cases. */ export interface Schema$GoogleCloudDialogflowCxV3WebhookRequest { /** @@ -3663,6 +3667,35 @@ export namespace dialogflow_v3 { */ text?: string | null; } + /** + * Represents article answer. + */ + export interface Schema$GoogleCloudDialogflowV2ArticleAnswer { + /** + * The name of answer record, in the format of "projects//locations//answerRecords/" + */ + answerRecord?: string | null; + /** + * Article match confidence. The system's confidence score that this article is a good match for this conversation, as a value from 0.0 (completely uncertain) to 1.0 (completely certain). + */ + confidence?: number | null; + /** + * A map that contains metadata about the answer and the document from which it originates. + */ + metadata?: {[key: string]: string} | null; + /** + * Article snippets. + */ + snippets?: string[] | null; + /** + * The article title. + */ + title?: string | null; + /** + * The article URI. + */ + uri?: string | null; + } /** * The response message for EntityTypes.BatchUpdateEntityTypes. */ @@ -3681,6 +3714,48 @@ export namespace dialogflow_v3 { */ intents?: Schema$GoogleCloudDialogflowV2Intent[]; } + /** + * Represents a part of a message possibly annotated with an entity. The part can be an entity or purely a part of the message between two entities or message start/end. + */ + export interface Schema$GoogleCloudDialogflowV2beta1AnnotatedMessagePart { + /** + * Optional. The [Dialogflow system entity type](https://cloud.google.com/dialogflow/docs/reference/system-entities) of this message part. If this is empty, Dialogflow could not annotate the phrase part with a system entity. + */ + entityType?: string | null; + /** + * Optional. The [Dialogflow system entity formatted value ](https://cloud.google.com/dialogflow/docs/reference/system-entities) of this message part. For example for a system entity of type `@sys.unit-currency`, this may contain: { "amount": 5, "currency": "USD" \} + */ + formattedValue?: any | null; + /** + * Required. A part of a message possibly annotated with an entity. + */ + text?: string | null; + } + /** + * Represents article answer. + */ + export interface Schema$GoogleCloudDialogflowV2beta1ArticleAnswer { + /** + * The name of answer record, in the format of "projects//locations//answerRecords/" + */ + answerRecord?: string | null; + /** + * A map that contains metadata about the answer and the document from which it originates. + */ + metadata?: {[key: string]: string} | null; + /** + * Output only. Article snippets. + */ + snippets?: string[] | null; + /** + * The article title. + */ + title?: string | null; + /** + * The article URI. + */ + uri?: string | null; + } /** * The response message for EntityTypes.BatchUpdateEntityTypes. */ @@ -3716,6 +3791,27 @@ export namespace dialogflow_v3 { */ parameters?: {[key: string]: any} | null; } + /** + * Represents a notification sent to Pub/Sub subscribers for conversation lifecycle events. + */ + export interface Schema$GoogleCloudDialogflowV2beta1ConversationEvent { + /** + * Required. The unique identifier of the conversation this notification refers to. Format: `projects//conversations/`. + */ + conversation?: string | null; + /** + * Optional. More detailed information about an error. Only set for type UNRECOVERABLE_ERROR_IN_PHONE_CALL. + */ + errorStatus?: Schema$GoogleRpcStatus; + /** + * Payload of NEW_MESSAGE event. + */ + newMessagePayload?: Schema$GoogleCloudDialogflowV2beta1Message; + /** + * Required. The type of the event that this notification refers to. + */ + type?: string | null; + } /** * Each intent parameter has a type, called the entity type, which dictates exactly how data from an end-user expression is extracted. Dialogflow provides predefined system entities that can match many common types of data. For example, there are system entities for matching dates, times, colors, email addresses, and so on. You can also create your own custom entities for matching custom data. For example, you could define a vegetable entity that can match the types of vegetables available for purchase with a grocery store agent. For more information, see the [Entity guide](https://cloud.google.com/dialogflow/docs/entities-overview). */ @@ -3788,6 +3884,61 @@ export namespace dialogflow_v3 { */ agentUri?: string | null; } + /** + * Represents answer from "frequently asked questions". + */ + export interface Schema$GoogleCloudDialogflowV2beta1FaqAnswer { + /** + * The piece of text from the `source` knowledge base document. + */ + answer?: string | null; + /** + * The name of answer record, in the format of "projects//locations//answerRecords/" + */ + answerRecord?: string | null; + /** + * The system's confidence score that this Knowledge answer is a good match for this conversational query, range from 0.0 (completely uncertain) to 1.0 (completely certain). + */ + confidence?: number | null; + /** + * A map that contains metadata about the answer and the document from which it originates. + */ + metadata?: {[key: string]: string} | null; + /** + * The corresponding FAQ question. + */ + question?: string | null; + /** + * Indicates which Knowledge Document this answer was extracted from. Format: `projects//locations//agent/knowledgeBases//documents/`. + */ + source?: string | null; + } + /** + * Output only. Represents a notification sent to Pub/Sub subscribers for agent assistant events in a specific conversation. + */ + export interface Schema$GoogleCloudDialogflowV2beta1HumanAgentAssistantEvent { + /** + * The conversation this notification refers to. Format: `projects//conversations/`. + */ + conversation?: string | null; + /** + * The participant that the suggestion is compiled for. And This field is used to call Participants.ListSuggestions API. Format: `projects//conversations//participants/`. It will not be set in legacy workflow. HumanAgentAssistantConfig.name for more information. + */ + participant?: string | null; + /** + * The suggestion results payload that this notification refers to. It will only be set when HumanAgentAssistantConfig.SuggestionConfig.group_suggestion_responses sets to true. + */ + suggestionResults?: Schema$GoogleCloudDialogflowV2beta1SuggestionResult[]; + } + /** + * Response message for Documents.ImportDocuments. + */ + export interface Schema$GoogleCloudDialogflowV2beta1ImportDocumentsResponse { + /** + * Includes details about skipped documents or any other warnings. + */ + warnings?: Schema$GoogleRpcStatus[]; + } /** * An intent categorizes an end-user's intention for one conversation turn. For each agent, you define many intents, where your combined intents can handle a complete conversation. When an end-user writes or says something, referred to as an end-user expression or end-user input, Dialogflow matches the end-user input to the best intent in your agent. Matching an intent is also known as intent classification. For more information, see the [intent guide](https://cloud.google.com/dialogflow/docs/intents-overview). */ @@ -3824,6 +3975,10 @@ export namespace dialogflow_v3 { * Optional. Indicates whether this is a fallback intent. */ isFallback?: boolean | null; + /** + * Optional. Indicates that a live agent should be brought in to handle the interaction with the user. In most cases, when you set this flag to true, you would also want to set end_interaction to true as well. Default is false. + */ + liveAgentHandoff?: boolean | null; /** * Optional. The collection of rich messages corresponding to the `Response` field in the Dialogflow console. */ @@ -4689,6 +4844,60 @@ export namespace dialogflow_v3 { */ state?: string | null; } + /** + * Represents a message posted into a conversation. + */ + export interface Schema$GoogleCloudDialogflowV2beta1Message { + /** + * Required. The message content. + */ + content?: string | null; + /** + * Output only. The time when the message was created in Contact Center AI. + */ + createTime?: string | null; + /** + * Optional. The message language. This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. Example: "en-US". + */ + languageCode?: string | null; + /** + * Output only. The annotation for the message. + */ + messageAnnotation?: Schema$GoogleCloudDialogflowV2beta1MessageAnnotation; + /** + * Optional. The unique identifier of the message. Format: `projects//locations//conversations//messages/`. + */ + name?: string | null; + /** + * Output only. The participant that sends this message. + */ + participant?: string | null; + /** + * Output only. The role of the participant. + */ + participantRole?: string | null; + /** + * Optional. The time when the message was sent. + */ + sendTime?: string | null; + /** + * Output only. The sentiment analysis result for the message. + */ + sentimentAnalysis?: Schema$GoogleCloudDialogflowV2beta1SentimentAnalysisResult; + } + /** + * Represents the result of annotation for the message. + */ + export interface Schema$GoogleCloudDialogflowV2beta1MessageAnnotation { + /** + * Required. Indicates whether the text message contains entities. + */ + containEntities?: boolean | null; + /** + * Optional. The collection of annotated message parts ordered by their position in the message. You can recover the annotated message by concatenating [AnnotatedMessagePart.text]. + */ + parts?: Schema$GoogleCloudDialogflowV2beta1AnnotatedMessagePart[]; + } /** * Represents the contents of the original request that was passed to the `[Streaming]DetectIntent` call. */ @@ -4814,6 +5023,95 @@ export namespace dialogflow_v3 { */ name?: string | null; } + /** + * Represents a smart reply answer. + */ + export interface Schema$GoogleCloudDialogflowV2beta1SmartReplyAnswer { + /** + * The name of answer record, in the format of "projects//locations//answerRecords/" + */ + answerRecord?: string | null; + /** + * Smart reply confidence. The system's confidence score that this reply is a good match for this conversation, as a value from 0.0 (completely uncertain) to 1.0 (completely certain). + */ + confidence?: number | null; + /** + * The content of the reply. + */ + reply?: string | null; + } + /** + * The response message for Participants.SuggestArticles. + */ + export interface Schema$GoogleCloudDialogflowV2beta1SuggestArticlesResponse { + /** + * Output only. Articles ordered by score in descending order. + */ + articleAnswers?: Schema$GoogleCloudDialogflowV2beta1ArticleAnswer[]; + /** + * Number of messages prior to and including latest_message to compile the suggestion. It may be smaller than the SuggestArticlesResponse.context_size field in the request if there aren't that many messages in the conversation. + */ + contextSize?: number | null; + /** + * The name of the latest conversation message used to compile suggestion for. Format: `projects//locations//conversations//messages/`. + */ + latestMessage?: string | null; + } + /** + * The request message for Participants.SuggestFaqAnswers. + */ + export interface Schema$GoogleCloudDialogflowV2beta1SuggestFaqAnswersResponse { + /** + * Number of messages prior to and including latest_message to compile the suggestion. It may be smaller than the SuggestFaqAnswersRequest.context_size field in the request if there aren't that many messages in the conversation. + */ + contextSize?: number | null; + /** + * Output only. Answers extracted from FAQ documents. + */ + faqAnswers?: Schema$GoogleCloudDialogflowV2beta1FaqAnswer[]; + /** + * The name of the latest conversation message used to compile suggestion for. Format: `projects//locations//conversations//messages/`. + */ + latestMessage?: string | null; + } + /** + * One response of different type of suggestion response which is used in the response of Participants.AnalyzeContent and Participants.AnalyzeContent, as well as HumanAgentAssistantEvent. + */ + export interface Schema$GoogleCloudDialogflowV2beta1SuggestionResult { + /** + * Error status if the request failed. + */ + error?: Schema$GoogleRpcStatus; + /** + * SuggestArticlesResponse if request is for ARTICLE_SUGGESTION. + */ + suggestArticlesResponse?: Schema$GoogleCloudDialogflowV2beta1SuggestArticlesResponse; + /** + * SuggestFaqAnswersResponse if request is for FAQ_ANSWER. + */ + suggestFaqAnswersResponse?: Schema$GoogleCloudDialogflowV2beta1SuggestFaqAnswersResponse; + /** + * SuggestSmartRepliesResponse if request is for SMART_REPLY. + */ + suggestSmartRepliesResponse?: Schema$GoogleCloudDialogflowV2beta1SuggestSmartRepliesResponse; + } + /** + * The response message for Participants.SuggestSmartReplies. + */ + export interface Schema$GoogleCloudDialogflowV2beta1SuggestSmartRepliesResponse { + /** + * Number of messages prior to and including latest_message to compile the suggestion. It may be smaller than the SuggestSmartRepliesRequest.context_size field in the request if there aren't that many messages in the conversation. + */ + contextSize?: number | null; + /** + * The name of the latest conversation message used to compile suggestion for. Format: `projects//locations//conversations//messages/`. + */ + latestMessage?: string | null; + /** + * Output only. Multiple reply options provided by smart reply service. The order is based on the rank of the model prediction. The maximum number of the returned replies is set in SmartReplyConfig. + */ + smartReplyAnswers?: Schema$GoogleCloudDialogflowV2beta1SmartReplyAnswer[]; + } /** * The request message for a webhook call. */ @@ -4859,6 +5157,10 @@ export namespace dialogflow_v3 { * Optional. The text response message intended for the end-user. It is recommended to use `fulfillment_messages.text.text[0]` instead. When provided, Dialogflow uses this field to populate QueryResult.fulfillment_text sent to the integration or API caller. */ fulfillmentText?: string | null; + /** + * Indicates that a live agent should be brought in to handle the interaction with the user. In most cases, when you set this flag to true, you would also want to set end_interaction to true as well. Default is false. + */ + liveAgentHandoff?: boolean | null; /** * Optional. The collection of output contexts that will overwrite currently active contexts for the session and reset their lifespans. When provided, Dialogflow uses this field to populate QueryResult.output_contexts sent to the integration or API caller. */ @@ -4986,6 +5288,52 @@ export namespace dialogflow_v3 { */ agentUri?: string | null; } + /** + * Represents answer from "frequently asked questions". + */ + export interface Schema$GoogleCloudDialogflowV2FaqAnswer { + /** + * The piece of text from the `source` knowledge base document. + */ + answer?: string | null; + /** + * The name of answer record, in the format of "projects//locations//answerRecords/" + */ + answerRecord?: string | null; + /** + * The system's confidence score that this Knowledge answer is a good match for this conversational query, range from 0.0 (completely uncertain) to 1.0 (completely certain). + */ + confidence?: number | null; + /** + * A map that contains metadata about the answer and the document from which it originates. + */ + metadata?: {[key: string]: string} | null; + /** + * The corresponding FAQ question. + */ + question?: string | null; + /** + * Indicates which Knowledge Document this answer was extracted from. Format: `projects//locations//agent/knowledgeBases//documents/`. + */ + source?: string | null; + } + /** + * Represents a notification sent to Cloud Pub/Sub subscribers for human agent assistant events in a specific conversation. + */ + export interface Schema$GoogleCloudDialogflowV2HumanAgentAssistantEvent { + /** + * The conversation this notification refers to. Format: `projects//conversations/`. + */ + conversation?: string | null; + /** + * The participant that the suggestion is compiled for. Format: `projects//conversations//participants/`. It will not be set in legacy workflow. + */ + participant?: string | null; + /** + * The suggestion results payload that this notification refers to. + */ + suggestionResults?: Schema$GoogleCloudDialogflowV2SuggestionResult[]; + } /** * An intent categorizes an end-user's intention for one conversation turn. For each agent, you define many intents, where your combined intents can handle a complete conversation. When an end-user writes or says something, referred to as an end-user expression or end-user input, Dialogflow matches the end-user input to the best intent in your agent. Matching an intent is also known as intent classification. For more information, see the [intent guide](https://cloud.google.com/dialogflow/docs/intents-overview). */ @@ -5002,6 +5350,10 @@ export namespace dialogflow_v3 { * Required. The name of this intent. */ displayName?: string | null; + /** + * Optional. Indicates that this intent ends an interaction. Some integrations (e.g., Actions on Google or Dialogflow phone gateway) use this information to close interaction with an end user. Default is false. + */ + endInteraction?: boolean | null; /** * Optional. The collection of event names that trigger the intent. If the collection of input contexts is not empty, all of the contexts must be present in the active user session for an event to trigger this intent. Event names are limited to 150 characters. */ @@ -5018,6 +5370,10 @@ export namespace dialogflow_v3 { * Optional. Indicates whether this is a fallback intent. */ isFallback?: boolean | null; + /** + * Optional. Indicates that a live agent should be brought in to handle the interaction with the user. In most cases, when you set this flag to true, you would also want to set end_interaction to true as well. Default is false. + */ + liveAgentHandoff?: boolean | null; /** * Optional. The collection of rich messages corresponding to the `Response` field in the Dialogflow console. */ @@ -5627,6 +5983,15 @@ export namespace dialogflow_v3 { */ userDefined?: boolean | null; } + /** + * Metadata in google::longrunning::Operation for Knowledge operations. + */ + export interface Schema$GoogleCloudDialogflowV2KnowledgeOperationMetadata { + /** + * Output only. The current state of this operation. + */ + state?: string | null; + } /** * Represents a message posted into a conversation. */ @@ -5794,6 +6159,57 @@ export namespace dialogflow_v3 { */ name?: string | null; } + /** + * The response message for Participants.SuggestArticles. + */ + export interface Schema$GoogleCloudDialogflowV2SuggestArticlesResponse { + /** + * Articles ordered by score in descending order. + */ + articleAnswers?: Schema$GoogleCloudDialogflowV2ArticleAnswer[]; + /** + * Number of messages prior to and including latest_message to compile the suggestion. It may be smaller than the SuggestArticlesRequest.context_size field in the request if there aren't that many messages in the conversation. + */ + contextSize?: number | null; + /** + * The name of the latest conversation message used to compile suggestion for. Format: `projects//locations//conversations//messages/`. + */ + latestMessage?: string | null; + } + /** + * The request message for Participants.SuggestFaqAnswers. + */ + export interface Schema$GoogleCloudDialogflowV2SuggestFaqAnswersResponse { + /** + * Number of messages prior to and including latest_message to compile the suggestion. It may be smaller than the SuggestFaqAnswersRequest.context_size field in the request if there aren't that many messages in the conversation. + */ + contextSize?: number | null; + /** + * Answers extracted from FAQ documents. + */ + faqAnswers?: Schema$GoogleCloudDialogflowV2FaqAnswer[]; + /** + * The name of the latest conversation message used to compile suggestion for. Format: `projects//locations//conversations//messages/`. + */ + latestMessage?: string | null; + } + /** + * One response of different type of suggestion response which is used in the response of Participants.AnalyzeContent and Participants.AnalyzeContent, as well as HumanAgentAssistantEvent. + */ + export interface Schema$GoogleCloudDialogflowV2SuggestionResult { + /** + * Error status if the request failed. + */ + error?: Schema$GoogleRpcStatus; + /** + * SuggestArticlesResponse if request is for ARTICLE_SUGGESTION. + */ + suggestArticlesResponse?: Schema$GoogleCloudDialogflowV2SuggestArticlesResponse; + /** + * SuggestFaqAnswersResponse if request is for FAQ_ANSWER. + */ + suggestFaqAnswersResponse?: Schema$GoogleCloudDialogflowV2SuggestFaqAnswersResponse; + } /** * The request message for a webhook call. */ @@ -7133,7 +7549,8 @@ export namespace dialogflow_v3 { * // request body parameters * // { * // "agentContent": "my_agentContent", - * // "agentUri": "my_agentUri" + * // "agentUri": "my_agentUri", + * // "restoreOption": "my_restoreOption" * // } * }, * }); @@ -11027,7 +11444,7 @@ export namespace dialogflow_v3 { } /** - * Creates a session entity type. If the specified session entity type already exists, overrides the session entity type. + * Creates a session entity type. * @example * ```js * // Before running the sample: @@ -17149,7 +17566,7 @@ export namespace dialogflow_v3 { } /** - * Creates a session entity type. If the specified session entity type already exists, overrides the session entity type. + * Creates a session entity type. * @example * ```js * // Before running the sample: @@ -19603,6 +20020,149 @@ export namespace dialogflow_v3 { this.context = context; } + /** + * Gets a test case result. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v3'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agents.testCases.results.get({ + * // Required. The name of the testcase. Format: `projects//locations//agents//testCases//results/`. + * name: + * 'projects/my-project/locations/my-location/agents/my-agent/testCases/my-testCase/results/my-result', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "conversationTurns": [], + * // "environment": "my_environment", + * // "name": "my_name", + * // "testResult": "my_testResult", + * // "testTime": "my_testTime" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Projects$Locations$Agents$Testcases$Results$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Projects$Locations$Agents$Testcases$Results$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Agents$Testcases$Results$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Agents$Testcases$Results$Get, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Agents$Testcases$Results$Get, + callback: BodyResponseCallback + ): void; + get( + callback: BodyResponseCallback + ): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agents$Testcases$Results$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agents$Testcases$Results$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agents$Testcases$Results$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v3/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + /** * Fetches a list of results for a given test case. * @example @@ -19755,6 +20315,13 @@ export namespace dialogflow_v3 { } } + export interface Params$Resource$Projects$Locations$Agents$Testcases$Results$Get + extends StandardParameters { + /** + * Required. The name of the testcase. Format: `projects//locations//agents//testCases//results/`. + */ + name?: string; + } export interface Params$Resource$Projects$Locations$Agents$Testcases$Results$List extends StandardParameters { /** diff --git a/src/apis/dialogflow/v3beta1.ts b/src/apis/dialogflow/v3beta1.ts index f8893ac406b..77d6493c3ec 100644 --- a/src/apis/dialogflow/v3beta1.ts +++ b/src/apis/dialogflow/v3beta1.ts @@ -585,7 +585,7 @@ export namespace dialogflow_v3beta1 { */ endTime?: string | null; /** - * Maximum number of days to run the experiment. + * Maximum number of days to run the experiment. If auto-rollout is not enabled, default value and maximum will be 30 days. If auto-rollout is enabled, default value and maximum will be 6 days. */ experimentLength?: string | null; /** @@ -1447,7 +1447,7 @@ export namespace dialogflow_v3beta1 { */ text?: string | null; /** - * If natural language speech audio was provided as input, this field will contain the trascript for the audio. + * If natural language speech audio was provided as input, this field will contain the transcript for the audio. */ transcript?: string | null; /** @@ -1455,7 +1455,7 @@ export namespace dialogflow_v3beta1 { */ triggerEvent?: string | null; /** - * If an intent was provided as input, this field will contain a copy of the intent identifier. + * If an intent was provided as input, this field will contain a copy of the intent identifier. Format: `projects//locations//agents//intents/`. */ triggerIntent?: string | null; } @@ -1684,7 +1684,7 @@ export namespace dialogflow_v3beta1 { */ text?: string | null; /** - * If natural language speech audio was provided as input, this field will contain the trascript for the audio. + * If natural language speech audio was provided as input, this field will contain the transcript for the audio. */ transcript?: string | null; /** @@ -1692,7 +1692,7 @@ export namespace dialogflow_v3beta1 { */ triggerEvent?: string | null; /** - * If an intent was provided as input, this field will contain a copy of the intent identifier. + * If an intent was provided as input, this field will contain a copy of the intent identifier. Format: `projects//locations//agents//intents/`. */ triggerIntent?: string | null; /** @@ -1866,6 +1866,10 @@ export namespace dialogflow_v3beta1 { * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI to restore agent from. The format of this URI must be `gs:///`. */ agentUri?: string | null; + /** + * Agent restore mode. If not specified, `KEEP` is assumed. + */ + restoreOption?: string | null; } /** * Metadata returned for the TestCases.RunTestCase long running operation. @@ -2462,7 +2466,7 @@ export namespace dialogflow_v3beta1 { username?: string | null; } /** - * The request message for a webhook call. + * The request message for a webhook call. The request is sent as a JSON object and the field names will be presented in camel cases. */ export interface Schema$GoogleCloudDialogflowCxV3beta1WebhookRequest { /** @@ -3508,7 +3512,7 @@ export namespace dialogflow_v3beta1 { genericMetadata?: Schema$GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata; } /** - * The request message for a webhook call. + * The request message for a webhook call. The request is sent as a JSON object and the field names will be presented in camel cases. */ export interface Schema$GoogleCloudDialogflowCxV3WebhookRequest { /** @@ -3663,6 +3667,35 @@ export namespace dialogflow_v3beta1 { */ text?: string | null; } + /** + * Represents article answer. + */ + export interface Schema$GoogleCloudDialogflowV2ArticleAnswer { + /** + * The name of answer record, in the format of "projects//locations//answerRecords/" + */ + answerRecord?: string | null; + /** + * Article match confidence. The system's confidence score that this article is a good match for this conversation, as a value from 0.0 (completely uncertain) to 1.0 (completely certain). + */ + confidence?: number | null; + /** + * A map that contains metadata about the answer and the document from which it originates. + */ + metadata?: {[key: string]: string} | null; + /** + * Article snippets. + */ + snippets?: string[] | null; + /** + * The article title. + */ + title?: string | null; + /** + * The article URI. + */ + uri?: string | null; + } /** * The response message for EntityTypes.BatchUpdateEntityTypes. */ @@ -3681,6 +3714,48 @@ export namespace dialogflow_v3beta1 { */ intents?: Schema$GoogleCloudDialogflowV2Intent[]; } + /** + * Represents a part of a message possibly annotated with an entity. The part can be an entity or purely a part of the message between two entities or message start/end. + */ + export interface Schema$GoogleCloudDialogflowV2beta1AnnotatedMessagePart { + /** + * Optional. The [Dialogflow system entity type](https://cloud.google.com/dialogflow/docs/reference/system-entities) of this message part. If this is empty, Dialogflow could not annotate the phrase part with a system entity. + */ + entityType?: string | null; + /** + * Optional. The [Dialogflow system entity formatted value ](https://cloud.google.com/dialogflow/docs/reference/system-entities) of this message part. For example for a system entity of type `@sys.unit-currency`, this may contain: { "amount": 5, "currency": "USD" \} + */ + formattedValue?: any | null; + /** + * Required. A part of a message possibly annotated with an entity. + */ + text?: string | null; + } + /** + * Represents article answer. + */ + export interface Schema$GoogleCloudDialogflowV2beta1ArticleAnswer { + /** + * The name of answer record, in the format of "projects//locations//answerRecords/" + */ + answerRecord?: string | null; + /** + * A map that contains metadata about the answer and the document from which it originates. + */ + metadata?: {[key: string]: string} | null; + /** + * Output only. Article snippets. + */ + snippets?: string[] | null; + /** + * The article title. + */ + title?: string | null; + /** + * The article URI. + */ + uri?: string | null; + } /** * The response message for EntityTypes.BatchUpdateEntityTypes. */ @@ -3716,6 +3791,27 @@ export namespace dialogflow_v3beta1 { */ parameters?: {[key: string]: any} | null; } + /** + * Represents a notification sent to Pub/Sub subscribers for conversation lifecycle events. + */ + export interface Schema$GoogleCloudDialogflowV2beta1ConversationEvent { + /** + * Required. The unique identifier of the conversation this notification refers to. Format: `projects//conversations/`. + */ + conversation?: string | null; + /** + * Optional. More detailed information about an error. Only set for type UNRECOVERABLE_ERROR_IN_PHONE_CALL. + */ + errorStatus?: Schema$GoogleRpcStatus; + /** + * Payload of NEW_MESSAGE event. + */ + newMessagePayload?: Schema$GoogleCloudDialogflowV2beta1Message; + /** + * Required. The type of the event that this notification refers to. + */ + type?: string | null; + } /** * Each intent parameter has a type, called the entity type, which dictates exactly how data from an end-user expression is extracted. Dialogflow provides predefined system entities that can match many common types of data. For example, there are system entities for matching dates, times, colors, email addresses, and so on. You can also create your own custom entities for matching custom data. For example, you could define a vegetable entity that can match the types of vegetables available for purchase with a grocery store agent. For more information, see the [Entity guide](https://cloud.google.com/dialogflow/docs/entities-overview). */ @@ -3788,6 +3884,61 @@ export namespace dialogflow_v3beta1 { */ agentUri?: string | null; } + /** + * Represents answer from "frequently asked questions". + */ + export interface Schema$GoogleCloudDialogflowV2beta1FaqAnswer { + /** + * The piece of text from the `source` knowledge base document. + */ + answer?: string | null; + /** + * The name of answer record, in the format of "projects//locations//answerRecords/" + */ + answerRecord?: string | null; + /** + * The system's confidence score that this Knowledge answer is a good match for this conversational query, range from 0.0 (completely uncertain) to 1.0 (completely certain). + */ + confidence?: number | null; + /** + * A map that contains metadata about the answer and the document from which it originates. + */ + metadata?: {[key: string]: string} | null; + /** + * The corresponding FAQ question. + */ + question?: string | null; + /** + * Indicates which Knowledge Document this answer was extracted from. Format: `projects//locations//agent/knowledgeBases//documents/`. + */ + source?: string | null; + } + /** + * Output only. Represents a notification sent to Pub/Sub subscribers for agent assistant events in a specific conversation. + */ + export interface Schema$GoogleCloudDialogflowV2beta1HumanAgentAssistantEvent { + /** + * The conversation this notification refers to. Format: `projects//conversations/`. + */ + conversation?: string | null; + /** + * The participant that the suggestion is compiled for. And This field is used to call Participants.ListSuggestions API. Format: `projects//conversations//participants/`. It will not be set in legacy workflow. HumanAgentAssistantConfig.name for more information. + */ + participant?: string | null; + /** + * The suggestion results payload that this notification refers to. It will only be set when HumanAgentAssistantConfig.SuggestionConfig.group_suggestion_responses sets to true. + */ + suggestionResults?: Schema$GoogleCloudDialogflowV2beta1SuggestionResult[]; + } + /** + * Response message for Documents.ImportDocuments. + */ + export interface Schema$GoogleCloudDialogflowV2beta1ImportDocumentsResponse { + /** + * Includes details about skipped documents or any other warnings. + */ + warnings?: Schema$GoogleRpcStatus[]; + } /** * An intent categorizes an end-user's intention for one conversation turn. For each agent, you define many intents, where your combined intents can handle a complete conversation. When an end-user writes or says something, referred to as an end-user expression or end-user input, Dialogflow matches the end-user input to the best intent in your agent. Matching an intent is also known as intent classification. For more information, see the [intent guide](https://cloud.google.com/dialogflow/docs/intents-overview). */ @@ -3824,6 +3975,10 @@ export namespace dialogflow_v3beta1 { * Optional. Indicates whether this is a fallback intent. */ isFallback?: boolean | null; + /** + * Optional. Indicates that a live agent should be brought in to handle the interaction with the user. In most cases, when you set this flag to true, you would also want to set end_interaction to true as well. Default is false. + */ + liveAgentHandoff?: boolean | null; /** * Optional. The collection of rich messages corresponding to the `Response` field in the Dialogflow console. */ @@ -4689,6 +4844,60 @@ export namespace dialogflow_v3beta1 { */ state?: string | null; } + /** + * Represents a message posted into a conversation. + */ + export interface Schema$GoogleCloudDialogflowV2beta1Message { + /** + * Required. The message content. + */ + content?: string | null; + /** + * Output only. The time when the message was created in Contact Center AI. + */ + createTime?: string | null; + /** + * Optional. The message language. This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. Example: "en-US". + */ + languageCode?: string | null; + /** + * Output only. The annotation for the message. + */ + messageAnnotation?: Schema$GoogleCloudDialogflowV2beta1MessageAnnotation; + /** + * Optional. The unique identifier of the message. Format: `projects//locations//conversations//messages/`. + */ + name?: string | null; + /** + * Output only. The participant that sends this message. + */ + participant?: string | null; + /** + * Output only. The role of the participant. + */ + participantRole?: string | null; + /** + * Optional. The time when the message was sent. + */ + sendTime?: string | null; + /** + * Output only. The sentiment analysis result for the message. + */ + sentimentAnalysis?: Schema$GoogleCloudDialogflowV2beta1SentimentAnalysisResult; + } + /** + * Represents the result of annotation for the message. + */ + export interface Schema$GoogleCloudDialogflowV2beta1MessageAnnotation { + /** + * Required. Indicates whether the text message contains entities. + */ + containEntities?: boolean | null; + /** + * Optional. The collection of annotated message parts ordered by their position in the message. You can recover the annotated message by concatenating [AnnotatedMessagePart.text]. + */ + parts?: Schema$GoogleCloudDialogflowV2beta1AnnotatedMessagePart[]; + } /** * Represents the contents of the original request that was passed to the `[Streaming]DetectIntent` call. */ @@ -4814,6 +5023,95 @@ export namespace dialogflow_v3beta1 { */ name?: string | null; } + /** + * Represents a smart reply answer. + */ + export interface Schema$GoogleCloudDialogflowV2beta1SmartReplyAnswer { + /** + * The name of answer record, in the format of "projects//locations//answerRecords/" + */ + answerRecord?: string | null; + /** + * Smart reply confidence. The system's confidence score that this reply is a good match for this conversation, as a value from 0.0 (completely uncertain) to 1.0 (completely certain). + */ + confidence?: number | null; + /** + * The content of the reply. + */ + reply?: string | null; + } + /** + * The response message for Participants.SuggestArticles. + */ + export interface Schema$GoogleCloudDialogflowV2beta1SuggestArticlesResponse { + /** + * Output only. Articles ordered by score in descending order. + */ + articleAnswers?: Schema$GoogleCloudDialogflowV2beta1ArticleAnswer[]; + /** + * Number of messages prior to and including latest_message to compile the suggestion. It may be smaller than the SuggestArticlesResponse.context_size field in the request if there aren't that many messages in the conversation. + */ + contextSize?: number | null; + /** + * The name of the latest conversation message used to compile suggestion for. Format: `projects//locations//conversations//messages/`. + */ + latestMessage?: string | null; + } + /** + * The request message for Participants.SuggestFaqAnswers. + */ + export interface Schema$GoogleCloudDialogflowV2beta1SuggestFaqAnswersResponse { + /** + * Number of messages prior to and including latest_message to compile the suggestion. It may be smaller than the SuggestFaqAnswersRequest.context_size field in the request if there aren't that many messages in the conversation. + */ + contextSize?: number | null; + /** + * Output only. Answers extracted from FAQ documents. + */ + faqAnswers?: Schema$GoogleCloudDialogflowV2beta1FaqAnswer[]; + /** + * The name of the latest conversation message used to compile suggestion for. Format: `projects//locations//conversations//messages/`. + */ + latestMessage?: string | null; + } + /** + * One response of different type of suggestion response which is used in the response of Participants.AnalyzeContent and Participants.AnalyzeContent, as well as HumanAgentAssistantEvent. + */ + export interface Schema$GoogleCloudDialogflowV2beta1SuggestionResult { + /** + * Error status if the request failed. + */ + error?: Schema$GoogleRpcStatus; + /** + * SuggestArticlesResponse if request is for ARTICLE_SUGGESTION. + */ + suggestArticlesResponse?: Schema$GoogleCloudDialogflowV2beta1SuggestArticlesResponse; + /** + * SuggestFaqAnswersResponse if request is for FAQ_ANSWER. + */ + suggestFaqAnswersResponse?: Schema$GoogleCloudDialogflowV2beta1SuggestFaqAnswersResponse; + /** + * SuggestSmartRepliesResponse if request is for SMART_REPLY. + */ + suggestSmartRepliesResponse?: Schema$GoogleCloudDialogflowV2beta1SuggestSmartRepliesResponse; + } + /** + * The response message for Participants.SuggestSmartReplies. + */ + export interface Schema$GoogleCloudDialogflowV2beta1SuggestSmartRepliesResponse { + /** + * Number of messages prior to and including latest_message to compile the suggestion. It may be smaller than the SuggestSmartRepliesRequest.context_size field in the request if there aren't that many messages in the conversation. + */ + contextSize?: number | null; + /** + * The name of the latest conversation message used to compile suggestion for. Format: `projects//locations//conversations//messages/`. + */ + latestMessage?: string | null; + /** + * Output only. Multiple reply options provided by smart reply service. The order is based on the rank of the model prediction. The maximum number of the returned replies is set in SmartReplyConfig. + */ + smartReplyAnswers?: Schema$GoogleCloudDialogflowV2beta1SmartReplyAnswer[]; + } /** * The request message for a webhook call. */ @@ -4859,6 +5157,10 @@ export namespace dialogflow_v3beta1 { * Optional. The text response message intended for the end-user. It is recommended to use `fulfillment_messages.text.text[0]` instead. When provided, Dialogflow uses this field to populate QueryResult.fulfillment_text sent to the integration or API caller. */ fulfillmentText?: string | null; + /** + * Indicates that a live agent should be brought in to handle the interaction with the user. In most cases, when you set this flag to true, you would also want to set end_interaction to true as well. Default is false. + */ + liveAgentHandoff?: boolean | null; /** * Optional. The collection of output contexts that will overwrite currently active contexts for the session and reset their lifespans. When provided, Dialogflow uses this field to populate QueryResult.output_contexts sent to the integration or API caller. */ @@ -4986,6 +5288,52 @@ export namespace dialogflow_v3beta1 { */ agentUri?: string | null; } + /** + * Represents answer from "frequently asked questions". + */ + export interface Schema$GoogleCloudDialogflowV2FaqAnswer { + /** + * The piece of text from the `source` knowledge base document. + */ + answer?: string | null; + /** + * The name of answer record, in the format of "projects//locations//answerRecords/" + */ + answerRecord?: string | null; + /** + * The system's confidence score that this Knowledge answer is a good match for this conversational query, range from 0.0 (completely uncertain) to 1.0 (completely certain). + */ + confidence?: number | null; + /** + * A map that contains metadata about the answer and the document from which it originates. + */ + metadata?: {[key: string]: string} | null; + /** + * The corresponding FAQ question. + */ + question?: string | null; + /** + * Indicates which Knowledge Document this answer was extracted from. Format: `projects//locations//agent/knowledgeBases//documents/`. + */ + source?: string | null; + } + /** + * Represents a notification sent to Cloud Pub/Sub subscribers for human agent assistant events in a specific conversation. + */ + export interface Schema$GoogleCloudDialogflowV2HumanAgentAssistantEvent { + /** + * The conversation this notification refers to. Format: `projects//conversations/`. + */ + conversation?: string | null; + /** + * The participant that the suggestion is compiled for. Format: `projects//conversations//participants/`. It will not be set in legacy workflow. + */ + participant?: string | null; + /** + * The suggestion results payload that this notification refers to. + */ + suggestionResults?: Schema$GoogleCloudDialogflowV2SuggestionResult[]; + } /** * An intent categorizes an end-user's intention for one conversation turn. For each agent, you define many intents, where your combined intents can handle a complete conversation. When an end-user writes or says something, referred to as an end-user expression or end-user input, Dialogflow matches the end-user input to the best intent in your agent. Matching an intent is also known as intent classification. For more information, see the [intent guide](https://cloud.google.com/dialogflow/docs/intents-overview). */ @@ -5002,6 +5350,10 @@ export namespace dialogflow_v3beta1 { * Required. The name of this intent. */ displayName?: string | null; + /** + * Optional. Indicates that this intent ends an interaction. Some integrations (e.g., Actions on Google or Dialogflow phone gateway) use this information to close interaction with an end user. Default is false. + */ + endInteraction?: boolean | null; /** * Optional. The collection of event names that trigger the intent. If the collection of input contexts is not empty, all of the contexts must be present in the active user session for an event to trigger this intent. Event names are limited to 150 characters. */ @@ -5018,6 +5370,10 @@ export namespace dialogflow_v3beta1 { * Optional. Indicates whether this is a fallback intent. */ isFallback?: boolean | null; + /** + * Optional. Indicates that a live agent should be brought in to handle the interaction with the user. In most cases, when you set this flag to true, you would also want to set end_interaction to true as well. Default is false. + */ + liveAgentHandoff?: boolean | null; /** * Optional. The collection of rich messages corresponding to the `Response` field in the Dialogflow console. */ @@ -5627,6 +5983,15 @@ export namespace dialogflow_v3beta1 { */ userDefined?: boolean | null; } + /** + * Metadata in google::longrunning::Operation for Knowledge operations. + */ + export interface Schema$GoogleCloudDialogflowV2KnowledgeOperationMetadata { + /** + * Output only. The current state of this operation. + */ + state?: string | null; + } /** * Represents a message posted into a conversation. */ @@ -5794,6 +6159,57 @@ export namespace dialogflow_v3beta1 { */ name?: string | null; } + /** + * The response message for Participants.SuggestArticles. + */ + export interface Schema$GoogleCloudDialogflowV2SuggestArticlesResponse { + /** + * Articles ordered by score in descending order. + */ + articleAnswers?: Schema$GoogleCloudDialogflowV2ArticleAnswer[]; + /** + * Number of messages prior to and including latest_message to compile the suggestion. It may be smaller than the SuggestArticlesRequest.context_size field in the request if there aren't that many messages in the conversation. + */ + contextSize?: number | null; + /** + * The name of the latest conversation message used to compile suggestion for. Format: `projects//locations//conversations//messages/`. + */ + latestMessage?: string | null; + } + /** + * The request message for Participants.SuggestFaqAnswers. + */ + export interface Schema$GoogleCloudDialogflowV2SuggestFaqAnswersResponse { + /** + * Number of messages prior to and including latest_message to compile the suggestion. It may be smaller than the SuggestFaqAnswersRequest.context_size field in the request if there aren't that many messages in the conversation. + */ + contextSize?: number | null; + /** + * Answers extracted from FAQ documents. + */ + faqAnswers?: Schema$GoogleCloudDialogflowV2FaqAnswer[]; + /** + * The name of the latest conversation message used to compile suggestion for. Format: `projects//locations//conversations//messages/`. + */ + latestMessage?: string | null; + } + /** + * One response of different type of suggestion response which is used in the response of Participants.AnalyzeContent and Participants.AnalyzeContent, as well as HumanAgentAssistantEvent. + */ + export interface Schema$GoogleCloudDialogflowV2SuggestionResult { + /** + * Error status if the request failed. + */ + error?: Schema$GoogleRpcStatus; + /** + * SuggestArticlesResponse if request is for ARTICLE_SUGGESTION. + */ + suggestArticlesResponse?: Schema$GoogleCloudDialogflowV2SuggestArticlesResponse; + /** + * SuggestFaqAnswersResponse if request is for FAQ_ANSWER. + */ + suggestFaqAnswersResponse?: Schema$GoogleCloudDialogflowV2SuggestFaqAnswersResponse; + } /** * The request message for a webhook call. */ @@ -7136,7 +7552,8 @@ export namespace dialogflow_v3beta1 { * // request body parameters * // { * // "agentContent": "my_agentContent", - * // "agentUri": "my_agentUri" + * // "agentUri": "my_agentUri", + * // "restoreOption": "my_restoreOption" * // } * }, * }); @@ -11035,7 +11452,7 @@ export namespace dialogflow_v3beta1 { } /** - * Creates a session entity type. If the specified session entity type already exists, overrides the session entity type. + * Creates a session entity type. * @example * ```js * // Before running the sample: @@ -17163,7 +17580,7 @@ export namespace dialogflow_v3beta1 { } /** - * Creates a session entity type. If the specified session entity type already exists, overrides the session entity type. + * Creates a session entity type. * @example * ```js * // Before running the sample: @@ -19619,6 +20036,149 @@ export namespace dialogflow_v3beta1 { this.context = context; } + /** + * Gets a test case result. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/dialogflow.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const dialogflow = google.dialogflow('v3beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/dialogflow', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await dialogflow.projects.locations.agents.testCases.results.get({ + * // Required. The name of the testcase. Format: `projects//locations//agents//testCases//results/`. + * name: + * 'projects/my-project/locations/my-location/agents/my-agent/testCases/my-testCase/results/my-result', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "conversationTurns": [], + * // "environment": "my_environment", + * // "name": "my_name", + * // "testResult": "my_testResult", + * // "testTime": "my_testTime" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Projects$Locations$Agents$Testcases$Results$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Projects$Locations$Agents$Testcases$Results$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Agents$Testcases$Results$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Agents$Testcases$Results$Get, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Agents$Testcases$Results$Get, + callback: BodyResponseCallback + ): void; + get( + callback: BodyResponseCallback + ): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Agents$Testcases$Results$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Agents$Testcases$Results$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Agents$Testcases$Results$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://dialogflow.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v3beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + /** * Fetches a list of results for a given test case. * @example @@ -19771,6 +20331,13 @@ export namespace dialogflow_v3beta1 { } } + export interface Params$Resource$Projects$Locations$Agents$Testcases$Results$Get + extends StandardParameters { + /** + * Required. The name of the testcase. Format: `projects//locations//agents//testCases//results/`. + */ + name?: string; + } export interface Params$Resource$Projects$Locations$Agents$Testcases$Results$List extends StandardParameters { /** diff --git a/src/apis/displayvideo/v1.ts b/src/apis/displayvideo/v1.ts index 4e9590ab66f..72cc1be7427 100644 --- a/src/apis/displayvideo/v1.ts +++ b/src/apis/displayvideo/v1.ts @@ -360,6 +360,10 @@ export namespace displayvideo_v1 { * Required. The ID of the app. Android's Play store app uses bundle ID, for example `com.google.android.gm`. Apple's App store app ID uses 9 digit string, for example `422689480`. */ appId?: string | null; + /** + * Indicates the platform of the targeted app. If this field is not specified, the app platform will be assumed to be mobile (i.e., Android or iOS), and we will derive the appropriate mobile platform from the app ID. + */ + appPlatform?: string | null; /** * Output only. The display name of the app. */ @@ -979,6 +983,19 @@ export namespace displayvideo_v1 { */ nextPageToken?: string | null; } + /** + * Response message for BulkListCampaignAssignedTargetingOptions. + */ + export interface Schema$BulkListCampaignAssignedTargetingOptionsResponse { + /** + * The list of assigned targeting options. This list will be absent if empty. + */ + assignedTargetingOptions?: Schema$AssignedTargetingOption[]; + /** + * A token identifying the next page of results. This value should be specified as the pageToken in a subsequent BulkListCampaignAssignedTargetingOptionsRequest to fetch the next page of results. This token will be absent if there are no more assigned_targeting_options to return. + */ + nextPageToken?: string | null; + } /** * Response message for BulkListInsertionOrderAssignedTargetingOptions. */ @@ -2197,6 +2214,27 @@ export namespace displayvideo_v1 { */ gender?: string | null; } + /** + * Request message for LineItemService.GenerateDefaultLineItem. + */ + export interface Schema$GenerateDefaultLineItemRequest { + /** + * Required. The display name of the line item. Must be UTF-8 encoded with a maximum size of 240 bytes. + */ + displayName?: string | null; + /** + * Required. The unique ID of the insertion order that the line item belongs to. + */ + insertionOrderId?: string | null; + /** + * Required. The type of the line item. + */ + lineItemType?: string | null; + /** + * The mobile app promoted by the line item. This is applicable only when line_item_type is either `LINE_ITEM_TYPE_DISPLAY_MOBILE_APP_INSTALL` or `LINE_ITEM_TYPE_VIDEO_MOBILE_APP_INSTALL`. + */ + mobileApp?: Schema$MobileApp; + } /** * Details for assigned geographic region targeting option. This will be populated in the details field of an AssignedTargetingOption when targeting_type is `TARGETING_TYPE_GEO_REGION`. */ @@ -2883,6 +2921,19 @@ export namespace displayvideo_v1 { */ nextPageToken?: string | null; } + /** + * Response message for ListCampaignAssignedTargetingOptions. + */ + export interface Schema$ListCampaignAssignedTargetingOptionsResponse { + /** + * The list of assigned targeting options. This list will be absent if empty. + */ + assignedTargetingOptions?: Schema$AssignedTargetingOption[]; + /** + * A token identifying the next page of results. This value should be specified as the pageToken in a subsequent ListCampaignAssignedTargetingOptionsRequest to fetch the next page of results. This token will be absent if there are no more assigned_targeting_options to return. + */ + nextPageToken?: string | null; + } export interface Schema$ListCampaignsResponse { /** * The list of campaigns. This list will be absent if empty. @@ -3702,6 +3753,50 @@ export namespace displayvideo_v1 { */ regionalLocationListId?: string | null; } + /** + * Request message for NegativeKeywordService.ReplaceNegativeKeywords. + */ + export interface Schema$ReplaceNegativeKeywordsRequest { + /** + * The negative keywords that will replace the existing keywords in the negative keyword list, specified as a list of NegativeKeywords. + */ + newNegativeKeywords?: Schema$NegativeKeyword[]; + } + /** + * Response message for NegativeKeywordService.ReplaceNegativeKeywords. + */ + export interface Schema$ReplaceNegativeKeywordsResponse { + /** + * The full list of negative keywords now present in the negative keyword list. + */ + negativeKeywords?: Schema$NegativeKeyword[]; + } + /** + * Request message for SiteService.ReplaceSites. + */ + export interface Schema$ReplaceSitesRequest { + /** + * The ID of the advertiser that owns the parent channel. + */ + advertiserId?: string | null; + /** + * The sites that will replace the existing sites assigned to the channel, specified as a list of Sites. + */ + newSites?: Schema$Site[]; + /** + * The ID of the partner that owns the parent channel. + */ + partnerId?: string | null; + } + /** + * Response message for SiteService.ReplaceSites. + */ + export interface Schema$ReplaceSitesResponse { + /** + * The list of sites in the channel after replacing. + */ + sites?: Schema$Site[]; + } /** * Review statuses for the creative. */ @@ -5725,8 +5820,163 @@ export namespace displayvideo_v1 { export class Resource$Advertisers$Campaigns { context: APIRequestContext; + targetingTypes: Resource$Advertisers$Campaigns$Targetingtypes; constructor(context: APIRequestContext) { this.context = context; + this.targetingTypes = new Resource$Advertisers$Campaigns$Targetingtypes( + this.context + ); + } + + /** + * Lists assigned targeting options of a campaign across targeting types. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/displayvideo.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const displayvideo = google.displayvideo('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/display-video'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await displayvideo.advertisers.campaigns.bulkListCampaignAssignedTargetingOptions( + * { + * // Required. The ID of the advertiser the campaign belongs to. + * advertiserId: '[^/]+', + * // Required. The ID of the campaign to list assigned targeting options for. + * campaignId: '[^/]+', + * // Allows filtering by assigned targeting option properties. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by the logical operator `OR` on the same field. * A restriction has the form of `{field\} {operator\} {value\}`. * The operator must be `EQUALS (=)`. * Supported fields: - `targetingType` - `inheritance` Examples: * AssignedTargetingOptions of targeting type TARGETING_TYPE_LANGUAGE or TARGETING_TYPE_GENDER `targetingType="TARGETING_TYPE_LANGUAGE" OR targetingType="TARGETING_TYPE_GENDER"` * AssignedTargetingOptions with inheritance status of NOT_INHERITED or INHERITED_FROM_PARTNER `inheritance="NOT_INHERITED" OR inheritance="INHERITED_FROM_PARTNER"` The length of this field should be no more than 500 characters. + * filter: 'placeholder-value', + * // Field by which to sort the list. Acceptable values are: * `targetingType` (default) The default sorting order is ascending. To specify descending order for a field, a suffix "desc" should be added to the field name. Example: `targetingType desc`. + * orderBy: 'placeholder-value', + * // Requested page size. The size must be an integer between `1` and `5000`. If unspecified, the default is `5000`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified. + * pageSize: 'placeholder-value', + * // A token that lets the client fetch the next page of results. Typically, this is the value of next_page_token returned from the previous call to `BulkListCampaignAssignedTargetingOptions` method. If not specified, the first page of results will be returned. + * pageToken: 'placeholder-value', + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "assignedTargetingOptions": [], + * // "nextPageToken": "my_nextPageToken" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + bulkListCampaignAssignedTargetingOptions( + params: Params$Resource$Advertisers$Campaigns$Bulklistcampaignassignedtargetingoptions, + options: StreamMethodOptions + ): GaxiosPromise; + bulkListCampaignAssignedTargetingOptions( + params?: Params$Resource$Advertisers$Campaigns$Bulklistcampaignassignedtargetingoptions, + options?: MethodOptions + ): GaxiosPromise; + bulkListCampaignAssignedTargetingOptions( + params: Params$Resource$Advertisers$Campaigns$Bulklistcampaignassignedtargetingoptions, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + bulkListCampaignAssignedTargetingOptions( + params: Params$Resource$Advertisers$Campaigns$Bulklistcampaignassignedtargetingoptions, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + bulkListCampaignAssignedTargetingOptions( + params: Params$Resource$Advertisers$Campaigns$Bulklistcampaignassignedtargetingoptions, + callback: BodyResponseCallback + ): void; + bulkListCampaignAssignedTargetingOptions( + callback: BodyResponseCallback + ): void; + bulkListCampaignAssignedTargetingOptions( + paramsOrCallback?: + | Params$Resource$Advertisers$Campaigns$Bulklistcampaignassignedtargetingoptions + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Advertisers$Campaigns$Bulklistcampaignassignedtargetingoptions; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Advertisers$Campaigns$Bulklistcampaignassignedtargetingoptions; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://displayvideo.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/v1/advertisers/{+advertiserId}/campaigns/{+campaignId}:bulkListCampaignAssignedTargetingOptions' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['advertiserId', 'campaignId'], + pathParams: ['advertiserId', 'campaignId'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } } /** @@ -6464,6 +6714,33 @@ export namespace displayvideo_v1 { } } + export interface Params$Resource$Advertisers$Campaigns$Bulklistcampaignassignedtargetingoptions + extends StandardParameters { + /** + * Required. The ID of the advertiser the campaign belongs to. + */ + advertiserId?: string; + /** + * Required. The ID of the campaign to list assigned targeting options for. + */ + campaignId?: string; + /** + * Allows filtering by assigned targeting option properties. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by the logical operator `OR` on the same field. * A restriction has the form of `{field\} {operator\} {value\}`. * The operator must be `EQUALS (=)`. * Supported fields: - `targetingType` - `inheritance` Examples: * AssignedTargetingOptions of targeting type TARGETING_TYPE_LANGUAGE or TARGETING_TYPE_GENDER `targetingType="TARGETING_TYPE_LANGUAGE" OR targetingType="TARGETING_TYPE_GENDER"` * AssignedTargetingOptions with inheritance status of NOT_INHERITED or INHERITED_FROM_PARTNER `inheritance="NOT_INHERITED" OR inheritance="INHERITED_FROM_PARTNER"` The length of this field should be no more than 500 characters. + */ + filter?: string; + /** + * Field by which to sort the list. Acceptable values are: * `targetingType` (default) The default sorting order is ascending. To specify descending order for a field, a suffix "desc" should be added to the field name. Example: `targetingType desc`. + */ + orderBy?: string; + /** + * Requested page size. The size must be an integer between `1` and `5000`. If unspecified, the default is `5000`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified. + */ + pageSize?: number; + /** + * A token that lets the client fetch the next page of results. Typically, this is the value of next_page_token returned from the previous call to `BulkListCampaignAssignedTargetingOptions` method. If not specified, the first page of results will be returned. + */ + pageToken?: string; + } export interface Params$Resource$Advertisers$Campaigns$Create extends StandardParameters { /** @@ -6542,16 +6819,25 @@ export namespace displayvideo_v1 { requestBody?: Schema$Campaign; } - export class Resource$Advertisers$Channels { + export class Resource$Advertisers$Campaigns$Targetingtypes { + context: APIRequestContext; + assignedTargetingOptions: Resource$Advertisers$Campaigns$Targetingtypes$Assignedtargetingoptions; + constructor(context: APIRequestContext) { + this.context = context; + this.assignedTargetingOptions = new Resource$Advertisers$Campaigns$Targetingtypes$Assignedtargetingoptions( + this.context + ); + } + } + + export class Resource$Advertisers$Campaigns$Targetingtypes$Assignedtargetingoptions { context: APIRequestContext; - sites: Resource$Advertisers$Channels$Sites; constructor(context: APIRequestContext) { this.context = context; - this.sites = new Resource$Advertisers$Channels$Sites(this.context); } /** - * Creates a new channel. Returns the newly created channel if successful. + * Gets a single targeting option assigned to a campaign. * @example * ```js * // Before running the sample: @@ -6576,38 +6862,443 @@ export namespace displayvideo_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await displayvideo.advertisers.channels.create({ - * // The ID of the advertiser that owns the created channel. - * advertiserId: '[^/]+', - * // The ID of the partner that owns the created channel. - * partnerId: 'placeholder-value', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "advertiserId": "my_advertiserId", - * // "channelId": "my_channelId", - * // "displayName": "my_displayName", - * // "name": "my_name", - * // "partnerId": "my_partnerId" - * // } - * }, - * }); + * const res = await displayvideo.advertisers.campaigns.targetingTypes.assignedTargetingOptions.get( + * { + * // Required. The ID of the advertiser the campaign belongs to. + * advertiserId: '[^/]+', + * // Required. An identifier unique to the targeting type in this campaign that identifies the assigned targeting option being requested. + * assignedTargetingOptionId: '[^/]+', + * // Required. The ID of the campaign the assigned targeting option belongs to. + * campaignId: '[^/]+', + * // Required. Identifies the type of this assigned targeting option. Supported targeting types: * `TARGETING_TYPE_AGE_RANGE` * `TARGETING_TYPE_AUTHORIZED_SELLER_STATUS` * `TARGETING_TYPE_CONTENT_INSTREAM_POSITION` * `TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION` * `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_EXCHANGE` * `TARGETING_TYPE_GENDER` * `TARGETING_TYPE_GEO_REGION` * `TARGETING_TYPE_HOUSEHOLD_INCOME` * `TARGETING_TYPE_INVENTORY_SOURCE` * `TARGETING_TYPE_INVENTORY_SOURCE_GROUP` * `TARGETING_TYPE_LANGUAGE` * `TARGETING_TYPE_ON_SCREEN_POSITION` * `TARGETING_TYPE_PARENTAL_STATUS` * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * `TARGETING_TYPE_SUB_EXCHANGE` * `TARGETING_TYPE_THIRD_PARTY_VERIFIER` * `TARGETING_TYPE_VIEWABILITY` + * targetingType: '[^/]+', + * } + * ); * console.log(res.data); * * // Example response * // { - * // "advertiserId": "my_advertiserId", - * // "channelId": "my_channelId", - * // "displayName": "my_displayName", - * // "name": "my_name", - * // "partnerId": "my_partnerId" - * // } - * } - * - * main().catch(e => { - * console.error(e); + * // "ageRangeDetails": {}, + * // "appCategoryDetails": {}, + * // "appDetails": {}, + * // "assignedTargetingOptionId": "my_assignedTargetingOptionId", + * // "audienceGroupDetails": {}, + * // "authorizedSellerStatusDetails": {}, + * // "browserDetails": {}, + * // "carrierAndIspDetails": {}, + * // "categoryDetails": {}, + * // "channelDetails": {}, + * // "contentInstreamPositionDetails": {}, + * // "contentOutstreamPositionDetails": {}, + * // "dayAndTimeDetails": {}, + * // "deviceMakeModelDetails": {}, + * // "deviceTypeDetails": {}, + * // "digitalContentLabelExclusionDetails": {}, + * // "environmentDetails": {}, + * // "exchangeDetails": {}, + * // "genderDetails": {}, + * // "geoRegionDetails": {}, + * // "householdIncomeDetails": {}, + * // "inheritance": "my_inheritance", + * // "inventorySourceDetails": {}, + * // "inventorySourceGroupDetails": {}, + * // "keywordDetails": {}, + * // "languageDetails": {}, + * // "name": "my_name", + * // "negativeKeywordListDetails": {}, + * // "onScreenPositionDetails": {}, + * // "operatingSystemDetails": {}, + * // "parentalStatusDetails": {}, + * // "proximityLocationListDetails": {}, + * // "regionalLocationListDetails": {}, + * // "sensitiveCategoryExclusionDetails": {}, + * // "subExchangeDetails": {}, + * // "targetingType": "my_targetingType", + * // "thirdPartyVerifierDetails": {}, + * // "urlDetails": {}, + * // "userRewardedContentDetails": {}, + * // "videoPlayerSizeDetails": {}, + * // "viewabilityDetails": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Advertisers$Campaigns$Targetingtypes$Assignedtargetingoptions$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Advertisers$Campaigns$Targetingtypes$Assignedtargetingoptions$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Advertisers$Campaigns$Targetingtypes$Assignedtargetingoptions$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Advertisers$Campaigns$Targetingtypes$Assignedtargetingoptions$Get, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Advertisers$Campaigns$Targetingtypes$Assignedtargetingoptions$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Advertisers$Campaigns$Targetingtypes$Assignedtargetingoptions$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Advertisers$Campaigns$Targetingtypes$Assignedtargetingoptions$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Advertisers$Campaigns$Targetingtypes$Assignedtargetingoptions$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://displayvideo.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/v1/advertisers/{+advertiserId}/campaigns/{+campaignId}/targetingTypes/{+targetingType}/assignedTargetingOptions/{+assignedTargetingOptionId}' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: [ + 'advertiserId', + 'campaignId', + 'targetingType', + 'assignedTargetingOptionId', + ], + pathParams: [ + 'advertiserId', + 'assignedTargetingOptionId', + 'campaignId', + 'targetingType', + ], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Lists the targeting options assigned to a campaign for a specified targeting type. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/displayvideo.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const displayvideo = google.displayvideo('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/display-video'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await displayvideo.advertisers.campaigns.targetingTypes.assignedTargetingOptions.list( + * { + * // Required. The ID of the advertiser the campaign belongs to. + * advertiserId: '[^/]+', + * // Required. The ID of the campaign to list assigned targeting options for. + * campaignId: '[^/]+', + * // Allows filtering by assigned targeting option properties. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by the logical operator `OR`. * A restriction has the form of `{field\} {operator\} {value\}`. * The operator must be `EQUALS (=)`. * Supported fields: - `assignedTargetingOptionId` - `inheritance` Examples: * AssignedTargetingOptions with ID 1 or 2 `assignedTargetingOptionId="1" OR assignedTargetingOptionId="2"` * AssignedTargetingOptions with inheritance status of NOT_INHERITED or INHERITED_FROM_PARTNER `inheritance="NOT_INHERITED" OR inheritance="INHERITED_FROM_PARTNER"` The length of this field should be no more than 500 characters. + * filter: 'placeholder-value', + * // Field by which to sort the list. Acceptable values are: * `assignedTargetingOptionId` (default) The default sorting order is ascending. To specify descending order for a field, a suffix "desc" should be added to the field name. Example: `assignedTargetingOptionId desc`. + * orderBy: 'placeholder-value', + * // Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified. + * pageSize: 'placeholder-value', + * // A token identifying a page of results the server should return. Typically, this is the value of next_page_token returned from the previous call to `ListCampaignAssignedTargetingOptions` method. If not specified, the first page of results will be returned. + * pageToken: 'placeholder-value', + * // Required. Identifies the type of assigned targeting options to list. Supported targeting types: * `TARGETING_TYPE_AGE_RANGE` * `TARGETING_TYPE_AUTHORIZED_SELLER_STATUS` * `TARGETING_TYPE_CONTENT_INSTREAM_POSITION` * `TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION` * `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_EXCHANGE` * `TARGETING_TYPE_GENDER` * `TARGETING_TYPE_GEO_REGION` * `TARGETING_TYPE_HOUSEHOLD_INCOME` * `TARGETING_TYPE_INVENTORY_SOURCE` * `TARGETING_TYPE_INVENTORY_SOURCE_GROUP` * `TARGETING_TYPE_LANGUAGE` * `TARGETING_TYPE_ON_SCREEN_POSITION` * `TARGETING_TYPE_PARENTAL_STATUS` * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * `TARGETING_TYPE_SUB_EXCHANGE` * `TARGETING_TYPE_THIRD_PARTY_VERIFIER` * `TARGETING_TYPE_VIEWABILITY` + * targetingType: '[^/]+', + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "assignedTargetingOptions": [], + * // "nextPageToken": "my_nextPageToken" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Advertisers$Campaigns$Targetingtypes$Assignedtargetingoptions$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Advertisers$Campaigns$Targetingtypes$Assignedtargetingoptions$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Advertisers$Campaigns$Targetingtypes$Assignedtargetingoptions$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Advertisers$Campaigns$Targetingtypes$Assignedtargetingoptions$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Advertisers$Campaigns$Targetingtypes$Assignedtargetingoptions$List, + callback: BodyResponseCallback + ): void; + list( + callback: BodyResponseCallback + ): void; + list( + paramsOrCallback?: + | Params$Resource$Advertisers$Campaigns$Targetingtypes$Assignedtargetingoptions$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Advertisers$Campaigns$Targetingtypes$Assignedtargetingoptions$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Advertisers$Campaigns$Targetingtypes$Assignedtargetingoptions$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://displayvideo.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/v1/advertisers/{+advertiserId}/campaigns/{+campaignId}/targetingTypes/{+targetingType}/assignedTargetingOptions' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['advertiserId', 'campaignId', 'targetingType'], + pathParams: ['advertiserId', 'campaignId', 'targetingType'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + } + + export interface Params$Resource$Advertisers$Campaigns$Targetingtypes$Assignedtargetingoptions$Get + extends StandardParameters { + /** + * Required. The ID of the advertiser the campaign belongs to. + */ + advertiserId?: string; + /** + * Required. An identifier unique to the targeting type in this campaign that identifies the assigned targeting option being requested. + */ + assignedTargetingOptionId?: string; + /** + * Required. The ID of the campaign the assigned targeting option belongs to. + */ + campaignId?: string; + /** + * Required. Identifies the type of this assigned targeting option. Supported targeting types: * `TARGETING_TYPE_AGE_RANGE` * `TARGETING_TYPE_AUTHORIZED_SELLER_STATUS` * `TARGETING_TYPE_CONTENT_INSTREAM_POSITION` * `TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION` * `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_EXCHANGE` * `TARGETING_TYPE_GENDER` * `TARGETING_TYPE_GEO_REGION` * `TARGETING_TYPE_HOUSEHOLD_INCOME` * `TARGETING_TYPE_INVENTORY_SOURCE` * `TARGETING_TYPE_INVENTORY_SOURCE_GROUP` * `TARGETING_TYPE_LANGUAGE` * `TARGETING_TYPE_ON_SCREEN_POSITION` * `TARGETING_TYPE_PARENTAL_STATUS` * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * `TARGETING_TYPE_SUB_EXCHANGE` * `TARGETING_TYPE_THIRD_PARTY_VERIFIER` * `TARGETING_TYPE_VIEWABILITY` + */ + targetingType?: string; + } + export interface Params$Resource$Advertisers$Campaigns$Targetingtypes$Assignedtargetingoptions$List + extends StandardParameters { + /** + * Required. The ID of the advertiser the campaign belongs to. + */ + advertiserId?: string; + /** + * Required. The ID of the campaign to list assigned targeting options for. + */ + campaignId?: string; + /** + * Allows filtering by assigned targeting option properties. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by the logical operator `OR`. * A restriction has the form of `{field\} {operator\} {value\}`. * The operator must be `EQUALS (=)`. * Supported fields: - `assignedTargetingOptionId` - `inheritance` Examples: * AssignedTargetingOptions with ID 1 or 2 `assignedTargetingOptionId="1" OR assignedTargetingOptionId="2"` * AssignedTargetingOptions with inheritance status of NOT_INHERITED or INHERITED_FROM_PARTNER `inheritance="NOT_INHERITED" OR inheritance="INHERITED_FROM_PARTNER"` The length of this field should be no more than 500 characters. + */ + filter?: string; + /** + * Field by which to sort the list. Acceptable values are: * `assignedTargetingOptionId` (default) The default sorting order is ascending. To specify descending order for a field, a suffix "desc" should be added to the field name. Example: `assignedTargetingOptionId desc`. + */ + orderBy?: string; + /** + * Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified. + */ + pageSize?: number; + /** + * A token identifying a page of results the server should return. Typically, this is the value of next_page_token returned from the previous call to `ListCampaignAssignedTargetingOptions` method. If not specified, the first page of results will be returned. + */ + pageToken?: string; + /** + * Required. Identifies the type of assigned targeting options to list. Supported targeting types: * `TARGETING_TYPE_AGE_RANGE` * `TARGETING_TYPE_AUTHORIZED_SELLER_STATUS` * `TARGETING_TYPE_CONTENT_INSTREAM_POSITION` * `TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION` * `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_EXCHANGE` * `TARGETING_TYPE_GENDER` * `TARGETING_TYPE_GEO_REGION` * `TARGETING_TYPE_HOUSEHOLD_INCOME` * `TARGETING_TYPE_INVENTORY_SOURCE` * `TARGETING_TYPE_INVENTORY_SOURCE_GROUP` * `TARGETING_TYPE_LANGUAGE` * `TARGETING_TYPE_ON_SCREEN_POSITION` * `TARGETING_TYPE_PARENTAL_STATUS` * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * `TARGETING_TYPE_SUB_EXCHANGE` * `TARGETING_TYPE_THIRD_PARTY_VERIFIER` * `TARGETING_TYPE_VIEWABILITY` + */ + targetingType?: string; + } + + export class Resource$Advertisers$Channels { + context: APIRequestContext; + sites: Resource$Advertisers$Channels$Sites; + constructor(context: APIRequestContext) { + this.context = context; + this.sites = new Resource$Advertisers$Channels$Sites(this.context); + } + + /** + * Creates a new channel. Returns the newly created channel if successful. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/displayvideo.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const displayvideo = google.displayvideo('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/display-video'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await displayvideo.advertisers.channels.create({ + * // The ID of the advertiser that owns the created channel. + * advertiserId: '[^/]+', + * // The ID of the partner that owns the created channel. + * partnerId: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "advertiserId": "my_advertiserId", + * // "channelId": "my_channelId", + * // "displayName": "my_displayName", + * // "name": "my_name", + * // "partnerId": "my_partnerId" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "advertiserId": "my_advertiserId", + * // "channelId": "my_channelId", + * // "displayName": "my_displayName", + * // "name": "my_name", + * // "partnerId": "my_partnerId" + * // } + * } + * + * main().catch(e => { + * console.error(e); * throw e; * }); * @@ -7568,46 +8259,191 @@ export namespace displayvideo_v1 { params: Params$Resource$Advertisers$Channels$Sites$Delete, options: StreamMethodOptions ): GaxiosPromise; - delete( - params?: Params$Resource$Advertisers$Channels$Sites$Delete, + delete( + params?: Params$Resource$Advertisers$Channels$Sites$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Advertisers$Channels$Sites$Delete, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Advertisers$Channels$Sites$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Advertisers$Channels$Sites$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Advertisers$Channels$Sites$Delete + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Advertisers$Channels$Sites$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Advertisers$Channels$Sites$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://displayvideo.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/v1/advertisers/{advertiserId}/channels/{+channelId}/sites/{+urlOrAppId}' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['advertiserId', 'channelId', 'urlOrAppId'], + pathParams: ['advertiserId', 'channelId', 'urlOrAppId'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Lists sites in a channel. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/displayvideo.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const displayvideo = google.displayvideo('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/display-video'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await displayvideo.advertisers.channels.sites.list({ + * // The ID of the advertiser that owns the parent channel. + * advertiserId: '[^/]+', + * // Required. The ID of the parent channel to which the requested sites belong. + * channelId: '[^/]+', + * // Allows filtering by site fields. Supported syntax: * Filter expressions for site currently can only contain at most one * restriction. * A restriction has the form of `{field\} {operator\} {value\}`. * The operator must be `CONTAINS (:)`. * Supported fields: - `urlOrAppId` Examples: * All sites for which the URL or app ID contains "google": `urlOrAppId : "google"` + * filter: 'placeholder-value', + * // Field by which to sort the list. Acceptable values are: * `urlOrAppId` (default) The default sorting order is ascending. To specify descending order for a field, a suffix " desc" should be added to the field name. Example: `urlOrAppId desc`. + * orderBy: 'placeholder-value', + * // Requested page size. Must be between `1` and `10000`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified. + * pageSize: 'placeholder-value', + * // A token identifying a page of results the server should return. Typically, this is the value of next_page_token returned from the previous call to `ListSites` method. If not specified, the first page of results will be returned. + * pageToken: 'placeholder-value', + * // The ID of the partner that owns the parent channel. + * partnerId: 'placeholder-value', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "nextPageToken": "my_nextPageToken", + * // "sites": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Advertisers$Channels$Sites$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Advertisers$Channels$Sites$List, options?: MethodOptions - ): GaxiosPromise; - delete( - params: Params$Resource$Advertisers$Channels$Sites$Delete, + ): GaxiosPromise; + list( + params: Params$Resource$Advertisers$Channels$Sites$List, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - delete( - params: Params$Resource$Advertisers$Channels$Sites$Delete, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + list( + params: Params$Resource$Advertisers$Channels$Sites$List, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - delete( - params: Params$Resource$Advertisers$Channels$Sites$Delete, - callback: BodyResponseCallback + list( + params: Params$Resource$Advertisers$Channels$Sites$List, + callback: BodyResponseCallback ): void; - delete(callback: BodyResponseCallback): void; - delete( + list(callback: BodyResponseCallback): void; + list( paramsOrCallback?: - | Params$Resource$Advertisers$Channels$Sites$Delete - | BodyResponseCallback + | Params$Resource$Advertisers$Channels$Sites$List + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { + ): + | void + | GaxiosPromise + | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Advertisers$Channels$Sites$Delete; + {}) as Params$Resource$Advertisers$Channels$Sites$List; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Advertisers$Channels$Sites$Delete; + params = {} as Params$Resource$Advertisers$Channels$Sites$List; options = {}; } @@ -7622,29 +8458,29 @@ export namespace displayvideo_v1 { { url: ( rootUrl + - '/v1/advertisers/{advertiserId}/channels/{+channelId}/sites/{+urlOrAppId}' + '/v1/advertisers/{+advertiserId}/channels/{+channelId}/sites' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'DELETE', + method: 'GET', }, options ), params, - requiredParams: ['advertiserId', 'channelId', 'urlOrAppId'], - pathParams: ['advertiserId', 'channelId', 'urlOrAppId'], + requiredParams: ['advertiserId', 'channelId'], + pathParams: ['advertiserId', 'channelId'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Lists sites in a channel. + * Replaces all of the sites under a single channel. The operation will replace the sites under a channel with the sites provided in ReplaceSitesRequest.new_sites. * @example * ```js * // Before running the sample: @@ -7669,27 +8505,26 @@ export namespace displayvideo_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await displayvideo.advertisers.channels.sites.list({ + * const res = await displayvideo.advertisers.channels.sites.replace({ * // The ID of the advertiser that owns the parent channel. - * advertiserId: '[^/]+', - * // Required. The ID of the parent channel to which the requested sites belong. + * advertiserId: 'placeholder-value', + * // Required. The ID of the parent channel whose sites will be replaced. * channelId: '[^/]+', - * // Allows filtering by site fields. Supported syntax: * Filter expressions for site currently can only contain at most one * restriction. * A restriction has the form of `{field\} {operator\} {value\}`. * The operator must be `CONTAINS (:)`. * Supported fields: - `urlOrAppId` Examples: * All sites for which the URL or app ID contains "google": `urlOrAppId : "google"` - * filter: 'placeholder-value', - * // Field by which to sort the list. Acceptable values are: * `urlOrAppId` (default) The default sorting order is ascending. To specify descending order for a field, a suffix " desc" should be added to the field name. Example: `urlOrAppId desc`. - * orderBy: 'placeholder-value', - * // Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified. - * pageSize: 'placeholder-value', - * // A token identifying a page of results the server should return. Typically, this is the value of next_page_token returned from the previous call to `ListSites` method. If not specified, the first page of results will be returned. - * pageToken: 'placeholder-value', - * // The ID of the partner that owns the parent channel. - * partnerId: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "advertiserId": "my_advertiserId", + * // "newSites": [], + * // "partnerId": "my_partnerId" + * // } + * }, * }); * console.log(res.data); * * // Example response * // { - * // "nextPageToken": "my_nextPageToken", * // "sites": [] * // } * } @@ -7706,53 +8541,55 @@ export namespace displayvideo_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - list( - params: Params$Resource$Advertisers$Channels$Sites$List, + replace( + params: Params$Resource$Advertisers$Channels$Sites$Replace, options: StreamMethodOptions ): GaxiosPromise; - list( - params?: Params$Resource$Advertisers$Channels$Sites$List, + replace( + params?: Params$Resource$Advertisers$Channels$Sites$Replace, options?: MethodOptions - ): GaxiosPromise; - list( - params: Params$Resource$Advertisers$Channels$Sites$List, + ): GaxiosPromise; + replace( + params: Params$Resource$Advertisers$Channels$Sites$Replace, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Advertisers$Channels$Sites$List, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + replace( + params: Params$Resource$Advertisers$Channels$Sites$Replace, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Advertisers$Channels$Sites$List, - callback: BodyResponseCallback + replace( + params: Params$Resource$Advertisers$Channels$Sites$Replace, + callback: BodyResponseCallback ): void; - list(callback: BodyResponseCallback): void; - list( + replace(callback: BodyResponseCallback): void; + replace( paramsOrCallback?: - | Params$Resource$Advertisers$Channels$Sites$List - | BodyResponseCallback + | Params$Resource$Advertisers$Channels$Sites$Replace + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Advertisers$Channels$Sites$List; + {}) as Params$Resource$Advertisers$Channels$Sites$Replace; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Advertisers$Channels$Sites$List; + params = {} as Params$Resource$Advertisers$Channels$Sites$Replace; options = {}; } @@ -7767,9 +8604,9 @@ export namespace displayvideo_v1 { { url: ( rootUrl + - '/v1/advertisers/{+advertiserId}/channels/{+channelId}/sites' + '/v1/advertisers/{advertiserId}/channels/{+channelId}/sites:replace' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'GET', + method: 'POST', }, options ), @@ -7779,12 +8616,12 @@ export namespace displayvideo_v1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } } @@ -7863,7 +8700,7 @@ export namespace displayvideo_v1 { */ orderBy?: string; /** - * Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified. + * Requested page size. Must be between `1` and `10000`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified. */ pageSize?: number; /** @@ -7875,6 +8712,22 @@ export namespace displayvideo_v1 { */ partnerId?: string; } + export interface Params$Resource$Advertisers$Channels$Sites$Replace + extends StandardParameters { + /** + * The ID of the advertiser that owns the parent channel. + */ + advertiserId?: string; + /** + * Required. The ID of the parent channel whose sites will be replaced. + */ + channelId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$ReplaceSitesRequest; + } export class Resource$Advertisers$Creatives { context: APIRequestContext; @@ -10754,12 +11607,140 @@ export namespace displayvideo_v1 { | BodyResponseCallback ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Advertisers$Lineitems$Create; + {}) as Params$Resource$Advertisers$Lineitems$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Advertisers$Lineitems$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://displayvideo.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + '/v1/advertisers/{+advertiserId}/lineItems' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['advertiserId'], + pathParams: ['advertiserId'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Deletes a line item. Returns error code `NOT_FOUND` if the line item does not exist. The line item should be archived first, i.e. set entity_status to `ENTITY_STATUS_ARCHIVED`, to be able to delete it. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/displayvideo.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const displayvideo = google.displayvideo('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/display-video'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await displayvideo.advertisers.lineItems.delete({ + * // The ID of the advertiser this line item belongs to. + * advertiserId: '[^/]+', + * // The ID of the line item we need to fetch. + * lineItemId: '[^/]+', + * }); + * console.log(res.data); + * + * // Example response + * // {} + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + delete( + params: Params$Resource$Advertisers$Lineitems$Delete, + options: StreamMethodOptions + ): GaxiosPromise; + delete( + params?: Params$Resource$Advertisers$Lineitems$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Advertisers$Lineitems$Delete, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Advertisers$Lineitems$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Advertisers$Lineitems$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Advertisers$Lineitems$Delete + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Advertisers$Lineitems$Delete; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Advertisers$Lineitems$Create; + params = {} as Params$Resource$Advertisers$Lineitems$Delete; options = {}; } @@ -10773,29 +11754,30 @@ export namespace displayvideo_v1 { options: Object.assign( { url: ( - rootUrl + '/v1/advertisers/{+advertiserId}/lineItems' + rootUrl + + '/v1/advertisers/{+advertiserId}/lineItems/{+lineItemId}' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'POST', + method: 'DELETE', }, options ), params, - requiredParams: ['advertiserId'], - pathParams: ['advertiserId'], + requiredParams: ['advertiserId', 'lineItemId'], + pathParams: ['advertiserId', 'lineItemId'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Deletes a line item. Returns error code `NOT_FOUND` if the line item does not exist. The line item should be archived first, i.e. set entity_status to `ENTITY_STATUS_ARCHIVED`, to be able to delete it. + * Creates a new line item with settings (including targeting) inherited from the insertion order. Returns the newly created line item if successful. There are default values based on the three fields: * The insertion order's InsertionOrderType * The insertion order's InsertionOrderAutomationType * The given line_item_type * @example * ```js * // Before running the sample: @@ -10820,16 +11802,49 @@ export namespace displayvideo_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await displayvideo.advertisers.lineItems.delete({ - * // The ID of the advertiser this line item belongs to. + * const res = await displayvideo.advertisers.lineItems.generateDefault({ + * // Required. The ID of the advertiser this line item belongs to. * advertiserId: '[^/]+', - * // The ID of the line item we need to fetch. - * lineItemId: '[^/]+', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "displayName": "my_displayName", + * // "insertionOrderId": "my_insertionOrderId", + * // "lineItemType": "my_lineItemType", + * // "mobileApp": {} + * // } + * }, * }); * console.log(res.data); * * // Example response - * // {} + * // { + * // "advertiserId": "my_advertiserId", + * // "bidStrategy": {}, + * // "budget": {}, + * // "campaignId": "my_campaignId", + * // "conversionCounting": {}, + * // "creativeIds": [], + * // "displayName": "my_displayName", + * // "entityStatus": "my_entityStatus", + * // "flight": {}, + * // "frequencyCap": {}, + * // "insertionOrderId": "my_insertionOrderId", + * // "integrationDetails": {}, + * // "inventorySourceIds": [], + * // "lineItemId": "my_lineItemId", + * // "lineItemType": "my_lineItemType", + * // "mobileApp": {}, + * // "name": "my_name", + * // "pacing": {}, + * // "partnerCosts": [], + * // "partnerRevenueModel": {}, + * // "targetingExpansion": {}, + * // "updateTime": "my_updateTime", + * // "warningMessages": [] + * // } * } * * main().catch(e => { @@ -10844,50 +11859,50 @@ export namespace displayvideo_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - delete( - params: Params$Resource$Advertisers$Lineitems$Delete, + generateDefault( + params: Params$Resource$Advertisers$Lineitems$Generatedefault, options: StreamMethodOptions ): GaxiosPromise; - delete( - params?: Params$Resource$Advertisers$Lineitems$Delete, + generateDefault( + params?: Params$Resource$Advertisers$Lineitems$Generatedefault, options?: MethodOptions - ): GaxiosPromise; - delete( - params: Params$Resource$Advertisers$Lineitems$Delete, + ): GaxiosPromise; + generateDefault( + params: Params$Resource$Advertisers$Lineitems$Generatedefault, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - delete( - params: Params$Resource$Advertisers$Lineitems$Delete, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + generateDefault( + params: Params$Resource$Advertisers$Lineitems$Generatedefault, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - delete( - params: Params$Resource$Advertisers$Lineitems$Delete, - callback: BodyResponseCallback + generateDefault( + params: Params$Resource$Advertisers$Lineitems$Generatedefault, + callback: BodyResponseCallback ): void; - delete(callback: BodyResponseCallback): void; - delete( + generateDefault(callback: BodyResponseCallback): void; + generateDefault( paramsOrCallback?: - | Params$Resource$Advertisers$Lineitems$Delete - | BodyResponseCallback + | Params$Resource$Advertisers$Lineitems$Generatedefault + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { + ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Advertisers$Lineitems$Delete; + {}) as Params$Resource$Advertisers$Lineitems$Generatedefault; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Advertisers$Lineitems$Delete; + params = {} as Params$Resource$Advertisers$Lineitems$Generatedefault; options = {}; } @@ -10902,24 +11917,24 @@ export namespace displayvideo_v1 { { url: ( rootUrl + - '/v1/advertisers/{+advertiserId}/lineItems/{+lineItemId}' + '/v1/advertisers/{+advertiserId}/lineItems:generateDefault' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'DELETE', + method: 'POST', }, options ), params, - requiredParams: ['advertiserId', 'lineItemId'], - pathParams: ['advertiserId', 'lineItemId'], + requiredParams: ['advertiserId'], + pathParams: ['advertiserId'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } @@ -11470,6 +12485,18 @@ export namespace displayvideo_v1 { */ lineItemId?: string; } + export interface Params$Resource$Advertisers$Lineitems$Generatedefault + extends StandardParameters { + /** + * Required. The ID of the advertiser this line item belongs to. + */ + advertiserId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GenerateDefaultLineItemRequest; + } export interface Params$Resource$Advertisers$Lineitems$Get extends StandardParameters { /** @@ -15794,37 +16821,190 @@ export namespace displayvideo_v1 { options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - delete( - params: Params$Resource$Advertisers$Negativekeywordlists$Negativekeywords$Delete, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + delete( + params: Params$Resource$Advertisers$Negativekeywordlists$Negativekeywords$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Advertisers$Negativekeywordlists$Negativekeywords$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Advertisers$Negativekeywordlists$Negativekeywords$Delete + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Advertisers$Negativekeywordlists$Negativekeywords$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Advertisers$Negativekeywordlists$Negativekeywords$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://displayvideo.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/v1/advertisers/{advertiserId}/negativeKeywordLists/{+negativeKeywordListId}/negativeKeywords/{+keywordValue}' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', + }, + options + ), + params, + requiredParams: [ + 'advertiserId', + 'negativeKeywordListId', + 'keywordValue', + ], + pathParams: ['advertiserId', 'keywordValue', 'negativeKeywordListId'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Lists negative keywords in a negative keyword list. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/displayvideo.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const displayvideo = google.displayvideo('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/display-video'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await displayvideo.advertisers.negativeKeywordLists.negativeKeywords.list( + * { + * // Required. The ID of the DV360 advertiser to which the parent negative keyword list belongs. + * advertiserId: '[^/]+', + * // Allows filtering by negative keyword fields. Supported syntax: * Filter expressions for negative keyword currently can only contain at most one * restriction. * A restriction has the form of `{field\} {operator\} {value\}`. * The operator must be `CONTAINS (:)`. * Supported fields: - `keywordValue` Examples: * All negative keywords for which the keyword value contains "google": `keywordValue : "google"` + * filter: 'placeholder-value', + * // Required. The ID of the parent negative keyword list to which the requested negative keywords belong. + * negativeKeywordListId: '[^/]+', + * // Field by which to sort the list. Acceptable values are: * `keywordValue` (default) The default sorting order is ascending. To specify descending order for a field, a suffix " desc" should be added to the field name. Example: `keywordValue desc`. + * orderBy: 'placeholder-value', + * // Requested page size. Must be between `1` and `1000`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified. + * pageSize: 'placeholder-value', + * // A token identifying a page of results the server should return. Typically, this is the value of next_page_token returned from the previous call to `ListNegativeKeywords` method. If not specified, the first page of results will be returned. + * pageToken: 'placeholder-value', + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "negativeKeywords": [], + * // "nextPageToken": "my_nextPageToken" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Advertisers$Negativekeywordlists$Negativekeywords$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Advertisers$Negativekeywordlists$Negativekeywords$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Advertisers$Negativekeywordlists$Negativekeywords$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Advertisers$Negativekeywordlists$Negativekeywords$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - delete( - params: Params$Resource$Advertisers$Negativekeywordlists$Negativekeywords$Delete, - callback: BodyResponseCallback + list( + params: Params$Resource$Advertisers$Negativekeywordlists$Negativekeywords$List, + callback: BodyResponseCallback ): void; - delete(callback: BodyResponseCallback): void; - delete( + list( + callback: BodyResponseCallback + ): void; + list( paramsOrCallback?: - | Params$Resource$Advertisers$Negativekeywordlists$Negativekeywords$Delete - | BodyResponseCallback + | Params$Resource$Advertisers$Negativekeywordlists$Negativekeywords$List + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { + ): + | void + | GaxiosPromise + | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Advertisers$Negativekeywordlists$Negativekeywords$Delete; + {}) as Params$Resource$Advertisers$Negativekeywordlists$Negativekeywords$List; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Advertisers$Negativekeywordlists$Negativekeywords$Delete; + params = {} as Params$Resource$Advertisers$Negativekeywordlists$Negativekeywords$List; options = {}; } @@ -15839,33 +17019,31 @@ export namespace displayvideo_v1 { { url: ( rootUrl + - '/v1/advertisers/{advertiserId}/negativeKeywordLists/{+negativeKeywordListId}/negativeKeywords/{+keywordValue}' + '/v1/advertisers/{+advertiserId}/negativeKeywordLists/{+negativeKeywordListId}/negativeKeywords' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'DELETE', + method: 'GET', }, options ), params, - requiredParams: [ - 'advertiserId', - 'negativeKeywordListId', - 'keywordValue', - ], - pathParams: ['advertiserId', 'keywordValue', 'negativeKeywordListId'], + requiredParams: ['advertiserId', 'negativeKeywordListId'], + pathParams: ['advertiserId', 'negativeKeywordListId'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest( + parameters + ); } } /** - * Lists negative keywords in a negative keyword list. + * Replaces all negative keywords in a single negative keyword list. The operation will replace the keywords in a negative keywords with keywords provided in ReplaceNegativeKeywordsRequest.new_negative_keywords. * @example * ```js * // Before running the sample: @@ -15890,28 +17068,27 @@ export namespace displayvideo_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await displayvideo.advertisers.negativeKeywordLists.negativeKeywords.list( + * const res = await displayvideo.advertisers.negativeKeywordLists.negativeKeywords.replace( * { * // Required. The ID of the DV360 advertiser to which the parent negative keyword list belongs. - * advertiserId: '[^/]+', - * // Allows filtering by negative keyword fields. Supported syntax: * Filter expressions for negative keyword currently can only contain at most one * restriction. * A restriction has the form of `{field\} {operator\} {value\}`. * The operator must be `CONTAINS (:)`. * Supported fields: - `keywordValue` Examples: * All negative keywords for which the keyword value contains "google": `keywordValue : "google"` - * filter: 'placeholder-value', - * // Required. The ID of the parent negative keyword list to which the requested negative keywords belong. + * advertiserId: 'placeholder-value', + * // Required. The ID of the parent negative keyword list to which the negative keywords belong. * negativeKeywordListId: '[^/]+', - * // Field by which to sort the list. Acceptable values are: * `keywordValue` (default) The default sorting order is ascending. To specify descending order for a field, a suffix " desc" should be added to the field name. Example: `keywordValue desc`. - * orderBy: 'placeholder-value', - * // Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified. - * pageSize: 'placeholder-value', - * // A token identifying a page of results the server should return. Typically, this is the value of next_page_token returned from the previous call to `ListNegativeKeywords` method. If not specified, the first page of results will be returned. - * pageToken: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "newNegativeKeywords": [] + * // } + * }, * } * ); * console.log(res.data); * * // Example response * // { - * // "negativeKeywords": [], - * // "nextPageToken": "my_nextPageToken" + * // "negativeKeywords": [] * // } * } * @@ -15927,57 +17104,57 @@ export namespace displayvideo_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - list( - params: Params$Resource$Advertisers$Negativekeywordlists$Negativekeywords$List, + replace( + params: Params$Resource$Advertisers$Negativekeywordlists$Negativekeywords$Replace, options: StreamMethodOptions ): GaxiosPromise; - list( - params?: Params$Resource$Advertisers$Negativekeywordlists$Negativekeywords$List, + replace( + params?: Params$Resource$Advertisers$Negativekeywordlists$Negativekeywords$Replace, options?: MethodOptions - ): GaxiosPromise; - list( - params: Params$Resource$Advertisers$Negativekeywordlists$Negativekeywords$List, + ): GaxiosPromise; + replace( + params: Params$Resource$Advertisers$Negativekeywordlists$Negativekeywords$Replace, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Advertisers$Negativekeywordlists$Negativekeywords$List, + replace( + params: Params$Resource$Advertisers$Negativekeywordlists$Negativekeywords$Replace, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Advertisers$Negativekeywordlists$Negativekeywords$List, - callback: BodyResponseCallback + replace( + params: Params$Resource$Advertisers$Negativekeywordlists$Negativekeywords$Replace, + callback: BodyResponseCallback ): void; - list( - callback: BodyResponseCallback + replace( + callback: BodyResponseCallback ): void; - list( + replace( paramsOrCallback?: - | Params$Resource$Advertisers$Negativekeywordlists$Negativekeywords$List - | BodyResponseCallback + | Params$Resource$Advertisers$Negativekeywordlists$Negativekeywords$Replace + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Advertisers$Negativekeywordlists$Negativekeywords$List; + {}) as Params$Resource$Advertisers$Negativekeywordlists$Negativekeywords$Replace; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Advertisers$Negativekeywordlists$Negativekeywords$List; + params = {} as Params$Resource$Advertisers$Negativekeywordlists$Negativekeywords$Replace; options = {}; } @@ -15992,9 +17169,9 @@ export namespace displayvideo_v1 { { url: ( rootUrl + - '/v1/advertisers/{+advertiserId}/negativeKeywordLists/{+negativeKeywordListId}/negativeKeywords' + '/v1/advertisers/{advertiserId}/negativeKeywordLists/{+negativeKeywordListId}/negativeKeywords:replace' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'GET', + method: 'POST', }, options ), @@ -16004,12 +17181,12 @@ export namespace displayvideo_v1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest( + return createAPIRequest( parameters ); } @@ -16082,7 +17259,7 @@ export namespace displayvideo_v1 { */ orderBy?: string; /** - * Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified. + * Requested page size. Must be between `1` and `1000`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified. */ pageSize?: number; /** @@ -16090,6 +17267,22 @@ export namespace displayvideo_v1 { */ pageToken?: string; } + export interface Params$Resource$Advertisers$Negativekeywordlists$Negativekeywords$Replace + extends StandardParameters { + /** + * Required. The ID of the DV360 advertiser to which the parent negative keyword list belongs. + */ + advertiserId?: string; + /** + * Required. The ID of the parent negative keyword list to which the negative keywords belong. + */ + negativeKeywordListId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$ReplaceNegativeKeywordsRequest; + } export class Resource$Advertisers$Targetingtypes { context: APIRequestContext; @@ -22496,7 +23689,7 @@ export namespace displayvideo_v1 { * filter: 'placeholder-value', * // Field by which to sort the list. Acceptable values are: * `urlOrAppId` (default) The default sorting order is ascending. To specify descending order for a field, a suffix " desc" should be added to the field name. Example: `urlOrAppId desc`. * orderBy: 'placeholder-value', - * // Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified. + * // Requested page size. Must be between `1` and `10000`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified. * pageSize: 'placeholder-value', * // A token identifying a page of results the server should return. Typically, this is the value of next_page_token returned from the previous call to `ListSites` method. If not specified, the first page of results will be returned. * pageToken: 'placeholder-value', @@ -22604,6 +23797,152 @@ export namespace displayvideo_v1 { return createAPIRequest(parameters); } } + + /** + * Replaces all of the sites under a single channel. The operation will replace the sites under a channel with the sites provided in ReplaceSitesRequest.new_sites. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/displayvideo.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const displayvideo = google.displayvideo('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/display-video'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await displayvideo.partners.channels.sites.replace({ + * // Required. The ID of the parent channel whose sites will be replaced. + * channelId: '[^/]+', + * // The ID of the partner that owns the parent channel. + * partnerId: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "advertiserId": "my_advertiserId", + * // "newSites": [], + * // "partnerId": "my_partnerId" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "sites": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + replace( + params: Params$Resource$Partners$Channels$Sites$Replace, + options: StreamMethodOptions + ): GaxiosPromise; + replace( + params?: Params$Resource$Partners$Channels$Sites$Replace, + options?: MethodOptions + ): GaxiosPromise; + replace( + params: Params$Resource$Partners$Channels$Sites$Replace, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + replace( + params: Params$Resource$Partners$Channels$Sites$Replace, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + replace( + params: Params$Resource$Partners$Channels$Sites$Replace, + callback: BodyResponseCallback + ): void; + replace(callback: BodyResponseCallback): void; + replace( + paramsOrCallback?: + | Params$Resource$Partners$Channels$Sites$Replace + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Partners$Channels$Sites$Replace; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Partners$Channels$Sites$Replace; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://displayvideo.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/v1/partners/{partnerId}/channels/{+channelId}/sites:replace' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['partnerId', 'channelId'], + pathParams: ['channelId', 'partnerId'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } } export interface Params$Resource$Partners$Channels$Sites$Bulkedit @@ -22680,7 +24019,7 @@ export namespace displayvideo_v1 { */ orderBy?: string; /** - * Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified. + * Requested page size. Must be between `1` and `10000`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified. */ pageSize?: number; /** @@ -22692,6 +24031,22 @@ export namespace displayvideo_v1 { */ partnerId?: string; } + export interface Params$Resource$Partners$Channels$Sites$Replace + extends StandardParameters { + /** + * Required. The ID of the parent channel whose sites will be replaced. + */ + channelId?: string; + /** + * The ID of the partner that owns the parent channel. + */ + partnerId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$ReplaceSitesRequest; + } export class Resource$Partners$Targetingtypes { context: APIRequestContext; diff --git a/src/apis/dns/v1.ts b/src/apis/dns/v1.ts index 0aeecf650ca..01116c34bc1 100644 --- a/src/apis/dns/v1.ts +++ b/src/apis/dns/v1.ts @@ -183,7 +183,7 @@ export namespace dns_v1 { */ kind?: string | null; /** - * The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your pagination token. In this way you can retrieve the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. There is no way to retrieve a "snapshot" of collections larger than the maximum page size. + * The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your pagination token. This lets you retrieve the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. You cannot retrieve a "snapshot" of collections larger than the maximum page size. */ nextPageToken?: string | null; } @@ -382,7 +382,7 @@ export namespace dns_v1 { header?: Schema$ResponseHeader; kind?: string | null; /** - * The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your page token. In this way you can retrieve the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. There is no way to retrieve a consistent snapshot of a collection larger than the maximum page size. + * The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your page token. This lets you retrieve the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. You cannot retrieve a consistent snapshot of a collection larger than the maximum page size. */ nextPageToken?: string | null; /** @@ -442,7 +442,7 @@ export namespace dns_v1 { deletionTime?: string | null; kind?: string | null; /** - * The fully qualified URL of the namespace associated with the zone. This should be formatted like https://servicedirectory.googleapis.com/v1/projects/{project\}/locations/{location\}/namespaces/{namespace\} + * The fully qualified URL of the namespace associated with the zone. Format must be https://servicedirectory.googleapis.com/v1/projects/{project\}/locations/{location\}/namespaces/{namespace\} */ namespaceUrl?: string | null; } @@ -457,7 +457,7 @@ export namespace dns_v1 { */ managedZones?: Schema$ManagedZone[]; /** - * The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your page token. In this way you can retrieve the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. There is no way to retrieve a consistent snapshot of a collection larger than the maximum page size. + * The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your page token. This lets you the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. You cannot retrieve a consistent snapshot of a collection larger than the maximum page size. */ nextPageToken?: string | null; } @@ -522,7 +522,7 @@ export namespace dns_v1 { */ kind?: string | null; /** - * The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your page token. In this way you can retrieve the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. There is no way to retrieve a consistent snapshot of a collection larger than the maximum page size. + * The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your page token. This lets you the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. You cannot retrieve a consistent snapshot of a collection larger than the maximum page size. */ nextPageToken?: string | null; /** @@ -598,7 +598,7 @@ export namespace dns_v1 { networkUrl?: string | null; } /** - * A project resource. The project is a top level container for resources including Cloud DNS ManagedZones. Projects can be created only in the APIs console. + * A project resource. The project is a top level container for resources including Cloud DNS ManagedZones. Projects can be created only in the APIs console. Next tag: 7. */ export interface Schema$Project { /** @@ -1256,7 +1256,7 @@ export namespace dns_v1 { } /** - * Fetch the representation of an existing DnsKey. + * Fetches the representation of an existing DnsKey. * @example * ```js * // Before running the sample: @@ -1407,7 +1407,7 @@ export namespace dns_v1 { } /** - * Enumerate DnsKeys to a ResourceRecordSet collection. + * Enumerates DnsKeys to a ResourceRecordSet collection. * @example * ```js * // Before running the sample: @@ -1957,7 +1957,7 @@ export namespace dns_v1 { } /** - * Create a new ManagedZone. + * Creates a new ManagedZone. * @example * ```js * // Before running the sample: @@ -2129,7 +2129,7 @@ export namespace dns_v1 { } /** - * Delete a previously created ManagedZone. + * Deletes a previously created ManagedZone. * @example * ```js * // Before running the sample: @@ -2257,7 +2257,7 @@ export namespace dns_v1 { } /** - * Fetch the representation of an existing ManagedZone. + * Fetches the representation of an existing ManagedZone. * @example * ```js * // Before running the sample: @@ -2408,7 +2408,7 @@ export namespace dns_v1 { } /** - * Enumerate ManagedZones that have been created but not yet deleted. + * Enumerates ManagedZones that have been created but not yet deleted. * @example * ```js * // Before running the sample: @@ -2556,7 +2556,7 @@ export namespace dns_v1 { } /** - * Apply a partial update to an existing ManagedZone. + * Applies a partial update to an existing ManagedZone. * @example * ```js * // Before running the sample: @@ -2721,7 +2721,7 @@ export namespace dns_v1 { } /** - * Update an existing ManagedZone. + * Updates an existing ManagedZone. * @example * ```js * // Before running the sample: @@ -3568,7 +3568,7 @@ export namespace dns_v1 { } /** - * Apply a partial update to an existing Policy. + * Applies a partial update to an existing Policy. * @example * ```js * // Before running the sample: @@ -3723,7 +3723,7 @@ export namespace dns_v1 { } /** - * Update an existing Policy. + * Updates an existing Policy. * @example * ```js * // Before running the sample: @@ -3983,7 +3983,7 @@ export namespace dns_v1 { } /** - * Fetch the representation of an existing Project. + * Fetches the representation of an existing Project. * @example * ```js * // Before running the sample: @@ -4148,7 +4148,7 @@ export namespace dns_v1 { } /** - * Create a new ResourceRecordSet. + * Creates a new ResourceRecordSet. * @example * ```js * // Before running the sample: @@ -4305,7 +4305,7 @@ export namespace dns_v1 { } /** - * Delete a previously created ResourceRecordSet. + * Deletes a previously created ResourceRecordSet. * @example * ```js * // Before running the sample: @@ -4452,7 +4452,7 @@ export namespace dns_v1 { } /** - * Fetch the representation of an existing ResourceRecordSet. + * Fetches the representation of an existing ResourceRecordSet. * @example * ```js * // Before running the sample: @@ -4602,7 +4602,7 @@ export namespace dns_v1 { } /** - * Apply a partial update to an existing ResourceRecordSet. + * Applies a partial update to an existing ResourceRecordSet. * @example * ```js * // Before running the sample: diff --git a/src/apis/dns/v1beta2.ts b/src/apis/dns/v1beta2.ts index 24eaea080e1..be65e7bbf82 100644 --- a/src/apis/dns/v1beta2.ts +++ b/src/apis/dns/v1beta2.ts @@ -187,7 +187,7 @@ export namespace dns_v1beta2 { */ kind?: string | null; /** - * The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your pagination token. In this way you can retrieve the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. There is no way to retrieve a "snapshot" of collections larger than the maximum page size. + * The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your pagination token. This lets you retrieve the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. You cannot retrieve a "snapshot" of collections larger than the maximum page size. */ nextPageToken?: string | null; } @@ -390,7 +390,7 @@ export namespace dns_v1beta2 { header?: Schema$ResponseHeader; kind?: string | null; /** - * The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your page token. In this way you can retrieve the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. There is no way to retrieve a consistent snapshot of a collection larger than the maximum page size. + * The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your page token. This lets you retrieve the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. You cannot retrieve a consistent snapshot of a collection larger than the maximum page size. */ nextPageToken?: string | null; /** @@ -450,7 +450,7 @@ export namespace dns_v1beta2 { deletionTime?: string | null; kind?: string | null; /** - * The fully qualified URL of the namespace associated with the zone. This should be formatted like https://servicedirectory.googleapis.com/v1/projects/{project\}/locations/{location\}/namespaces/{namespace\} + * The fully qualified URL of the namespace associated with the zone. Format must be https://servicedirectory.googleapis.com/v1/projects/{project\}/locations/{location\}/namespaces/{namespace\} */ namespaceUrl?: string | null; } @@ -465,7 +465,7 @@ export namespace dns_v1beta2 { */ managedZones?: Schema$ManagedZone[]; /** - * The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your page token. In this way you can retrieve the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. There is no way to retrieve a consistent snapshot of a collection larger than the maximum page size. + * The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your page token. This lets you the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. You cannot retrieve a consistent snapshot of a collection larger than the maximum page size. */ nextPageToken?: string | null; } @@ -530,7 +530,7 @@ export namespace dns_v1beta2 { */ kind?: string | null; /** - * The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your page token. In this way you can retrieve the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. There is no way to retrieve a consistent snapshot of a collection larger than the maximum page size. + * The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your page token. This lets you the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. You cannot retrieve a consistent snapshot of a collection larger than the maximum page size. */ nextPageToken?: string | null; /** @@ -610,7 +610,7 @@ export namespace dns_v1beta2 { networkUrl?: string | null; } /** - * A project resource. The project is a top level container for resources including Cloud DNS ManagedZones. Projects can be created only in the APIs console. + * A project resource. The project is a top level container for resources including Cloud DNS ManagedZones. Projects can be created only in the APIs console. Next tag: 7. */ export interface Schema$Project { /** @@ -746,7 +746,7 @@ export namespace dns_v1beta2 { export interface Schema$ResponsePoliciesListResponse { header?: Schema$ResponseHeader; /** - * The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your page token. In this way you can retrieve the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. There is no way to retrieve a consistent snapshot of a collection larger than the maximum page size. + * The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your page token. This lets you the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. You cannot retrieve a consistent snapshot of a collection larger than the maximum page size. */ nextPageToken?: string | null; /** @@ -822,7 +822,7 @@ export namespace dns_v1beta2 { export interface Schema$ResponsePolicyRulesListResponse { header?: Schema$ResponseHeader; /** - * The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your page token. In this way you can retrieve the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. There is no way to retrieve a consistent snapshot of a collection larger than the maximum page size. + * The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your page token. This lets you the complete contents of even very large collections one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. You cannot retrieve a consistent snapshot of a collection larger than the maximum page size. */ nextPageToken?: string | null; /** @@ -1366,7 +1366,7 @@ export namespace dns_v1beta2 { } /** - * Fetch the representation of an existing DnsKey. + * Fetches the representation of an existing DnsKey. * @example * ```js * // Before running the sample: @@ -1517,7 +1517,7 @@ export namespace dns_v1beta2 { } /** - * Enumerate DnsKeys to a ResourceRecordSet collection. + * Enumerates DnsKeys to a ResourceRecordSet collection. * @example * ```js * // Before running the sample: @@ -2067,7 +2067,7 @@ export namespace dns_v1beta2 { } /** - * Create a new ManagedZone. + * Creates a new ManagedZone. * @example * ```js * // Before running the sample: @@ -2238,7 +2238,7 @@ export namespace dns_v1beta2 { } /** - * Delete a previously created ManagedZone. + * Deletes a previously created ManagedZone. * @example * ```js * // Before running the sample: @@ -2367,7 +2367,7 @@ export namespace dns_v1beta2 { } /** - * Fetch the representation of an existing ManagedZone. + * Fetches the representation of an existing ManagedZone. * @example * ```js * // Before running the sample: @@ -2519,7 +2519,7 @@ export namespace dns_v1beta2 { } /** - * Enumerate ManagedZones that have been created but not yet deleted. + * Enumerates ManagedZones that have been created but not yet deleted. * @example * ```js * // Before running the sample: @@ -2666,7 +2666,7 @@ export namespace dns_v1beta2 { } /** - * Apply a partial update to an existing ManagedZone. + * Applies a partial update to an existing ManagedZone. * @example * ```js * // Before running the sample: @@ -2832,7 +2832,7 @@ export namespace dns_v1beta2 { } /** - * Update an existing ManagedZone. + * Updates an existing ManagedZone. * @example * ```js * // Before running the sample: @@ -3680,7 +3680,7 @@ export namespace dns_v1beta2 { } /** - * Apply a partial update to an existing Policy. + * Applies a partial update to an existing Policy. * @example * ```js * // Before running the sample: @@ -3835,7 +3835,7 @@ export namespace dns_v1beta2 { } /** - * Update an existing Policy. + * Updates an existing Policy. * @example * ```js * // Before running the sample: @@ -4095,7 +4095,7 @@ export namespace dns_v1beta2 { } /** - * Fetch the representation of an existing Project. + * Fetches the representation of an existing Project. * @example * ```js * // Before running the sample: @@ -4260,7 +4260,7 @@ export namespace dns_v1beta2 { } /** - * Create a new ResourceRecordSet. + * Creates a new ResourceRecordSet. * @example * ```js * // Before running the sample: @@ -4417,7 +4417,7 @@ export namespace dns_v1beta2 { } /** - * Delete a previously created ResourceRecordSet. + * Deletes a previously created ResourceRecordSet. * @example * ```js * // Before running the sample: @@ -4550,7 +4550,7 @@ export namespace dns_v1beta2 { } /** - * Fetch the representation of an existing ResourceRecordSet. + * Fetches the representation of an existing ResourceRecordSet. * @example * ```js * // Before running the sample: @@ -4700,7 +4700,7 @@ export namespace dns_v1beta2 { } /** - * Apply a partial update to an existing ResourceRecordSet. + * Applies a partial update to an existing ResourceRecordSet. * @example * ```js * // Before running the sample: @@ -5303,7 +5303,7 @@ export namespace dns_v1beta2 { } /** - * Delete a previously created Response Policy. Fails if the response policy is non-empty or still being referenced by a network. + * Deletes a previously created Response Policy. Fails if the response policy is non-empty or still being referenced by a network. * @example * ```js * // Before running the sample: @@ -5432,7 +5432,7 @@ export namespace dns_v1beta2 { } /** - * Fetch the representation of an existing Response Policy. + * Fetches the representation of an existing Response Policy. * @example * ```js * // Before running the sample: @@ -5574,7 +5574,7 @@ export namespace dns_v1beta2 { } /** - * Enumerate all Response Policies associated with a project. + * Enumerates all Response Policies associated with a project. * @example * ```js * // Before running the sample: @@ -5722,7 +5722,7 @@ export namespace dns_v1beta2 { } /** - * Apply a partial update to an existing Response Policy. + * Applies a partial update to an existing Response Policy. * @example * ```js * // Before running the sample: @@ -5880,7 +5880,7 @@ export namespace dns_v1beta2 { } /** - * Update an existing Response Policy. + * Updates an existing Response Policy. * @example * ```js * // Before running the sample: @@ -6302,7 +6302,7 @@ export namespace dns_v1beta2 { } /** - * Delete a previously created Response Policy Rule. + * Deletes a previously created Response Policy Rule. * @example * ```js * // Before running the sample: @@ -6433,7 +6433,7 @@ export namespace dns_v1beta2 { } /** - * Fetch the representation of an existing Response Policy Rule. + * Fetches the representation of an existing Response Policy Rule. * @example * ```js * // Before running the sample: @@ -6580,7 +6580,7 @@ export namespace dns_v1beta2 { } /** - * Enumerate all Response Policy Rules associated with a project. + * Enumerates all Response Policy Rules associated with a project. * @example * ```js * // Before running the sample: @@ -6731,7 +6731,7 @@ export namespace dns_v1beta2 { } /** - * Apply a partial update to an existing Response Policy Rule. + * Applies a partial update to an existing Response Policy Rule. * @example * ```js * // Before running the sample: @@ -6891,7 +6891,7 @@ export namespace dns_v1beta2 { } /** - * Update an existing Response Policy Rule. + * Updates an existing Response Policy Rule. * @example * ```js * // Before running the sample: diff --git a/src/apis/documentai/v1beta2.ts b/src/apis/documentai/v1beta2.ts index 44e91c85d9c..7fb17878950 100644 --- a/src/apis/documentai/v1beta2.ts +++ b/src/apis/documentai/v1beta2.ts @@ -239,6 +239,15 @@ export namespace documentai_v1beta2 { */ evaluation?: string | null; } + /** + * The long running operation metadata for SampleDataset. + */ + export interface Schema$GoogleCloudDocumentaiUiv1beta3SampleDatasetMetadata { + /** + * The basic metadata of the long running operation. + */ + commonMetadata?: Schema$GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata; + } /** * The long running operation metadata for set default processor version method. */ @@ -399,7 +408,7 @@ export namespace documentai_v1beta2 { */ export interface Schema$GoogleCloudDocumentaiV1beta1Document { /** - * Inline document content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64. + * Optional. Inline document content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64. */ content?: string | null; /** @@ -431,7 +440,7 @@ export namespace documentai_v1beta2 { */ shardInfo?: Schema$GoogleCloudDocumentaiV1beta1DocumentShardInfo; /** - * UTF-8 encoded text in reading order from the document. + * Optional. UTF-8 encoded text in reading order from the document. */ text?: string | null; /** @@ -443,11 +452,7 @@ export namespace documentai_v1beta2 { */ textStyles?: Schema$GoogleCloudDocumentaiV1beta1DocumentStyle[]; /** - * A list of translations on Document.text. For document shards, translations in this list may cross shard boundaries. - */ - translations?: Schema$GoogleCloudDocumentaiV1beta1DocumentTranslation[]; - /** - * Currently supports Google Cloud Storage URI of the form `gs://bucket_name/object_name`. Object versioning is not supported. See [Google Cloud Storage Request URIs](https://cloud.google.com/storage/docs/reference-uris) for more info. + * Optional. Currently supports Google Cloud Storage URI of the form `gs://bucket_name/object_name`. Object versioning is not supported. See [Google Cloud Storage Request URIs](https://cloud.google.com/storage/docs/reference-uris) for more info. */ uri?: string | null; } @@ -464,11 +469,11 @@ export namespace documentai_v1beta2 { */ id?: string | null; /** - * Deprecated. Use `id` field instead. + * Optional. Deprecated. Use `id` field instead. */ mentionId?: string | null; /** - * Text value in the document e.g. `1600 Amphitheatre Pkwy`. + * Optional. Text value in the document e.g. `1600 Amphitheatre Pkwy`. */ mentionText?: string | null; /** @@ -492,7 +497,7 @@ export namespace documentai_v1beta2 { */ redacted?: boolean | null; /** - * Provenance of the entity. Text anchor indexing into the Document.text. + * Optional. Provenance of the entity. Text anchor indexing into the Document.text. */ textAnchor?: Schema$GoogleCloudDocumentaiV1beta1DocumentTextAnchor; /** @@ -1082,27 +1087,6 @@ export namespace documentai_v1beta2 { */ textAnchor?: Schema$GoogleCloudDocumentaiV1beta1DocumentTextAnchor; } - /** - * A translation of the text segment. - */ - export interface Schema$GoogleCloudDocumentaiV1beta1DocumentTranslation { - /** - * The BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - */ - languageCode?: string | null; - /** - * The history of this annotation. - */ - provenance?: Schema$GoogleCloudDocumentaiV1beta1DocumentProvenance[]; - /** - * Provenance of the translation. Text anchor indexing into the Document.text. There can only be a single `TextAnchor.text_segments` element. If the start and end index of the text segment are the same, the text change is inserted before that index. - */ - textAnchor?: Schema$GoogleCloudDocumentaiV1beta1DocumentTextAnchor; - /** - * Text translated into the target language. - */ - translatedText?: string | null; - } /** * The Google Cloud Storage location where the output file will be written to. */ @@ -1246,7 +1230,7 @@ export namespace documentai_v1beta2 { */ export interface Schema$GoogleCloudDocumentaiV1beta2Document { /** - * Inline document content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64. + * Optional. Inline document content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64. */ content?: string | null; /** @@ -1282,7 +1266,7 @@ export namespace documentai_v1beta2 { */ shardInfo?: Schema$GoogleCloudDocumentaiV1beta2DocumentShardInfo; /** - * UTF-8 encoded text in reading order from the document. + * Optional. UTF-8 encoded text in reading order from the document. */ text?: string | null; /** @@ -1294,11 +1278,7 @@ export namespace documentai_v1beta2 { */ textStyles?: Schema$GoogleCloudDocumentaiV1beta2DocumentStyle[]; /** - * A list of translations on Document.text. For document shards, translations in this list may cross shard boundaries. - */ - translations?: Schema$GoogleCloudDocumentaiV1beta2DocumentTranslation[]; - /** - * Currently supports Google Cloud Storage URI of the form `gs://bucket_name/object_name`. Object versioning is not supported. See [Google Cloud Storage Request URIs](https://cloud.google.com/storage/docs/reference-uris) for more info. + * Optional. Currently supports Google Cloud Storage URI of the form `gs://bucket_name/object_name`. Object versioning is not supported. See [Google Cloud Storage Request URIs](https://cloud.google.com/storage/docs/reference-uris) for more info. */ uri?: string | null; } @@ -1315,11 +1295,11 @@ export namespace documentai_v1beta2 { */ id?: string | null; /** - * Deprecated. Use `id` field instead. + * Optional. Deprecated. Use `id` field instead. */ mentionId?: string | null; /** - * Text value in the document e.g. `1600 Amphitheatre Pkwy`. + * Optional. Text value in the document e.g. `1600 Amphitheatre Pkwy`. */ mentionText?: string | null; /** @@ -1343,7 +1323,7 @@ export namespace documentai_v1beta2 { */ redacted?: boolean | null; /** - * Provenance of the entity. Text anchor indexing into the Document.text. + * Optional. Provenance of the entity. Text anchor indexing into the Document.text. */ textAnchor?: Schema$GoogleCloudDocumentaiV1beta2DocumentTextAnchor; /** @@ -1950,27 +1930,6 @@ export namespace documentai_v1beta2 { */ textAnchor?: Schema$GoogleCloudDocumentaiV1beta2DocumentTextAnchor; } - /** - * A translation of the text segment. - */ - export interface Schema$GoogleCloudDocumentaiV1beta2DocumentTranslation { - /** - * The BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - */ - languageCode?: string | null; - /** - * The history of this annotation. - */ - provenance?: Schema$GoogleCloudDocumentaiV1beta2DocumentProvenance[]; - /** - * Provenance of the translation. Text anchor indexing into the Document.text. There can only be a single `TextAnchor.text_segments` element. If the start and end index of the text segment are the same, the text change is inserted before that index. - */ - textAnchor?: Schema$GoogleCloudDocumentaiV1beta2DocumentTextAnchor; - /** - * Text translated into the target language. - */ - translatedText?: string | null; - } /** * Parameters to control entity extraction behavior. */ @@ -2429,11 +2388,11 @@ export namespace documentai_v1beta2 { message?: string | null; } /** - * Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to/from color representations in various languages over compactness; for example, the fields of this representation can be trivially provided to the constructor of "java.awt.Color" in Java; it can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" method in iOS; and, with just a little work, it can be easily formatted into a CSS "rgba()" string in JavaScript, as well. Note: this proto does not carry information about the absolute color space that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default, applications SHOULD assume the sRGB color space. Note: when color equality needs to be decided, implementations, unless documented otherwise, will treat two colors to be equal if all their red, green, blue and alpha values each differ by at most 1e-5. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); \} public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); \} return resultBuilder.build(); \} // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; \} return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; \} static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) { return nil; \} Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; \} [result autorelease]; return result; \} // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) { return rgbToCssColor_(red, green, blue); \} var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); \}; var rgbToCssColor_ = function(red, green, blue) { var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) { resultBuilder.push('0'); \} resultBuilder.push(hexString); return resultBuilder.join(''); \}; // ... + * Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to/from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn't carry information about the absolute color space that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most 1e-5. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); \} public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); \} return resultBuilder.build(); \} // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; \} return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; \} static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) { return nil; \} Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; \} [result autorelease]; return result; \} // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) { return rgbToCssColor(red, green, blue); \} var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); \}; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) { resultBuilder.push('0'); \} resultBuilder.push(hexString); return resultBuilder.join(''); \}; // ... */ export interface Schema$GoogleTypeColor { /** - * The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: pixel color = alpha * (this color) + (1.0 - alpha) * (background color) This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is to be rendered as a solid color (as if the alpha value had been explicitly given with a value of 1.0). + * The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0). */ alpha?: number | null; /** @@ -2815,7 +2774,6 @@ export namespace documentai_v1beta2 { * // "text": "my_text", * // "textChanges": [], * // "textStyles": [], - * // "translations": [], * // "uri": "my_uri" * // } * } @@ -3174,7 +3132,6 @@ export namespace documentai_v1beta2 { * // "text": "my_text", * // "textChanges": [], * // "textStyles": [], - * // "translations": [], * // "uri": "my_uri" * // } * } diff --git a/src/apis/documentai/v1beta3.ts b/src/apis/documentai/v1beta3.ts index 03c00ad0965..7fda3355db8 100644 --- a/src/apis/documentai/v1beta3.ts +++ b/src/apis/documentai/v1beta3.ts @@ -239,6 +239,15 @@ export namespace documentai_v1beta3 { */ evaluation?: string | null; } + /** + * The long running operation metadata for SampleDataset. + */ + export interface Schema$GoogleCloudDocumentaiUiv1beta3SampleDatasetMetadata { + /** + * The basic metadata of the long running operation. + */ + commonMetadata?: Schema$GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata; + } /** * The long running operation metadata for set default processor version method. */ @@ -399,7 +408,7 @@ export namespace documentai_v1beta3 { */ export interface Schema$GoogleCloudDocumentaiV1beta1Document { /** - * Inline document content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64. + * Optional. Inline document content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64. */ content?: string | null; /** @@ -431,7 +440,7 @@ export namespace documentai_v1beta3 { */ shardInfo?: Schema$GoogleCloudDocumentaiV1beta1DocumentShardInfo; /** - * UTF-8 encoded text in reading order from the document. + * Optional. UTF-8 encoded text in reading order from the document. */ text?: string | null; /** @@ -443,11 +452,7 @@ export namespace documentai_v1beta3 { */ textStyles?: Schema$GoogleCloudDocumentaiV1beta1DocumentStyle[]; /** - * A list of translations on Document.text. For document shards, translations in this list may cross shard boundaries. - */ - translations?: Schema$GoogleCloudDocumentaiV1beta1DocumentTranslation[]; - /** - * Currently supports Google Cloud Storage URI of the form `gs://bucket_name/object_name`. Object versioning is not supported. See [Google Cloud Storage Request URIs](https://cloud.google.com/storage/docs/reference-uris) for more info. + * Optional. Currently supports Google Cloud Storage URI of the form `gs://bucket_name/object_name`. Object versioning is not supported. See [Google Cloud Storage Request URIs](https://cloud.google.com/storage/docs/reference-uris) for more info. */ uri?: string | null; } @@ -464,11 +469,11 @@ export namespace documentai_v1beta3 { */ id?: string | null; /** - * Deprecated. Use `id` field instead. + * Optional. Deprecated. Use `id` field instead. */ mentionId?: string | null; /** - * Text value in the document e.g. `1600 Amphitheatre Pkwy`. + * Optional. Text value in the document e.g. `1600 Amphitheatre Pkwy`. */ mentionText?: string | null; /** @@ -492,7 +497,7 @@ export namespace documentai_v1beta3 { */ redacted?: boolean | null; /** - * Provenance of the entity. Text anchor indexing into the Document.text. + * Optional. Provenance of the entity. Text anchor indexing into the Document.text. */ textAnchor?: Schema$GoogleCloudDocumentaiV1beta1DocumentTextAnchor; /** @@ -1082,27 +1087,6 @@ export namespace documentai_v1beta3 { */ textAnchor?: Schema$GoogleCloudDocumentaiV1beta1DocumentTextAnchor; } - /** - * A translation of the text segment. - */ - export interface Schema$GoogleCloudDocumentaiV1beta1DocumentTranslation { - /** - * The BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - */ - languageCode?: string | null; - /** - * The history of this annotation. - */ - provenance?: Schema$GoogleCloudDocumentaiV1beta1DocumentProvenance[]; - /** - * Provenance of the translation. Text anchor indexing into the Document.text. There can only be a single `TextAnchor.text_segments` element. If the start and end index of the text segment are the same, the text change is inserted before that index. - */ - textAnchor?: Schema$GoogleCloudDocumentaiV1beta1DocumentTextAnchor; - /** - * Text translated into the target language. - */ - translatedText?: string | null; - } /** * The Google Cloud Storage location where the output file will be written to. */ @@ -1228,7 +1212,7 @@ export namespace documentai_v1beta3 { */ export interface Schema$GoogleCloudDocumentaiV1beta2Document { /** - * Inline document content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64. + * Optional. Inline document content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64. */ content?: string | null; /** @@ -1264,7 +1248,7 @@ export namespace documentai_v1beta3 { */ shardInfo?: Schema$GoogleCloudDocumentaiV1beta2DocumentShardInfo; /** - * UTF-8 encoded text in reading order from the document. + * Optional. UTF-8 encoded text in reading order from the document. */ text?: string | null; /** @@ -1276,11 +1260,7 @@ export namespace documentai_v1beta3 { */ textStyles?: Schema$GoogleCloudDocumentaiV1beta2DocumentStyle[]; /** - * A list of translations on Document.text. For document shards, translations in this list may cross shard boundaries. - */ - translations?: Schema$GoogleCloudDocumentaiV1beta2DocumentTranslation[]; - /** - * Currently supports Google Cloud Storage URI of the form `gs://bucket_name/object_name`. Object versioning is not supported. See [Google Cloud Storage Request URIs](https://cloud.google.com/storage/docs/reference-uris) for more info. + * Optional. Currently supports Google Cloud Storage URI of the form `gs://bucket_name/object_name`. Object versioning is not supported. See [Google Cloud Storage Request URIs](https://cloud.google.com/storage/docs/reference-uris) for more info. */ uri?: string | null; } @@ -1297,11 +1277,11 @@ export namespace documentai_v1beta3 { */ id?: string | null; /** - * Deprecated. Use `id` field instead. + * Optional. Deprecated. Use `id` field instead. */ mentionId?: string | null; /** - * Text value in the document e.g. `1600 Amphitheatre Pkwy`. + * Optional. Text value in the document e.g. `1600 Amphitheatre Pkwy`. */ mentionText?: string | null; /** @@ -1325,7 +1305,7 @@ export namespace documentai_v1beta3 { */ redacted?: boolean | null; /** - * Provenance of the entity. Text anchor indexing into the Document.text. + * Optional. Provenance of the entity. Text anchor indexing into the Document.text. */ textAnchor?: Schema$GoogleCloudDocumentaiV1beta2DocumentTextAnchor; /** @@ -1932,27 +1912,6 @@ export namespace documentai_v1beta3 { */ textAnchor?: Schema$GoogleCloudDocumentaiV1beta2DocumentTextAnchor; } - /** - * A translation of the text segment. - */ - export interface Schema$GoogleCloudDocumentaiV1beta2DocumentTranslation { - /** - * The BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - */ - languageCode?: string | null; - /** - * The history of this annotation. - */ - provenance?: Schema$GoogleCloudDocumentaiV1beta2DocumentProvenance[]; - /** - * Provenance of the translation. Text anchor indexing into the Document.text. There can only be a single `TextAnchor.text_segments` element. If the start and end index of the text segment are the same, the text change is inserted before that index. - */ - textAnchor?: Schema$GoogleCloudDocumentaiV1beta2DocumentTextAnchor; - /** - * Text translated into the target language. - */ - translatedText?: string | null; - } /** * The Google Cloud Storage location where the output file will be written to. */ @@ -2208,7 +2167,7 @@ export namespace documentai_v1beta3 { */ export interface Schema$GoogleCloudDocumentaiV1beta3Document { /** - * Inline document content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64. + * Optional. Inline document content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64. */ content?: string | null; /** @@ -2240,7 +2199,7 @@ export namespace documentai_v1beta3 { */ shardInfo?: Schema$GoogleCloudDocumentaiV1beta3DocumentShardInfo; /** - * UTF-8 encoded text in reading order from the document. + * Optional. UTF-8 encoded text in reading order from the document. */ text?: string | null; /** @@ -2252,11 +2211,7 @@ export namespace documentai_v1beta3 { */ textStyles?: Schema$GoogleCloudDocumentaiV1beta3DocumentStyle[]; /** - * A list of translations on Document.text. For document shards, translations in this list may cross shard boundaries. - */ - translations?: Schema$GoogleCloudDocumentaiV1beta3DocumentTranslation[]; - /** - * Currently supports Google Cloud Storage URI of the form `gs://bucket_name/object_name`. Object versioning is not supported. See [Google Cloud Storage Request URIs](https://cloud.google.com/storage/docs/reference-uris) for more info. + * Optional. Currently supports Google Cloud Storage URI of the form `gs://bucket_name/object_name`. Object versioning is not supported. See [Google Cloud Storage Request URIs](https://cloud.google.com/storage/docs/reference-uris) for more info. */ uri?: string | null; } @@ -2273,11 +2228,11 @@ export namespace documentai_v1beta3 { */ id?: string | null; /** - * Deprecated. Use `id` field instead. + * Optional. Deprecated. Use `id` field instead. */ mentionId?: string | null; /** - * Text value in the document e.g. `1600 Amphitheatre Pkwy`. + * Optional. Text value in the document e.g. `1600 Amphitheatre Pkwy`. */ mentionText?: string | null; /** @@ -2301,7 +2256,7 @@ export namespace documentai_v1beta3 { */ redacted?: boolean | null; /** - * Provenance of the entity. Text anchor indexing into the Document.text. + * Optional. Provenance of the entity. Text anchor indexing into the Document.text. */ textAnchor?: Schema$GoogleCloudDocumentaiV1beta3DocumentTextAnchor; /** @@ -2909,27 +2864,6 @@ export namespace documentai_v1beta3 { */ textAnchor?: Schema$GoogleCloudDocumentaiV1beta3DocumentTextAnchor; } - /** - * A translation of the text segment. - */ - export interface Schema$GoogleCloudDocumentaiV1beta3DocumentTranslation { - /** - * The BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - */ - languageCode?: string | null; - /** - * The history of this annotation. - */ - provenance?: Schema$GoogleCloudDocumentaiV1beta3DocumentProvenance[]; - /** - * Provenance of the translation. Text anchor indexing into the Document.text. There can only be a single `TextAnchor.text_segments` element. If the start and end index of the text segment are the same, the text change is inserted before that index. - */ - textAnchor?: Schema$GoogleCloudDocumentaiV1beta3DocumentTextAnchor; - /** - * Text translated into the target language. - */ - translatedText?: string | null; - } /** * Specifies a document stored on Cloud Storage. */ @@ -3243,11 +3177,11 @@ export namespace documentai_v1beta3 { message?: string | null; } /** - * Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to/from color representations in various languages over compactness; for example, the fields of this representation can be trivially provided to the constructor of "java.awt.Color" in Java; it can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" method in iOS; and, with just a little work, it can be easily formatted into a CSS "rgba()" string in JavaScript, as well. Note: this proto does not carry information about the absolute color space that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default, applications SHOULD assume the sRGB color space. Note: when color equality needs to be decided, implementations, unless documented otherwise, will treat two colors to be equal if all their red, green, blue and alpha values each differ by at most 1e-5. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); \} public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); \} return resultBuilder.build(); \} // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; \} return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; \} static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) { return nil; \} Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; \} [result autorelease]; return result; \} // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) { return rgbToCssColor_(red, green, blue); \} var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); \}; var rgbToCssColor_ = function(red, green, blue) { var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) { resultBuilder.push('0'); \} resultBuilder.push(hexString); return resultBuilder.join(''); \}; // ... + * Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to/from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn't carry information about the absolute color space that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most 1e-5. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); \} public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); \} return resultBuilder.build(); \} // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; \} return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; \} static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) { return nil; \} Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; \} [result autorelease]; return result; \} // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) { return rgbToCssColor(red, green, blue); \} var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); \}; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) { resultBuilder.push('0'); \} resultBuilder.push(hexString); return resultBuilder.join(''); \}; // ... */ export interface Schema$GoogleTypeColor { /** - * The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: pixel color = alpha * (this color) + (1.0 - alpha) * (background color) This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is to be rendered as a solid color (as if the alpha value had been explicitly given with a value of 1.0). + * The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0). */ alpha?: number | null; /** @@ -3588,13 +3522,13 @@ export namespace documentai_v1beta3 { * * // Do the magic * const res = await documentai.projects.locations.list({ - * // The standard list 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). * filter: 'placeholder-value', * // The resource that owns the locations collection, if applicable. * name: 'projects/my-project', - * // The standard list page size. + * // The maximum number of results to return. If not set, the service will select a default. * pageSize: 'placeholder-value', - * // The standard list page token. + * // A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. * pageToken: 'placeholder-value', * }); * console.log(res.data); @@ -3717,7 +3651,7 @@ export namespace documentai_v1beta3 { export interface Params$Resource$Projects$Locations$List extends StandardParameters { /** - * The standard list 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). */ filter?: string; /** @@ -3725,11 +3659,11 @@ export namespace documentai_v1beta3 { */ name?: string; /** - * The standard list page size. + * The maximum number of results to return. If not set, the service will select a default. */ pageSize?: number; /** - * The standard list page token. + * A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. */ pageToken?: string; } @@ -3927,7 +3861,7 @@ export namespace documentai_v1beta3 { * * // Do the magic * const res = await documentai.projects.locations.processors.batchProcess({ - * // Required. The resource name of Processor or ProcessorVersion. Format: projects/{project\}/locations/{location\}/processors/{processor\}, or projects/{project\}/locations/{location\}/processors/{processor\}/processorVerions/{processorVersion\} + * // Required. The resource name of Processor or ProcessorVersion. Format: projects/{project\}/locations/{location\}/processors/{processor\}, or projects/{project\}/locations/{location\}/processors/{processor\}/processorVersions/{processorVersion\} * name: 'projects/my-project/locations/my-location/processors/my-processor', * * // Request body metadata @@ -4079,7 +4013,7 @@ export namespace documentai_v1beta3 { * * // Do the magic * const res = await documentai.projects.locations.processors.process({ - * // Required. The resource name of the Processor or ProcessorVersion to use for processing. If a Processor is specified, the server will use its default version. Format: projects/{project\}/locations/{location\}/processors/{processor\}, or projects/{project\}/locations/{location\}/processors/{processor\}/processorVerions/{processorVersion\} + * // Required. The resource name of the Processor or ProcessorVersion to use for processing. If a Processor is specified, the server will use its default version. Format: projects/{project\}/locations/{location\}/processors/{processor\}, or projects/{project\}/locations/{location\}/processors/{processor\}/processorVersions/{processorVersion\} * name: 'projects/my-project/locations/my-location/processors/my-processor', * * // Request body metadata @@ -4207,7 +4141,7 @@ export namespace documentai_v1beta3 { export interface Params$Resource$Projects$Locations$Processors$Batchprocess extends StandardParameters { /** - * Required. The resource name of Processor or ProcessorVersion. Format: projects/{project\}/locations/{location\}/processors/{processor\}, or projects/{project\}/locations/{location\}/processors/{processor\}/processorVerions/{processorVersion\} + * Required. The resource name of Processor or ProcessorVersion. Format: projects/{project\}/locations/{location\}/processors/{processor\}, or projects/{project\}/locations/{location\}/processors/{processor\}/processorVersions/{processorVersion\} */ name?: string; @@ -4219,7 +4153,7 @@ export namespace documentai_v1beta3 { export interface Params$Resource$Projects$Locations$Processors$Process extends StandardParameters { /** - * Required. The resource name of the Processor or ProcessorVersion to use for processing. If a Processor is specified, the server will use its default version. Format: projects/{project\}/locations/{location\}/processors/{processor\}, or projects/{project\}/locations/{location\}/processors/{processor\}/processorVerions/{processorVersion\} + * Required. The resource name of the Processor or ProcessorVersion to use for processing. If a Processor is specified, the server will use its default version. Format: projects/{project\}/locations/{location\}/processors/{processor\}, or projects/{project\}/locations/{location\}/processors/{processor\}/processorVersions/{processorVersion\} */ name?: string; @@ -4434,7 +4368,7 @@ export namespace documentai_v1beta3 { * // Do the magic * const res = await documentai.projects.locations.processors.processorVersions.batchProcess( * { - * // Required. The resource name of Processor or ProcessorVersion. Format: projects/{project\}/locations/{location\}/processors/{processor\}, or projects/{project\}/locations/{location\}/processors/{processor\}/processorVerions/{processorVersion\} + * // Required. The resource name of Processor or ProcessorVersion. Format: projects/{project\}/locations/{location\}/processors/{processor\}, or projects/{project\}/locations/{location\}/processors/{processor\}/processorVersions/{processorVersion\} * name: * 'projects/my-project/locations/my-location/processors/my-processor/processorVersions/my-processorVersion', * @@ -4589,7 +4523,7 @@ export namespace documentai_v1beta3 { * // Do the magic * const res = await documentai.projects.locations.processors.processorVersions.process( * { - * // Required. The resource name of the Processor or ProcessorVersion to use for processing. If a Processor is specified, the server will use its default version. Format: projects/{project\}/locations/{location\}/processors/{processor\}, or projects/{project\}/locations/{location\}/processors/{processor\}/processorVerions/{processorVersion\} + * // Required. The resource name of the Processor or ProcessorVersion to use for processing. If a Processor is specified, the server will use its default version. Format: projects/{project\}/locations/{location\}/processors/{processor\}, or projects/{project\}/locations/{location\}/processors/{processor\}/processorVersions/{processorVersion\} * name: * 'projects/my-project/locations/my-location/processors/my-processor/processorVersions/my-processorVersion', * @@ -4719,7 +4653,7 @@ export namespace documentai_v1beta3 { export interface Params$Resource$Projects$Locations$Processors$Processorversions$Batchprocess extends StandardParameters { /** - * Required. The resource name of Processor or ProcessorVersion. Format: projects/{project\}/locations/{location\}/processors/{processor\}, or projects/{project\}/locations/{location\}/processors/{processor\}/processorVerions/{processorVersion\} + * Required. The resource name of Processor or ProcessorVersion. Format: projects/{project\}/locations/{location\}/processors/{processor\}, or projects/{project\}/locations/{location\}/processors/{processor\}/processorVersions/{processorVersion\} */ name?: string; @@ -4731,7 +4665,7 @@ export namespace documentai_v1beta3 { export interface Params$Resource$Projects$Locations$Processors$Processorversions$Process extends StandardParameters { /** - * Required. The resource name of the Processor or ProcessorVersion to use for processing. If a Processor is specified, the server will use its default version. Format: projects/{project\}/locations/{location\}/processors/{processor\}, or projects/{project\}/locations/{location\}/processors/{processor\}/processorVerions/{processorVersion\} + * Required. The resource name of the Processor or ProcessorVersion to use for processing. If a Processor is specified, the server will use its default version. Format: projects/{project\}/locations/{location\}/processors/{processor\}, or projects/{project\}/locations/{location\}/processors/{processor\}/processorVersions/{processorVersion\} */ name?: string; diff --git a/src/apis/driveactivity/v2.ts b/src/apis/driveactivity/v2.ts index 79173aaa627..e1752828165 100644 --- a/src/apis/driveactivity/v2.ts +++ b/src/apis/driveactivity/v2.ts @@ -297,7 +297,7 @@ export namespace driveactivity_v2 { */ export interface Schema$Copy { /** - * The the original object. + * The original object. */ originalObject?: Schema$TargetReference; } @@ -349,7 +349,7 @@ export namespace driveactivity_v2 { */ legacyId?: string | null; /** - * The name of the domain, e.g. "google.com". + * The name of the domain, e.g. `google.com`. */ name?: string | null; } @@ -358,7 +358,7 @@ export namespace driveactivity_v2 { */ export interface Schema$Drive { /** - * The resource name of the shared drive. The format is "COLLECTION_ID/DRIVE_ID". Clients should not assume a specific collection ID for this resource name. + * The resource name of the shared drive. The format is `COLLECTION_ID/DRIVE_ID`. Clients should not assume a specific collection ID for this resource name. */ name?: string | null; /** @@ -437,7 +437,7 @@ export namespace driveactivity_v2 { */ mimeType?: string | null; /** - * The target Drive item. The format is "items/ITEM_ID". + * The target Drive item. The format is `items/ITEM_ID`. */ name?: string | null; /** @@ -470,7 +470,7 @@ export namespace driveactivity_v2 { */ folder?: Schema$Folder; /** - * The target Drive item. The format is "items/ITEM_ID". + * The target Drive item. The format is `items/ITEM_ID`. */ name?: string | null; /** @@ -483,7 +483,7 @@ export namespace driveactivity_v2 { */ export interface Schema$DriveReference { /** - * The resource name of the shared drive. The format is "COLLECTION_ID/DRIVE_ID". Clients should not assume a specific collection ID for this resource name. + * The resource name of the shared drive. The format is `COLLECTION_ID/DRIVE_ID`. Clients should not assume a specific collection ID for this resource name. */ name?: string | null; /** @@ -512,7 +512,7 @@ export namespace driveactivity_v2 { */ legacyDiscussionId?: string | null; /** - * The link to the discussion thread containing this comment, for example, "https://docs.google.com/DOCUMENT_ID/edit?disco=THREAD_ID". + * The link to the discussion thread containing this comment, for example, `https://docs.google.com/DOCUMENT_ID/edit?disco=THREAD_ID`. */ linkToDiscussion?: string | null; /** @@ -560,7 +560,7 @@ export namespace driveactivity_v2 { */ isCurrentUser?: boolean | null; /** - * The identifier for this user that can be used with the People API to get more information. The format is "people/ACCOUNT_ID". See https://developers.google.com/people/. + * The identifier for this user that can be used with the People API to get more information. The format is `people/ACCOUNT_ID`. See https://developers.google.com/people/. */ personName?: string | null; } @@ -631,7 +631,7 @@ export namespace driveactivity_v2 { */ group?: Schema$Group; /** - * Indicates the Google Drive permissions role. The role determines a user's ability to read, write, and comment on items. + * Indicates the [Google Drive permissions role](https://developers.google.com/drive/web/manage-sharing#roles). The role determines a user's ability to read, write, and comment on items. */ role?: string | null; /** @@ -666,7 +666,7 @@ export namespace driveactivity_v2 { */ export interface Schema$QueryDriveActivityRequest { /** - * Return activities for this Drive folder and all children and descendants. The format is "items/ITEM_ID". + * Return activities for this Drive folder and all children and descendants. The format is `items/ITEM_ID`. */ ancestorName?: string | null; /** @@ -674,11 +674,11 @@ export namespace driveactivity_v2 { */ consolidationStrategy?: Schema$ConsolidationStrategy; /** - * The filtering for items returned from this query request. The format of the filter string is a sequence of expressions, joined by an optional "AND", where each expression is of the form "field operator value". Supported fields: - time: Uses numerical operators on date values either in terms of milliseconds since Jan 1, 1970 or in RFC 3339 format. Examples: - time \> 1452409200000 AND time <= 1492812924310 - time \>= "2016-01-10T01:02:03-05:00" - detail.action_detail_case: Uses the "has" operator (:) and either a singular value or a list of allowed action types enclosed in parentheses. Examples: - detail.action_detail_case: RENAME - detail.action_detail_case:(CREATE EDIT) - -detail.action_detail_case:MOVE + * The filtering for items returned from this query request. The format of the filter string is a sequence of expressions, joined by an optional "AND", where each expression is of the form "field operator value". Supported fields: - `time`: Uses numerical operators on date values either in terms of milliseconds since Jan 1, 1970 or in RFC 3339 format. Examples: - `time \> 1452409200000 AND time <= 1492812924310` - `time \>= "2016-01-10T01:02:03-05:00"` - `detail.action_detail_case`: Uses the "has" operator (:) and either a singular value or a list of allowed action types enclosed in parentheses. Examples: - `detail.action_detail_case: RENAME` - `detail.action_detail_case:(CREATE EDIT)` - `-detail.action_detail_case:MOVE` */ filter?: string | null; /** - * Return activities for this Drive item. The format is "items/ITEM_ID". + * Return activities for this Drive item. The format is `items/ITEM_ID`. */ itemName?: string | null; /** diff --git a/src/apis/eventarc/v1.ts b/src/apis/eventarc/v1.ts index 52b2e2623e9..bd03c55032a 100644 --- a/src/apis/eventarc/v1.ts +++ b/src/apis/eventarc/v1.ts @@ -677,13 +677,13 @@ export namespace eventarc_v1 { * * // Do the magic * const res = await eventarc.projects.locations.list({ - * // The standard list 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). * filter: 'placeholder-value', * // The resource that owns the locations collection, if applicable. * name: 'projects/my-project', - * // The standard list page size. + * // The maximum number of results to return. If not set, the service will select a default. * pageSize: 'placeholder-value', - * // The standard list page token. + * // A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. * pageToken: 'placeholder-value', * }); * console.log(res.data); @@ -802,7 +802,7 @@ export namespace eventarc_v1 { export interface Params$Resource$Projects$Locations$List extends StandardParameters { /** - * The standard list 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). */ filter?: string; /** @@ -810,11 +810,11 @@ export namespace eventarc_v1 { */ name?: string; /** - * The standard list page size. + * The maximum number of results to return. If not set, the service will select a default. */ pageSize?: number; /** - * The standard list page token. + * A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. */ pageToken?: string; } diff --git a/src/apis/eventarc/v1beta1.ts b/src/apis/eventarc/v1beta1.ts index 44af5979288..f3af578c6f1 100644 --- a/src/apis/eventarc/v1beta1.ts +++ b/src/apis/eventarc/v1beta1.ts @@ -673,13 +673,13 @@ export namespace eventarc_v1beta1 { * * // Do the magic * const res = await eventarc.projects.locations.list({ - * // The standard list 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). * filter: 'placeholder-value', * // The resource that owns the locations collection, if applicable. * name: 'projects/my-project', - * // The standard list page size. + * // The maximum number of results to return. If not set, the service will select a default. * pageSize: 'placeholder-value', - * // The standard list page token. + * // A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. * pageToken: 'placeholder-value', * }); * console.log(res.data); @@ -798,7 +798,7 @@ export namespace eventarc_v1beta1 { export interface Params$Resource$Projects$Locations$List extends StandardParameters { /** - * The standard list 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). */ filter?: string; /** @@ -806,11 +806,11 @@ export namespace eventarc_v1beta1 { */ name?: string; /** - * The standard list page size. + * The maximum number of results to return. If not set, the service will select a default. */ pageSize?: number; /** - * The standard list page token. + * A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. */ pageToken?: string; } diff --git a/src/apis/fcm/v1.ts b/src/apis/fcm/v1.ts index 7888137b2d5..5cf0de9937a 100644 --- a/src/apis/fcm/v1.ts +++ b/src/apis/fcm/v1.ts @@ -307,11 +307,11 @@ export namespace fcm_v1 { image?: string | null; } /** - * Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to/from color representations in various languages over compactness; for example, the fields of this representation can be trivially provided to the constructor of "java.awt.Color" in Java; it can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" method in iOS; and, with just a little work, it can be easily formatted into a CSS "rgba()" string in JavaScript, as well. Note: this proto does not carry information about the absolute color space that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default, applications SHOULD assume the sRGB color space. Note: when color equality needs to be decided, implementations, unless documented otherwise, will treat two colors to be equal if all their red, green, blue and alpha values each differ by at most 1e-5. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); \} public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); \} return resultBuilder.build(); \} // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; \} return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; \} static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) { return nil; \} Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; \} [result autorelease]; return result; \} // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) { return rgbToCssColor_(red, green, blue); \} var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); \}; var rgbToCssColor_ = function(red, green, blue) { var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) { resultBuilder.push('0'); \} resultBuilder.push(hexString); return resultBuilder.join(''); \}; // ... + * Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to/from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn't carry information about the absolute color space that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most 1e-5. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); \} public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); \} return resultBuilder.build(); \} // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; \} return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; \} static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) { return nil; \} Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; \} [result autorelease]; return result; \} // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) { return rgbToCssColor(red, green, blue); \} var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); \}; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) { resultBuilder.push('0'); \} resultBuilder.push(hexString); return resultBuilder.join(''); \}; // ... */ export interface Schema$Color { /** - * The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: pixel color = alpha * (this color) + (1.0 - alpha) * (background color) This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is to be rendered as a solid color (as if the alpha value had been explicitly given with a value of 1.0). + * The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0). */ alpha?: number | null; /** diff --git a/src/apis/firebasehosting/v1.ts b/src/apis/firebasehosting/v1.ts index 4608558eac8..b27fce03ef2 100644 --- a/src/apis/firebasehosting/v1.ts +++ b/src/apis/firebasehosting/v1.ts @@ -103,7 +103,7 @@ export namespace firebasehosting_v1 { /** * Firebase Hosting API * - * The Firebase Hosting REST API enables programmatic and customizable deployments to your Firebase-hosted sites. Use this REST API to deploy new or updated hosting configurations and content files. + * The Firebase Hosting REST API enables programmatic and customizable management and deployments to your Firebase-hosted sites. Use this REST API to create and manage channels and sites as well as to deploy new or updated hosting configurations and content files. * * @example * ```js diff --git a/src/apis/firebasehosting/v1beta1.ts b/src/apis/firebasehosting/v1beta1.ts index 065f3323de6..7c085d3104c 100644 --- a/src/apis/firebasehosting/v1beta1.ts +++ b/src/apis/firebasehosting/v1beta1.ts @@ -103,7 +103,7 @@ export namespace firebasehosting_v1beta1 { /** * Firebase Hosting API * - * The Firebase Hosting REST API enables programmatic and customizable deployments to your Firebase-hosted sites. Use this REST API to deploy new or updated hosting configurations and content files. + * The Firebase Hosting REST API enables programmatic and customizable management and deployments to your Firebase-hosted sites. Use this REST API to create and manage channels and sites as well as to deploy new or updated hosting configurations and content files. * * @example * ```js @@ -183,7 +183,7 @@ export namespace firebasehosting_v1beta1 { */ labels?: {[key: string]: string} | null; /** - * The fully-qualified identifier for the channel, in the format: sites/ SITE_NAME/channels/CHANNEL_ID + * The fully-qualified resource name for the channel, in the format: sites/ SITE_ID/channels/CHANNEL_ID */ name?: string | null; /** @@ -221,7 +221,7 @@ export namespace firebasehosting_v1beta1 { */ include?: Schema$PathFilter; /** - * Required. The unique identifier for the version to be cloned, in the format: sites/SITE_NAME/versions/VERSION_ID + * Required. The unique identifier for the version to be cloned, in the format: sites/SITE_ID/versions/VERSION_ID */ sourceVersion?: string | null; } @@ -380,6 +380,16 @@ export namespace firebasehosting_v1beta1 { */ releases?: Schema$Release[]; } + export interface Schema$ListSitesResponse { + /** + * The pagination token, if more results exist beyond the ones in this response. Include this token in your next call to `ListSites`. Page tokens are short-lived and should not be stored. + */ + nextPageToken?: string | null; + /** + * A list of Site objects associated with the specified Firebase project. + */ + sites?: Schema$Site[]; + } export interface Schema$ListVersionFilesResponse { /** * The list of paths to the hashes of the files in the specified version. @@ -446,7 +456,7 @@ export namespace firebasehosting_v1beta1 { */ uploadRequiredHashes?: string[] | null; /** - * The URL to which the files should be uploaded, in the format: "https://upload-firebasehosting.googleapis.com/upload/sites/SITE_NAME /versions/VERSION_ID/files" Perform a multipart `POST` of the Gzipped file contents to the URL using a forward slash and the hash of the file appended to the end. + * The URL to which the files should be uploaded, in the format: "https://upload-firebasehosting.googleapis.com/upload/sites/SITE_ID /versions/VERSION_ID/files" Perform a multipart `POST` of the Gzipped file contents to the URL using a forward slash and the hash of the file appended to the end. */ uploadUrl?: string | null; } @@ -493,7 +503,7 @@ export namespace firebasehosting_v1beta1 { */ message?: string | null; /** - * Output only. The unique identifier for the release, in either of the following formats: - sites/SITE_NAME/releases/RELEASE_ID - sites/SITE_NAME/channels/CHANNEL_ID/releases/RELEASE_ID This name is provided in the response body when you call [`releases.create`](sites.releases/create) or [`channels.releases.create`](sites.channels.releases/create). + * Output only. The unique identifier for the release, in either of the following formats: - sites/SITE_ID/releases/RELEASE_ID - sites/SITE_ID/channels/CHANNEL_ID/releases/RELEASE_ID This name is provided in the response body when you call [`releases.create`](sites.releases/create) or [`channels.releases.create`](sites.channels.releases/create). */ name?: string | null; /** @@ -575,6 +585,31 @@ export namespace firebasehosting_v1beta1 { */ trailingSlashBehavior?: string | null; } + /** + * A `Site` represents a Firebase Hosting site. + */ + export interface Schema$Site { + /** + * Optional. The [ID of a Web App](https://firebase.google.com/docs/projects/api/reference/rest/v1beta1/projects.webApps#WebApp.FIELDS.app_id) associated with the Hosting site. + */ + appId?: string | null; + /** + * Output only. The default URL for the Hosting site. + */ + defaultUrl?: string | null; + /** + * Optional. User-specified labels for the Hosting site. + */ + labels?: {[key: string]: string} | null; + /** + * Output only. The fully-qualified resource name of the Hosting site, in the format: projects/PROJECT_IDENTIFIER/sites/SITE_ID PROJECT_IDENTIFIER: the Firebase project's [`ProjectNumber`](https://firebase.google.com/docs/projects/api/reference/rest/v1beta1/projects#FirebaseProject.FIELDS.project_number) ***(recommended)*** or its [`ProjectId`](https://firebase.google.com/docs/projects/api/reference/rest/v1beta1/projects#FirebaseProject.FIELDS.project_id). Learn more about using project identifiers in Google's [AIP 2510 standard](https://google.aip.dev/cloud/2510). + */ + name?: string | null; + /** + * Output only. The type of Hosting site. Every Firebase project has a `DEFAULT_SITE`, which is created when Hosting is provisioned for the project. All additional sites are `USER_SITE`. + */ + type?: string | null; + } /** * A `SiteConfig` contains metadata associated with a specific site that controls Firebase Hosting serving behavior */ @@ -646,7 +681,7 @@ export namespace firebasehosting_v1beta1 { */ labels?: {[key: string]: string} | null; /** - * The fully-qualified identifier for the version, in the format: sites/ SITE_NAME/versions/VERSION_ID This name is provided in the response body when you call [`CreateVersion`](sites.versions/create). + * The fully-qualified resource name for the version, in the format: sites/ SITE_ID/versions/VERSION_ID This name is provided in the response body when you call [`CreateVersion`](sites.versions/create). */ name?: string | null; /** @@ -857,7 +892,7 @@ export namespace firebasehosting_v1beta1 { } /** - * Gets the Hosting metadata for a specific site. + * Creates a new Hosting Site in the specified parent Firebase project. Note that Hosting sites can take several minutes to propagate through Firebase systems. * @example * ```js * // Before running the sample: @@ -876,9 +911,7 @@ export namespace firebasehosting_v1beta1 { * // Scopes can be specified either as an array or as a single, space-delimited string. * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', - * 'https://www.googleapis.com/auth/cloud-platform.read-only', * 'https://www.googleapis.com/auth/firebase', - * 'https://www.googleapis.com/auth/firebase.readonly', * ], * }); * @@ -887,16 +920,33 @@ export namespace firebasehosting_v1beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await firebasehosting.projects.sites.getConfig({ - * // Required. The site for which to get the SiteConfig, in the format: sites/ site-name/config - * name: 'projects/my-project/sites/my-site/config', + * const res = await firebasehosting.projects.sites.create({ + * // Required. The Firebase project in which to create a Hosting site, in the format: projects/PROJECT_IDENTIFIER Refer to the `Site` [`name`](../projects#Site.FIELDS.name) field for details about PROJECT_IDENTIFIER values. + * parent: 'projects/my-project', + * // Required. Immutable. A globally unique identifier for the Hosting site. This identifier is used to construct the Firebase-provisioned subdomains for the site, so it must also be a valid domain name label. + * siteId: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "appId": "my_appId", + * // "defaultUrl": "my_defaultUrl", + * // "labels": {}, + * // "name": "my_name", + * // "type": "my_type" + * // } + * }, * }); * console.log(res.data); * * // Example response * // { - * // "cloudLoggingEnabled": false, - * // "maxVersions": "my_maxVersions" + * // "appId": "my_appId", + * // "defaultUrl": "my_defaultUrl", + * // "labels": {}, + * // "name": "my_name", + * // "type": "my_type" * // } * } * @@ -912,50 +962,181 @@ export namespace firebasehosting_v1beta1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - getConfig( - params: Params$Resource$Projects$Sites$Getconfig, + create( + params: Params$Resource$Projects$Sites$Create, options: StreamMethodOptions ): GaxiosPromise; - getConfig( - params?: Params$Resource$Projects$Sites$Getconfig, + create( + params?: Params$Resource$Projects$Sites$Create, options?: MethodOptions - ): GaxiosPromise; - getConfig( - params: Params$Resource$Projects$Sites$Getconfig, + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Sites$Create, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - getConfig( - params: Params$Resource$Projects$Sites$Getconfig, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + create( + params: Params$Resource$Projects$Sites$Create, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - getConfig( - params: Params$Resource$Projects$Sites$Getconfig, - callback: BodyResponseCallback + create( + params: Params$Resource$Projects$Sites$Create, + callback: BodyResponseCallback ): void; - getConfig(callback: BodyResponseCallback): void; - getConfig( + create(callback: BodyResponseCallback): void; + create( paramsOrCallback?: - | Params$Resource$Projects$Sites$Getconfig - | BodyResponseCallback + | Params$Resource$Projects$Sites$Create + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { + ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Sites$Getconfig; + {}) as Params$Resource$Projects$Sites$Create; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Sites$Getconfig; + params = {} as Params$Resource$Projects$Sites$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://firebasehosting.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+parent}/sites').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Deletes the specified Hosting Site from the specified parent Firebase project. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/firebasehosting.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const firebasehosting = google.firebasehosting('v1beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/firebase', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await firebasehosting.projects.sites.delete({ + * // Required. The fully-qualified resource name for the Hosting site, in the format: projects/PROJECT_IDENTIFIER/sites/SITE_ID Refer to the `Site` [`name`](../projects#Site.FIELDS.name) field for details about PROJECT_IDENTIFIER values. + * name: 'projects/my-project/sites/my-site', + * }); + * console.log(res.data); + * + * // Example response + * // {} + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + delete( + params: Params$Resource$Projects$Sites$Delete, + options: StreamMethodOptions + ): GaxiosPromise; + delete( + params?: Params$Resource$Projects$Sites$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Sites$Delete, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Sites$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Sites$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Projects$Sites$Delete + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Sites$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Sites$Delete; options = {}; } @@ -970,7 +1151,7 @@ export namespace firebasehosting_v1beta1 { options: Object.assign( { url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), - method: 'GET', + method: 'DELETE', }, options ), @@ -980,17 +1161,17 @@ export namespace firebasehosting_v1beta1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Sets the Hosting metadata for a specific site. + * Gets the specified Hosting Site. * @example * ```js * // Before running the sample: @@ -1009,7 +1190,9 @@ export namespace firebasehosting_v1beta1 { * // Scopes can be specified either as an array or as a single, space-delimited string. * scopes: [ * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/cloud-platform.read-only', * 'https://www.googleapis.com/auth/firebase', + * 'https://www.googleapis.com/auth/firebase.readonly', * ], * }); * @@ -1018,27 +1201,19 @@ export namespace firebasehosting_v1beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await firebasehosting.projects.sites.updateConfig({ - * // Required. The site for which to update the SiteConfig, in the format: sites/ site-name/config - * name: 'projects/my-project/sites/my-site/config', - * // A set of field names from your [site configuration](../sites.SiteConfig) that you want to update. A field will be overwritten if, and only if, it's in the mask. If a mask is not provided then a default mask of only [`max_versions`](../sites.SiteConfig.max_versions) will be used. - * updateMask: 'placeholder-value', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "cloudLoggingEnabled": false, - * // "maxVersions": "my_maxVersions" - * // } - * }, + * const res = await firebasehosting.projects.sites.get({ + * // Required. The fully-qualified resource name for the Hosting site, in the format: projects/PROJECT_IDENTIFIER/sites/SITE_ID Refer to the `Site` [`name`](../projects#Site.FIELDS.name) field for details about PROJECT_IDENTIFIER values. Since a SITE_ID is a globally unique identifier, you can also use the unique sub-collection resource access pattern, in the format: projects/-/sites/SITE_ID + * name: 'projects/my-project/sites/my-site', * }); * console.log(res.data); * * // Example response * // { - * // "cloudLoggingEnabled": false, - * // "maxVersions": "my_maxVersions" + * // "appId": "my_appId", + * // "defaultUrl": "my_defaultUrl", + * // "labels": {}, + * // "name": "my_name", + * // "type": "my_type" * // } * } * @@ -1054,50 +1229,50 @@ export namespace firebasehosting_v1beta1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - updateConfig( - params: Params$Resource$Projects$Sites$Updateconfig, + get( + params: Params$Resource$Projects$Sites$Get, options: StreamMethodOptions ): GaxiosPromise; - updateConfig( - params?: Params$Resource$Projects$Sites$Updateconfig, + get( + params?: Params$Resource$Projects$Sites$Get, options?: MethodOptions - ): GaxiosPromise; - updateConfig( - params: Params$Resource$Projects$Sites$Updateconfig, + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Sites$Get, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - updateConfig( - params: Params$Resource$Projects$Sites$Updateconfig, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + get( + params: Params$Resource$Projects$Sites$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - updateConfig( - params: Params$Resource$Projects$Sites$Updateconfig, - callback: BodyResponseCallback + get( + params: Params$Resource$Projects$Sites$Get, + callback: BodyResponseCallback ): void; - updateConfig(callback: BodyResponseCallback): void; - updateConfig( + get(callback: BodyResponseCallback): void; + get( paramsOrCallback?: - | Params$Resource$Projects$Sites$Updateconfig - | BodyResponseCallback + | Params$Resource$Projects$Sites$Get + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { + ): void | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Projects$Sites$Updateconfig; + {}) as Params$Resource$Projects$Sites$Get; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Projects$Sites$Updateconfig; + params = {} as Params$Resource$Projects$Sites$Get; options = {}; } @@ -1112,7 +1287,7 @@ export namespace firebasehosting_v1beta1 { options: Object.assign( { url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), - method: 'PATCH', + method: 'GET', }, options ), @@ -1122,22 +1297,649 @@ export namespace firebasehosting_v1beta1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } - } - export interface Params$Resource$Projects$Sites$Getconfig - extends StandardParameters { /** - * Required. The site for which to get the SiteConfig, in the format: sites/ site-name/config - */ - name?: string; + * Gets the Hosting metadata for a specific site. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/firebasehosting.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const firebasehosting = google.firebasehosting('v1beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/cloud-platform.read-only', + * 'https://www.googleapis.com/auth/firebase', + * 'https://www.googleapis.com/auth/firebase.readonly', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await firebasehosting.projects.sites.getConfig({ + * // Required. The site for which to get the SiteConfig, in the format: sites/ site-name/config + * name: 'projects/my-project/sites/my-site/config', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "cloudLoggingEnabled": false, + * // "maxVersions": "my_maxVersions" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + getConfig( + params: Params$Resource$Projects$Sites$Getconfig, + options: StreamMethodOptions + ): GaxiosPromise; + getConfig( + params?: Params$Resource$Projects$Sites$Getconfig, + options?: MethodOptions + ): GaxiosPromise; + getConfig( + params: Params$Resource$Projects$Sites$Getconfig, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getConfig( + params: Params$Resource$Projects$Sites$Getconfig, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getConfig( + params: Params$Resource$Projects$Sites$Getconfig, + callback: BodyResponseCallback + ): void; + getConfig(callback: BodyResponseCallback): void; + getConfig( + paramsOrCallback?: + | Params$Resource$Projects$Sites$Getconfig + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Sites$Getconfig; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Sites$Getconfig; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://firebasehosting.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Lists each Hosting Site associated with the specified parent Firebase project. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/firebasehosting.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const firebasehosting = google.firebasehosting('v1beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/cloud-platform.read-only', + * 'https://www.googleapis.com/auth/firebase', + * 'https://www.googleapis.com/auth/firebase.readonly', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await firebasehosting.projects.sites.list({ + * // Optional. The maximum number of sites to return. The service may return a lower number if fewer sites exist than this maximum number. If unspecified, defaults to 40. + * pageSize: 'placeholder-value', + * // Optional. A token from a previous call to `ListSites` that tells the server where to resume listing. + * pageToken: 'placeholder-value', + * // Required. The Firebase project for which to list sites, in the format: projects/PROJECT_IDENTIFIER Refer to the `Site` [`name`](../projects#Site.FIELDS.name) field for details about PROJECT_IDENTIFIER values. + * parent: 'projects/my-project', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "nextPageToken": "my_nextPageToken", + * // "sites": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Projects$Sites$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Projects$Sites$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Sites$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Sites$List, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Sites$List, + callback: BodyResponseCallback + ): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Sites$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Sites$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Sites$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://firebasehosting.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+parent}/sites').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Updates attributes of the specified Hosting Site. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/firebasehosting.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const firebasehosting = google.firebasehosting('v1beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/firebase', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await firebasehosting.projects.sites.patch({ + * // Output only. The fully-qualified resource name of the Hosting site, in the format: projects/PROJECT_IDENTIFIER/sites/SITE_ID PROJECT_IDENTIFIER: the Firebase project's [`ProjectNumber`](https://firebase.google.com/docs/projects/api/reference/rest/v1beta1/projects#FirebaseProject.FIELDS.project_number) ***(recommended)*** or its [`ProjectId`](https://firebase.google.com/docs/projects/api/reference/rest/v1beta1/projects#FirebaseProject.FIELDS.project_id). Learn more about using project identifiers in Google's [AIP 2510 standard](https://google.aip.dev/cloud/2510). + * name: 'projects/my-project/sites/my-site', + * // A set of field names from your Site that you want to update. + * updateMask: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "appId": "my_appId", + * // "defaultUrl": "my_defaultUrl", + * // "labels": {}, + * // "name": "my_name", + * // "type": "my_type" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "appId": "my_appId", + * // "defaultUrl": "my_defaultUrl", + * // "labels": {}, + * // "name": "my_name", + * // "type": "my_type" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + patch( + params: Params$Resource$Projects$Sites$Patch, + options: StreamMethodOptions + ): GaxiosPromise; + patch( + params?: Params$Resource$Projects$Sites$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Sites$Patch, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Sites$Patch, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Sites$Patch, + callback: BodyResponseCallback + ): void; + patch(callback: BodyResponseCallback): void; + patch( + paramsOrCallback?: + | Params$Resource$Projects$Sites$Patch + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Sites$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Sites$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://firebasehosting.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Sets the Hosting metadata for a specific site. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/firebasehosting.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const firebasehosting = google.firebasehosting('v1beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/firebase', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await firebasehosting.projects.sites.updateConfig({ + * // Required. The site for which to update the SiteConfig, in the format: sites/ site-name/config + * name: 'projects/my-project/sites/my-site/config', + * // A set of field names from your [site configuration](../sites.SiteConfig) that you want to update. A field will be overwritten if, and only if, it's in the mask. If a mask is not provided then a default mask of only [`max_versions`](../sites.SiteConfig.max_versions) will be used. + * updateMask: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "cloudLoggingEnabled": false, + * // "maxVersions": "my_maxVersions" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "cloudLoggingEnabled": false, + * // "maxVersions": "my_maxVersions" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + updateConfig( + params: Params$Resource$Projects$Sites$Updateconfig, + options: StreamMethodOptions + ): GaxiosPromise; + updateConfig( + params?: Params$Resource$Projects$Sites$Updateconfig, + options?: MethodOptions + ): GaxiosPromise; + updateConfig( + params: Params$Resource$Projects$Sites$Updateconfig, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + updateConfig( + params: Params$Resource$Projects$Sites$Updateconfig, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + updateConfig( + params: Params$Resource$Projects$Sites$Updateconfig, + callback: BodyResponseCallback + ): void; + updateConfig(callback: BodyResponseCallback): void; + updateConfig( + paramsOrCallback?: + | Params$Resource$Projects$Sites$Updateconfig + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Sites$Updateconfig; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Sites$Updateconfig; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://firebasehosting.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Sites$Create + extends StandardParameters { + /** + * Required. The Firebase project in which to create a Hosting site, in the format: projects/PROJECT_IDENTIFIER Refer to the `Site` [`name`](../projects#Site.FIELDS.name) field for details about PROJECT_IDENTIFIER values. + */ + parent?: string; + /** + * Required. Immutable. A globally unique identifier for the Hosting site. This identifier is used to construct the Firebase-provisioned subdomains for the site, so it must also be a valid domain name label. + */ + siteId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Site; + } + export interface Params$Resource$Projects$Sites$Delete + extends StandardParameters { + /** + * Required. The fully-qualified resource name for the Hosting site, in the format: projects/PROJECT_IDENTIFIER/sites/SITE_ID Refer to the `Site` [`name`](../projects#Site.FIELDS.name) field for details about PROJECT_IDENTIFIER values. + */ + name?: string; + } + export interface Params$Resource$Projects$Sites$Get + extends StandardParameters { + /** + * Required. The fully-qualified resource name for the Hosting site, in the format: projects/PROJECT_IDENTIFIER/sites/SITE_ID Refer to the `Site` [`name`](../projects#Site.FIELDS.name) field for details about PROJECT_IDENTIFIER values. Since a SITE_ID is a globally unique identifier, you can also use the unique sub-collection resource access pattern, in the format: projects/-/sites/SITE_ID + */ + name?: string; + } + export interface Params$Resource$Projects$Sites$Getconfig + extends StandardParameters { + /** + * Required. The site for which to get the SiteConfig, in the format: sites/ site-name/config + */ + name?: string; + } + export interface Params$Resource$Projects$Sites$List + extends StandardParameters { + /** + * Optional. The maximum number of sites to return. The service may return a lower number if fewer sites exist than this maximum number. If unspecified, defaults to 40. + */ + pageSize?: number; + /** + * Optional. A token from a previous call to `ListSites` that tells the server where to resume listing. + */ + pageToken?: string; + /** + * Required. The Firebase project for which to list sites, in the format: projects/PROJECT_IDENTIFIER Refer to the `Site` [`name`](../projects#Site.FIELDS.name) field for details about PROJECT_IDENTIFIER values. + */ + parent?: string; + } + export interface Params$Resource$Projects$Sites$Patch + extends StandardParameters { + /** + * Output only. The fully-qualified resource name of the Hosting site, in the format: projects/PROJECT_IDENTIFIER/sites/SITE_ID PROJECT_IDENTIFIER: the Firebase project's [`ProjectNumber`](https://firebase.google.com/docs/projects/api/reference/rest/v1beta1/projects#FirebaseProject.FIELDS.project_number) ***(recommended)*** or its [`ProjectId`](https://firebase.google.com/docs/projects/api/reference/rest/v1beta1/projects#FirebaseProject.FIELDS.project_id). Learn more about using project identifiers in Google's [AIP 2510 standard](https://google.aip.dev/cloud/2510). + */ + name?: string; + /** + * A set of field names from your Site that you want to update. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Site; } export interface Params$Resource$Projects$Sites$Updateconfig extends StandardParameters { @@ -1198,7 +2000,7 @@ export namespace firebasehosting_v1beta1 { * const res = await firebasehosting.projects.sites.channels.create({ * // Required. Immutable. A unique ID within the site that identifies the channel. * channelId: 'placeholder-value', - * // Required. The site in which to create this channel, in the format: sites/ SITE_NAME + * // Required. The site in which to create this channel, in the format: sites/ SITE_ID * parent: 'projects/my-project/sites/my-site', * * // Request body metadata @@ -1355,7 +2157,7 @@ export namespace firebasehosting_v1beta1 { * * // Do the magic * const res = await firebasehosting.projects.sites.channels.delete({ - * // Required. The fully-qualified identifier for the channel, in the format: sites/SITE_NAME/channels/CHANNEL_ID + * // Required. The fully-qualified resource name for the channel, in the format: sites/SITE_ID/channels/CHANNEL_ID * name: 'projects/my-project/sites/my-site/channels/my-channel', * }); * console.log(res.data); @@ -1485,7 +2287,7 @@ export namespace firebasehosting_v1beta1 { * * // Do the magic * const res = await firebasehosting.projects.sites.channels.get({ - * // Required. The fully-qualified identifier for the channel, in the format: sites/SITE_NAME/channels/CHANNEL_ID + * // Required. The fully-qualified resource name for the channel, in the format: sites/SITE_ID/channels/CHANNEL_ID * name: 'projects/my-project/sites/my-site/channels/my-channel', * }); * console.log(res.data); @@ -1629,7 +2431,7 @@ export namespace firebasehosting_v1beta1 { * pageSize: 'placeholder-value', * // A token from a previous call to `ListChannels` that tells the server where to resume listing. * pageToken: 'placeholder-value', - * // Required. The site for which to list channels, in the format: sites/ SITE_NAME + * // Required. The site for which to list channels, in the format: sites/SITE_ID * parent: 'projects/my-project/sites/my-site', * }); * console.log(res.data); @@ -1768,7 +2570,7 @@ export namespace firebasehosting_v1beta1 { * * // Do the magic * const res = await firebasehosting.projects.sites.channels.patch({ - * // The fully-qualified identifier for the channel, in the format: sites/ SITE_NAME/channels/CHANNEL_ID + * // The fully-qualified resource name for the channel, in the format: sites/ SITE_ID/channels/CHANNEL_ID * name: 'projects/my-project/sites/my-site/channels/my-channel', * // A comma-separated list of fields to be updated in this request. * updateMask: 'placeholder-value', @@ -1902,7 +2704,7 @@ export namespace firebasehosting_v1beta1 { */ channelId?: string; /** - * Required. The site in which to create this channel, in the format: sites/ SITE_NAME + * Required. The site in which to create this channel, in the format: sites/ SITE_ID */ parent?: string; @@ -1914,14 +2716,14 @@ export namespace firebasehosting_v1beta1 { export interface Params$Resource$Projects$Sites$Channels$Delete extends StandardParameters { /** - * Required. The fully-qualified identifier for the channel, in the format: sites/SITE_NAME/channels/CHANNEL_ID + * Required. The fully-qualified resource name for the channel, in the format: sites/SITE_ID/channels/CHANNEL_ID */ name?: string; } export interface Params$Resource$Projects$Sites$Channels$Get extends StandardParameters { /** - * Required. The fully-qualified identifier for the channel, in the format: sites/SITE_NAME/channels/CHANNEL_ID + * Required. The fully-qualified resource name for the channel, in the format: sites/SITE_ID/channels/CHANNEL_ID */ name?: string; } @@ -1936,14 +2738,14 @@ export namespace firebasehosting_v1beta1 { */ pageToken?: string; /** - * Required. The site for which to list channels, in the format: sites/ SITE_NAME + * Required. The site for which to list channels, in the format: sites/SITE_ID */ parent?: string; } export interface Params$Resource$Projects$Sites$Channels$Patch extends StandardParameters { /** - * The fully-qualified identifier for the channel, in the format: sites/ SITE_NAME/channels/CHANNEL_ID + * The fully-qualified resource name for the channel, in the format: sites/ SITE_ID/channels/CHANNEL_ID */ name?: string; /** @@ -1993,9 +2795,9 @@ export namespace firebasehosting_v1beta1 { * * // Do the magic * const res = await firebasehosting.projects.sites.channels.releases.create({ - * // Required. The site or channel to which the release belongs, in either of the following formats: - sites/SITE_NAME - sites/SITE_NAME/channels/CHANNEL_ID + * // Required. The site or channel to which the release belongs, in either of the following formats: - sites/SITE_ID - sites/SITE_ID/channels/CHANNEL_ID * parent: 'projects/my-project/sites/my-site/channels/my-channel', - * // The unique identifier for a version, in the format: sites/SITE_NAME /versions/VERSION_ID The SITE_NAME in this version identifier must match the SITE_NAME in the `parent` parameter. This query parameter must be empty if the `type` field in the request body is `SITE_DISABLE`. + * // The unique identifier for a version, in the format: sites/SITE_ID/versions/ VERSION_ID The SITE_ID in this version identifier must match the SITE_ID in the `parent` parameter. This query parameter must be empty if the `type` field in the request body is `SITE_DISABLE`. * versionName: 'placeholder-value', * * // Request body metadata @@ -2152,7 +2954,7 @@ export namespace firebasehosting_v1beta1 { * pageSize: 'placeholder-value', * // A token from a previous call to `releases.list` or `channels.releases.list` that tells the server where to resume listing. * pageToken: 'placeholder-value', - * // Required. The site or channel for which to list releases, in either of the following formats: - sites/SITE_NAME - sites/SITE_NAME/channels/CHANNEL_ID + * // Required. The site or channel for which to list releases, in either of the following formats: - sites/SITE_ID - sites/SITE_ID/channels/CHANNEL_ID * parent: 'projects/my-project/sites/my-site/channels/my-channel', * }); * console.log(res.data); @@ -2265,11 +3067,11 @@ export namespace firebasehosting_v1beta1 { export interface Params$Resource$Projects$Sites$Channels$Releases$Create extends StandardParameters { /** - * Required. The site or channel to which the release belongs, in either of the following formats: - sites/SITE_NAME - sites/SITE_NAME/channels/CHANNEL_ID + * Required. The site or channel to which the release belongs, in either of the following formats: - sites/SITE_ID - sites/SITE_ID/channels/CHANNEL_ID */ parent?: string; /** - * The unique identifier for a version, in the format: sites/SITE_NAME /versions/VERSION_ID The SITE_NAME in this version identifier must match the SITE_NAME in the `parent` parameter. This query parameter must be empty if the `type` field in the request body is `SITE_DISABLE`. + * The unique identifier for a version, in the format: sites/SITE_ID/versions/ VERSION_ID The SITE_ID in this version identifier must match the SITE_ID in the `parent` parameter. This query parameter must be empty if the `type` field in the request body is `SITE_DISABLE`. */ versionName?: string; @@ -2289,7 +3091,7 @@ export namespace firebasehosting_v1beta1 { */ pageToken?: string; /** - * Required. The site or channel for which to list releases, in either of the following formats: - sites/SITE_NAME - sites/SITE_NAME/channels/CHANNEL_ID + * Required. The site or channel for which to list releases, in either of the following formats: - sites/SITE_ID - sites/SITE_ID/channels/CHANNEL_ID */ parent?: string; } @@ -3098,9 +3900,9 @@ export namespace firebasehosting_v1beta1 { * * // Do the magic * const res = await firebasehosting.projects.sites.releases.create({ - * // Required. The site or channel to which the release belongs, in either of the following formats: - sites/SITE_NAME - sites/SITE_NAME/channels/CHANNEL_ID + * // Required. The site or channel to which the release belongs, in either of the following formats: - sites/SITE_ID - sites/SITE_ID/channels/CHANNEL_ID * parent: 'projects/my-project/sites/my-site', - * // The unique identifier for a version, in the format: sites/SITE_NAME /versions/VERSION_ID The SITE_NAME in this version identifier must match the SITE_NAME in the `parent` parameter. This query parameter must be empty if the `type` field in the request body is `SITE_DISABLE`. + * // The unique identifier for a version, in the format: sites/SITE_ID/versions/ VERSION_ID The SITE_ID in this version identifier must match the SITE_ID in the `parent` parameter. This query parameter must be empty if the `type` field in the request body is `SITE_DISABLE`. * versionName: 'placeholder-value', * * // Request body metadata @@ -3257,7 +4059,7 @@ export namespace firebasehosting_v1beta1 { * pageSize: 'placeholder-value', * // A token from a previous call to `releases.list` or `channels.releases.list` that tells the server where to resume listing. * pageToken: 'placeholder-value', - * // Required. The site or channel for which to list releases, in either of the following formats: - sites/SITE_NAME - sites/SITE_NAME/channels/CHANNEL_ID + * // Required. The site or channel for which to list releases, in either of the following formats: - sites/SITE_ID - sites/SITE_ID/channels/CHANNEL_ID * parent: 'projects/my-project/sites/my-site', * }); * console.log(res.data); @@ -3370,11 +4172,11 @@ export namespace firebasehosting_v1beta1 { export interface Params$Resource$Projects$Sites$Releases$Create extends StandardParameters { /** - * Required. The site or channel to which the release belongs, in either of the following formats: - sites/SITE_NAME - sites/SITE_NAME/channels/CHANNEL_ID + * Required. The site or channel to which the release belongs, in either of the following formats: - sites/SITE_ID - sites/SITE_ID/channels/CHANNEL_ID */ parent?: string; /** - * The unique identifier for a version, in the format: sites/SITE_NAME /versions/VERSION_ID The SITE_NAME in this version identifier must match the SITE_NAME in the `parent` parameter. This query parameter must be empty if the `type` field in the request body is `SITE_DISABLE`. + * The unique identifier for a version, in the format: sites/SITE_ID/versions/ VERSION_ID The SITE_ID in this version identifier must match the SITE_ID in the `parent` parameter. This query parameter must be empty if the `type` field in the request body is `SITE_DISABLE`. */ versionName?: string; @@ -3394,7 +4196,7 @@ export namespace firebasehosting_v1beta1 { */ pageToken?: string; /** - * Required. The site or channel for which to list releases, in either of the following formats: - sites/SITE_NAME - sites/SITE_NAME/channels/CHANNEL_ID + * Required. The site or channel for which to list releases, in either of the following formats: - sites/SITE_ID - sites/SITE_ID/channels/CHANNEL_ID */ parent?: string; } @@ -3437,7 +4239,7 @@ export namespace firebasehosting_v1beta1 { * * // Do the magic * const res = await firebasehosting.projects.sites.versions.clone({ - * // Required. The target site for the cloned version, in the format: sites/ SITE_NAME + * // Required. The target site for the cloned version, in the format: sites/ SITE_ID * parent: 'projects/my-project/sites/my-site', * * // Request body metadata @@ -3585,7 +4387,7 @@ export namespace firebasehosting_v1beta1 { * * // Do the magic * const res = await firebasehosting.projects.sites.versions.create({ - * // Required. The site in which to create the version, in the format: sites/ SITE_NAME + * // Required. The site in which to create the version, in the format: sites/ SITE_ID * parent: 'projects/my-project/sites/my-site', * // The self-reported size of the version. This value is used for a pre-emptive quota check for legacy version uploads. * sizeBytes: 'placeholder-value', @@ -3754,7 +4556,7 @@ export namespace firebasehosting_v1beta1 { * * // Do the magic * const res = await firebasehosting.projects.sites.versions.delete({ - * // Required. The fully-qualified identifier for the version, in the format: sites/SITE_NAME/versions/VERSION_ID + * // Required. The fully-qualified resource name for the version, in the format: sites/SITE_ID/versions/VERSION_ID * name: 'projects/my-project/sites/my-site/versions/my-version', * }); * console.log(res.data); @@ -3890,7 +4692,7 @@ export namespace firebasehosting_v1beta1 { * pageSize: 'placeholder-value', * // A token from a previous call to `ListVersions` that tells the server where to resume listing. * pageToken: 'placeholder-value', - * // Required. The site or channel for which to list versions, in either of the following formats: - sites/SITE_NAME - sites/SITE_NAME/channels/CHANNEL_ID + * // Required. The site or channel for which to list versions, in either of the following formats: - sites/SITE_ID - sites/SITE_ID/channels/CHANNEL_ID * parent: 'projects/my-project/sites/my-site', * }); * console.log(res.data); @@ -4029,7 +4831,7 @@ export namespace firebasehosting_v1beta1 { * * // Do the magic * const res = await firebasehosting.projects.sites.versions.patch({ - * // The fully-qualified identifier for the version, in the format: sites/ SITE_NAME/versions/VERSION_ID This name is provided in the response body when you call [`CreateVersion`](sites.versions/create). + * // The fully-qualified resource name for the version, in the format: sites/ SITE_ID/versions/VERSION_ID This name is provided in the response body when you call [`CreateVersion`](sites.versions/create). * name: 'projects/my-project/sites/my-site/versions/my-version', * // A set of field names from your [version](../sites.versions) that you want to update. A field will be overwritten if, and only if, it's in the mask. If a mask is not provided then a default mask of only [`status`](../sites.versions#Version.FIELDS.status) will be used. * updateMask: 'placeholder-value', @@ -4193,7 +4995,7 @@ export namespace firebasehosting_v1beta1 { * * // Do the magic * const res = await firebasehosting.projects.sites.versions.populateFiles({ - * // Required. The version to which to add files, in the format: sites/SITE_NAME /versions/VERSION_ID + * // Required. The version to which to add files, in the format: sites/SITE_ID /versions/VERSION_ID * parent: 'projects/my-project/sites/my-site/versions/my-version', * * // Request body metadata @@ -4318,7 +5120,7 @@ export namespace firebasehosting_v1beta1 { export interface Params$Resource$Projects$Sites$Versions$Clone extends StandardParameters { /** - * Required. The target site for the cloned version, in the format: sites/ SITE_NAME + * Required. The target site for the cloned version, in the format: sites/ SITE_ID */ parent?: string; @@ -4330,7 +5132,7 @@ export namespace firebasehosting_v1beta1 { export interface Params$Resource$Projects$Sites$Versions$Create extends StandardParameters { /** - * Required. The site in which to create the version, in the format: sites/ SITE_NAME + * Required. The site in which to create the version, in the format: sites/ SITE_ID */ parent?: string; /** @@ -4350,7 +5152,7 @@ export namespace firebasehosting_v1beta1 { export interface Params$Resource$Projects$Sites$Versions$Delete extends StandardParameters { /** - * Required. The fully-qualified identifier for the version, in the format: sites/SITE_NAME/versions/VERSION_ID + * Required. The fully-qualified resource name for the version, in the format: sites/SITE_ID/versions/VERSION_ID */ name?: string; } @@ -4369,14 +5171,14 @@ export namespace firebasehosting_v1beta1 { */ pageToken?: string; /** - * Required. The site or channel for which to list versions, in either of the following formats: - sites/SITE_NAME - sites/SITE_NAME/channels/CHANNEL_ID + * Required. The site or channel for which to list versions, in either of the following formats: - sites/SITE_ID - sites/SITE_ID/channels/CHANNEL_ID */ parent?: string; } export interface Params$Resource$Projects$Sites$Versions$Patch extends StandardParameters { /** - * The fully-qualified identifier for the version, in the format: sites/ SITE_NAME/versions/VERSION_ID This name is provided in the response body when you call [`CreateVersion`](sites.versions/create). + * The fully-qualified resource name for the version, in the format: sites/ SITE_ID/versions/VERSION_ID This name is provided in the response body when you call [`CreateVersion`](sites.versions/create). */ name?: string; /** @@ -4392,7 +5194,7 @@ export namespace firebasehosting_v1beta1 { export interface Params$Resource$Projects$Sites$Versions$Populatefiles extends StandardParameters { /** - * Required. The version to which to add files, in the format: sites/SITE_NAME /versions/VERSION_ID + * Required. The version to which to add files, in the format: sites/SITE_ID /versions/VERSION_ID */ parent?: string; @@ -4444,7 +5246,7 @@ export namespace firebasehosting_v1beta1 { * pageSize: 'placeholder-value', * // A token from a previous call to `ListVersionFiles` that tells the server where to resume listing. * pageToken: 'placeholder-value', - * // Required. The version for which to list files, in the format: sites/ SITE_NAME/versions/VERSION_ID + * // Required. The version for which to list files, in the format: sites/SITE_ID /versions/VERSION_ID * parent: 'projects/my-project/sites/my-site/versions/my-version', * // The type of files that should be listed for the specified version. * status: 'placeholder-value', @@ -4567,7 +5369,7 @@ export namespace firebasehosting_v1beta1 { */ pageToken?: string; /** - * Required. The version for which to list files, in the format: sites/ SITE_NAME/versions/VERSION_ID + * Required. The version for which to list files, in the format: sites/SITE_ID /versions/VERSION_ID */ parent?: string; /** @@ -4928,7 +5730,7 @@ export namespace firebasehosting_v1beta1 { * const res = await firebasehosting.sites.channels.create({ * // Required. Immutable. A unique ID within the site that identifies the channel. * channelId: 'placeholder-value', - * // Required. The site in which to create this channel, in the format: sites/ SITE_NAME + * // Required. The site in which to create this channel, in the format: sites/ SITE_ID * parent: 'sites/my-site', * * // Request body metadata @@ -5085,7 +5887,7 @@ export namespace firebasehosting_v1beta1 { * * // Do the magic * const res = await firebasehosting.sites.channels.delete({ - * // Required. The fully-qualified identifier for the channel, in the format: sites/SITE_NAME/channels/CHANNEL_ID + * // Required. The fully-qualified resource name for the channel, in the format: sites/SITE_ID/channels/CHANNEL_ID * name: 'sites/my-site/channels/my-channel', * }); * console.log(res.data); @@ -5215,7 +6017,7 @@ export namespace firebasehosting_v1beta1 { * * // Do the magic * const res = await firebasehosting.sites.channels.get({ - * // Required. The fully-qualified identifier for the channel, in the format: sites/SITE_NAME/channels/CHANNEL_ID + * // Required. The fully-qualified resource name for the channel, in the format: sites/SITE_ID/channels/CHANNEL_ID * name: 'sites/my-site/channels/my-channel', * }); * console.log(res.data); @@ -5359,7 +6161,7 @@ export namespace firebasehosting_v1beta1 { * pageSize: 'placeholder-value', * // A token from a previous call to `ListChannels` that tells the server where to resume listing. * pageToken: 'placeholder-value', - * // Required. The site for which to list channels, in the format: sites/ SITE_NAME + * // Required. The site for which to list channels, in the format: sites/SITE_ID * parent: 'sites/my-site', * }); * console.log(res.data); @@ -5498,7 +6300,7 @@ export namespace firebasehosting_v1beta1 { * * // Do the magic * const res = await firebasehosting.sites.channels.patch({ - * // The fully-qualified identifier for the channel, in the format: sites/ SITE_NAME/channels/CHANNEL_ID + * // The fully-qualified resource name for the channel, in the format: sites/ SITE_ID/channels/CHANNEL_ID * name: 'sites/my-site/channels/my-channel', * // A comma-separated list of fields to be updated in this request. * updateMask: 'placeholder-value', @@ -5632,7 +6434,7 @@ export namespace firebasehosting_v1beta1 { */ channelId?: string; /** - * Required. The site in which to create this channel, in the format: sites/ SITE_NAME + * Required. The site in which to create this channel, in the format: sites/ SITE_ID */ parent?: string; @@ -5644,14 +6446,14 @@ export namespace firebasehosting_v1beta1 { export interface Params$Resource$Sites$Channels$Delete extends StandardParameters { /** - * Required. The fully-qualified identifier for the channel, in the format: sites/SITE_NAME/channels/CHANNEL_ID + * Required. The fully-qualified resource name for the channel, in the format: sites/SITE_ID/channels/CHANNEL_ID */ name?: string; } export interface Params$Resource$Sites$Channels$Get extends StandardParameters { /** - * Required. The fully-qualified identifier for the channel, in the format: sites/SITE_NAME/channels/CHANNEL_ID + * Required. The fully-qualified resource name for the channel, in the format: sites/SITE_ID/channels/CHANNEL_ID */ name?: string; } @@ -5666,14 +6468,14 @@ export namespace firebasehosting_v1beta1 { */ pageToken?: string; /** - * Required. The site for which to list channels, in the format: sites/ SITE_NAME + * Required. The site for which to list channels, in the format: sites/SITE_ID */ parent?: string; } export interface Params$Resource$Sites$Channels$Patch extends StandardParameters { /** - * The fully-qualified identifier for the channel, in the format: sites/ SITE_NAME/channels/CHANNEL_ID + * The fully-qualified resource name for the channel, in the format: sites/ SITE_ID/channels/CHANNEL_ID */ name?: string; /** @@ -5723,9 +6525,9 @@ export namespace firebasehosting_v1beta1 { * * // Do the magic * const res = await firebasehosting.sites.channels.releases.create({ - * // Required. The site or channel to which the release belongs, in either of the following formats: - sites/SITE_NAME - sites/SITE_NAME/channels/CHANNEL_ID + * // Required. The site or channel to which the release belongs, in either of the following formats: - sites/SITE_ID - sites/SITE_ID/channels/CHANNEL_ID * parent: 'sites/my-site/channels/my-channel', - * // The unique identifier for a version, in the format: sites/SITE_NAME /versions/VERSION_ID The SITE_NAME in this version identifier must match the SITE_NAME in the `parent` parameter. This query parameter must be empty if the `type` field in the request body is `SITE_DISABLE`. + * // The unique identifier for a version, in the format: sites/SITE_ID/versions/ VERSION_ID The SITE_ID in this version identifier must match the SITE_ID in the `parent` parameter. This query parameter must be empty if the `type` field in the request body is `SITE_DISABLE`. * versionName: 'placeholder-value', * * // Request body metadata @@ -5882,7 +6684,7 @@ export namespace firebasehosting_v1beta1 { * pageSize: 'placeholder-value', * // A token from a previous call to `releases.list` or `channels.releases.list` that tells the server where to resume listing. * pageToken: 'placeholder-value', - * // Required. The site or channel for which to list releases, in either of the following formats: - sites/SITE_NAME - sites/SITE_NAME/channels/CHANNEL_ID + * // Required. The site or channel for which to list releases, in either of the following formats: - sites/SITE_ID - sites/SITE_ID/channels/CHANNEL_ID * parent: 'sites/my-site/channels/my-channel', * }); * console.log(res.data); @@ -5995,11 +6797,11 @@ export namespace firebasehosting_v1beta1 { export interface Params$Resource$Sites$Channels$Releases$Create extends StandardParameters { /** - * Required. The site or channel to which the release belongs, in either of the following formats: - sites/SITE_NAME - sites/SITE_NAME/channels/CHANNEL_ID + * Required. The site or channel to which the release belongs, in either of the following formats: - sites/SITE_ID - sites/SITE_ID/channels/CHANNEL_ID */ parent?: string; /** - * The unique identifier for a version, in the format: sites/SITE_NAME /versions/VERSION_ID The SITE_NAME in this version identifier must match the SITE_NAME in the `parent` parameter. This query parameter must be empty if the `type` field in the request body is `SITE_DISABLE`. + * The unique identifier for a version, in the format: sites/SITE_ID/versions/ VERSION_ID The SITE_ID in this version identifier must match the SITE_ID in the `parent` parameter. This query parameter must be empty if the `type` field in the request body is `SITE_DISABLE`. */ versionName?: string; @@ -6019,7 +6821,7 @@ export namespace firebasehosting_v1beta1 { */ pageToken?: string; /** - * Required. The site or channel for which to list releases, in either of the following formats: - sites/SITE_NAME - sites/SITE_NAME/channels/CHANNEL_ID + * Required. The site or channel for which to list releases, in either of the following formats: - sites/SITE_ID - sites/SITE_ID/channels/CHANNEL_ID */ parent?: string; } @@ -6828,9 +7630,9 @@ export namespace firebasehosting_v1beta1 { * * // Do the magic * const res = await firebasehosting.sites.releases.create({ - * // Required. The site or channel to which the release belongs, in either of the following formats: - sites/SITE_NAME - sites/SITE_NAME/channels/CHANNEL_ID + * // Required. The site or channel to which the release belongs, in either of the following formats: - sites/SITE_ID - sites/SITE_ID/channels/CHANNEL_ID * parent: 'sites/my-site', - * // The unique identifier for a version, in the format: sites/SITE_NAME /versions/VERSION_ID The SITE_NAME in this version identifier must match the SITE_NAME in the `parent` parameter. This query parameter must be empty if the `type` field in the request body is `SITE_DISABLE`. + * // The unique identifier for a version, in the format: sites/SITE_ID/versions/ VERSION_ID The SITE_ID in this version identifier must match the SITE_ID in the `parent` parameter. This query parameter must be empty if the `type` field in the request body is `SITE_DISABLE`. * versionName: 'placeholder-value', * * // Request body metadata @@ -6987,7 +7789,7 @@ export namespace firebasehosting_v1beta1 { * pageSize: 'placeholder-value', * // A token from a previous call to `releases.list` or `channels.releases.list` that tells the server where to resume listing. * pageToken: 'placeholder-value', - * // Required. The site or channel for which to list releases, in either of the following formats: - sites/SITE_NAME - sites/SITE_NAME/channels/CHANNEL_ID + * // Required. The site or channel for which to list releases, in either of the following formats: - sites/SITE_ID - sites/SITE_ID/channels/CHANNEL_ID * parent: 'sites/my-site', * }); * console.log(res.data); @@ -7100,11 +7902,11 @@ export namespace firebasehosting_v1beta1 { export interface Params$Resource$Sites$Releases$Create extends StandardParameters { /** - * Required. The site or channel to which the release belongs, in either of the following formats: - sites/SITE_NAME - sites/SITE_NAME/channels/CHANNEL_ID + * Required. The site or channel to which the release belongs, in either of the following formats: - sites/SITE_ID - sites/SITE_ID/channels/CHANNEL_ID */ parent?: string; /** - * The unique identifier for a version, in the format: sites/SITE_NAME /versions/VERSION_ID The SITE_NAME in this version identifier must match the SITE_NAME in the `parent` parameter. This query parameter must be empty if the `type` field in the request body is `SITE_DISABLE`. + * The unique identifier for a version, in the format: sites/SITE_ID/versions/ VERSION_ID The SITE_ID in this version identifier must match the SITE_ID in the `parent` parameter. This query parameter must be empty if the `type` field in the request body is `SITE_DISABLE`. */ versionName?: string; @@ -7124,7 +7926,7 @@ export namespace firebasehosting_v1beta1 { */ pageToken?: string; /** - * Required. The site or channel for which to list releases, in either of the following formats: - sites/SITE_NAME - sites/SITE_NAME/channels/CHANNEL_ID + * Required. The site or channel for which to list releases, in either of the following formats: - sites/SITE_ID - sites/SITE_ID/channels/CHANNEL_ID */ parent?: string; } @@ -7167,7 +7969,7 @@ export namespace firebasehosting_v1beta1 { * * // Do the magic * const res = await firebasehosting.sites.versions.clone({ - * // Required. The target site for the cloned version, in the format: sites/ SITE_NAME + * // Required. The target site for the cloned version, in the format: sites/ SITE_ID * parent: 'sites/my-site', * * // Request body metadata @@ -7315,7 +8117,7 @@ export namespace firebasehosting_v1beta1 { * * // Do the magic * const res = await firebasehosting.sites.versions.create({ - * // Required. The site in which to create the version, in the format: sites/ SITE_NAME + * // Required. The site in which to create the version, in the format: sites/ SITE_ID * parent: 'sites/my-site', * // The self-reported size of the version. This value is used for a pre-emptive quota check for legacy version uploads. * sizeBytes: 'placeholder-value', @@ -7484,7 +8286,7 @@ export namespace firebasehosting_v1beta1 { * * // Do the magic * const res = await firebasehosting.sites.versions.delete({ - * // Required. The fully-qualified identifier for the version, in the format: sites/SITE_NAME/versions/VERSION_ID + * // Required. The fully-qualified resource name for the version, in the format: sites/SITE_ID/versions/VERSION_ID * name: 'sites/my-site/versions/my-version', * }); * console.log(res.data); @@ -7620,7 +8422,7 @@ export namespace firebasehosting_v1beta1 { * pageSize: 'placeholder-value', * // A token from a previous call to `ListVersions` that tells the server where to resume listing. * pageToken: 'placeholder-value', - * // Required. The site or channel for which to list versions, in either of the following formats: - sites/SITE_NAME - sites/SITE_NAME/channels/CHANNEL_ID + * // Required. The site or channel for which to list versions, in either of the following formats: - sites/SITE_ID - sites/SITE_ID/channels/CHANNEL_ID * parent: 'sites/my-site', * }); * console.log(res.data); @@ -7759,7 +8561,7 @@ export namespace firebasehosting_v1beta1 { * * // Do the magic * const res = await firebasehosting.sites.versions.patch({ - * // The fully-qualified identifier for the version, in the format: sites/ SITE_NAME/versions/VERSION_ID This name is provided in the response body when you call [`CreateVersion`](sites.versions/create). + * // The fully-qualified resource name for the version, in the format: sites/ SITE_ID/versions/VERSION_ID This name is provided in the response body when you call [`CreateVersion`](sites.versions/create). * name: 'sites/my-site/versions/my-version', * // A set of field names from your [version](../sites.versions) that you want to update. A field will be overwritten if, and only if, it's in the mask. If a mask is not provided then a default mask of only [`status`](../sites.versions#Version.FIELDS.status) will be used. * updateMask: 'placeholder-value', @@ -7923,7 +8725,7 @@ export namespace firebasehosting_v1beta1 { * * // Do the magic * const res = await firebasehosting.sites.versions.populateFiles({ - * // Required. The version to which to add files, in the format: sites/SITE_NAME /versions/VERSION_ID + * // Required. The version to which to add files, in the format: sites/SITE_ID /versions/VERSION_ID * parent: 'sites/my-site/versions/my-version', * * // Request body metadata @@ -8048,7 +8850,7 @@ export namespace firebasehosting_v1beta1 { export interface Params$Resource$Sites$Versions$Clone extends StandardParameters { /** - * Required. The target site for the cloned version, in the format: sites/ SITE_NAME + * Required. The target site for the cloned version, in the format: sites/ SITE_ID */ parent?: string; @@ -8060,7 +8862,7 @@ export namespace firebasehosting_v1beta1 { export interface Params$Resource$Sites$Versions$Create extends StandardParameters { /** - * Required. The site in which to create the version, in the format: sites/ SITE_NAME + * Required. The site in which to create the version, in the format: sites/ SITE_ID */ parent?: string; /** @@ -8080,7 +8882,7 @@ export namespace firebasehosting_v1beta1 { export interface Params$Resource$Sites$Versions$Delete extends StandardParameters { /** - * Required. The fully-qualified identifier for the version, in the format: sites/SITE_NAME/versions/VERSION_ID + * Required. The fully-qualified resource name for the version, in the format: sites/SITE_ID/versions/VERSION_ID */ name?: string; } @@ -8099,14 +8901,14 @@ export namespace firebasehosting_v1beta1 { */ pageToken?: string; /** - * Required. The site or channel for which to list versions, in either of the following formats: - sites/SITE_NAME - sites/SITE_NAME/channels/CHANNEL_ID + * Required. The site or channel for which to list versions, in either of the following formats: - sites/SITE_ID - sites/SITE_ID/channels/CHANNEL_ID */ parent?: string; } export interface Params$Resource$Sites$Versions$Patch extends StandardParameters { /** - * The fully-qualified identifier for the version, in the format: sites/ SITE_NAME/versions/VERSION_ID This name is provided in the response body when you call [`CreateVersion`](sites.versions/create). + * The fully-qualified resource name for the version, in the format: sites/ SITE_ID/versions/VERSION_ID This name is provided in the response body when you call [`CreateVersion`](sites.versions/create). */ name?: string; /** @@ -8122,7 +8924,7 @@ export namespace firebasehosting_v1beta1 { export interface Params$Resource$Sites$Versions$Populatefiles extends StandardParameters { /** - * Required. The version to which to add files, in the format: sites/SITE_NAME /versions/VERSION_ID + * Required. The version to which to add files, in the format: sites/SITE_ID /versions/VERSION_ID */ parent?: string; @@ -8174,7 +8976,7 @@ export namespace firebasehosting_v1beta1 { * pageSize: 'placeholder-value', * // A token from a previous call to `ListVersionFiles` that tells the server where to resume listing. * pageToken: 'placeholder-value', - * // Required. The version for which to list files, in the format: sites/ SITE_NAME/versions/VERSION_ID + * // Required. The version for which to list files, in the format: sites/SITE_ID /versions/VERSION_ID * parent: 'sites/my-site/versions/my-version', * // The type of files that should be listed for the specified version. * status: 'placeholder-value', @@ -8297,7 +9099,7 @@ export namespace firebasehosting_v1beta1 { */ pageToken?: string; /** - * Required. The version for which to list files, in the format: sites/ SITE_NAME/versions/VERSION_ID + * Required. The version for which to list files, in the format: sites/SITE_ID /versions/VERSION_ID */ parent?: string; /** diff --git a/src/apis/firebasestorage/README.md b/src/apis/firebasestorage/README.md new file mode 100644 index 00000000000..891a64bffaa --- /dev/null +++ b/src/apis/firebasestorage/README.md @@ -0,0 +1,47 @@ +Google Inc. logo + +# firebasestorage + +> The Cloud Storage for Firebase API enables programmatic management of Cloud Storage buckets for use in Firebase projects + +## Installation + +```sh +$ npm install googleapis +``` + +## Usage +All documentation and usage information can be found on [GitHub](https://github.com/googleapis/google-api-nodejs-client). + +## Building a browser bundle + +This library can be used in a browser. To prepare a single file bundle, clone the +[repository](https://github.com/googleapis/google-api-nodejs-client) and run + +```sh +$ cd src/apis/firebasestorage +$ npm install +$ npm run webpack +``` + +The generated bundle will be written to `dist/firebasestorage.min.js`. Use it from your HTML file: + +```html + + +``` + +## License +This library is licensed under Apache 2.0. Full license text is available in [LICENSE](https://github.com/googleapis/google-api-nodejs-client/blob/master/LICENSE). + +## Contributing +We love contributions! Before submitting a Pull Request, it's always good to start with a new issue first. To learn more, see [CONTRIBUTING](https://github.com/google/google-api-nodejs-client/blob/master/.github/CONTRIBUTING.md). + +## Questions/problems? +* Ask your development related questions on [StackOverflow](http://stackoverflow.com/questions/tagged/google-api-nodejs-client). +* If you've found an bug/issue, please [file it on GitHub](https://github.com/googleapis/google-api-nodejs-client/issues). + + +*Crafted with ❤️ by the Google Node.js team* diff --git a/src/apis/firebasestorage/index.ts b/src/apis/firebasestorage/index.ts new file mode 100644 index 00000000000..0175c961c68 --- /dev/null +++ b/src/apis/firebasestorage/index.ts @@ -0,0 +1,48 @@ +// Copyright 2020 Google LLC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/*! THIS FILE IS AUTO-GENERATED */ + +import {AuthPlus, getAPI, GoogleConfigurable} from 'googleapis-common'; +import {firebasestorage_v1beta} from './v1beta'; + +export const VERSIONS = { + v1beta: firebasestorage_v1beta.Firebasestorage, +}; + +export function firebasestorage( + version: 'v1beta' +): firebasestorage_v1beta.Firebasestorage; +export function firebasestorage( + options: firebasestorage_v1beta.Options +): firebasestorage_v1beta.Firebasestorage; +export function firebasestorage( + this: GoogleConfigurable, + versionOrOptions: 'v1beta' | firebasestorage_v1beta.Options +) { + return getAPI('firebasestorage', versionOrOptions, VERSIONS, this); +} + +const auth = new AuthPlus(); +export {auth}; +export {firebasestorage_v1beta}; +export { + AuthPlus, + GlobalOptions, + APIRequestContext, + GoogleConfigurable, + StreamMethodOptions, + GaxiosPromise, + MethodOptions, + BodyResponseCallback, +} from 'googleapis-common'; diff --git a/src/apis/firebasestorage/package.json b/src/apis/firebasestorage/package.json new file mode 100644 index 00000000000..fa168ed8b87 --- /dev/null +++ b/src/apis/firebasestorage/package.json @@ -0,0 +1,43 @@ +{ + "name": "@googleapis/firebasestorage", + "version": "0.1.0", + "description": "firebasestorage", + "main": "build/index.js", + "types": "build/index.d.ts", + "keywords": [ + "google" + ], + "author": "Google LLC", + "license": "Apache-2.0", + "homepage": "https://github.com/googleapis/google-api-nodejs-client", + "bugs": { + "url": "https://github.com/googleapis/google-api-nodejs-client/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/googleapis/google-api-nodejs-client.git" + }, + "engines": { + "node": ">=10.0.0" + }, + "scripts": { + "fix": "gts fix", + "lint": "gts check", + "compile": "tsc -p .", + "prepare": "npm run compile", + "webpack": "webpack" + }, + "dependencies": { + "googleapis-common": "^5.0.1" + }, + "devDependencies": { + "@microsoft/api-documenter": "^7.8.10", + "@microsoft/api-extractor": "^7.8.10", + "gts": "^2.0.0", + "null-loader": "^4.0.0", + "ts-loader": "^8.0.0", + "typescript": "~3.7.0", + "webpack": "^5.0.0", + "webpack-cli": "^4.0.0" + } +} diff --git a/src/apis/firebasestorage/tsconfig.json b/src/apis/firebasestorage/tsconfig.json new file mode 100644 index 00000000000..e0810904968 --- /dev/null +++ b/src/apis/firebasestorage/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "./node_modules/gts/tsconfig-google.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build" + }, + "include": [ + "*.ts", + ] +} diff --git a/src/apis/firebasestorage/v1beta.ts b/src/apis/firebasestorage/v1beta.ts new file mode 100644 index 00000000000..388853b5690 --- /dev/null +++ b/src/apis/firebasestorage/v1beta.ts @@ -0,0 +1,772 @@ +// Copyright 2020 Google LLC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/* eslint-disable @typescript-eslint/no-explicit-any */ +/* eslint-disable @typescript-eslint/class-name-casing */ +/* eslint-disable @typescript-eslint/no-unused-vars */ +/* eslint-disable @typescript-eslint/no-empty-interface */ +/* eslint-disable @typescript-eslint/no-namespace */ +/* eslint-disable no-irregular-whitespace */ + +import { + OAuth2Client, + JWT, + Compute, + UserRefreshClient, + BaseExternalAccountClient, + GaxiosPromise, + GoogleConfigurable, + createAPIRequest, + MethodOptions, + StreamMethodOptions, + GlobalOptions, + GoogleAuth, + BodyResponseCallback, + APIRequestContext, +} from 'googleapis-common'; +import {Readable} from 'stream'; + +export namespace firebasestorage_v1beta { + export interface Options extends GlobalOptions { + version: 'v1beta'; + } + + interface StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: + | string + | OAuth2Client + | JWT + | Compute + | UserRefreshClient + | BaseExternalAccountClient + | GoogleAuth; + + /** + * V1 error format. + */ + '$.xgafv'?: string; + /** + * OAuth access token. + */ + access_token?: string; + /** + * Data format for response. + */ + alt?: string; + /** + * JSONP + */ + callback?: string; + /** + * Selector specifying which fields to include in a partial response. + */ + fields?: string; + /** + * 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. + */ + key?: string; + /** + * OAuth 2.0 token for the current user. + */ + oauth_token?: string; + /** + * Returns response with indentations and line breaks. + */ + prettyPrint?: boolean; + /** + * 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. + */ + quotaUser?: string; + /** + * Legacy upload protocol for media (e.g. "media", "multipart"). + */ + uploadType?: string; + /** + * Upload protocol for media (e.g. "raw", "multipart"). + */ + upload_protocol?: string; + } + + /** + * Cloud Storage for Firebase API + * + * The Cloud Storage for Firebase API enables programmatic management of Cloud Storage buckets for use in Firebase projects + * + * @example + * ```js + * const {google} = require('googleapis'); + * const firebasestorage = google.firebasestorage('v1beta'); + * ``` + */ + export class Firebasestorage { + context: APIRequestContext; + projects: Resource$Projects; + + constructor(options: GlobalOptions, google?: GoogleConfigurable) { + this.context = { + _options: options || {}, + google, + }; + + this.projects = new Resource$Projects(this.context); + } + } + + /** + * The request used to link a Google Cloud Storage bucket to a Firebase project. + */ + export interface Schema$AddFirebaseRequest {} + /** + * A storage bucket and its relation to a parent Firebase project. + */ + export interface Schema$Bucket { + /** + * Resource name of the bucket. + */ + name?: string | null; + } + /** + * 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); \} The JSON representation for `Empty` is empty JSON object `{\}`. + */ + export interface Schema$Empty {} + /** + * The response returned by `ListBuckets`. + */ + export interface Schema$ListBucketsResponse { + /** + * The list of linked buckets. + */ + buckets?: Schema$Bucket[]; + /** + * A token that can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. + */ + nextPageToken?: string | null; + } + /** + * The request used to unlink a Google Cloud Storage bucket from a Firebase project. + */ + export interface Schema$RemoveFirebaseRequest {} + + export class Resource$Projects { + context: APIRequestContext; + buckets: Resource$Projects$Buckets; + constructor(context: APIRequestContext) { + this.context = context; + this.buckets = new Resource$Projects$Buckets(this.context); + } + } + + export class Resource$Projects$Buckets { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Links a Google Cloud Storage bucket to a Firebase project. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/firebasestorage.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const firebasestorage = google.firebasestorage('v1beta'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/firebase', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await firebasestorage.projects.buckets.addFirebase({ + * // Required. Resource name of the bucket, mirrors the ID of the underlying Google Cloud Storage bucket. Because bucket resource names are unique across projects, you may omit the project number, `projects/-/buckets/{bucket_id\}`. + * bucket: 'projects/my-project/buckets/my-bucket', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // {} + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "name": "my_name" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + addFirebase( + params: Params$Resource$Projects$Buckets$Addfirebase, + options: StreamMethodOptions + ): GaxiosPromise; + addFirebase( + params?: Params$Resource$Projects$Buckets$Addfirebase, + options?: MethodOptions + ): GaxiosPromise; + addFirebase( + params: Params$Resource$Projects$Buckets$Addfirebase, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + addFirebase( + params: Params$Resource$Projects$Buckets$Addfirebase, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + addFirebase( + params: Params$Resource$Projects$Buckets$Addfirebase, + callback: BodyResponseCallback + ): void; + addFirebase(callback: BodyResponseCallback): void; + addFirebase( + paramsOrCallback?: + | Params$Resource$Projects$Buckets$Addfirebase + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Buckets$Addfirebase; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Buckets$Addfirebase; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://firebasestorage.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta/{+bucket}:addFirebase').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['bucket'], + pathParams: ['bucket'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Gets a single linked storage bucket. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/firebasestorage.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const firebasestorage = google.firebasestorage('v1beta'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/firebase', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await firebasestorage.projects.buckets.get({ + * // Required. Resource name of the bucket, mirrors the ID of the underlying Google Cloud Storage bucket. Because bucket resource names are unique across projects, you may omit the project number, `projects/-/buckets/{bucket_id\}`. + * name: 'projects/my-project/buckets/my-bucket', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "name": "my_name" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Projects$Buckets$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Projects$Buckets$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Buckets$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Buckets$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Buckets$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Buckets$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Buckets$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Buckets$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://firebasestorage.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Lists the linked storage buckets for a project. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/firebasestorage.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const firebasestorage = google.firebasestorage('v1beta'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/firebase', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await firebasestorage.projects.buckets.list({ + * // The maximum number of buckets to return. If not set, the server will use a reasonable default. + * pageSize: 'placeholder-value', + * // A page token, received from a previous `ListBuckets` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListBuckets` must match the call that provided the page token. + * pageToken: 'placeholder-value', + * // Required. Resource name of the parent Firebase project, `projects/{project_number\}`. + * parent: 'projects/my-project', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "buckets": [], + * // "nextPageToken": "my_nextPageToken" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Projects$Buckets$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Projects$Buckets$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Buckets$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Buckets$List, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Buckets$List, + callback: BodyResponseCallback + ): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Buckets$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Buckets$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Buckets$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://firebasestorage.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta/{+parent}/buckets').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Unlinks a linked Google Cloud Storage bucket from a Firebase project. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/firebasestorage.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const firebasestorage = google.firebasestorage('v1beta'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/firebase', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await firebasestorage.projects.buckets.removeFirebase({ + * // Required. Resource name of the bucket, mirrors the ID of the underlying Google Cloud Storage bucket. Because bucket resource names are unique across projects, you may omit the project number, `projects/-/buckets/{bucket_id\}`. + * bucket: 'projects/my-project/buckets/my-bucket', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // {} + * }, + * }); + * console.log(res.data); + * + * // Example response + * // {} + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + removeFirebase( + params: Params$Resource$Projects$Buckets$Removefirebase, + options: StreamMethodOptions + ): GaxiosPromise; + removeFirebase( + params?: Params$Resource$Projects$Buckets$Removefirebase, + options?: MethodOptions + ): GaxiosPromise; + removeFirebase( + params: Params$Resource$Projects$Buckets$Removefirebase, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + removeFirebase( + params: Params$Resource$Projects$Buckets$Removefirebase, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + removeFirebase( + params: Params$Resource$Projects$Buckets$Removefirebase, + callback: BodyResponseCallback + ): void; + removeFirebase(callback: BodyResponseCallback): void; + removeFirebase( + paramsOrCallback?: + | Params$Resource$Projects$Buckets$Removefirebase + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Buckets$Removefirebase; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Buckets$Removefirebase; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://firebasestorage.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta/{+bucket}:removeFirebase').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['bucket'], + pathParams: ['bucket'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Buckets$Addfirebase + extends StandardParameters { + /** + * Required. Resource name of the bucket, mirrors the ID of the underlying Google Cloud Storage bucket. Because bucket resource names are unique across projects, you may omit the project number, `projects/-/buckets/{bucket_id\}`. + */ + bucket?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$AddFirebaseRequest; + } + export interface Params$Resource$Projects$Buckets$Get + extends StandardParameters { + /** + * Required. Resource name of the bucket, mirrors the ID of the underlying Google Cloud Storage bucket. Because bucket resource names are unique across projects, you may omit the project number, `projects/-/buckets/{bucket_id\}`. + */ + name?: string; + } + export interface Params$Resource$Projects$Buckets$List + extends StandardParameters { + /** + * The maximum number of buckets to return. If not set, the server will use a reasonable default. + */ + pageSize?: number; + /** + * A page token, received from a previous `ListBuckets` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListBuckets` must match the call that provided the page token. + */ + pageToken?: string; + /** + * Required. Resource name of the parent Firebase project, `projects/{project_number\}`. + */ + parent?: string; + } + export interface Params$Resource$Projects$Buckets$Removefirebase + extends StandardParameters { + /** + * Required. Resource name of the bucket, mirrors the ID of the underlying Google Cloud Storage bucket. Because bucket resource names are unique across projects, you may omit the project number, `projects/-/buckets/{bucket_id\}`. + */ + bucket?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$RemoveFirebaseRequest; + } +} diff --git a/src/apis/firebasestorage/webpack.config.js b/src/apis/firebasestorage/webpack.config.js new file mode 100644 index 00000000000..8ea050d87c6 --- /dev/null +++ b/src/apis/firebasestorage/webpack.config.js @@ -0,0 +1,79 @@ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Use `npm run webpack` to produce Webpack bundle for this library. + +const path = require('path'); + +module.exports = { + entry: './index.ts', + resolve: { + extensions: ['.ts', '.js', '.json'], + fallback: { + crypto: false, + child_process: false, + fs: false, + http2: false, + buffer: 'browserify', + process: false, + os: false, + querystring: false, + path: false, + stream: 'stream-browserify', + url: false, + util: false, + zlib: false, + }, + }, + output: { + library: 'Firebasestorage', + filename: 'firebasestorage.min.js', + path: path.resolve(__dirname, 'dist'), + }, + module: { + rules: [ + { + test: /node_modules[\\/]google-auth-library[\\/]src[\\/]crypto[\\/]node[\\/]crypto/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]https-proxy-agent[\\/]/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]gcp-metadata[\\/]/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]gtoken[\\/]/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]pkginfo[\\/]/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]semver[\\/]/, + use: 'null-loader', + }, + { + test: /\.ts$/, + use: 'ts-loader', + exclude: /node_modules/, + }, + ], + }, + mode: 'production', + plugins: [], +}; diff --git a/src/apis/firestore/v1.ts b/src/apis/firestore/v1.ts index 0cf3037f20e..3fc9453c70f 100644 --- a/src/apis/firestore/v1.ts +++ b/src/apis/firestore/v1.ts @@ -546,7 +546,7 @@ export namespace firestore_v1 { */ indexConfig?: Schema$GoogleFirestoreAdminV1IndexConfig; /** - * A field name of the form `projects/{project_id\}/databases/{database_id\}/collectionGroups/{collection_id\}/fields/{field_path\}` A field path may be a simple field name, e.g. `address` or a path to fields within map_value , e.g. `address.city`, or a special field path. The only valid special field is `*`, which represents any field. Field paths may be quoted using ` (backtick). The only character that needs to be escaped within a quoted field path is the backtick character itself, escaped using a backslash. Special characters in field paths that must be quoted include: `*`, `.`, ``` (backtick), `[`, `]`, as well as any ascii symbolic characters. Examples: (Note: Comments here are written in markdown syntax, so there is an additional layer of backticks to represent a code block) `\`address.city\`` represents a field named `address.city`, not the map key `city` in the field `address`. `\`*\`` represents a field named `*`, not any field. A special `Field` contains the default indexing settings for all fields. This field's resource name is: `projects/{project_id\}/databases/{database_id\}/collectionGroups/__default__/fields/x` Indexes defined on this `Field` will be applied to all fields which do not have their own `Field` index configuration. + * Required. A field name of the form `projects/{project_id\}/databases/{database_id\}/collectionGroups/{collection_id\}/fields/{field_path\}` A field path may be a simple field name, e.g. `address` or a path to fields within map_value , e.g. `address.city`, or a special field path. The only valid special field is `*`, which represents any field. Field paths may be quoted using ` (backtick). The only character that needs to be escaped within a quoted field path is the backtick character itself, escaped using a backslash. Special characters in field paths that must be quoted include: `*`, `.`, ``` (backtick), `[`, `]`, as well as any ascii symbolic characters. Examples: (Note: Comments here are written in markdown syntax, so there is an additional layer of backticks to represent a code block) `\`address.city\`` represents a field named `address.city`, not the map key `city` in the field `address`. `\`*\`` represents a field named `*`, not any field. A special `Field` contains the default indexing settings for all fields. This field's resource name is: `projects/{project_id\}/databases/{database_id\}/collectionGroups/__default__/fields/x` Indexes defined on this `Field` will be applied to all fields which do not have their own `Field` index configuration. */ name?: string | null; } @@ -697,7 +697,7 @@ export namespace firestore_v1 { */ fieldPath?: string | null; /** - * Indicates that this field supports ordering by the specified order or comparing using =, <, <=, \>, \>=. + * Indicates that this field supports ordering by the specified order or comparing using =, !=, <, <=, \>, \>=. */ order?: string | null; } @@ -816,7 +816,7 @@ export namespace firestore_v1 { response?: {[key: string]: any} | null; } /** - * An object representing a latitude/longitude pair. This is expressed as a pair of doubles representing degrees latitude and degrees longitude. Unless specified otherwise, this must conform to the WGS84 standard. Values must be within normalized ranges. + * An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this must conform to the WGS84 standard. Values must be within normalized ranges. */ export interface Schema$LatLng { /** @@ -2070,7 +2070,7 @@ export namespace firestore_v1 { * * // Do the magic * const res = await firestore.projects.databases.collectionGroups.fields.patch({ - * // A field name of the form `projects/{project_id\}/databases/{database_id\}/collectionGroups/{collection_id\}/fields/{field_path\}` A field path may be a simple field name, e.g. `address` or a path to fields within map_value , e.g. `address.city`, or a special field path. The only valid special field is `*`, which represents any field. Field paths may be quoted using ` (backtick). The only character that needs to be escaped within a quoted field path is the backtick character itself, escaped using a backslash. Special characters in field paths that must be quoted include: `*`, `.`, ``` (backtick), `[`, `]`, as well as any ascii symbolic characters. Examples: (Note: Comments here are written in markdown syntax, so there is an additional layer of backticks to represent a code block) `\`address.city\`` represents a field named `address.city`, not the map key `city` in the field `address`. `\`*\`` represents a field named `*`, not any field. A special `Field` contains the default indexing settings for all fields. This field's resource name is: `projects/{project_id\}/databases/{database_id\}/collectionGroups/__default__/fields/x` Indexes defined on this `Field` will be applied to all fields which do not have their own `Field` index configuration. + * // Required. A field name of the form `projects/{project_id\}/databases/{database_id\}/collectionGroups/{collection_id\}/fields/{field_path\}` A field path may be a simple field name, e.g. `address` or a path to fields within map_value , e.g. `address.city`, or a special field path. The only valid special field is `*`, which represents any field. Field paths may be quoted using ` (backtick). The only character that needs to be escaped within a quoted field path is the backtick character itself, escaped using a backslash. Special characters in field paths that must be quoted include: `*`, `.`, ``` (backtick), `[`, `]`, as well as any ascii symbolic characters. Examples: (Note: Comments here are written in markdown syntax, so there is an additional layer of backticks to represent a code block) `\`address.city\`` represents a field named `address.city`, not the map key `city` in the field `address`. `\`*\`` represents a field named `*`, not any field. A special `Field` contains the default indexing settings for all fields. This field's resource name is: `projects/{project_id\}/databases/{database_id\}/collectionGroups/__default__/fields/x` Indexes defined on this `Field` will be applied to all fields which do not have their own `Field` index configuration. * name: * 'projects/my-project/databases/my-database/collectionGroups/my-collectionGroup/fields/my-field', * // A mask, relative to the field. If specified, only configuration specified by this field_mask will be updated in the field. @@ -2222,7 +2222,7 @@ export namespace firestore_v1 { export interface Params$Resource$Projects$Databases$Collectiongroups$Fields$Patch extends StandardParameters { /** - * A field name of the form `projects/{project_id\}/databases/{database_id\}/collectionGroups/{collection_id\}/fields/{field_path\}` A field path may be a simple field name, e.g. `address` or a path to fields within map_value , e.g. `address.city`, or a special field path. The only valid special field is `*`, which represents any field. Field paths may be quoted using ` (backtick). The only character that needs to be escaped within a quoted field path is the backtick character itself, escaped using a backslash. Special characters in field paths that must be quoted include: `*`, `.`, ``` (backtick), `[`, `]`, as well as any ascii symbolic characters. Examples: (Note: Comments here are written in markdown syntax, so there is an additional layer of backticks to represent a code block) `\`address.city\`` represents a field named `address.city`, not the map key `city` in the field `address`. `\`*\`` represents a field named `*`, not any field. A special `Field` contains the default indexing settings for all fields. This field's resource name is: `projects/{project_id\}/databases/{database_id\}/collectionGroups/__default__/fields/x` Indexes defined on this `Field` will be applied to all fields which do not have their own `Field` index configuration. + * Required. A field name of the form `projects/{project_id\}/databases/{database_id\}/collectionGroups/{collection_id\}/fields/{field_path\}` A field path may be a simple field name, e.g. `address` or a path to fields within map_value , e.g. `address.city`, or a special field path. The only valid special field is `*`, which represents any field. Field paths may be quoted using ` (backtick). The only character that needs to be escaped within a quoted field path is the backtick character itself, escaped using a backslash. Special characters in field paths that must be quoted include: `*`, `.`, ``` (backtick), `[`, `]`, as well as any ascii symbolic characters. Examples: (Note: Comments here are written in markdown syntax, so there is an additional layer of backticks to represent a code block) `\`address.city\`` represents a field named `address.city`, not the map key `city` in the field `address`. `\`*\`` represents a field named `*`, not any field. A special `Field` contains the default indexing settings for all fields. This field's resource name is: `projects/{project_id\}/databases/{database_id\}/collectionGroups/__default__/fields/x` Indexes defined on this `Field` will be applied to all fields which do not have their own `Field` index configuration. */ name?: string; /** diff --git a/src/apis/firestore/v1beta1.ts b/src/apis/firestore/v1beta1.ts index b5fb05f9203..d560fa93ba6 100644 --- a/src/apis/firestore/v1beta1.ts +++ b/src/apis/firestore/v1beta1.ts @@ -702,7 +702,7 @@ export namespace firestore_v1beta1 { response?: {[key: string]: any} | null; } /** - * An object representing a latitude/longitude pair. This is expressed as a pair of doubles representing degrees latitude and degrees longitude. Unless specified otherwise, this must conform to the WGS84 standard. Values must be within normalized ranges. + * An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this must conform to the WGS84 standard. Values must be within normalized ranges. */ export interface Schema$LatLng { /** diff --git a/src/apis/fitness/v1.ts b/src/apis/fitness/v1.ts index 2daa19b1346..3d80deda80a 100644 --- a/src/apis/fitness/v1.ts +++ b/src/apis/fitness/v1.ts @@ -1836,14 +1836,10 @@ export namespace fitness_v1 { * * // Do the magic * const res = await fitness.users.dataSources.datasets.delete({ - * // The client's current time in milliseconds since epoch. - * currentTimeMillis: 'placeholder-value', * // Dataset identifier that is a composite of the minimum data point start time and maximum data point end time represented as nanoseconds from the epoch. The ID is formatted like: "startTime-endTime" where startTime and endTime are 64 bit integers. * datasetId: 'placeholder-value', * // The data stream ID of the data source that created the dataset. * dataSourceId: 'placeholder-value', - * // When the operation was performed on the client. - * modifiedTimeMillis: 'placeholder-value', * // Delete a dataset for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. * userId: 'placeholder-value', * }); @@ -2142,8 +2138,6 @@ export namespace fitness_v1 { * * // Do the magic * const res = await fitness.users.dataSources.datasets.patch({ - * // The client's current time in milliseconds since epoch. Note that the minStartTimeNs and maxEndTimeNs properties in the request body are in nanoseconds instead of milliseconds. - * currentTimeMillis: 'placeholder-value', * // This field is not used, and can be safely omitted. * datasetId: 'placeholder-value', * // The data stream ID of the data source that created the dataset. @@ -2269,10 +2263,6 @@ export namespace fitness_v1 { export interface Params$Resource$Users$Datasources$Datasets$Delete extends StandardParameters { - /** - * The client's current time in milliseconds since epoch. - */ - currentTimeMillis?: string; /** * Dataset identifier that is a composite of the minimum data point start time and maximum data point end time represented as nanoseconds from the epoch. The ID is formatted like: "startTime-endTime" where startTime and endTime are 64 bit integers. */ @@ -2281,10 +2271,6 @@ export namespace fitness_v1 { * The data stream ID of the data source that created the dataset. */ dataSourceId?: string; - /** - * When the operation was performed on the client. - */ - modifiedTimeMillis?: string; /** * Delete a dataset for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. */ @@ -2315,10 +2301,6 @@ export namespace fitness_v1 { } export interface Params$Resource$Users$Datasources$Datasets$Patch extends StandardParameters { - /** - * The client's current time in milliseconds since epoch. Note that the minStartTimeNs and maxEndTimeNs properties in the request body are in nanoseconds instead of milliseconds. - */ - currentTimeMillis?: string; /** * This field is not used, and can be safely omitted. */ @@ -2374,8 +2356,6 @@ export namespace fitness_v1 { * * // Do the magic * const res = await fitness.users.sessions.delete({ - * // The client's current time in milliseconds since epoch. - * currentTimeMillis: 'placeholder-value', * // The ID of the session to be deleted. * sessionId: 'placeholder-value', * // Delete a session for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. @@ -2672,8 +2652,6 @@ export namespace fitness_v1 { * * // Do the magic * const res = await fitness.users.sessions.update({ - * // The client's current time in milliseconds since epoch. - * currentTimeMillis: 'placeholder-value', * // The ID of the session to be created. * sessionId: 'placeholder-value', * // Create sessions for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. @@ -2804,10 +2782,6 @@ export namespace fitness_v1 { export interface Params$Resource$Users$Sessions$Delete extends StandardParameters { - /** - * The client's current time in milliseconds since epoch. - */ - currentTimeMillis?: string; /** * The ID of the session to be deleted. */ @@ -2846,10 +2820,6 @@ export namespace fitness_v1 { } export interface Params$Resource$Users$Sessions$Update extends StandardParameters { - /** - * The client's current time in milliseconds since epoch. - */ - currentTimeMillis?: string; /** * The ID of the session to be created. */ diff --git a/src/apis/gameservices/v1.ts b/src/apis/gameservices/v1.ts index 7f46b8ff171..ff929f19cf7 100644 --- a/src/apis/gameservices/v1.ts +++ b/src/apis/gameservices/v1.ts @@ -1303,15 +1303,15 @@ export namespace gameservices_v1 { * * // Do the magic * const res = await gameservices.projects.locations.list({ - * // The standard list 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). * filter: 'placeholder-value', * // If true, the returned list will include locations which are not yet revealed. * includeUnrevealedLocations: 'placeholder-value', * // The resource that owns the locations collection, if applicable. * name: 'projects/my-project', - * // The standard list page size. + * // The maximum number of results to return. If not set, the service will select a default. * pageSize: 'placeholder-value', - * // The standard list page token. + * // A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. * pageToken: 'placeholder-value', * }); * console.log(res.data); @@ -1430,7 +1430,7 @@ export namespace gameservices_v1 { export interface Params$Resource$Projects$Locations$List extends StandardParameters { /** - * The standard list 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). */ filter?: string; /** @@ -1442,11 +1442,11 @@ export namespace gameservices_v1 { */ name?: string; /** - * The standard list page size. + * The maximum number of results to return. If not set, the service will select a default. */ pageSize?: number; /** - * The standard list page token. + * A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. */ pageToken?: string; } diff --git a/src/apis/gameservices/v1beta.ts b/src/apis/gameservices/v1beta.ts index 50d1c8e2c55..6a99b94cfc0 100644 --- a/src/apis/gameservices/v1beta.ts +++ b/src/apis/gameservices/v1beta.ts @@ -1320,15 +1320,15 @@ export namespace gameservices_v1beta { * * // Do the magic * const res = await gameservices.projects.locations.list({ - * // The standard list 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). * filter: 'placeholder-value', * // If true, the returned list will include locations which are not yet revealed. * includeUnrevealedLocations: 'placeholder-value', * // The resource that owns the locations collection, if applicable. * name: 'projects/my-project', - * // The standard list page size. + * // The maximum number of results to return. If not set, the service will select a default. * pageSize: 'placeholder-value', - * // The standard list page token. + * // A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. * pageToken: 'placeholder-value', * }); * console.log(res.data); @@ -1447,7 +1447,7 @@ export namespace gameservices_v1beta { export interface Params$Resource$Projects$Locations$List extends StandardParameters { /** - * The standard list 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). */ filter?: string; /** @@ -1459,11 +1459,11 @@ export namespace gameservices_v1beta { */ name?: string; /** - * The standard list page size. + * The maximum number of results to return. If not set, the service will select a default. */ pageSize?: number; /** - * The standard list page token. + * A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. */ pageToken?: string; } diff --git a/src/apis/gkehub/README.md b/src/apis/gkehub/README.md new file mode 100644 index 00000000000..fb86990003f --- /dev/null +++ b/src/apis/gkehub/README.md @@ -0,0 +1,56 @@ +Google Inc. logo + +# gkehub + +> + +## Support status +**Note**: Google provides multiple libraries for this service. This library is in +maintenance mode, and will continue to be made available for users who have +existing applications. If you're building a new application, or modernizing a +legacy application, please use [@google-cloud/gke-hub](https://www.npmjs.com/package/@google-cloud/gke-hub) instead. +The [@google-cloud/gke-hub](https://www.npmjs.com/package/@google-cloud/gke-hub) library is faster, easier to use, and better maintained. + +To learn more, see [Client Libraries Explained](https://cloud.google.com/apis/docs/client-libraries-explained). + +## Installation + +```sh +$ npm install googleapis +``` + +## Usage +All documentation and usage information can be found on [GitHub](https://github.com/googleapis/google-api-nodejs-client). + +## Building a browser bundle + +This library can be used in a browser. To prepare a single file bundle, clone the +[repository](https://github.com/googleapis/google-api-nodejs-client) and run + +```sh +$ cd src/apis/gkehub +$ npm install +$ npm run webpack +``` + +The generated bundle will be written to `dist/gkehub.min.js`. Use it from your HTML file: + +```html + + +``` + +## License +This library is licensed under Apache 2.0. Full license text is available in [LICENSE](https://github.com/googleapis/google-api-nodejs-client/blob/master/LICENSE). + +## Contributing +We love contributions! Before submitting a Pull Request, it's always good to start with a new issue first. To learn more, see [CONTRIBUTING](https://github.com/google/google-api-nodejs-client/blob/master/.github/CONTRIBUTING.md). + +## Questions/problems? +* Ask your development related questions on [StackOverflow](http://stackoverflow.com/questions/tagged/google-api-nodejs-client). +* If you've found an bug/issue, please [file it on GitHub](https://github.com/googleapis/google-api-nodejs-client/issues). + + +*Crafted with ❤️ by the Google Node.js team* diff --git a/src/apis/gkehub/index.ts b/src/apis/gkehub/index.ts new file mode 100644 index 00000000000..468242a3374 --- /dev/null +++ b/src/apis/gkehub/index.ts @@ -0,0 +1,83 @@ +// Copyright 2020 Google LLC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/*! THIS FILE IS AUTO-GENERATED */ + +import {AuthPlus, getAPI, GoogleConfigurable} from 'googleapis-common'; +import {gkehub_v1} from './v1'; +import {gkehub_v1alpha} from './v1alpha'; +import {gkehub_v1alpha2} from './v1alpha2'; +import {gkehub_v1beta} from './v1beta'; +import {gkehub_v1beta1} from './v1beta1'; + +export const VERSIONS = { + v1: gkehub_v1.Gkehub, + v1alpha: gkehub_v1alpha.Gkehub, + v1alpha2: gkehub_v1alpha2.Gkehub, + v1beta: gkehub_v1beta.Gkehub, + v1beta1: gkehub_v1beta1.Gkehub, +}; + +export function gkehub(version: 'v1'): gkehub_v1.Gkehub; +export function gkehub(options: gkehub_v1.Options): gkehub_v1.Gkehub; +export function gkehub(version: 'v1alpha'): gkehub_v1alpha.Gkehub; +export function gkehub(options: gkehub_v1alpha.Options): gkehub_v1alpha.Gkehub; +export function gkehub(version: 'v1alpha2'): gkehub_v1alpha2.Gkehub; +export function gkehub( + options: gkehub_v1alpha2.Options +): gkehub_v1alpha2.Gkehub; +export function gkehub(version: 'v1beta'): gkehub_v1beta.Gkehub; +export function gkehub(options: gkehub_v1beta.Options): gkehub_v1beta.Gkehub; +export function gkehub(version: 'v1beta1'): gkehub_v1beta1.Gkehub; +export function gkehub(options: gkehub_v1beta1.Options): gkehub_v1beta1.Gkehub; +export function gkehub< + T = + | gkehub_v1.Gkehub + | gkehub_v1alpha.Gkehub + | gkehub_v1alpha2.Gkehub + | gkehub_v1beta.Gkehub + | gkehub_v1beta1.Gkehub +>( + this: GoogleConfigurable, + versionOrOptions: + | 'v1' + | gkehub_v1.Options + | 'v1alpha' + | gkehub_v1alpha.Options + | 'v1alpha2' + | gkehub_v1alpha2.Options + | 'v1beta' + | gkehub_v1beta.Options + | 'v1beta1' + | gkehub_v1beta1.Options +) { + return getAPI('gkehub', versionOrOptions, VERSIONS, this); +} + +const auth = new AuthPlus(); +export {auth}; +export {gkehub_v1}; +export {gkehub_v1alpha}; +export {gkehub_v1alpha2}; +export {gkehub_v1beta}; +export {gkehub_v1beta1}; +export { + AuthPlus, + GlobalOptions, + APIRequestContext, + GoogleConfigurable, + StreamMethodOptions, + GaxiosPromise, + MethodOptions, + BodyResponseCallback, +} from 'googleapis-common'; diff --git a/src/apis/gkehub/package.json b/src/apis/gkehub/package.json new file mode 100644 index 00000000000..0ce6f98b625 --- /dev/null +++ b/src/apis/gkehub/package.json @@ -0,0 +1,43 @@ +{ + "name": "@googleapis/gkehub", + "version": "0.1.0", + "description": "gkehub", + "main": "build/index.js", + "types": "build/index.d.ts", + "keywords": [ + "google" + ], + "author": "Google LLC", + "license": "Apache-2.0", + "homepage": "https://github.com/googleapis/google-api-nodejs-client", + "bugs": { + "url": "https://github.com/googleapis/google-api-nodejs-client/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/googleapis/google-api-nodejs-client.git" + }, + "engines": { + "node": ">=10.0.0" + }, + "scripts": { + "fix": "gts fix", + "lint": "gts check", + "compile": "tsc -p .", + "prepare": "npm run compile", + "webpack": "webpack" + }, + "dependencies": { + "googleapis-common": "^5.0.1" + }, + "devDependencies": { + "@microsoft/api-documenter": "^7.8.10", + "@microsoft/api-extractor": "^7.8.10", + "gts": "^2.0.0", + "null-loader": "^4.0.0", + "ts-loader": "^8.0.0", + "typescript": "~3.7.0", + "webpack": "^5.0.0", + "webpack-cli": "^4.0.0" + } +} diff --git a/src/apis/gkehub/tsconfig.json b/src/apis/gkehub/tsconfig.json new file mode 100644 index 00000000000..e0810904968 --- /dev/null +++ b/src/apis/gkehub/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "./node_modules/gts/tsconfig-google.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build" + }, + "include": [ + "*.ts", + ] +} diff --git a/src/apis/gkehub/v1.ts b/src/apis/gkehub/v1.ts new file mode 100644 index 00000000000..faca8f60331 --- /dev/null +++ b/src/apis/gkehub/v1.ts @@ -0,0 +1,2912 @@ +// Copyright 2020 Google LLC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/* eslint-disable @typescript-eslint/no-explicit-any */ +/* eslint-disable @typescript-eslint/class-name-casing */ +/* eslint-disable @typescript-eslint/no-unused-vars */ +/* eslint-disable @typescript-eslint/no-empty-interface */ +/* eslint-disable @typescript-eslint/no-namespace */ +/* eslint-disable no-irregular-whitespace */ + +import { + OAuth2Client, + JWT, + Compute, + UserRefreshClient, + BaseExternalAccountClient, + GaxiosPromise, + GoogleConfigurable, + createAPIRequest, + MethodOptions, + StreamMethodOptions, + GlobalOptions, + GoogleAuth, + BodyResponseCallback, + APIRequestContext, +} from 'googleapis-common'; +import {Readable} from 'stream'; + +export namespace gkehub_v1 { + export interface Options extends GlobalOptions { + version: 'v1'; + } + + interface StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: + | string + | OAuth2Client + | JWT + | Compute + | UserRefreshClient + | BaseExternalAccountClient + | GoogleAuth; + + /** + * V1 error format. + */ + '$.xgafv'?: string; + /** + * OAuth access token. + */ + access_token?: string; + /** + * Data format for response. + */ + alt?: string; + /** + * JSONP + */ + callback?: string; + /** + * Selector specifying which fields to include in a partial response. + */ + fields?: string; + /** + * 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. + */ + key?: string; + /** + * OAuth 2.0 token for the current user. + */ + oauth_token?: string; + /** + * Returns response with indentations and line breaks. + */ + prettyPrint?: boolean; + /** + * 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. + */ + quotaUser?: string; + /** + * Legacy upload protocol for media (e.g. "media", "multipart"). + */ + uploadType?: string; + /** + * Upload protocol for media (e.g. "raw", "multipart"). + */ + upload_protocol?: string; + } + + /** + * GKE Hub + * + * + * + * @example + * ```js + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1'); + * ``` + */ + export class Gkehub { + context: APIRequestContext; + projects: Resource$Projects; + + constructor(options: GlobalOptions, google?: GoogleConfigurable) { + this.context = { + _options: options || {}, + google, + }; + + this.projects = new Resource$Projects(this.context); + } + } + + /** + * Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { "audit_configs": [ { "service": "allServices", "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] \}, { "log_type": "DATA_WRITE" \}, { "log_type": "ADMIN_READ" \} ] \}, { "service": "sampleservice.googleapis.com", "audit_log_configs": [ { "log_type": "DATA_READ" \}, { "log_type": "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] \} ] \} ] \} For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging. + */ + export interface Schema$AuditConfig { + /** + * The configuration for logging of each type of permission. + */ + auditLogConfigs?: Schema$AuditLogConfig[]; + /** + * Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services. + */ + service?: string | null; + } + /** + * Provides the configuration for logging a type of permissions. Example: { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] \}, { "log_type": "DATA_WRITE" \} ] \} This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging. + */ + export interface Schema$AuditLogConfig { + /** + * Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members. + */ + exemptedMembers?: string[] | null; + /** + * The log type that this config enables. + */ + logType?: string | null; + } + /** + * Authority encodes how Google will recognize identities from this Membership. See the workload identity documentation for more details: https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity + */ + export interface Schema$Authority { + /** + * Output only. An identity provider that reflects the `issuer` in the workload identity pool. + */ + identityProvider?: string | null; + /** + * Optional. A JSON Web Token (JWT) issuer URI. `issuer` must start with `https://` and be a valid URL with length <2000 characters. If set, then Google will allow valid OIDC tokens from this issuer to authenticate within the workload_identity_pool. OIDC discovery will be performed on this URI to validate tokens from the issuer. Clearing `issuer` disables Workload Identity. `issuer` cannot be directly modified; it must be cleared (and Workload Identity disabled) before using a new issuer (and re-enabling Workload Identity). + */ + issuer?: string | null; + /** + * Output only. The name of the workload identity pool in which `issuer` will be recognized. There is a single Workload Identity Pool per Hub that is shared between all Memberships that belong to that Hub. For a Hub hosted in {PROJECT_ID\}, the workload pool format is `{PROJECT_ID\}.hub.id.goog`, although this is subject to change in newer versions of this API. + */ + workloadIdentityPool?: string | null; + } + /** + * Associates `members` with a `role`. + */ + export interface Schema$Binding { + /** + * The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + */ + condition?: Schema$Expr; + /** + * Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid\}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid\}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid\}`: An email address that represents a Google group. For example, `admins@example.com`. * `deleted:user:{emailid\}?uid={uniqueid\}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid\}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid\}?uid={uniqueid\}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid\}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid\}?uid={uniqueid\}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid\}` and the recovered group retains the role in the binding. * `domain:{domain\}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. + */ + members?: string[] | null; + /** + * Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + */ + role?: string | null; + } + /** + * The request message for Operations.CancelOperation. + */ + export interface Schema$CancelOperationRequest {} + /** + * ConnectAgentResource represents a Kubernetes resource manifest for Connect Agent deployment. + */ + export interface Schema$ConnectAgentResource { + /** + * YAML manifest of the resource. + */ + manifest?: string | null; + /** + * Kubernetes type of the resource. + */ + type?: Schema$TypeMeta; + } + /** + * 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); \} The JSON representation for `Empty` is empty JSON object `{\}`. + */ + export interface Schema$Empty {} + /** + * Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. + */ + export interface Schema$Expr { + /** + * Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. + */ + description?: string | null; + /** + * Textual representation of an expression in Common Expression Language syntax. + */ + expression?: string | null; + /** + * Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file. + */ + location?: string | null; + /** + * Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression. + */ + title?: string | null; + } + /** + * GenerateConnectManifestResponse contains manifest information for installing/upgrading a Connect agent. + */ + export interface Schema$GenerateConnectManifestResponse { + /** + * The ordered list of Kubernetes resources that need to be applied to the cluster for GKE Connect agent installation/upgrade. + */ + manifest?: Schema$ConnectAgentResource[]; + } + /** + * GkeCluster contains information specific to GKE clusters. + */ + export interface Schema$GkeCluster { + /** + * Immutable. Self-link of the GCP resource for the GKE cluster. For example: //container.googleapis.com/projects/my-project/locations/us-west1-a/clusters/my-cluster Zonal clusters are also supported. + */ + resourceLink?: string | null; + } + /** + * 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). + */ + export interface Schema$GoogleRpcStatus { + /** + * The status code, which should be an enum value of google.rpc.Code. + */ + code?: number | null; + /** + * A list of messages that carry the error details. There is a common set of message types for APIs to use. + */ + details?: Array<{[key: string]: any}> | null; + /** + * 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 | null; + } + /** + * KubernetesMetadata provides informational metadata for Memberships representing Kubernetes clusters. + */ + export interface Schema$KubernetesMetadata { + /** + * Output only. Kubernetes API server version string as reported by `/version`. + */ + kubernetesApiServerVersion?: string | null; + /** + * Output only. The total memory capacity as reported by the sum of all Kubernetes nodes resources, defined in MB. + */ + memoryMb?: number | null; + /** + * Output only. Node count as reported by Kubernetes nodes resources. + */ + nodeCount?: number | null; + /** + * Output only. Node providerID as reported by the first node in the list of nodes on the Kubernetes endpoint. On Kubernetes platforms that support zero-node clusters (like GKE-on-GCP), the node_count will be zero and the node_provider_id will be empty. + */ + nodeProviderId?: string | null; + /** + * Output only. The time at which these details were last updated. This update_time is different from the Membership-level update_time since EndpointDetails are updated internally for API consumers. + */ + updateTime?: string | null; + /** + * Output only. vCPU count as reported by Kubernetes nodes resources. + */ + vcpuCount?: number | null; + } + /** + * The response message for Locations.ListLocations. + */ + export interface Schema$ListLocationsResponse { + /** + * A list of locations that matches the specified filter in the request. + */ + locations?: Schema$Location[]; + /** + * The standard List next-page token. + */ + nextPageToken?: string | null; + } + /** + * Response message for the `GkeHub.ListMemberships` method. + */ + export interface Schema$ListMembershipsResponse { + /** + * A token to request the next page of resources from the `ListMemberships` method. The value of an empty string means that there are no more resources to return. + */ + nextPageToken?: string | null; + /** + * The list of matching Memberships. + */ + resources?: Schema$Membership[]; + /** + * List of locations that could not be reached while fetching this list. + */ + unreachable?: string[] | null; + } + /** + * The response message for Operations.ListOperations. + */ + export interface Schema$ListOperationsResponse { + /** + * The standard List next-page token. + */ + nextPageToken?: string | null; + /** + * A list of operations that matches the specified filter in the request. + */ + operations?: Schema$Operation[]; + } + /** + * A resource that represents Google Cloud Platform location. + */ + export interface Schema$Location { + /** + * The friendly name for this location, typically a nearby city name. For example, "Tokyo". + */ + displayName?: string | null; + /** + * Cross-service attributes for the location. For example {"cloud.googleapis.com/region": "us-east1"\} + */ + labels?: {[key: string]: string} | null; + /** + * The canonical id for this location. For example: `"us-east1"`. + */ + locationId?: string | null; + /** + * Service-specific metadata. For example the available capacity at the given location. + */ + metadata?: {[key: string]: any} | null; + /** + * Resource name for the location, which may vary between implementations. For example: `"projects/example-project/locations/us-east1"` + */ + name?: string | null; + } + /** + * Membership contains information about a member cluster. + */ + export interface Schema$Membership { + /** + * Optional. How to identify workloads from this Membership. See the documentation on Workload Identity for more details: https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity + */ + authority?: Schema$Authority; + /** + * Output only. When the Membership was created. + */ + createTime?: string | null; + /** + * Output only. When the Membership was deleted. + */ + deleteTime?: string | null; + /** + * Output only. Description of this membership, limited to 63 characters. Must match the regex: `a-zA-Z0-9*` This field is present for legacy purposes. + */ + description?: string | null; + /** + * Optional. Endpoint information to reach this member. + */ + endpoint?: Schema$MembershipEndpoint; + /** + * Optional. An externally-generated and managed ID for this Membership. This ID may be modified after creation, but this is not recommended. The ID must match the regex: `a-zA-Z0-9*` If this Membership represents a Kubernetes cluster, this value should be set to the UID of the `kube-system` namespace object. + */ + externalId?: string | null; + /** + * Optional. GCP labels for this membership. + */ + labels?: {[key: string]: string} | null; + /** + * Output only. For clusters using Connect, the timestamp of the most recent connection established with Google Cloud. This time is updated every several minutes, not continuously. For clusters that do not use GKE Connect, or that have never connected successfully, this field will be unset. + */ + lastConnectionTime?: string | null; + /** + * Output only. The full, unique name of this Membership resource in the format `projects/x/locations/x/memberships/{membership_id\}`, set during creation. `membership_id` must be a valid RFC 1123 compliant DNS label: 1. At most 63 characters in length 2. It must consist of lower case alphanumeric characters or `-` 3. It must start and end with an alphanumeric character Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters. + */ + name?: string | null; + /** + * Output only. State of the Membership resource. + */ + state?: Schema$MembershipState; + /** + * Output only. Google-generated UUID for this resource. This is unique across all Membership resources. If a Membership resource is deleted and another resource with the same name is created, it gets a different unique_id. + */ + uniqueId?: string | null; + /** + * Output only. When the Membership was last updated. + */ + updateTime?: string | null; + } + /** + * MembershipEndpoint contains information needed to contact a Kubernetes API, endpoint and any additional Kubernetes metadata. + */ + export interface Schema$MembershipEndpoint { + /** + * Optional. GKE-specific information. Only present if this Membership is a GKE cluster. + */ + gkeCluster?: Schema$GkeCluster; + /** + * Output only. Useful Kubernetes-specific metadata. + */ + kubernetesMetadata?: Schema$KubernetesMetadata; + } + /** + * MembershipState describes the state of a Membership resource. + */ + export interface Schema$MembershipState { + /** + * Output only. The current state of the Membership resource. + */ + code?: string | null; + } + /** + * This resource represents a long-running operation that is the result of a network API call. + */ + export interface Schema$Operation { + /** + * 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?: boolean | null; + /** + * The error result of the operation in case of failure or cancellation. + */ + error?: Schema$GoogleRpcStatus; + /** + * 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?: {[key: string]: any} | null; + /** + * 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 | null; + /** + * The normal response of the operation in case of success. 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?: {[key: string]: any} | null; + } + /** + * Represents the metadata of the long-running operation. + */ + export interface Schema$OperationMetadata { + /** + * Output only. API version used to start the operation. + */ + apiVersion?: string | null; + /** + * 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`. + */ + cancelRequested?: boolean | null; + /** + * Output only. The time the operation was created. + */ + createTime?: string | null; + /** + * Output only. The time the operation finished running. + */ + endTime?: string | null; + /** + * Output only. Human-readable status of the operation, if any. + */ + statusDetail?: string | null; + /** + * Output only. Server-defined resource path for the target of the operation. + */ + target?: string | null; + /** + * Output only. Name of the verb executed by the operation. + */ + verb?: string | null; + } + /** + * An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] \}, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", \} \} ], "etag": "BwWWja0YfJA=", "version": 3 \} **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/). + */ + export interface Schema$Policy { + /** + * Specifies cloud audit logging configuration for this policy. + */ + auditConfigs?: Schema$AuditConfig[]; + /** + * Associates a list of `members` to a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one member. + */ + bindings?: Schema$Binding[]; + /** + * `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. + */ + etag?: string | null; + /** + * Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + */ + version?: number | null; + } + /** + * Request message for `SetIamPolicy` method. + */ + export interface Schema$SetIamPolicyRequest { + /** + * REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them. + */ + policy?: Schema$Policy; + /** + * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used: `paths: "bindings, etag"` + */ + updateMask?: string | null; + } + /** + * Request message for `TestIamPermissions` method. + */ + export interface Schema$TestIamPermissionsRequest { + /** + * The set of permissions to check for the `resource`. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + */ + permissions?: string[] | null; + } + /** + * Response message for `TestIamPermissions` method. + */ + export interface Schema$TestIamPermissionsResponse { + /** + * A subset of `TestPermissionsRequest.permissions` that the caller is allowed. + */ + permissions?: string[] | null; + } + /** + * TypeMeta is the type information needed for content unmarshalling of Kubernetes resources in the manifest. + */ + export interface Schema$TypeMeta { + /** + * APIVersion of the resource (e.g. v1). + */ + apiVersion?: string | null; + /** + * Kind of the resource (e.g. Deployment). + */ + kind?: string | null; + } + + export class Resource$Projects { + context: APIRequestContext; + locations: Resource$Projects$Locations; + constructor(context: APIRequestContext) { + this.context = context; + this.locations = new Resource$Projects$Locations(this.context); + } + } + + export class Resource$Projects$Locations { + context: APIRequestContext; + memberships: Resource$Projects$Locations$Memberships; + operations: Resource$Projects$Locations$Operations; + constructor(context: APIRequestContext) { + this.context = context; + this.memberships = new Resource$Projects$Locations$Memberships( + this.context + ); + this.operations = new Resource$Projects$Locations$Operations( + this.context + ); + } + + /** + * Gets information about a location. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.get({ + * // Resource name for the location. + * name: 'projects/my-project/locations/my-location', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "displayName": "my_displayName", + * // "labels": {}, + * // "locationId": "my_locationId", + * // "metadata": {}, + * // "name": "my_name" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Projects$Locations$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Projects$Locations$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Lists information about the supported locations for this service. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.list({ + * // 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). + * filter: 'placeholder-value', + * // The resource that owns the locations collection, if applicable. + * name: 'projects/my-project', + * // The maximum number of results to return. If not set, the service will select a default. + * pageSize: 'placeholder-value', + * // A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. + * pageToken: 'placeholder-value', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "locations": [], + * // "nextPageToken": "my_nextPageToken" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Projects$Locations$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Projects$Locations$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$List, + callback: BodyResponseCallback + ): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Locations$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}/locations').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Locations$Get + extends StandardParameters { + /** + * Resource name for the location. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$List + extends StandardParameters { + /** + * 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). + */ + filter?: string; + /** + * The resource that owns the locations collection, if applicable. + */ + name?: string; + /** + * The maximum number of results to return. If not set, the service will select a default. + */ + pageSize?: number; + /** + * A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. + */ + pageToken?: string; + } + + export class Resource$Projects$Locations$Memberships { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Adds a new Membership. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.memberships.create({ + * // Required. Client chosen ID for the membership. `membership_id` must be a valid RFC 1123 compliant DNS label: 1. At most 63 characters in length 2. It must consist of lower case alphanumeric characters or `-` 3. It must start and end with an alphanumeric character Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters. + * membershipId: 'placeholder-value', + * // Required. The parent (project and location) where the Memberships will be created. Specified in the format `projects/x/locations/x`. + * parent: 'projects/my-project/locations/my-location', + * // Optional. A 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: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "authority": {}, + * // "createTime": "my_createTime", + * // "deleteTime": "my_deleteTime", + * // "description": "my_description", + * // "endpoint": {}, + * // "externalId": "my_externalId", + * // "labels": {}, + * // "lastConnectionTime": "my_lastConnectionTime", + * // "name": "my_name", + * // "state": {}, + * // "uniqueId": "my_uniqueId", + * // "updateTime": "my_updateTime" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + create( + params: Params$Resource$Projects$Locations$Memberships$Create, + options: StreamMethodOptions + ): GaxiosPromise; + create( + params?: Params$Resource$Projects$Locations$Memberships$Create, + options?: MethodOptions + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Locations$Memberships$Create, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Locations$Memberships$Create, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Locations$Memberships$Create, + callback: BodyResponseCallback + ): void; + create(callback: BodyResponseCallback): void; + create( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Memberships$Create + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Memberships$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Memberships$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+parent}/memberships').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Removes a Membership. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.memberships.delete({ + * // Required. The Membership resource name in the format `projects/x/locations/x/memberships/x`. + * name: 'projects/my-project/locations/my-location/memberships/my-membership', + * // Optional. A 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: 'placeholder-value', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + delete( + params: Params$Resource$Projects$Locations$Memberships$Delete, + options: StreamMethodOptions + ): GaxiosPromise; + delete( + params?: Params$Resource$Projects$Locations$Memberships$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Locations$Memberships$Delete, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Memberships$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Memberships$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Memberships$Delete + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Memberships$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Memberships$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Generates the manifest for deployment of the GKE connect agent. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.memberships.generateConnectManifest( + * { + * // Optional. The image pull secret content for the registry, if not public. + * imagePullSecretContent: 'placeholder-value', + * // Optional. If true, generate the resources for upgrade only. Some resources generated only for installation (e.g. secrets) will be excluded. + * isUpgrade: 'placeholder-value', + * // Required. The Membership resource name the Agent will associate with, in the format `projects/x/locations/x/memberships/x`. + * name: + * 'projects/my-project/locations/my-location/memberships/my-membership', + * // Optional. Namespace for GKE Connect agent resources. Defaults to `gke-connect`. The Connect Agent is authorized automatically when run in the default namespace. Otherwise, explicit authorization must be granted with an additional IAM binding. + * namespace: 'placeholder-value', + * // Optional. URI of a proxy if connectivity from the agent to gkeconnect.googleapis.com requires the use of a proxy. Format must be in the form `http(s)://{proxy_address\}`, depending on the HTTP/HTTPS protocol supported by the proxy. This will direct the connect agent's outbound traffic through a HTTP(S) proxy. + * proxy: 'placeholder-value', + * // Optional. The registry to fetch the connect agent image from. Defaults to gcr.io/gkeconnect. + * registry: 'placeholder-value', + * // Optional. The Connect agent version to use. Defaults to the most current version. + * version: 'placeholder-value', + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "manifest": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + generateConnectManifest( + params: Params$Resource$Projects$Locations$Memberships$Generateconnectmanifest, + options: StreamMethodOptions + ): GaxiosPromise; + generateConnectManifest( + params?: Params$Resource$Projects$Locations$Memberships$Generateconnectmanifest, + options?: MethodOptions + ): GaxiosPromise; + generateConnectManifest( + params: Params$Resource$Projects$Locations$Memberships$Generateconnectmanifest, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + generateConnectManifest( + params: Params$Resource$Projects$Locations$Memberships$Generateconnectmanifest, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + generateConnectManifest( + params: Params$Resource$Projects$Locations$Memberships$Generateconnectmanifest, + callback: BodyResponseCallback + ): void; + generateConnectManifest( + callback: BodyResponseCallback + ): void; + generateConnectManifest( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Memberships$Generateconnectmanifest + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Memberships$Generateconnectmanifest; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Memberships$Generateconnectmanifest; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}:generateConnectManifest').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Gets the details of a Membership. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.memberships.get({ + * // Required. The Membership resource name in the format `projects/x/locations/x/memberships/x`. + * name: 'projects/my-project/locations/my-location/memberships/my-membership', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "authority": {}, + * // "createTime": "my_createTime", + * // "deleteTime": "my_deleteTime", + * // "description": "my_description", + * // "endpoint": {}, + * // "externalId": "my_externalId", + * // "labels": {}, + * // "lastConnectionTime": "my_lastConnectionTime", + * // "name": "my_name", + * // "state": {}, + * // "uniqueId": "my_uniqueId", + * // "updateTime": "my_updateTime" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Projects$Locations$Memberships$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Projects$Locations$Memberships$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Memberships$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Memberships$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Memberships$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Memberships$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Memberships$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Memberships$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.memberships.getIamPolicy({ + * // Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + * 'options.requestedPolicyVersion': 'placeholder-value', + * // REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. + * resource: + * 'projects/my-project/locations/my-location/memberships/my-membership', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "auditConfigs": [], + * // "bindings": [], + * // "etag": "my_etag", + * // "version": 0 + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + getIamPolicy( + params: Params$Resource$Projects$Locations$Memberships$Getiampolicy, + options: StreamMethodOptions + ): GaxiosPromise; + getIamPolicy( + params?: Params$Resource$Projects$Locations$Memberships$Getiampolicy, + options?: MethodOptions + ): GaxiosPromise; + getIamPolicy( + params: Params$Resource$Projects$Locations$Memberships$Getiampolicy, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getIamPolicy( + params: Params$Resource$Projects$Locations$Memberships$Getiampolicy, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getIamPolicy( + params: Params$Resource$Projects$Locations$Memberships$Getiampolicy, + callback: BodyResponseCallback + ): void; + getIamPolicy(callback: BodyResponseCallback): void; + getIamPolicy( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Memberships$Getiampolicy + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Memberships$Getiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Memberships$Getiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+resource}:getIamPolicy').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Lists Memberships in a given project and location. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.memberships.list({ + * // Optional. Lists Memberships that match the filter expression, following the syntax outlined in https://google.aip.dev/160. Examples: - Name is `bar` in project `foo-proj` and location `global`: name = "projects/foo-proj/locations/global/membership/bar" - Memberships that have a label called `foo`: labels.foo:* - Memberships that have a label called `foo` whose value is `bar`: labels.foo = bar - Memberships in the CREATING state: state = CREATING + * filter: 'placeholder-value', + * // Optional. One or more fields to compare and use to sort the output. See https://google.aip.dev/132#ordering. + * orderBy: 'placeholder-value', + * // Optional. When requesting a 'page' of resources, `page_size` specifies number of resources to return. If unspecified or set to 0, all resources will be returned. + * pageSize: 'placeholder-value', + * // Optional. Token returned by previous call to `ListMemberships` which specifies the position in the list from where to continue listing the resources. + * pageToken: 'placeholder-value', + * // Required. The parent (project and location) where the Memberships will be listed. Specified in the format `projects/x/locations/x`. + * parent: 'projects/my-project/locations/my-location', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "nextPageToken": "my_nextPageToken", + * // "resources": [], + * // "unreachable": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Projects$Locations$Memberships$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Projects$Locations$Memberships$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$Memberships$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Memberships$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Memberships$List, + callback: BodyResponseCallback + ): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Memberships$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Memberships$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Memberships$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+parent}/memberships').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Updates an existing Membership. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.memberships.patch({ + * // Required. The Membership resource name in the format `projects/x/locations/x/memberships/x`. + * name: 'projects/my-project/locations/my-location/memberships/my-membership', + * // Optional. A 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: 'placeholder-value', + * // Required. Mask of fields to update. + * updateMask: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "authority": {}, + * // "createTime": "my_createTime", + * // "deleteTime": "my_deleteTime", + * // "description": "my_description", + * // "endpoint": {}, + * // "externalId": "my_externalId", + * // "labels": {}, + * // "lastConnectionTime": "my_lastConnectionTime", + * // "name": "my_name", + * // "state": {}, + * // "uniqueId": "my_uniqueId", + * // "updateTime": "my_updateTime" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + patch( + params: Params$Resource$Projects$Locations$Memberships$Patch, + options: StreamMethodOptions + ): GaxiosPromise; + patch( + params?: Params$Resource$Projects$Locations$Memberships$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Locations$Memberships$Patch, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Locations$Memberships$Patch, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Locations$Memberships$Patch, + callback: BodyResponseCallback + ): void; + patch(callback: BodyResponseCallback): void; + patch( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Memberships$Patch + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Memberships$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Memberships$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.memberships.setIamPolicy({ + * // REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. + * resource: + * 'projects/my-project/locations/my-location/memberships/my-membership', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "policy": {}, + * // "updateMask": "my_updateMask" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "auditConfigs": [], + * // "bindings": [], + * // "etag": "my_etag", + * // "version": 0 + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + setIamPolicy( + params: Params$Resource$Projects$Locations$Memberships$Setiampolicy, + options: StreamMethodOptions + ): GaxiosPromise; + setIamPolicy( + params?: Params$Resource$Projects$Locations$Memberships$Setiampolicy, + options?: MethodOptions + ): GaxiosPromise; + setIamPolicy( + params: Params$Resource$Projects$Locations$Memberships$Setiampolicy, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + setIamPolicy( + params: Params$Resource$Projects$Locations$Memberships$Setiampolicy, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + setIamPolicy( + params: Params$Resource$Projects$Locations$Memberships$Setiampolicy, + callback: BodyResponseCallback + ): void; + setIamPolicy(callback: BodyResponseCallback): void; + setIamPolicy( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Memberships$Setiampolicy + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Memberships$Setiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Memberships$Setiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+resource}:setIamPolicy').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.memberships.testIamPermissions({ + * // REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. + * resource: + * 'projects/my-project/locations/my-location/memberships/my-membership', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "permissions": [] + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "permissions": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + testIamPermissions( + params: Params$Resource$Projects$Locations$Memberships$Testiampermissions, + options: StreamMethodOptions + ): GaxiosPromise; + testIamPermissions( + params?: Params$Resource$Projects$Locations$Memberships$Testiampermissions, + options?: MethodOptions + ): GaxiosPromise; + testIamPermissions( + params: Params$Resource$Projects$Locations$Memberships$Testiampermissions, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + testIamPermissions( + params: Params$Resource$Projects$Locations$Memberships$Testiampermissions, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + testIamPermissions( + params: Params$Resource$Projects$Locations$Memberships$Testiampermissions, + callback: BodyResponseCallback + ): void; + testIamPermissions( + callback: BodyResponseCallback + ): void; + testIamPermissions( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Memberships$Testiampermissions + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Memberships$Testiampermissions; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Memberships$Testiampermissions; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+resource}:testIamPermissions').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Locations$Memberships$Create + extends StandardParameters { + /** + * Required. Client chosen ID for the membership. `membership_id` must be a valid RFC 1123 compliant DNS label: 1. At most 63 characters in length 2. It must consist of lower case alphanumeric characters or `-` 3. It must start and end with an alphanumeric character Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters. + */ + membershipId?: string; + /** + * Required. The parent (project and location) where the Memberships will be created. Specified in the format `projects/x/locations/x`. + */ + parent?: string; + /** + * Optional. A 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; + + /** + * Request body metadata + */ + requestBody?: Schema$Membership; + } + export interface Params$Resource$Projects$Locations$Memberships$Delete + extends StandardParameters { + /** + * Required. The Membership resource name in the format `projects/x/locations/x/memberships/x`. + */ + name?: string; + /** + * Optional. A 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; + } + export interface Params$Resource$Projects$Locations$Memberships$Generateconnectmanifest + extends StandardParameters { + /** + * Optional. The image pull secret content for the registry, if not public. + */ + imagePullSecretContent?: string; + /** + * Optional. If true, generate the resources for upgrade only. Some resources generated only for installation (e.g. secrets) will be excluded. + */ + isUpgrade?: boolean; + /** + * Required. The Membership resource name the Agent will associate with, in the format `projects/x/locations/x/memberships/x`. + */ + name?: string; + /** + * Optional. Namespace for GKE Connect agent resources. Defaults to `gke-connect`. The Connect Agent is authorized automatically when run in the default namespace. Otherwise, explicit authorization must be granted with an additional IAM binding. + */ + namespace?: string; + /** + * Optional. URI of a proxy if connectivity from the agent to gkeconnect.googleapis.com requires the use of a proxy. Format must be in the form `http(s)://{proxy_address\}`, depending on the HTTP/HTTPS protocol supported by the proxy. This will direct the connect agent's outbound traffic through a HTTP(S) proxy. + */ + proxy?: string; + /** + * Optional. The registry to fetch the connect agent image from. Defaults to gcr.io/gkeconnect. + */ + registry?: string; + /** + * Optional. The Connect agent version to use. Defaults to the most current version. + */ + version?: string; + } + export interface Params$Resource$Projects$Locations$Memberships$Get + extends StandardParameters { + /** + * Required. The Membership resource name in the format `projects/x/locations/x/memberships/x`. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Memberships$Getiampolicy + extends StandardParameters { + /** + * Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + */ + 'options.requestedPolicyVersion'?: number; + /** + * REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. + */ + resource?: string; + } + export interface Params$Resource$Projects$Locations$Memberships$List + extends StandardParameters { + /** + * Optional. Lists Memberships that match the filter expression, following the syntax outlined in https://google.aip.dev/160. Examples: - Name is `bar` in project `foo-proj` and location `global`: name = "projects/foo-proj/locations/global/membership/bar" - Memberships that have a label called `foo`: labels.foo:* - Memberships that have a label called `foo` whose value is `bar`: labels.foo = bar - Memberships in the CREATING state: state = CREATING + */ + filter?: string; + /** + * Optional. One or more fields to compare and use to sort the output. See https://google.aip.dev/132#ordering. + */ + orderBy?: string; + /** + * Optional. When requesting a 'page' of resources, `page_size` specifies number of resources to return. If unspecified or set to 0, all resources will be returned. + */ + pageSize?: number; + /** + * Optional. Token returned by previous call to `ListMemberships` which specifies the position in the list from where to continue listing the resources. + */ + pageToken?: string; + /** + * Required. The parent (project and location) where the Memberships will be listed. Specified in the format `projects/x/locations/x`. + */ + parent?: string; + } + export interface Params$Resource$Projects$Locations$Memberships$Patch + extends StandardParameters { + /** + * Required. The Membership resource name in the format `projects/x/locations/x/memberships/x`. + */ + name?: string; + /** + * Optional. A 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; + /** + * Required. Mask of fields to update. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Membership; + } + export interface Params$Resource$Projects$Locations$Memberships$Setiampolicy + extends StandardParameters { + /** + * REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$SetIamPolicyRequest; + } + export interface Params$Resource$Projects$Locations$Memberships$Testiampermissions + extends StandardParameters { + /** + * REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$TestIamPermissionsRequest; + } + + export class Resource$Projects$Locations$Operations { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * 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`. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.operations.cancel({ + * // The name of the operation resource to be cancelled. + * name: 'projects/my-project/locations/my-location/operations/my-operation', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // {} + * }, + * }); + * console.log(res.data); + * + * // Example response + * // {} + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + cancel( + params: Params$Resource$Projects$Locations$Operations$Cancel, + options: StreamMethodOptions + ): GaxiosPromise; + cancel( + params?: Params$Resource$Projects$Locations$Operations$Cancel, + options?: MethodOptions + ): GaxiosPromise; + cancel( + params: Params$Resource$Projects$Locations$Operations$Cancel, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + cancel( + params: Params$Resource$Projects$Locations$Operations$Cancel, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + cancel( + params: Params$Resource$Projects$Locations$Operations$Cancel, + callback: BodyResponseCallback + ): void; + cancel(callback: BodyResponseCallback): void; + cancel( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Operations$Cancel + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Operations$Cancel; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Operations$Cancel; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}:cancel').replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * 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`. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.operations.delete({ + * // The name of the operation resource to be deleted. + * name: 'projects/my-project/locations/my-location/operations/my-operation', + * }); + * console.log(res.data); + * + * // Example response + * // {} + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + delete( + params: Params$Resource$Projects$Locations$Operations$Delete, + options: StreamMethodOptions + ): GaxiosPromise; + delete( + params?: Params$Resource$Projects$Locations$Operations$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Locations$Operations$Delete, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Operations$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Operations$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Operations$Delete + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Operations$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Operations$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * 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. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.operations.get({ + * // The name of the operation resource. + * name: 'projects/my-project/locations/my-location/operations/my-operation', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Projects$Locations$Operations$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Projects$Locations$Operations$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Operations$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Operations$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Operations$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Operations$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Operations$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Operations$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/x/operations`. To override the binding, API services can add a binding such as `"/v1/{name=users/x\}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.operations.list({ + * // The standard list filter. + * filter: 'placeholder-value', + * // The name of the operation's parent resource. + * name: 'projects/my-project/locations/my-location', + * // The standard list page size. + * pageSize: 'placeholder-value', + * // The standard list page token. + * pageToken: 'placeholder-value', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "nextPageToken": "my_nextPageToken", + * // "operations": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Projects$Locations$Operations$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Projects$Locations$Operations$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$Operations$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Operations$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Operations$List, + callback: BodyResponseCallback + ): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Operations$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Operations$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Operations$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}/operations').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Locations$Operations$Cancel + extends StandardParameters { + /** + * The name of the operation resource to be cancelled. + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$CancelOperationRequest; + } + export interface Params$Resource$Projects$Locations$Operations$Delete + extends StandardParameters { + /** + * The name of the operation resource to be deleted. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Operations$Get + extends StandardParameters { + /** + * The name of the operation resource. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Operations$List + extends StandardParameters { + /** + * The standard list filter. + */ + filter?: string; + /** + * The name of the operation's parent resource. + */ + name?: string; + /** + * The standard list page size. + */ + pageSize?: number; + /** + * The standard list page token. + */ + pageToken?: string; + } +} diff --git a/src/apis/gkehub/v1alpha.ts b/src/apis/gkehub/v1alpha.ts new file mode 100644 index 00000000000..750c9be3f0f --- /dev/null +++ b/src/apis/gkehub/v1alpha.ts @@ -0,0 +1,3699 @@ +// Copyright 2020 Google LLC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/* eslint-disable @typescript-eslint/no-explicit-any */ +/* eslint-disable @typescript-eslint/class-name-casing */ +/* eslint-disable @typescript-eslint/no-unused-vars */ +/* eslint-disable @typescript-eslint/no-empty-interface */ +/* eslint-disable @typescript-eslint/no-namespace */ +/* eslint-disable no-irregular-whitespace */ + +import { + OAuth2Client, + JWT, + Compute, + UserRefreshClient, + BaseExternalAccountClient, + GaxiosPromise, + GoogleConfigurable, + createAPIRequest, + MethodOptions, + StreamMethodOptions, + GlobalOptions, + GoogleAuth, + BodyResponseCallback, + APIRequestContext, +} from 'googleapis-common'; +import {Readable} from 'stream'; + +export namespace gkehub_v1alpha { + export interface Options extends GlobalOptions { + version: 'v1alpha'; + } + + interface StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: + | string + | OAuth2Client + | JWT + | Compute + | UserRefreshClient + | BaseExternalAccountClient + | GoogleAuth; + + /** + * V1 error format. + */ + '$.xgafv'?: string; + /** + * OAuth access token. + */ + access_token?: string; + /** + * Data format for response. + */ + alt?: string; + /** + * JSONP + */ + callback?: string; + /** + * Selector specifying which fields to include in a partial response. + */ + fields?: string; + /** + * 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. + */ + key?: string; + /** + * OAuth 2.0 token for the current user. + */ + oauth_token?: string; + /** + * Returns response with indentations and line breaks. + */ + prettyPrint?: boolean; + /** + * 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. + */ + quotaUser?: string; + /** + * Legacy upload protocol for media (e.g. "media", "multipart"). + */ + uploadType?: string; + /** + * Upload protocol for media (e.g. "raw", "multipart"). + */ + upload_protocol?: string; + } + + /** + * GKE Hub + * + * + * + * @example + * ```js + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1alpha'); + * ``` + */ + export class Gkehub { + context: APIRequestContext; + projects: Resource$Projects; + + constructor(options: GlobalOptions, google?: GoogleConfigurable) { + this.context = { + _options: options || {}, + google, + }; + + this.projects = new Resource$Projects(this.context); + } + } + + /** + * Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { "audit_configs": [ { "service": "allServices", "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] \}, { "log_type": "DATA_WRITE" \}, { "log_type": "ADMIN_READ" \} ] \}, { "service": "sampleservice.googleapis.com", "audit_log_configs": [ { "log_type": "DATA_READ" \}, { "log_type": "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] \} ] \} ] \} For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging. + */ + export interface Schema$AuditConfig { + /** + * The configuration for logging of each type of permission. + */ + auditLogConfigs?: Schema$AuditLogConfig[]; + /** + * Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services. + */ + service?: string | null; + } + /** + * Provides the configuration for logging a type of permissions. Example: { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] \}, { "log_type": "DATA_WRITE" \} ] \} This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging. + */ + export interface Schema$AuditLogConfig { + /** + * Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members. + */ + exemptedMembers?: string[] | null; + /** + * The log type that this config enables. + */ + logType?: string | null; + } + /** + * Associates `members` with a `role`. + */ + export interface Schema$Binding { + /** + * The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + */ + condition?: Schema$Expr; + /** + * Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid\}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid\}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid\}`: An email address that represents a Google group. For example, `admins@example.com`. * `deleted:user:{emailid\}?uid={uniqueid\}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid\}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid\}?uid={uniqueid\}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid\}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid\}?uid={uniqueid\}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid\}` and the recovered group retains the role in the binding. * `domain:{domain\}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. + */ + members?: string[] | null; + /** + * Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + */ + role?: string | null; + } + /** + * The request message for Operations.CancelOperation. + */ + export interface Schema$CancelOperationRequest {} + /** + * Spec for Audit Logging Allowlisting. + */ + export interface Schema$CloudAuditLoggingFeatureSpec { + /** + * Service account that should be allowlisted to send the audit logs; eg cloudauditlogging@gcp-project.iam.gserviceaccount.com. These accounts must already exist, but do not need to have any permissions granted to them. The customer's entitlements will be checked prior to allowlisting (i.e. the customer must be an Anthos customer.) + */ + allowlistedServiceAccounts?: string[] | null; + } + /** + * CommonFeatureSpec contains Hub-wide configuration information + */ + export interface Schema$CommonFeatureSpec { + /** + * Cloud Audit Logging-specific spec. + */ + cloudauditlogging?: Schema$CloudAuditLoggingFeatureSpec; + /** + * Multicluster Ingress-specific spec. + */ + multiclusteringress?: Schema$MultiClusterIngressFeatureSpec; + } + /** + * CommonFeatureState contains Hub-wide Feature status information. + */ + export interface Schema$CommonFeatureState { + /** + * Service Mesh-specific state. + */ + servicemesh?: Schema$ServiceMeshFeatureState; + /** + * Output only. The "running state" of the Feature in this Hub. + */ + state?: Schema$FeatureState; + } + /** + * Configuration for Binauthz + */ + export interface Schema$ConfigManagementBinauthzConfig { + /** + * Whether binauthz is enabled in this cluster. + */ + enabled?: boolean | null; + } + /** + * State for Binauthz + */ + export interface Schema$ConfigManagementBinauthzState { + /** + * The version of binauthz that is installed. + */ + version?: Schema$ConfigManagementBinauthzVersion; + /** + * The state of the binauthz webhook. + */ + webhook?: string | null; + } + /** + * The version of binauthz. + */ + export interface Schema$ConfigManagementBinauthzVersion { + /** + * The version of the binauthz webhook. + */ + webhookVersion?: string | null; + } + /** + * Configuration for Config Sync + */ + export interface Schema$ConfigManagementConfigSync { + /** + * Git repo configuration for the cluster. + */ + git?: Schema$ConfigManagementGitConfig; + /** + * Specifies whether the Config Sync Repo is in “hierarchical” or “unstructured” mode. + */ + sourceFormat?: string | null; + } + /** + * The state of ConfigSync's deployment on a cluster + */ + export interface Schema$ConfigManagementConfigSyncDeploymentState { + /** + * Deployment state of the git-sync pod + */ + gitSync?: string | null; + /** + * Deployment state of the importer pod + */ + importer?: string | null; + /** + * Deployment state of the monitor pod + */ + monitor?: string | null; + /** + * Deployment state of reconciler-manager pod + */ + reconcilerManager?: string | null; + /** + * Deployment state of root-reconciler + */ + rootReconciler?: string | null; + /** + * Deployment state of the syncer pod + */ + syncer?: string | null; + } + /** + * State information for ConfigSync + */ + export interface Schema$ConfigManagementConfigSyncState { + /** + * Information about the deployment of ConfigSync, including the version of the various Pods deployed + */ + deploymentState?: Schema$ConfigManagementConfigSyncDeploymentState; + /** + * The state of ConfigSync's process to sync configs to a cluster + */ + syncState?: Schema$ConfigManagementSyncState; + /** + * The version of ConfigSync deployed + */ + version?: Schema$ConfigManagementConfigSyncVersion; + } + /** + * Specific versioning information pertaining to ConfigSync's Pods + */ + export interface Schema$ConfigManagementConfigSyncVersion { + /** + * Version of the deployed git-sync pod + */ + gitSync?: string | null; + /** + * Version of the deployed importer pod + */ + importer?: string | null; + /** + * Version of the deployed monitor pod + */ + monitor?: string | null; + /** + * Version of the deployed reconciler-manager pod + */ + reconcilerManager?: string | null; + /** + * Version of the deployed reconciler container in root-reconciler pod + */ + rootReconciler?: string | null; + /** + * Version of the deployed syncer pod + */ + syncer?: string | null; + } + /** + * Model for a config file in the git repo with an associated Sync error + */ + export interface Schema$ConfigManagementErrorResource { + /** + * Group/version/kind of the resource that is causing an error + */ + resourceGvk?: Schema$ConfigManagementGroupVersionKind; + /** + * Metadata name of the resource that is causing an error + */ + resourceName?: string | null; + /** + * Namespace of the resource that is causing an error + */ + resourceNamespace?: string | null; + /** + * Path in the git repo of the erroneous config + */ + sourcePath?: string | null; + } + /** + * State of Policy Controller installation. + */ + export interface Schema$ConfigManagementGatekeeperDeploymentState { + /** + * Status of gatekeeper-audit deployment. + */ + gatekeeperAudit?: string | null; + /** + * Status of gatekeeper-controller-manager pod. + */ + gatekeeperControllerManagerState?: string | null; + } + /** + * Git repo configuration for a single cluster. + */ + export interface Schema$ConfigManagementGitConfig { + /** + * URL for the HTTPS proxy to be used when communicating with the Git repo. + */ + httpsProxy?: string | null; + /** + * The path within the Git repository that represents the top level of the repo to sync. Default: the root directory of the repository. + */ + policyDir?: string | null; + /** + * Type of secret configured for access to the Git repo. + */ + secretType?: string | null; + /** + * The branch of the repository to sync from. Default: master. + */ + syncBranch?: string | null; + /** + * The URL of the Git repository to use as the source of truth. + */ + syncRepo?: string | null; + /** + * Git revision (tag or hash) to check out. Default HEAD. + */ + syncRev?: string | null; + /** + * Period in seconds between consecutive syncs. Default: 15. + */ + syncWaitSecs?: string | null; + } + /** + * A Kubernetes object's GVK + */ + export interface Schema$ConfigManagementGroupVersionKind { + /** + * Kubernetes Group + */ + group?: string | null; + /** + * Kubernetes Kind + */ + kind?: string | null; + /** + * Kubernetes Version + */ + version?: string | null; + } + /** + * Configuration for Hierarchy Controller + */ + export interface Schema$ConfigManagementHierarchyControllerConfig { + /** + * Whether Hierarchy Controller is enabled in this cluster. + */ + enabled?: boolean | null; + /** + * Whether hierarchical resource quota is enabled in this cluster. + */ + enableHierarchicalResourceQuota?: boolean | null; + /** + * Whether pod tree labels are enabled in this cluster. + */ + enablePodTreeLabels?: boolean | null; + } + /** + * Deployment state for Hierarchy Controller + */ + export interface Schema$ConfigManagementHierarchyControllerDeploymentState { + /** + * The deployment state for Hierarchy Controller extension (e.g. v0.7.0-hc.1) + */ + extension?: string | null; + /** + * The deployment state for open source HNC (e.g. v0.7.0-hc.0) + */ + hnc?: string | null; + } + /** + * State for Hierarchy Controller + */ + export interface Schema$ConfigManagementHierarchyControllerState { + /** + * The deployment state for Hierarchy Controller + */ + state?: Schema$ConfigManagementHierarchyControllerDeploymentState; + /** + * The version for Hierarchy Controller + */ + version?: Schema$ConfigManagementHierarchyControllerVersion; + } + /** + * Version for Hierarchy Controller + */ + export interface Schema$ConfigManagementHierarchyControllerVersion { + /** + * Version for Hierarchy Controller extension + */ + extension?: string | null; + /** + * Version for open source HNC + */ + hnc?: string | null; + } + /** + * Errors pertaining to the installation of ACM + */ + export interface Schema$ConfigManagementInstallError { + /** + * A string representing the user facing error message + */ + errorMessage?: string | null; + } + /** + * Configuration for a single cluster. Intended to parallel the ConfigManagement CR. + */ + export interface Schema$ConfigManagementMembershipSpec { + /** + * Binauthz conifguration for the cluster. + */ + binauthz?: Schema$ConfigManagementBinauthzConfig; + /** + * Config Sync configuration for the cluster. + */ + configSync?: Schema$ConfigManagementConfigSync; + /** + * Hierarchy Controller configuration for the cluster. + */ + hierarchyController?: Schema$ConfigManagementHierarchyControllerConfig; + /** + * Policy Controller configuration for the cluster. + */ + policyController?: Schema$ConfigManagementPolicyController; + /** + * Version of ACM installed. + */ + version?: string | null; + } + /** + * State for Anthos Config Management + */ + export interface Schema$ConfigManagementMembershipState { + /** + * Binauthz status + */ + binauthzState?: Schema$ConfigManagementBinauthzState; + /** + * The user-defined name for the cluster used by ClusterSelectors to group clusters together. This should match Membership's membership_name, unless the user installed ACM on the cluster manually prior to enabling the ACM hub feature. Unique within a Anthos Config Management installation. + */ + clusterName?: string | null; + /** + * Current sync status + */ + configSyncState?: Schema$ConfigManagementConfigSyncState; + /** + * Hierarchy Controller status + */ + hierarchyControllerState?: Schema$ConfigManagementHierarchyControllerState; + /** + * Membership configuration in the cluster. This represents the actual state in the cluster, while the MembershipSpec in the FeatureSpec represents the intended state + */ + membershipSpec?: Schema$ConfigManagementMembershipSpec; + /** + * Current install status of ACM's Operator + */ + operatorState?: Schema$ConfigManagementOperatorState; + /** + * PolicyController status + */ + policyControllerState?: Schema$ConfigManagementPolicyControllerState; + } + /** + * State information for an ACM's Operator + */ + export interface Schema$ConfigManagementOperatorState { + /** + * The state of the Operator's deployment + */ + deploymentState?: string | null; + /** + * Install errors. + */ + errors?: Schema$ConfigManagementInstallError[]; + /** + * The semenatic version number of the operator + */ + version?: string | null; + } + /** + * Configuration for Policy Controller + */ + export interface Schema$ConfigManagementPolicyController { + /** + * Sets the interval for Policy Controller Audit Scans (in seconds). When set to 0, this disables audit functionality altogether. + */ + auditIntervalSeconds?: string | null; + /** + * Enables the installation of Policy Controller. If false, the rest of PolicyController fields take no effect. + */ + enabled?: boolean | null; + /** + * The set of namespaces that are excluded from Policy Controller checks. Namespaces do not need to currently exist on the cluster. + */ + exemptableNamespaces?: string[] | null; + /** + * Logs all denies and dry run failures. + */ + logDeniesEnabled?: boolean | null; + /** + * Enables the ability to use Constraint Templates that reference to objects other than the object currently being evaluated. + */ + referentialRulesEnabled?: boolean | null; + /** + * Installs the default template library along with Policy Controller. + */ + templateLibraryInstalled?: boolean | null; + } + /** + * State for PolicyControllerState. + */ + export interface Schema$ConfigManagementPolicyControllerState { + /** + * The state about the policy controller installation. + */ + deploymentState?: Schema$ConfigManagementGatekeeperDeploymentState; + /** + * The version of Gatekeeper Policy Controller deployed. + */ + version?: Schema$ConfigManagementPolicyControllerVersion; + } + /** + * The build version of Gatekeeper Policy Controller is using. + */ + export interface Schema$ConfigManagementPolicyControllerVersion { + /** + * The gatekeeper image tag that is composed of ACM version, git tag, build number. + */ + version?: string | null; + } + /** + * An ACM created error representing a problem syncing configurations + */ + export interface Schema$ConfigManagementSyncError { + /** + * An ACM defined error code + */ + code?: string | null; + /** + * A description of the error + */ + errorMessage?: string | null; + /** + * A list of config(s) associated with the error, if any + */ + errorResources?: Schema$ConfigManagementErrorResource[]; + } + /** + * State indicating an ACM's progress syncing configurations to a cluster + */ + export interface Schema$ConfigManagementSyncState { + /** + * Sync status code + */ + code?: string | null; + /** + * A list of errors resulting from problematic configs. This list will be truncated after 100 errors, although it is unlikely for that many errors to simultaneously exist. + */ + errors?: Schema$ConfigManagementSyncError[]; + /** + * Token indicating the state of the importer. + */ + importToken?: string | null; + /** + * Timestamp of when ACM last successfully synced the repo The time format is specified in https://golang.org/pkg/time/#Time.String This field is being deprecated. Use last_sync_time instead. (b/154053616) + */ + lastSync?: string | null; + /** + * Timestamp type of when ACM last successfully synced the repo + */ + lastSyncTime?: string | null; + /** + * Token indicating the state of the repo. + */ + sourceToken?: string | null; + /** + * Token indicating the state of the syncer. + */ + syncToken?: string | null; + } + /** + * 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); \} The JSON representation for `Empty` is empty JSON object `{\}`. + */ + export interface Schema$Empty {} + /** + * Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. + */ + export interface Schema$Expr { + /** + * Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. + */ + description?: string | null; + /** + * Textual representation of an expression in Common Expression Language syntax. + */ + expression?: string | null; + /** + * Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file. + */ + location?: string | null; + /** + * Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression. + */ + title?: string | null; + } + /** + * Feature represents the settings and status of any Hub Feature. + */ + export interface Schema$Feature { + /** + * Output only. When the Feature resource was created. + */ + createTime?: string | null; + /** + * Output only. When the Feature resource was deleted. + */ + deleteTime?: string | null; + /** + * GCP labels for this Feature. + */ + labels?: {[key: string]: string} | null; + /** + * Optional. Membership-specific configuration for this Feature. If this Feature does not support any per-Membership configuration, this field may be unused. The keys indicate which Membership the configuration is for, in the form: projects/{p\}/locations/{l\}/memberships/{m\} Where {p\} is the project number, {l\} is a valid location and {m\} is a valid Membership in this project at that location. {p\} MUST match the Feature's project number. + */ + membershipSpecs?: {[key: string]: Schema$MembershipFeatureSpec} | null; + /** + * Output only. Membership-specific Feature status. If this Feature does report any per-Membership status, this field may be unused. The keys indicate which Membership the state is for, in the form: projects/{p\}/locations/{l\}/memberships/{m\} Where {p\} is the project number, {l\} is a valid location and {m\} is a valid Membership in this project at that location. {p\} MUST match the Feature's project number. + */ + membershipStates?: {[key: string]: Schema$MembershipFeatureState} | null; + /** + * Output only. The full, unique name of this Feature resource in the format `projects/x/locations/global/features/x`. + */ + name?: string | null; + /** + * Output only. State of the Feature resource itself. + */ + resourceState?: Schema$FeatureResourceState; + /** + * Optional. Hub-wide Feature configuration. If this Feature does not support any Hub-wide configuration, this field may be unused. + */ + spec?: Schema$CommonFeatureSpec; + /** + * Output only. The Hub-wide Feature state. + */ + state?: Schema$CommonFeatureState; + /** + * Output only. When the Feature resource was last updated. + */ + updateTime?: string | null; + } + /** + * FeatureResourceState describes the state of a Feature *resource* in the GkeHub API. See `FeatureState` for the "running state" of the Feature in the Hub and across Memberships. + */ + export interface Schema$FeatureResourceState { + /** + * The current state of the Feature resource in the Hub API. + */ + state?: string | null; + } + /** + * FeatureState describes the high-level state of a Feature. It may be used to describe a Feature's state at the environ-level, or per-membershop, depending on the context. + */ + export interface Schema$FeatureState { + /** + * The high-level, machine-readable status of this Feature. + */ + code?: string | null; + /** + * A human-readable description of the current status. + */ + description?: string | null; + /** + * The time this status and any related Feature-specific details were updated. + */ + updateTime?: string | null; + } + /** + * 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). + */ + export interface Schema$GoogleRpcStatus { + /** + * The status code, which should be an enum value of google.rpc.Code. + */ + code?: number | null; + /** + * A list of messages that carry the error details. There is a common set of message types for APIs to use. + */ + details?: Array<{[key: string]: any}> | null; + /** + * 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 | null; + } + /** + * Response message for the `GkeHub.ListFeatures` method. + */ + export interface Schema$ListFeaturesResponse { + /** + * A token to request the next page of resources from the `ListFeatures` method. The value of an empty string means that there are no more resources to return. + */ + nextPageToken?: string | null; + /** + * The list of matching Features + */ + resources?: Schema$Feature[]; + } + /** + * The response message for Locations.ListLocations. + */ + export interface Schema$ListLocationsResponse { + /** + * A list of locations that matches the specified filter in the request. + */ + locations?: Schema$Location[]; + /** + * The standard List next-page token. + */ + nextPageToken?: string | null; + } + /** + * The response message for Operations.ListOperations. + */ + export interface Schema$ListOperationsResponse { + /** + * The standard List next-page token. + */ + nextPageToken?: string | null; + /** + * A list of operations that matches the specified filter in the request. + */ + operations?: Schema$Operation[]; + } + /** + * A resource that represents Google Cloud Platform location. + */ + export interface Schema$Location { + /** + * The friendly name for this location, typically a nearby city name. For example, "Tokyo". + */ + displayName?: string | null; + /** + * Cross-service attributes for the location. For example {"cloud.googleapis.com/region": "us-east1"\} + */ + labels?: {[key: string]: string} | null; + /** + * The canonical id for this location. For example: `"us-east1"`. + */ + locationId?: string | null; + /** + * Service-specific metadata. For example the available capacity at the given location. + */ + metadata?: {[key: string]: any} | null; + /** + * Resource name for the location, which may vary between implementations. For example: `"projects/example-project/locations/us-east1"` + */ + name?: string | null; + } + /** + * MembershipFeatureSpec contains configuration information for a single Membership. + */ + export interface Schema$MembershipFeatureSpec { + /** + * Config Management-specific spec. + */ + configmanagement?: Schema$ConfigManagementMembershipSpec; + } + /** + * MembershipFeatureState contains Feature status information for a single Membership. + */ + export interface Schema$MembershipFeatureState { + /** + * Config Management-specific state. + */ + configmanagement?: Schema$ConfigManagementMembershipState; + /** + * Metering-specific spec. + */ + metering?: Schema$MeteringMembershipState; + /** + * Service Mesh-specific state. + */ + servicemesh?: Schema$ServiceMeshMembershipState; + /** + * The high-level state of this Feature for a single membership. + */ + state?: Schema$FeatureState; + } + /** + * Metering per-Membership Feature State. + */ + export interface Schema$MeteringMembershipState { + /** + * The time stamp of the most recent measurement of the number of vCPUs in the cluster. + */ + lastMeasurementTime?: string | null; + /** + * The vCPUs capacity in the cluster according to the most recent measurement (1/1000 precision). + */ + preciseLastMeasuredClusterVcpuCapacity?: number | null; + } + /** + * FeatureSpec contains the input for the MultiClusterIngress feature. + */ + export interface Schema$MultiClusterIngressFeatureSpec { + /** + * Fully-qualified Membership name which hosts the MultiClusterIngress CRD. Example: `projects/foo-proj/locations/global/memberships/bar` + */ + configMembership?: string | null; + } + /** + * This resource represents a long-running operation that is the result of a network API call. + */ + export interface Schema$Operation { + /** + * 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?: boolean | null; + /** + * The error result of the operation in case of failure or cancellation. + */ + error?: Schema$GoogleRpcStatus; + /** + * 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?: {[key: string]: any} | null; + /** + * 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 | null; + /** + * The normal response of the operation in case of success. 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?: {[key: string]: any} | null; + } + /** + * Represents the metadata of the long-running operation. + */ + export interface Schema$OperationMetadata { + /** + * Output only. API version used to start the operation. + */ + apiVersion?: string | null; + /** + * 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`. + */ + cancelRequested?: boolean | null; + /** + * Output only. The time the operation was created. + */ + createTime?: string | null; + /** + * Output only. The time the operation finished running. + */ + endTime?: string | null; + /** + * Output only. Human-readable status of the operation, if any. + */ + statusDetail?: string | null; + /** + * Output only. Server-defined resource path for the target of the operation. + */ + target?: string | null; + /** + * Output only. Name of the verb executed by the operation. + */ + verb?: string | null; + } + /** + * An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] \}, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", \} \} ], "etag": "BwWWja0YfJA=", "version": 3 \} **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/). + */ + export interface Schema$Policy { + /** + * Specifies cloud audit logging configuration for this policy. + */ + auditConfigs?: Schema$AuditConfig[]; + /** + * Associates a list of `members` to a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one member. + */ + bindings?: Schema$Binding[]; + /** + * `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. + */ + etag?: string | null; + /** + * Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + */ + version?: number | null; + } + /** + * AnalysisMessage is a single message produced by an analyzer, and it used to communicate to the end user about the state of their Service Mesh configuration. + */ + export interface Schema$ServiceMeshAnalysisMessage { + /** + * A UI can combine these args with a template (based on message_base.type) to produce an internationalized message. + */ + args?: {[key: string]: any} | null; + /** + * A human readable description of what the error means. It is suitable for non-internationalize display purposes. + */ + description?: string | null; + /** + * Details common to all types of Istio and ServiceMesh analysis messages. + */ + messageBase?: Schema$ServiceMeshAnalysisMessageBase; + /** + * A list of strings specifying the resource identifiers that were the cause of message generation. A "path" here may be: * MEMBERSHIP_ID if the cause is a specific member cluster * MEMBERSHIP_ID/(NAMESPACE\/)?RESOURCETYPE/NAME if the cause is a resource in a cluster + */ + resourcePaths?: string[] | null; + } + /** + * AnalysisMessageBase describes some common information that is needed for all messages. + */ + export interface Schema$ServiceMeshAnalysisMessageBase { + /** + * A url pointing to the Service Mesh or Istio documentation for this specific error type. + */ + documentationUrl?: string | null; + /** + * Represents how severe a message is. + */ + level?: string | null; + /** + * Represents the specific type of a message. + */ + type?: Schema$ServiceMeshType; + } + /** + * FeatureState describes the state of the Service Mesh Hub Feature as analyzed by the Service Mesh Hub Controller, for the whole Hub. + */ + export interface Schema$ServiceMeshFeatureState { + /** + * Output only. Results of running Service Mesh analyzers. + */ + analysisMessages?: Schema$ServiceMeshAnalysisMessage[]; + } + /** + * MembershipState describes the state of the Service Mesh Hub Feature as analyzed by the Service Mesh Hub Controller, for single Membership. + */ + export interface Schema$ServiceMeshMembershipState { + /** + * Output only. Results of running Service Mesh analyzers. + */ + analysisMessages?: Schema$ServiceMeshAnalysisMessage[]; + } + /** + * A unique identifier for the type of message. Display_name is intended to be human-readable, code is intended to be machine readable. There should be a one-to-one mapping between display_name and code. (i.e. do not re-use display_names or codes between message types.) See istio.analysis.v1alpha1.AnalysisMessageBase.Type + */ + export interface Schema$ServiceMeshType { + /** + * A 7 character code matching `^IST[0-9]{4\}$` or `^ASM[0-9]{4\}$`, intended to uniquely identify the message type. (e.g. "IST0001" is mapped to the "InternalError" message type.) + */ + code?: string | null; + /** + * A human-readable name for the message type. e.g. "InternalError", "PodMissingProxy". This should be the same for all messages of the same type. (This corresponds to the `name` field in open-source Istio.) + */ + displayName?: string | null; + } + /** + * Request message for `SetIamPolicy` method. + */ + export interface Schema$SetIamPolicyRequest { + /** + * REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them. + */ + policy?: Schema$Policy; + /** + * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used: `paths: "bindings, etag"` + */ + updateMask?: string | null; + } + /** + * Request message for `TestIamPermissions` method. + */ + export interface Schema$TestIamPermissionsRequest { + /** + * The set of permissions to check for the `resource`. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + */ + permissions?: string[] | null; + } + /** + * Response message for `TestIamPermissions` method. + */ + export interface Schema$TestIamPermissionsResponse { + /** + * A subset of `TestPermissionsRequest.permissions` that the caller is allowed. + */ + permissions?: string[] | null; + } + + export class Resource$Projects { + context: APIRequestContext; + locations: Resource$Projects$Locations; + constructor(context: APIRequestContext) { + this.context = context; + this.locations = new Resource$Projects$Locations(this.context); + } + } + + export class Resource$Projects$Locations { + context: APIRequestContext; + features: Resource$Projects$Locations$Features; + global: Resource$Projects$Locations$Global; + memberships: Resource$Projects$Locations$Memberships; + operations: Resource$Projects$Locations$Operations; + constructor(context: APIRequestContext) { + this.context = context; + this.features = new Resource$Projects$Locations$Features(this.context); + this.global = new Resource$Projects$Locations$Global(this.context); + this.memberships = new Resource$Projects$Locations$Memberships( + this.context + ); + this.operations = new Resource$Projects$Locations$Operations( + this.context + ); + } + + /** + * Gets information about a location. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1alpha'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.get({ + * // Resource name for the location. + * name: 'projects/my-project/locations/my-location', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "displayName": "my_displayName", + * // "labels": {}, + * // "locationId": "my_locationId", + * // "metadata": {}, + * // "name": "my_name" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Projects$Locations$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Projects$Locations$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Lists information about the supported locations for this service. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1alpha'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.list({ + * // 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). + * filter: 'placeholder-value', + * // The resource that owns the locations collection, if applicable. + * name: 'projects/my-project', + * // The maximum number of results to return. If not set, the service will select a default. + * pageSize: 'placeholder-value', + * // A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. + * pageToken: 'placeholder-value', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "locations": [], + * // "nextPageToken": "my_nextPageToken" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Projects$Locations$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Projects$Locations$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$List, + callback: BodyResponseCallback + ): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Locations$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha/{+name}/locations').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Locations$Get + extends StandardParameters { + /** + * Resource name for the location. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$List + extends StandardParameters { + /** + * 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). + */ + filter?: string; + /** + * The resource that owns the locations collection, if applicable. + */ + name?: string; + /** + * The maximum number of results to return. If not set, the service will select a default. + */ + pageSize?: number; + /** + * A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. + */ + pageToken?: string; + } + + export class Resource$Projects$Locations$Features { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1alpha'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.features.getIamPolicy({ + * // Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + * 'options.requestedPolicyVersion': 'placeholder-value', + * // REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. + * resource: 'projects/my-project/locations/my-location/features/my-feature', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "auditConfigs": [], + * // "bindings": [], + * // "etag": "my_etag", + * // "version": 0 + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + getIamPolicy( + params: Params$Resource$Projects$Locations$Features$Getiampolicy, + options: StreamMethodOptions + ): GaxiosPromise; + getIamPolicy( + params?: Params$Resource$Projects$Locations$Features$Getiampolicy, + options?: MethodOptions + ): GaxiosPromise; + getIamPolicy( + params: Params$Resource$Projects$Locations$Features$Getiampolicy, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getIamPolicy( + params: Params$Resource$Projects$Locations$Features$Getiampolicy, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getIamPolicy( + params: Params$Resource$Projects$Locations$Features$Getiampolicy, + callback: BodyResponseCallback + ): void; + getIamPolicy(callback: BodyResponseCallback): void; + getIamPolicy( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Features$Getiampolicy + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Features$Getiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Features$Getiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha/{+resource}:getIamPolicy').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1alpha'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.features.setIamPolicy({ + * // REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. + * resource: 'projects/my-project/locations/my-location/features/my-feature', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "policy": {}, + * // "updateMask": "my_updateMask" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "auditConfigs": [], + * // "bindings": [], + * // "etag": "my_etag", + * // "version": 0 + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + setIamPolicy( + params: Params$Resource$Projects$Locations$Features$Setiampolicy, + options: StreamMethodOptions + ): GaxiosPromise; + setIamPolicy( + params?: Params$Resource$Projects$Locations$Features$Setiampolicy, + options?: MethodOptions + ): GaxiosPromise; + setIamPolicy( + params: Params$Resource$Projects$Locations$Features$Setiampolicy, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + setIamPolicy( + params: Params$Resource$Projects$Locations$Features$Setiampolicy, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + setIamPolicy( + params: Params$Resource$Projects$Locations$Features$Setiampolicy, + callback: BodyResponseCallback + ): void; + setIamPolicy(callback: BodyResponseCallback): void; + setIamPolicy( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Features$Setiampolicy + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Features$Setiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Features$Setiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha/{+resource}:setIamPolicy').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1alpha'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.features.testIamPermissions({ + * // REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. + * resource: 'projects/my-project/locations/my-location/features/my-feature', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "permissions": [] + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "permissions": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + testIamPermissions( + params: Params$Resource$Projects$Locations$Features$Testiampermissions, + options: StreamMethodOptions + ): GaxiosPromise; + testIamPermissions( + params?: Params$Resource$Projects$Locations$Features$Testiampermissions, + options?: MethodOptions + ): GaxiosPromise; + testIamPermissions( + params: Params$Resource$Projects$Locations$Features$Testiampermissions, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + testIamPermissions( + params: Params$Resource$Projects$Locations$Features$Testiampermissions, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + testIamPermissions( + params: Params$Resource$Projects$Locations$Features$Testiampermissions, + callback: BodyResponseCallback + ): void; + testIamPermissions( + callback: BodyResponseCallback + ): void; + testIamPermissions( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Features$Testiampermissions + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Features$Testiampermissions; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Features$Testiampermissions; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha/{+resource}:testIamPermissions').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Locations$Features$Getiampolicy + extends StandardParameters { + /** + * Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + */ + 'options.requestedPolicyVersion'?: number; + /** + * REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. + */ + resource?: string; + } + export interface Params$Resource$Projects$Locations$Features$Setiampolicy + extends StandardParameters { + /** + * REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$SetIamPolicyRequest; + } + export interface Params$Resource$Projects$Locations$Features$Testiampermissions + extends StandardParameters { + /** + * REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$TestIamPermissionsRequest; + } + + export class Resource$Projects$Locations$Global { + context: APIRequestContext; + features: Resource$Projects$Locations$Global$Features; + constructor(context: APIRequestContext) { + this.context = context; + this.features = new Resource$Projects$Locations$Global$Features( + this.context + ); + } + } + + export class Resource$Projects$Locations$Global$Features { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Adds a new Feature. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1alpha'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.global.features.create({ + * // The ID of the feature to create. + * featureId: 'placeholder-value', + * // The parent (project and location) where the Feature will be created. Specified in the format `projects/x/locations/global`. + * parent: 'projects/my-project/locations/global', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "createTime": "my_createTime", + * // "deleteTime": "my_deleteTime", + * // "labels": {}, + * // "membershipSpecs": {}, + * // "membershipStates": {}, + * // "name": "my_name", + * // "resourceState": {}, + * // "spec": {}, + * // "state": {}, + * // "updateTime": "my_updateTime" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + create( + params: Params$Resource$Projects$Locations$Global$Features$Create, + options: StreamMethodOptions + ): GaxiosPromise; + create( + params?: Params$Resource$Projects$Locations$Global$Features$Create, + options?: MethodOptions + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Locations$Global$Features$Create, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Locations$Global$Features$Create, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Locations$Global$Features$Create, + callback: BodyResponseCallback + ): void; + create(callback: BodyResponseCallback): void; + create( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Features$Create + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Features$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Features$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha/{+parent}/features').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Removes a Feature. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1alpha'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.global.features.delete({ + * // If set to true, the delete will ignore any outstanding resources for this Feature (that is, `FeatureState.has_resources` is set to true). These resources will NOT be cleaned up or modified in any way. + * force: 'placeholder-value', + * // The Feature resource name in the format `projects/x/locations/global/features/x`. + * name: 'projects/my-project/locations/global/features/my-feature', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + delete( + params: Params$Resource$Projects$Locations$Global$Features$Delete, + options: StreamMethodOptions + ): GaxiosPromise; + delete( + params?: Params$Resource$Projects$Locations$Global$Features$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Locations$Global$Features$Delete, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Global$Features$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Global$Features$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Features$Delete + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Features$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Features$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Gets details of a single Feature. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1alpha'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.global.features.get({ + * // The Feature resource name in the format `projects/x/locations/global/features/x` + * name: 'projects/my-project/locations/global/features/my-feature', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "createTime": "my_createTime", + * // "deleteTime": "my_deleteTime", + * // "labels": {}, + * // "membershipSpecs": {}, + * // "membershipStates": {}, + * // "name": "my_name", + * // "resourceState": {}, + * // "spec": {}, + * // "state": {}, + * // "updateTime": "my_updateTime" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Projects$Locations$Global$Features$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Projects$Locations$Global$Features$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Global$Features$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Global$Features$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Global$Features$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Features$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Features$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Features$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Lists Features in a given project and location. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1alpha'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.global.features.list({ + * // Lists Features that match the filter expression, following the syntax outlined in https://google.aip.dev/160. Examples: - Feature with the name "servicemesh" in project "foo-proj": name = "projects/foo-proj/locations/global/features/servicemesh" - Features that have a label called `foo`: labels.foo:* - Features that have a label called `foo` whose value is `bar`: labels.foo = bar + * filter: 'placeholder-value', + * // One or more fields to compare and use to sort the output. See https://google.aip.dev/132#ordering. + * orderBy: 'placeholder-value', + * // When requesting a 'page' of resources, `page_size` specifies number of resources to return. If unspecified or set to 0, all resources will be returned. + * pageSize: 'placeholder-value', + * // Token returned by previous call to `ListFeatures` which specifies the position in the list from where to continue listing the resources. + * pageToken: 'placeholder-value', + * // The parent (project and location) where the Features will be listed. Specified in the format `projects/x/locations/global`. + * parent: 'projects/my-project/locations/global', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "nextPageToken": "my_nextPageToken", + * // "resources": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Projects$Locations$Global$Features$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Projects$Locations$Global$Features$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$Global$Features$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Global$Features$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Global$Features$List, + callback: BodyResponseCallback + ): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Features$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Features$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Features$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha/{+parent}/features').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Updates an existing Feature. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1alpha'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.global.features.patch({ + * // The Feature resource name in the format `projects/x/locations/global/features/x`. + * name: 'projects/my-project/locations/global/features/my-feature', + * // Mask of fields to update. + * updateMask: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "createTime": "my_createTime", + * // "deleteTime": "my_deleteTime", + * // "labels": {}, + * // "membershipSpecs": {}, + * // "membershipStates": {}, + * // "name": "my_name", + * // "resourceState": {}, + * // "spec": {}, + * // "state": {}, + * // "updateTime": "my_updateTime" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + patch( + params: Params$Resource$Projects$Locations$Global$Features$Patch, + options: StreamMethodOptions + ): GaxiosPromise; + patch( + params?: Params$Resource$Projects$Locations$Global$Features$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Locations$Global$Features$Patch, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Locations$Global$Features$Patch, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Locations$Global$Features$Patch, + callback: BodyResponseCallback + ): void; + patch(callback: BodyResponseCallback): void; + patch( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Features$Patch + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Features$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Features$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Locations$Global$Features$Create + extends StandardParameters { + /** + * The ID of the feature to create. + */ + featureId?: string; + /** + * The parent (project and location) where the Feature will be created. Specified in the format `projects/x/locations/global`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Feature; + } + export interface Params$Resource$Projects$Locations$Global$Features$Delete + extends StandardParameters { + /** + * If set to true, the delete will ignore any outstanding resources for this Feature (that is, `FeatureState.has_resources` is set to true). These resources will NOT be cleaned up or modified in any way. + */ + force?: boolean; + /** + * The Feature resource name in the format `projects/x/locations/global/features/x`. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Global$Features$Get + extends StandardParameters { + /** + * The Feature resource name in the format `projects/x/locations/global/features/x` + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Global$Features$List + extends StandardParameters { + /** + * Lists Features that match the filter expression, following the syntax outlined in https://google.aip.dev/160. Examples: - Feature with the name "servicemesh" in project "foo-proj": name = "projects/foo-proj/locations/global/features/servicemesh" - Features that have a label called `foo`: labels.foo:* - Features that have a label called `foo` whose value is `bar`: labels.foo = bar + */ + filter?: string; + /** + * One or more fields to compare and use to sort the output. See https://google.aip.dev/132#ordering. + */ + orderBy?: string; + /** + * When requesting a 'page' of resources, `page_size` specifies number of resources to return. If unspecified or set to 0, all resources will be returned. + */ + pageSize?: number; + /** + * Token returned by previous call to `ListFeatures` which specifies the position in the list from where to continue listing the resources. + */ + pageToken?: string; + /** + * The parent (project and location) where the Features will be listed. Specified in the format `projects/x/locations/global`. + */ + parent?: string; + } + export interface Params$Resource$Projects$Locations$Global$Features$Patch + extends StandardParameters { + /** + * The Feature resource name in the format `projects/x/locations/global/features/x`. + */ + name?: string; + /** + * Mask of fields to update. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Feature; + } + + export class Resource$Projects$Locations$Memberships { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1alpha'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.memberships.getIamPolicy({ + * // Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + * 'options.requestedPolicyVersion': 'placeholder-value', + * // REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. + * resource: + * 'projects/my-project/locations/my-location/memberships/my-membership', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "auditConfigs": [], + * // "bindings": [], + * // "etag": "my_etag", + * // "version": 0 + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + getIamPolicy( + params: Params$Resource$Projects$Locations$Memberships$Getiampolicy, + options: StreamMethodOptions + ): GaxiosPromise; + getIamPolicy( + params?: Params$Resource$Projects$Locations$Memberships$Getiampolicy, + options?: MethodOptions + ): GaxiosPromise; + getIamPolicy( + params: Params$Resource$Projects$Locations$Memberships$Getiampolicy, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getIamPolicy( + params: Params$Resource$Projects$Locations$Memberships$Getiampolicy, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getIamPolicy( + params: Params$Resource$Projects$Locations$Memberships$Getiampolicy, + callback: BodyResponseCallback + ): void; + getIamPolicy(callback: BodyResponseCallback): void; + getIamPolicy( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Memberships$Getiampolicy + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Memberships$Getiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Memberships$Getiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha/{+resource}:getIamPolicy').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1alpha'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.memberships.setIamPolicy({ + * // REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. + * resource: + * 'projects/my-project/locations/my-location/memberships/my-membership', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "policy": {}, + * // "updateMask": "my_updateMask" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "auditConfigs": [], + * // "bindings": [], + * // "etag": "my_etag", + * // "version": 0 + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + setIamPolicy( + params: Params$Resource$Projects$Locations$Memberships$Setiampolicy, + options: StreamMethodOptions + ): GaxiosPromise; + setIamPolicy( + params?: Params$Resource$Projects$Locations$Memberships$Setiampolicy, + options?: MethodOptions + ): GaxiosPromise; + setIamPolicy( + params: Params$Resource$Projects$Locations$Memberships$Setiampolicy, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + setIamPolicy( + params: Params$Resource$Projects$Locations$Memberships$Setiampolicy, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + setIamPolicy( + params: Params$Resource$Projects$Locations$Memberships$Setiampolicy, + callback: BodyResponseCallback + ): void; + setIamPolicy(callback: BodyResponseCallback): void; + setIamPolicy( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Memberships$Setiampolicy + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Memberships$Setiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Memberships$Setiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha/{+resource}:setIamPolicy').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1alpha'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.memberships.testIamPermissions({ + * // REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. + * resource: + * 'projects/my-project/locations/my-location/memberships/my-membership', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "permissions": [] + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "permissions": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + testIamPermissions( + params: Params$Resource$Projects$Locations$Memberships$Testiampermissions, + options: StreamMethodOptions + ): GaxiosPromise; + testIamPermissions( + params?: Params$Resource$Projects$Locations$Memberships$Testiampermissions, + options?: MethodOptions + ): GaxiosPromise; + testIamPermissions( + params: Params$Resource$Projects$Locations$Memberships$Testiampermissions, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + testIamPermissions( + params: Params$Resource$Projects$Locations$Memberships$Testiampermissions, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + testIamPermissions( + params: Params$Resource$Projects$Locations$Memberships$Testiampermissions, + callback: BodyResponseCallback + ): void; + testIamPermissions( + callback: BodyResponseCallback + ): void; + testIamPermissions( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Memberships$Testiampermissions + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Memberships$Testiampermissions; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Memberships$Testiampermissions; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha/{+resource}:testIamPermissions').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Locations$Memberships$Getiampolicy + extends StandardParameters { + /** + * Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + */ + 'options.requestedPolicyVersion'?: number; + /** + * REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. + */ + resource?: string; + } + export interface Params$Resource$Projects$Locations$Memberships$Setiampolicy + extends StandardParameters { + /** + * REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$SetIamPolicyRequest; + } + export interface Params$Resource$Projects$Locations$Memberships$Testiampermissions + extends StandardParameters { + /** + * REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$TestIamPermissionsRequest; + } + + export class Resource$Projects$Locations$Operations { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * 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`. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1alpha'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.operations.cancel({ + * // The name of the operation resource to be cancelled. + * name: 'projects/my-project/locations/my-location/operations/my-operation', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // {} + * }, + * }); + * console.log(res.data); + * + * // Example response + * // {} + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + cancel( + params: Params$Resource$Projects$Locations$Operations$Cancel, + options: StreamMethodOptions + ): GaxiosPromise; + cancel( + params?: Params$Resource$Projects$Locations$Operations$Cancel, + options?: MethodOptions + ): GaxiosPromise; + cancel( + params: Params$Resource$Projects$Locations$Operations$Cancel, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + cancel( + params: Params$Resource$Projects$Locations$Operations$Cancel, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + cancel( + params: Params$Resource$Projects$Locations$Operations$Cancel, + callback: BodyResponseCallback + ): void; + cancel(callback: BodyResponseCallback): void; + cancel( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Operations$Cancel + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Operations$Cancel; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Operations$Cancel; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha/{+name}:cancel').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * 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`. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1alpha'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.operations.delete({ + * // The name of the operation resource to be deleted. + * name: 'projects/my-project/locations/my-location/operations/my-operation', + * }); + * console.log(res.data); + * + * // Example response + * // {} + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + delete( + params: Params$Resource$Projects$Locations$Operations$Delete, + options: StreamMethodOptions + ): GaxiosPromise; + delete( + params?: Params$Resource$Projects$Locations$Operations$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Locations$Operations$Delete, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Operations$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Operations$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Operations$Delete + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Operations$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Operations$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * 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. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1alpha'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.operations.get({ + * // The name of the operation resource. + * name: 'projects/my-project/locations/my-location/operations/my-operation', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Projects$Locations$Operations$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Projects$Locations$Operations$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Operations$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Operations$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Operations$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Operations$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Operations$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Operations$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/x/operations`. To override the binding, API services can add a binding such as `"/v1/{name=users/x\}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1alpha'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.operations.list({ + * // The standard list filter. + * filter: 'placeholder-value', + * // The name of the operation's parent resource. + * name: 'projects/my-project/locations/my-location', + * // The standard list page size. + * pageSize: 'placeholder-value', + * // The standard list page token. + * pageToken: 'placeholder-value', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "nextPageToken": "my_nextPageToken", + * // "operations": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Projects$Locations$Operations$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Projects$Locations$Operations$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$Operations$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Operations$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Operations$List, + callback: BodyResponseCallback + ): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Operations$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Operations$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Operations$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha/{+name}/operations').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Locations$Operations$Cancel + extends StandardParameters { + /** + * The name of the operation resource to be cancelled. + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$CancelOperationRequest; + } + export interface Params$Resource$Projects$Locations$Operations$Delete + extends StandardParameters { + /** + * The name of the operation resource to be deleted. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Operations$Get + extends StandardParameters { + /** + * The name of the operation resource. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Operations$List + extends StandardParameters { + /** + * The standard list filter. + */ + filter?: string; + /** + * The name of the operation's parent resource. + */ + name?: string; + /** + * The standard list page size. + */ + pageSize?: number; + /** + * The standard list page token. + */ + pageToken?: string; + } +} diff --git a/src/apis/gkehub/v1alpha2.ts b/src/apis/gkehub/v1alpha2.ts new file mode 100644 index 00000000000..900cc60d418 --- /dev/null +++ b/src/apis/gkehub/v1alpha2.ts @@ -0,0 +1,3151 @@ +// Copyright 2020 Google LLC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/* eslint-disable @typescript-eslint/no-explicit-any */ +/* eslint-disable @typescript-eslint/class-name-casing */ +/* eslint-disable @typescript-eslint/no-unused-vars */ +/* eslint-disable @typescript-eslint/no-empty-interface */ +/* eslint-disable @typescript-eslint/no-namespace */ +/* eslint-disable no-irregular-whitespace */ + +import { + OAuth2Client, + JWT, + Compute, + UserRefreshClient, + BaseExternalAccountClient, + GaxiosPromise, + GoogleConfigurable, + createAPIRequest, + MethodOptions, + StreamMethodOptions, + GlobalOptions, + GoogleAuth, + BodyResponseCallback, + APIRequestContext, +} from 'googleapis-common'; +import {Readable} from 'stream'; + +export namespace gkehub_v1alpha2 { + export interface Options extends GlobalOptions { + version: 'v1alpha2'; + } + + interface StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: + | string + | OAuth2Client + | JWT + | Compute + | UserRefreshClient + | BaseExternalAccountClient + | GoogleAuth; + + /** + * V1 error format. + */ + '$.xgafv'?: string; + /** + * OAuth access token. + */ + access_token?: string; + /** + * Data format for response. + */ + alt?: string; + /** + * JSONP + */ + callback?: string; + /** + * Selector specifying which fields to include in a partial response. + */ + fields?: string; + /** + * 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. + */ + key?: string; + /** + * OAuth 2.0 token for the current user. + */ + oauth_token?: string; + /** + * Returns response with indentations and line breaks. + */ + prettyPrint?: boolean; + /** + * 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. + */ + quotaUser?: string; + /** + * Legacy upload protocol for media (e.g. "media", "multipart"). + */ + uploadType?: string; + /** + * Upload protocol for media (e.g. "raw", "multipart"). + */ + upload_protocol?: string; + } + + /** + * GKE Hub + * + * + * + * @example + * ```js + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1alpha2'); + * ``` + */ + export class Gkehub { + context: APIRequestContext; + projects: Resource$Projects; + + constructor(options: GlobalOptions, google?: GoogleConfigurable) { + this.context = { + _options: options || {}, + google, + }; + + this.projects = new Resource$Projects(this.context); + } + } + + /** + * Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { "audit_configs": [ { "service": "allServices", "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] \}, { "log_type": "DATA_WRITE" \}, { "log_type": "ADMIN_READ" \} ] \}, { "service": "sampleservice.googleapis.com", "audit_log_configs": [ { "log_type": "DATA_READ" \}, { "log_type": "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] \} ] \} ] \} For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging. + */ + export interface Schema$AuditConfig { + /** + * The configuration for logging of each type of permission. + */ + auditLogConfigs?: Schema$AuditLogConfig[]; + /** + * Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services. + */ + service?: string | null; + } + /** + * Provides the configuration for logging a type of permissions. Example: { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] \}, { "log_type": "DATA_WRITE" \} ] \} This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging. + */ + export interface Schema$AuditLogConfig { + /** + * Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members. + */ + exemptedMembers?: string[] | null; + /** + * The log type that this config enables. + */ + logType?: string | null; + } + /** + * Authority encodes how Google will recognize identities from this Membership. See the workload identity documentation for more details: https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity + */ + export interface Schema$Authority { + /** + * Output only. An identity provider that reflects the `issuer` in the workload identity pool. + */ + identityProvider?: string | null; + /** + * Optional. A JSON Web Token (JWT) issuer URI. `issuer` must start with `https://` and be a valid URL with length <2000 characters. If set, then Google will allow valid OIDC tokens from this issuer to authenticate within the workload_identity_pool. OIDC discovery will be performed on this URI to validate tokens from the issuer, unless `oidc_jwks` is set. Clearing `issuer` disables Workload Identity. `issuer` cannot be directly modified; it must be cleared (and Workload Identity disabled) before using a new issuer (and re-enabling Workload Identity). + */ + issuer?: string | null; + /** + * Optional. OIDC verification keys for this Membership in JWKS format (RFC 7517). When this field is set, OIDC discovery will NOT be performed on `issuer`, and instead OIDC tokens will be validated using this field. + */ + oidcJwks?: string | null; + /** + * Output only. The name of the workload identity pool in which `issuer` will be recognized. There is a single Workload Identity Pool per Hub that is shared between all Memberships that belong to that Hub. For a Hub hosted in {PROJECT_ID\}, the workload pool format is `{PROJECT_ID\}.hub.id.goog`, although this is subject to change in newer versions of this API. + */ + workloadIdentityPool?: string | null; + } + /** + * Associates `members` with a `role`. + */ + export interface Schema$Binding { + /** + * The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + */ + condition?: Schema$Expr; + /** + * Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid\}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid\}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid\}`: An email address that represents a Google group. For example, `admins@example.com`. * `deleted:user:{emailid\}?uid={uniqueid\}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid\}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid\}?uid={uniqueid\}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid\}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid\}?uid={uniqueid\}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid\}` and the recovered group retains the role in the binding. * `domain:{domain\}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. + */ + members?: string[] | null; + /** + * Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + */ + role?: string | null; + } + /** + * The request message for Operations.CancelOperation. + */ + export interface Schema$CancelOperationRequest {} + /** + * ConnectAgentResource represents a Kubernetes resource manifest for Connect Agent deployment. + */ + export interface Schema$ConnectAgentResource { + /** + * YAML manifest of the resource. + */ + manifest?: string | null; + /** + * Kubernetes type of the resource. + */ + type?: Schema$TypeMeta; + } + /** + * 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); \} The JSON representation for `Empty` is empty JSON object `{\}`. + */ + export interface Schema$Empty {} + /** + * Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. + */ + export interface Schema$Expr { + /** + * Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. + */ + description?: string | null; + /** + * Textual representation of an expression in Common Expression Language syntax. + */ + expression?: string | null; + /** + * Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file. + */ + location?: string | null; + /** + * Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression. + */ + title?: string | null; + } + /** + * GenerateConnectManifestResponse contains manifest information for installing/upgrading a Connect agent. + */ + export interface Schema$GenerateConnectManifestResponse { + /** + * The ordered list of Kubernetes resources that need to be applied to the cluster for GKE Connect agent installation/upgrade. + */ + manifest?: Schema$ConnectAgentResource[]; + } + /** + * GkeCluster contains information specific to GKE clusters. + */ + export interface Schema$GkeCluster { + /** + * Immutable. Self-link of the GCP resource for the GKE cluster. For example: //container.googleapis.com/projects/my-project/locations/us-west1-a/clusters/my-cluster Zonal clusters are also supported. + */ + resourceLink?: string | null; + } + /** + * 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). + */ + export interface Schema$GoogleRpcStatus { + /** + * The status code, which should be an enum value of google.rpc.Code. + */ + code?: number | null; + /** + * A list of messages that carry the error details. There is a common set of message types for APIs to use. + */ + details?: Array<{[key: string]: any}> | null; + /** + * 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 | null; + } + /** + * Request message for the InitializeHub method. + */ + export interface Schema$InitializeHubRequest {} + /** + * Response message for the InitializeHub method. + */ + export interface Schema$InitializeHubResponse { + /** + * Name of the Hub default service identity, in the format: service-@gcp-sa-gkehub.iam.gserviceaccount.com The service account has `roles/gkehub.serviceAgent` in the Hub project. + */ + serviceIdentity?: string | null; + /** + * The Workload Identity Pool used for Workload Identity-enabled clusters registered with this Hub. Format: `.hub.id.goog` + */ + workloadIdentityPool?: string | null; + } + /** + * KubernetesMetadata provides informational metadata for Memberships that are created from Kubernetes Endpoints (currently, these are equivalent to Kubernetes clusters). + */ + export interface Schema$KubernetesMetadata { + /** + * Output only. Kubernetes API server version string as reported by '/version'. + */ + kubernetesApiServerVersion?: string | null; + /** + * Output only. The total memory capacity as reported by the sum of all Kubernetes nodes resources, defined in MB. + */ + memoryMb?: number | null; + /** + * Output only. Node count as reported by Kubernetes nodes resources. + */ + nodeCount?: number | null; + /** + * Output only. Node providerID as reported by the first node in the list of nodes on the Kubernetes endpoint. On Kubernetes platforms that support zero-node clusters (like GKE-on-GCP), the node_count will be zero and the node_provider_id will be empty. + */ + nodeProviderId?: string | null; + /** + * Output only. The time at which these details were last updated. This update_time is different from the Membership-level update_time since EndpointDetails are updated internally for API consumers. + */ + updateTime?: string | null; + /** + * Output only. vCPU count as reported by Kubernetes nodes resources. + */ + vcpuCount?: number | null; + } + /** + * KubernetesResource contains the YAML manifests and configuration for Membership Kubernetes resources in the cluster. After CreateMembership or UpdateMembership, these resources should be re-applied in the cluster. + */ + export interface Schema$KubernetesResource { + /** + * Output only. The Kubernetes resources for installing the GKE Connect agent. This field is only populated in the Membership returned from a successful long-running operation from CreateMembership or UpdateMembership. It is not populated during normal GetMembership or ListMemberships requests. To get the resource manifest after the initial registration, the caller should make a UpdateMembership call with an empty field mask. + */ + connectResources?: Schema$ResourceManifest[]; + /** + * Input only. The YAML representation of the Membership CR. This field is ignored for GKE clusters where Hub can read the CR directly. Callers should provide the CR that is currently present in the cluster during Create or Update, or leave this field empty if none exists. The CR manifest is used to validate the cluster has not been registered with another Membership. + */ + membershipCrManifest?: string | null; + /** + * Output only. Additional Kubernetes resources that need to be applied to the cluster after Membership creation, and after every update. This field is only populated in the Membership returned from a successful long-running operation from CreateMembership or UpdateMembership. It is not populated during normal GetMembership or ListMemberships requests. To get the resource manifest after the initial registration, the caller should make a UpdateMembership call with an empty field mask. + */ + membershipResources?: Schema$ResourceManifest[]; + /** + * Optional. Options for Kubernetes resource generation. + */ + resourceOptions?: Schema$ResourceOptions; + } + /** + * The response message for Locations.ListLocations. + */ + export interface Schema$ListLocationsResponse { + /** + * A list of locations that matches the specified filter in the request. + */ + locations?: Schema$Location[]; + /** + * The standard List next-page token. + */ + nextPageToken?: string | null; + } + /** + * Response message for the `GkeHub.ListMemberships` method. + */ + export interface Schema$ListMembershipsResponse { + /** + * A token to request the next page of resources from the `ListMemberships` method. The value of an empty string means that there are no more resources to return. + */ + nextPageToken?: string | null; + /** + * The list of matching Memberships. + */ + resources?: Schema$Membership[]; + /** + * List of locations that could not be reached while fetching this list. + */ + unreachable?: string[] | null; + } + /** + * The response message for Operations.ListOperations. + */ + export interface Schema$ListOperationsResponse { + /** + * The standard List next-page token. + */ + nextPageToken?: string | null; + /** + * A list of operations that matches the specified filter in the request. + */ + operations?: Schema$Operation[]; + } + /** + * A resource that represents Google Cloud Platform location. + */ + export interface Schema$Location { + /** + * The friendly name for this location, typically a nearby city name. For example, "Tokyo". + */ + displayName?: string | null; + /** + * Cross-service attributes for the location. For example {"cloud.googleapis.com/region": "us-east1"\} + */ + labels?: {[key: string]: string} | null; + /** + * The canonical id for this location. For example: `"us-east1"`. + */ + locationId?: string | null; + /** + * Service-specific metadata. For example the available capacity at the given location. + */ + metadata?: {[key: string]: any} | null; + /** + * Resource name for the location, which may vary between implementations. For example: `"projects/example-project/locations/us-east1"` + */ + name?: string | null; + } + /** + * Membership contains information about a member cluster. + */ + export interface Schema$Membership { + /** + * Optional. How to identify workloads from this Membership. See the documentation on Workload Identity for more details: https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity + */ + authority?: Schema$Authority; + /** + * Output only. When the Membership was created. + */ + createTime?: string | null; + /** + * Output only. When the Membership was deleted. + */ + deleteTime?: string | null; + /** + * Output only. Description of this membership, limited to 63 characters. Must match the regex: `a-zA-Z0-9*` This field is present for legacy purposes. + */ + description?: string | null; + /** + * Optional. Endpoint information to reach this member. + */ + endpoint?: Schema$MembershipEndpoint; + /** + * Optional. An externally-generated and managed ID for this Membership. This ID may be modified after creation, but this is not recommended. For GKE clusters, external_id is managed by the Hub API and updates will be ignored. The ID must match the regex: `a-zA-Z0-9*` If this Membership represents a Kubernetes cluster, this value should be set to the UID of the `kube-system` namespace object. + */ + externalId?: string | null; + /** + * Optional. The infrastructure type this Membership is running on. + */ + infrastructureType?: string | null; + /** + * Optional. GCP labels for this membership. + */ + labels?: {[key: string]: string} | null; + /** + * Output only. For clusters using Connect, the timestamp of the most recent connection established with Google Cloud. This time is updated every several minutes, not continuously. For clusters that do not use GKE Connect, or that have never connected successfully, this field will be unset. + */ + lastConnectionTime?: string | null; + /** + * Output only. The full, unique name of this Membership resource in the format `projects/x/locations/x/memberships/{membership_id\}`, set during creation. `membership_id` must be a valid RFC 1123 compliant DNS label: 1. At most 63 characters in length 2. It must consist of lower case alphanumeric characters or `-` 3. It must start and end with an alphanumeric character Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters. + */ + name?: string | null; + /** + * Output only. State of the Membership resource. + */ + state?: Schema$MembershipState; + /** + * Output only. Google-generated UUID for this resource. This is unique across all Membership resources. If a Membership resource is deleted and another resource with the same name is created, it gets a different unique_id. + */ + uniqueId?: string | null; + /** + * Output only. When the Membership was last updated. + */ + updateTime?: string | null; + } + /** + * MembershipEndpoint contains information needed to contact a Kubernetes API, endpoint and any additional Kubernetes metadata. + */ + export interface Schema$MembershipEndpoint { + /** + * Optional. GKE-specific information. Only present if this Membership is a GKE cluster. + */ + gkeCluster?: Schema$GkeCluster; + /** + * Output only. Useful Kubernetes-specific metadata. + */ + kubernetesMetadata?: Schema$KubernetesMetadata; + /** + * Optional. The in-cluster Kubernetes Resources that should be applied for a correctly registered cluster, in the steady state. These resources: * Ensure that the cluster is exclusively registered to one and only one Hub Membership. * Propagate Workload Pool Information available in the Membership Authority field. * Ensure proper initial configuration of default Hub Features. + */ + kubernetesResource?: Schema$KubernetesResource; + } + /** + * MembershipState describes the state of a Membership resource. + */ + export interface Schema$MembershipState { + /** + * Output only. The current state of the Membership resource. + */ + code?: string | null; + } + /** + * This resource represents a long-running operation that is the result of a network API call. + */ + export interface Schema$Operation { + /** + * 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?: boolean | null; + /** + * The error result of the operation in case of failure or cancellation. + */ + error?: Schema$GoogleRpcStatus; + /** + * 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?: {[key: string]: any} | null; + /** + * 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 | null; + /** + * The normal response of the operation in case of success. 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?: {[key: string]: any} | null; + } + /** + * Represents the metadata of the long-running operation. + */ + export interface Schema$OperationMetadata { + /** + * Output only. API version used to start the operation. + */ + apiVersion?: string | null; + /** + * 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`. + */ + cancelRequested?: boolean | null; + /** + * Output only. The time the operation was created. + */ + createTime?: string | null; + /** + * Output only. The time the operation finished running. + */ + endTime?: string | null; + /** + * Output only. Human-readable status of the operation, if any. + */ + statusDetail?: string | null; + /** + * Output only. Server-defined resource path for the target of the operation. + */ + target?: string | null; + /** + * Output only. Name of the verb executed by the operation. + */ + verb?: string | null; + } + /** + * An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] \}, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", \} \} ], "etag": "BwWWja0YfJA=", "version": 3 \} **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/). + */ + export interface Schema$Policy { + /** + * Specifies cloud audit logging configuration for this policy. + */ + auditConfigs?: Schema$AuditConfig[]; + /** + * Associates a list of `members` to a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one member. + */ + bindings?: Schema$Binding[]; + /** + * `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. + */ + etag?: string | null; + /** + * Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + */ + version?: number | null; + } + /** + * ResourceManifest represents a single Kubernetes resource to be applied to the cluster. + */ + export interface Schema$ResourceManifest { + /** + * Whether the resource provided in the manifest is `cluster_scoped`. If unset, the manifest is assumed to be namespace scoped. This field is used for REST mapping when applying the resource in a cluster. + */ + clusterScoped?: boolean | null; + /** + * YAML manifest of the resource. + */ + manifest?: string | null; + } + /** + * ResourceOptions represent options for Kubernetes resource generation. + */ + export interface Schema$ResourceOptions { + /** + * Optional. The Connect agent version to use for connect_resources. Defaults to the latest GKE Connect version. The version must be a currently supported version, obsolete versions will be rejected. + */ + connectVersion?: string | null; + /** + * Optional. Use `apiextensions/v1beta1` instead of `apiextensions/v1` for CustomResourceDefinition resources. This option should be set for clusters with Kubernetes apiserver versions <1.16. + */ + v1beta1Crd?: boolean | null; + } + /** + * Request message for `SetIamPolicy` method. + */ + export interface Schema$SetIamPolicyRequest { + /** + * REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them. + */ + policy?: Schema$Policy; + /** + * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used: `paths: "bindings, etag"` + */ + updateMask?: string | null; + } + /** + * Request message for `TestIamPermissions` method. + */ + export interface Schema$TestIamPermissionsRequest { + /** + * The set of permissions to check for the `resource`. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + */ + permissions?: string[] | null; + } + /** + * Response message for `TestIamPermissions` method. + */ + export interface Schema$TestIamPermissionsResponse { + /** + * A subset of `TestPermissionsRequest.permissions` that the caller is allowed. + */ + permissions?: string[] | null; + } + /** + * TypeMeta is the type information needed for content unmarshalling of Kubernetes resources in the manifest. + */ + export interface Schema$TypeMeta { + /** + * APIVersion of the resource (e.g. v1). + */ + apiVersion?: string | null; + /** + * Kind of the resource (e.g. Deployment). + */ + kind?: string | null; + } + + export class Resource$Projects { + context: APIRequestContext; + locations: Resource$Projects$Locations; + constructor(context: APIRequestContext) { + this.context = context; + this.locations = new Resource$Projects$Locations(this.context); + } + } + + export class Resource$Projects$Locations { + context: APIRequestContext; + global: Resource$Projects$Locations$Global; + memberships: Resource$Projects$Locations$Memberships; + operations: Resource$Projects$Locations$Operations; + constructor(context: APIRequestContext) { + this.context = context; + this.global = new Resource$Projects$Locations$Global(this.context); + this.memberships = new Resource$Projects$Locations$Memberships( + this.context + ); + this.operations = new Resource$Projects$Locations$Operations( + this.context + ); + } + + /** + * Gets information about a location. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1alpha2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.get({ + * // Resource name for the location. + * name: 'projects/my-project/locations/my-location', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "displayName": "my_displayName", + * // "labels": {}, + * // "locationId": "my_locationId", + * // "metadata": {}, + * // "name": "my_name" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Projects$Locations$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Projects$Locations$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Lists information about the supported locations for this service. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1alpha2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.list({ + * // 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). + * filter: 'placeholder-value', + * // The resource that owns the locations collection, if applicable. + * name: 'projects/my-project', + * // The maximum number of results to return. If not set, the service will select a default. + * pageSize: 'placeholder-value', + * // A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. + * pageToken: 'placeholder-value', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "locations": [], + * // "nextPageToken": "my_nextPageToken" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Projects$Locations$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Projects$Locations$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$List, + callback: BodyResponseCallback + ): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Locations$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha2/{+name}/locations').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Locations$Get + extends StandardParameters { + /** + * Resource name for the location. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$List + extends StandardParameters { + /** + * 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). + */ + filter?: string; + /** + * The resource that owns the locations collection, if applicable. + */ + name?: string; + /** + * The maximum number of results to return. If not set, the service will select a default. + */ + pageSize?: number; + /** + * A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. + */ + pageToken?: string; + } + + export class Resource$Projects$Locations$Global { + context: APIRequestContext; + memberships: Resource$Projects$Locations$Global$Memberships; + constructor(context: APIRequestContext) { + this.context = context; + this.memberships = new Resource$Projects$Locations$Global$Memberships( + this.context + ); + } + } + + export class Resource$Projects$Locations$Global$Memberships { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Initializes the Hub in this project, which includes creating the default Hub Service Account and the Hub Workload Identity Pool. Initialization is optional, and happens automatically when the first Membership is created. InitializeHub should be called when the first Membership cannot be registered without these resources. A common example is granting the Hub Service Account access to another project, which requires the account to exist first. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1alpha2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.global.memberships.initializeHub({ + * // Required. The Hub to initialize, in the format `projects/x/locations/x/memberships/x`. + * project: 'projects/my-project/locations/global/memberships', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // {} + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "serviceIdentity": "my_serviceIdentity", + * // "workloadIdentityPool": "my_workloadIdentityPool" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + initializeHub( + params: Params$Resource$Projects$Locations$Global$Memberships$Initializehub, + options: StreamMethodOptions + ): GaxiosPromise; + initializeHub( + params?: Params$Resource$Projects$Locations$Global$Memberships$Initializehub, + options?: MethodOptions + ): GaxiosPromise; + initializeHub( + params: Params$Resource$Projects$Locations$Global$Memberships$Initializehub, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + initializeHub( + params: Params$Resource$Projects$Locations$Global$Memberships$Initializehub, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + initializeHub( + params: Params$Resource$Projects$Locations$Global$Memberships$Initializehub, + callback: BodyResponseCallback + ): void; + initializeHub( + callback: BodyResponseCallback + ): void; + initializeHub( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Memberships$Initializehub + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Memberships$Initializehub; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Memberships$Initializehub; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha2/{+project}:initializeHub').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['project'], + pathParams: ['project'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Locations$Global$Memberships$Initializehub + extends StandardParameters { + /** + * Required. The Hub to initialize, in the format `projects/x/locations/x/memberships/x`. + */ + project?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$InitializeHubRequest; + } + + export class Resource$Projects$Locations$Memberships { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Adds a new Membership. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1alpha2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.memberships.create({ + * // Required. Client chosen ID for the membership. `membership_id` must be a valid RFC 1123 compliant DNS label: 1. At most 63 characters in length 2. It must consist of lower case alphanumeric characters or `-` 3. It must start and end with an alphanumeric character Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters. + * membershipId: 'placeholder-value', + * // Required. The parent (project and location) where the Memberships will be created. Specified in the format `projects/x/locations/x`. + * parent: 'projects/my-project/locations/my-location', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "authority": {}, + * // "createTime": "my_createTime", + * // "deleteTime": "my_deleteTime", + * // "description": "my_description", + * // "endpoint": {}, + * // "externalId": "my_externalId", + * // "infrastructureType": "my_infrastructureType", + * // "labels": {}, + * // "lastConnectionTime": "my_lastConnectionTime", + * // "name": "my_name", + * // "state": {}, + * // "uniqueId": "my_uniqueId", + * // "updateTime": "my_updateTime" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + create( + params: Params$Resource$Projects$Locations$Memberships$Create, + options: StreamMethodOptions + ): GaxiosPromise; + create( + params?: Params$Resource$Projects$Locations$Memberships$Create, + options?: MethodOptions + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Locations$Memberships$Create, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Locations$Memberships$Create, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Locations$Memberships$Create, + callback: BodyResponseCallback + ): void; + create(callback: BodyResponseCallback): void; + create( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Memberships$Create + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Memberships$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Memberships$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha2/{+parent}/memberships').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Removes a Membership. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1alpha2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.memberships.delete({ + * // Required. The Membership resource name in the format `projects/x/locations/x/memberships/x`. + * name: 'projects/my-project/locations/my-location/memberships/my-membership', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + delete( + params: Params$Resource$Projects$Locations$Memberships$Delete, + options: StreamMethodOptions + ): GaxiosPromise; + delete( + params?: Params$Resource$Projects$Locations$Memberships$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Locations$Memberships$Delete, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Memberships$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Memberships$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Memberships$Delete + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Memberships$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Memberships$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Generates the manifest for deployment of the GKE connect agent. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1alpha2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.memberships.generateConnectManifest( + * { + * // Optional. The image pull secret content for the registry, if not public. + * imagePullSecretContent: 'placeholder-value', + * // Optional. If true, generate the resources for upgrade only. Some resources generated only for installation (e.g. secrets) will be excluded. + * isUpgrade: 'placeholder-value', + * // Required. The Membership resource name the Agent will associate with, in the format `projects/x/locations/x/memberships/x`. + * name: + * 'projects/my-project/locations/my-location/memberships/my-membership', + * // Optional. Namespace for GKE Connect agent resources. Defaults to `gke-connect`. The Connect Agent is authorized automatically when run in the default namespace. Otherwise, explicit authorization must be granted with an additional IAM binding. + * namespace: 'placeholder-value', + * // Optional. URI of a proxy if connectivity from the agent to gkeconnect.googleapis.com requires the use of a proxy. Format must be in the form `http(s)://{proxy_address\}`, depending on the HTTP/HTTPS protocol supported by the proxy. This will direct the connect agent's outbound traffic through a HTTP(S) proxy. + * proxy: 'placeholder-value', + * // Optional. The registry to fetch the connect agent image from. Defaults to gcr.io/gkeconnect. + * registry: 'placeholder-value', + * // Optional. The Connect agent version to use. Defaults to the most current version. + * version: 'placeholder-value', + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "manifest": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + generateConnectManifest( + params: Params$Resource$Projects$Locations$Memberships$Generateconnectmanifest, + options: StreamMethodOptions + ): GaxiosPromise; + generateConnectManifest( + params?: Params$Resource$Projects$Locations$Memberships$Generateconnectmanifest, + options?: MethodOptions + ): GaxiosPromise; + generateConnectManifest( + params: Params$Resource$Projects$Locations$Memberships$Generateconnectmanifest, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + generateConnectManifest( + params: Params$Resource$Projects$Locations$Memberships$Generateconnectmanifest, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + generateConnectManifest( + params: Params$Resource$Projects$Locations$Memberships$Generateconnectmanifest, + callback: BodyResponseCallback + ): void; + generateConnectManifest( + callback: BodyResponseCallback + ): void; + generateConnectManifest( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Memberships$Generateconnectmanifest + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Memberships$Generateconnectmanifest; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Memberships$Generateconnectmanifest; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + '/v1alpha2/{+name}:generateConnectManifest' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Gets the details of a Membership. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1alpha2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.memberships.get({ + * // Required. The Membership resource name in the format `projects/x/locations/x/memberships/x`. + * name: 'projects/my-project/locations/my-location/memberships/my-membership', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "authority": {}, + * // "createTime": "my_createTime", + * // "deleteTime": "my_deleteTime", + * // "description": "my_description", + * // "endpoint": {}, + * // "externalId": "my_externalId", + * // "infrastructureType": "my_infrastructureType", + * // "labels": {}, + * // "lastConnectionTime": "my_lastConnectionTime", + * // "name": "my_name", + * // "state": {}, + * // "uniqueId": "my_uniqueId", + * // "updateTime": "my_updateTime" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Projects$Locations$Memberships$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Projects$Locations$Memberships$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Memberships$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Memberships$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Memberships$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Memberships$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Memberships$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Memberships$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1alpha2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.memberships.getIamPolicy({ + * // Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + * 'options.requestedPolicyVersion': 'placeholder-value', + * // REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. + * resource: + * 'projects/my-project/locations/my-location/memberships/my-membership', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "auditConfigs": [], + * // "bindings": [], + * // "etag": "my_etag", + * // "version": 0 + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + getIamPolicy( + params: Params$Resource$Projects$Locations$Memberships$Getiampolicy, + options: StreamMethodOptions + ): GaxiosPromise; + getIamPolicy( + params?: Params$Resource$Projects$Locations$Memberships$Getiampolicy, + options?: MethodOptions + ): GaxiosPromise; + getIamPolicy( + params: Params$Resource$Projects$Locations$Memberships$Getiampolicy, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getIamPolicy( + params: Params$Resource$Projects$Locations$Memberships$Getiampolicy, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getIamPolicy( + params: Params$Resource$Projects$Locations$Memberships$Getiampolicy, + callback: BodyResponseCallback + ): void; + getIamPolicy(callback: BodyResponseCallback): void; + getIamPolicy( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Memberships$Getiampolicy + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Memberships$Getiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Memberships$Getiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha2/{+resource}:getIamPolicy').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Lists Memberships in a given project and location. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1alpha2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.memberships.list({ + * // Optional. Lists Memberships that match the filter expression, following the syntax outlined in https://google.aip.dev/160. Examples: - Name is `bar` in project `foo-proj` and location `global`: name = "projects/foo-proj/locations/global/membership/bar" - Memberships that have a label called `foo`: labels.foo:* - Memberships that have a label called `foo` whose value is `bar`: labels.foo = bar - Memberships in the CREATING state: state = CREATING + * filter: 'placeholder-value', + * // Optional. One or more fields to compare and use to sort the output. See https://google.aip.dev/132#ordering. + * orderBy: 'placeholder-value', + * // Optional. When requesting a 'page' of resources, `page_size` specifies number of resources to return. If unspecified or set to 0, all resources will be returned. + * pageSize: 'placeholder-value', + * // Optional. Token returned by previous call to `ListMemberships` which specifies the position in the list from where to continue listing the resources. + * pageToken: 'placeholder-value', + * // Required. The parent (project and location) where the Memberships will be listed. Specified in the format `projects/x/locations/x`. + * parent: 'projects/my-project/locations/my-location', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "nextPageToken": "my_nextPageToken", + * // "resources": [], + * // "unreachable": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Projects$Locations$Memberships$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Projects$Locations$Memberships$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$Memberships$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Memberships$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Memberships$List, + callback: BodyResponseCallback + ): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Memberships$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Memberships$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Memberships$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha2/{+parent}/memberships').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Updates an existing Membership. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1alpha2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.memberships.patch({ + * // Required. The Membership resource name in the format `projects/x/locations/x/memberships/x`. + * name: 'projects/my-project/locations/my-location/memberships/my-membership', + * // Required. Mask of fields to update. + * updateMask: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "authority": {}, + * // "createTime": "my_createTime", + * // "deleteTime": "my_deleteTime", + * // "description": "my_description", + * // "endpoint": {}, + * // "externalId": "my_externalId", + * // "infrastructureType": "my_infrastructureType", + * // "labels": {}, + * // "lastConnectionTime": "my_lastConnectionTime", + * // "name": "my_name", + * // "state": {}, + * // "uniqueId": "my_uniqueId", + * // "updateTime": "my_updateTime" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + patch( + params: Params$Resource$Projects$Locations$Memberships$Patch, + options: StreamMethodOptions + ): GaxiosPromise; + patch( + params?: Params$Resource$Projects$Locations$Memberships$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Locations$Memberships$Patch, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Locations$Memberships$Patch, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Locations$Memberships$Patch, + callback: BodyResponseCallback + ): void; + patch(callback: BodyResponseCallback): void; + patch( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Memberships$Patch + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Memberships$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Memberships$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1alpha2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.memberships.setIamPolicy({ + * // REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. + * resource: + * 'projects/my-project/locations/my-location/memberships/my-membership', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "policy": {}, + * // "updateMask": "my_updateMask" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "auditConfigs": [], + * // "bindings": [], + * // "etag": "my_etag", + * // "version": 0 + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + setIamPolicy( + params: Params$Resource$Projects$Locations$Memberships$Setiampolicy, + options: StreamMethodOptions + ): GaxiosPromise; + setIamPolicy( + params?: Params$Resource$Projects$Locations$Memberships$Setiampolicy, + options?: MethodOptions + ): GaxiosPromise; + setIamPolicy( + params: Params$Resource$Projects$Locations$Memberships$Setiampolicy, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + setIamPolicy( + params: Params$Resource$Projects$Locations$Memberships$Setiampolicy, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + setIamPolicy( + params: Params$Resource$Projects$Locations$Memberships$Setiampolicy, + callback: BodyResponseCallback + ): void; + setIamPolicy(callback: BodyResponseCallback): void; + setIamPolicy( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Memberships$Setiampolicy + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Memberships$Setiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Memberships$Setiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha2/{+resource}:setIamPolicy').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1alpha2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.memberships.testIamPermissions({ + * // REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. + * resource: + * 'projects/my-project/locations/my-location/memberships/my-membership', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "permissions": [] + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "permissions": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + testIamPermissions( + params: Params$Resource$Projects$Locations$Memberships$Testiampermissions, + options: StreamMethodOptions + ): GaxiosPromise; + testIamPermissions( + params?: Params$Resource$Projects$Locations$Memberships$Testiampermissions, + options?: MethodOptions + ): GaxiosPromise; + testIamPermissions( + params: Params$Resource$Projects$Locations$Memberships$Testiampermissions, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + testIamPermissions( + params: Params$Resource$Projects$Locations$Memberships$Testiampermissions, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + testIamPermissions( + params: Params$Resource$Projects$Locations$Memberships$Testiampermissions, + callback: BodyResponseCallback + ): void; + testIamPermissions( + callback: BodyResponseCallback + ): void; + testIamPermissions( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Memberships$Testiampermissions + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Memberships$Testiampermissions; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Memberships$Testiampermissions; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha2/{+resource}:testIamPermissions').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Locations$Memberships$Create + extends StandardParameters { + /** + * Required. Client chosen ID for the membership. `membership_id` must be a valid RFC 1123 compliant DNS label: 1. At most 63 characters in length 2. It must consist of lower case alphanumeric characters or `-` 3. It must start and end with an alphanumeric character Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters. + */ + membershipId?: string; + /** + * Required. The parent (project and location) where the Memberships will be created. Specified in the format `projects/x/locations/x`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Membership; + } + export interface Params$Resource$Projects$Locations$Memberships$Delete + extends StandardParameters { + /** + * Required. The Membership resource name in the format `projects/x/locations/x/memberships/x`. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Memberships$Generateconnectmanifest + extends StandardParameters { + /** + * Optional. The image pull secret content for the registry, if not public. + */ + imagePullSecretContent?: string; + /** + * Optional. If true, generate the resources for upgrade only. Some resources generated only for installation (e.g. secrets) will be excluded. + */ + isUpgrade?: boolean; + /** + * Required. The Membership resource name the Agent will associate with, in the format `projects/x/locations/x/memberships/x`. + */ + name?: string; + /** + * Optional. Namespace for GKE Connect agent resources. Defaults to `gke-connect`. The Connect Agent is authorized automatically when run in the default namespace. Otherwise, explicit authorization must be granted with an additional IAM binding. + */ + namespace?: string; + /** + * Optional. URI of a proxy if connectivity from the agent to gkeconnect.googleapis.com requires the use of a proxy. Format must be in the form `http(s)://{proxy_address\}`, depending on the HTTP/HTTPS protocol supported by the proxy. This will direct the connect agent's outbound traffic through a HTTP(S) proxy. + */ + proxy?: string; + /** + * Optional. The registry to fetch the connect agent image from. Defaults to gcr.io/gkeconnect. + */ + registry?: string; + /** + * Optional. The Connect agent version to use. Defaults to the most current version. + */ + version?: string; + } + export interface Params$Resource$Projects$Locations$Memberships$Get + extends StandardParameters { + /** + * Required. The Membership resource name in the format `projects/x/locations/x/memberships/x`. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Memberships$Getiampolicy + extends StandardParameters { + /** + * Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + */ + 'options.requestedPolicyVersion'?: number; + /** + * REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. + */ + resource?: string; + } + export interface Params$Resource$Projects$Locations$Memberships$List + extends StandardParameters { + /** + * Optional. Lists Memberships that match the filter expression, following the syntax outlined in https://google.aip.dev/160. Examples: - Name is `bar` in project `foo-proj` and location `global`: name = "projects/foo-proj/locations/global/membership/bar" - Memberships that have a label called `foo`: labels.foo:* - Memberships that have a label called `foo` whose value is `bar`: labels.foo = bar - Memberships in the CREATING state: state = CREATING + */ + filter?: string; + /** + * Optional. One or more fields to compare and use to sort the output. See https://google.aip.dev/132#ordering. + */ + orderBy?: string; + /** + * Optional. When requesting a 'page' of resources, `page_size` specifies number of resources to return. If unspecified or set to 0, all resources will be returned. + */ + pageSize?: number; + /** + * Optional. Token returned by previous call to `ListMemberships` which specifies the position in the list from where to continue listing the resources. + */ + pageToken?: string; + /** + * Required. The parent (project and location) where the Memberships will be listed. Specified in the format `projects/x/locations/x`. + */ + parent?: string; + } + export interface Params$Resource$Projects$Locations$Memberships$Patch + extends StandardParameters { + /** + * Required. The Membership resource name in the format `projects/x/locations/x/memberships/x`. + */ + name?: string; + /** + * Required. Mask of fields to update. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Membership; + } + export interface Params$Resource$Projects$Locations$Memberships$Setiampolicy + extends StandardParameters { + /** + * REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$SetIamPolicyRequest; + } + export interface Params$Resource$Projects$Locations$Memberships$Testiampermissions + extends StandardParameters { + /** + * REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$TestIamPermissionsRequest; + } + + export class Resource$Projects$Locations$Operations { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * 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`. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1alpha2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.operations.cancel({ + * // The name of the operation resource to be cancelled. + * name: 'projects/my-project/locations/my-location/operations/my-operation', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // {} + * }, + * }); + * console.log(res.data); + * + * // Example response + * // {} + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + cancel( + params: Params$Resource$Projects$Locations$Operations$Cancel, + options: StreamMethodOptions + ): GaxiosPromise; + cancel( + params?: Params$Resource$Projects$Locations$Operations$Cancel, + options?: MethodOptions + ): GaxiosPromise; + cancel( + params: Params$Resource$Projects$Locations$Operations$Cancel, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + cancel( + params: Params$Resource$Projects$Locations$Operations$Cancel, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + cancel( + params: Params$Resource$Projects$Locations$Operations$Cancel, + callback: BodyResponseCallback + ): void; + cancel(callback: BodyResponseCallback): void; + cancel( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Operations$Cancel + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Operations$Cancel; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Operations$Cancel; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha2/{+name}:cancel').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * 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`. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1alpha2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.operations.delete({ + * // The name of the operation resource to be deleted. + * name: 'projects/my-project/locations/my-location/operations/my-operation', + * }); + * console.log(res.data); + * + * // Example response + * // {} + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + delete( + params: Params$Resource$Projects$Locations$Operations$Delete, + options: StreamMethodOptions + ): GaxiosPromise; + delete( + params?: Params$Resource$Projects$Locations$Operations$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Locations$Operations$Delete, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Operations$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Operations$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Operations$Delete + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Operations$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Operations$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * 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. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1alpha2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.operations.get({ + * // The name of the operation resource. + * name: 'projects/my-project/locations/my-location/operations/my-operation', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Projects$Locations$Operations$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Projects$Locations$Operations$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Operations$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Operations$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Operations$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Operations$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Operations$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Operations$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/x/operations`. To override the binding, API services can add a binding such as `"/v1/{name=users/x\}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1alpha2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.operations.list({ + * // The standard list filter. + * filter: 'placeholder-value', + * // The name of the operation's parent resource. + * name: 'projects/my-project/locations/my-location', + * // The standard list page size. + * pageSize: 'placeholder-value', + * // The standard list page token. + * pageToken: 'placeholder-value', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "nextPageToken": "my_nextPageToken", + * // "operations": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Projects$Locations$Operations$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Projects$Locations$Operations$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$Operations$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Operations$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Operations$List, + callback: BodyResponseCallback + ): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Operations$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Operations$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Operations$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha2/{+name}/operations').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Locations$Operations$Cancel + extends StandardParameters { + /** + * The name of the operation resource to be cancelled. + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$CancelOperationRequest; + } + export interface Params$Resource$Projects$Locations$Operations$Delete + extends StandardParameters { + /** + * The name of the operation resource to be deleted. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Operations$Get + extends StandardParameters { + /** + * The name of the operation resource. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Operations$List + extends StandardParameters { + /** + * The standard list filter. + */ + filter?: string; + /** + * The name of the operation's parent resource. + */ + name?: string; + /** + * The standard list page size. + */ + pageSize?: number; + /** + * The standard list page token. + */ + pageToken?: string; + } +} diff --git a/src/apis/gkehub/v1beta.ts b/src/apis/gkehub/v1beta.ts new file mode 100644 index 00000000000..d8e6874c538 --- /dev/null +++ b/src/apis/gkehub/v1beta.ts @@ -0,0 +1,2210 @@ +// Copyright 2020 Google LLC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/* eslint-disable @typescript-eslint/no-explicit-any */ +/* eslint-disable @typescript-eslint/class-name-casing */ +/* eslint-disable @typescript-eslint/no-unused-vars */ +/* eslint-disable @typescript-eslint/no-empty-interface */ +/* eslint-disable @typescript-eslint/no-namespace */ +/* eslint-disable no-irregular-whitespace */ + +import { + OAuth2Client, + JWT, + Compute, + UserRefreshClient, + BaseExternalAccountClient, + GaxiosPromise, + GoogleConfigurable, + createAPIRequest, + MethodOptions, + StreamMethodOptions, + GlobalOptions, + GoogleAuth, + BodyResponseCallback, + APIRequestContext, +} from 'googleapis-common'; +import {Readable} from 'stream'; + +export namespace gkehub_v1beta { + export interface Options extends GlobalOptions { + version: 'v1beta'; + } + + interface StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: + | string + | OAuth2Client + | JWT + | Compute + | UserRefreshClient + | BaseExternalAccountClient + | GoogleAuth; + + /** + * V1 error format. + */ + '$.xgafv'?: string; + /** + * OAuth access token. + */ + access_token?: string; + /** + * Data format for response. + */ + alt?: string; + /** + * JSONP + */ + callback?: string; + /** + * Selector specifying which fields to include in a partial response. + */ + fields?: string; + /** + * 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. + */ + key?: string; + /** + * OAuth 2.0 token for the current user. + */ + oauth_token?: string; + /** + * Returns response with indentations and line breaks. + */ + prettyPrint?: boolean; + /** + * 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. + */ + quotaUser?: string; + /** + * Legacy upload protocol for media (e.g. "media", "multipart"). + */ + uploadType?: string; + /** + * Upload protocol for media (e.g. "raw", "multipart"). + */ + upload_protocol?: string; + } + + /** + * GKE Hub + * + * + * + * @example + * ```js + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1beta'); + * ``` + */ + export class Gkehub { + context: APIRequestContext; + projects: Resource$Projects; + + constructor(options: GlobalOptions, google?: GoogleConfigurable) { + this.context = { + _options: options || {}, + google, + }; + + this.projects = new Resource$Projects(this.context); + } + } + + /** + * Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { "audit_configs": [ { "service": "allServices", "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] \}, { "log_type": "DATA_WRITE" \}, { "log_type": "ADMIN_READ" \} ] \}, { "service": "sampleservice.googleapis.com", "audit_log_configs": [ { "log_type": "DATA_READ" \}, { "log_type": "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] \} ] \} ] \} For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging. + */ + export interface Schema$AuditConfig { + /** + * The configuration for logging of each type of permission. + */ + auditLogConfigs?: Schema$AuditLogConfig[]; + /** + * Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services. + */ + service?: string | null; + } + /** + * Provides the configuration for logging a type of permissions. Example: { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] \}, { "log_type": "DATA_WRITE" \} ] \} This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging. + */ + export interface Schema$AuditLogConfig { + /** + * Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members. + */ + exemptedMembers?: string[] | null; + /** + * The log type that this config enables. + */ + logType?: string | null; + } + /** + * Associates `members` with a `role`. + */ + export interface Schema$Binding { + /** + * The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + */ + condition?: Schema$Expr; + /** + * Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid\}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid\}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid\}`: An email address that represents a Google group. For example, `admins@example.com`. * `deleted:user:{emailid\}?uid={uniqueid\}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid\}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid\}?uid={uniqueid\}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid\}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid\}?uid={uniqueid\}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid\}` and the recovered group retains the role in the binding. * `domain:{domain\}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. + */ + members?: string[] | null; + /** + * Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + */ + role?: string | null; + } + /** + * The request message for Operations.CancelOperation. + */ + export interface Schema$CancelOperationRequest {} + /** + * 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); \} The JSON representation for `Empty` is empty JSON object `{\}`. + */ + export interface Schema$Empty {} + /** + * Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. + */ + export interface Schema$Expr { + /** + * Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. + */ + description?: string | null; + /** + * Textual representation of an expression in Common Expression Language syntax. + */ + expression?: string | null; + /** + * Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file. + */ + location?: string | null; + /** + * Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression. + */ + title?: string | null; + } + /** + * 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). + */ + export interface Schema$GoogleRpcStatus { + /** + * The status code, which should be an enum value of google.rpc.Code. + */ + code?: number | null; + /** + * A list of messages that carry the error details. There is a common set of message types for APIs to use. + */ + details?: Array<{[key: string]: any}> | null; + /** + * 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 | null; + } + /** + * The response message for Locations.ListLocations. + */ + export interface Schema$ListLocationsResponse { + /** + * A list of locations that matches the specified filter in the request. + */ + locations?: Schema$Location[]; + /** + * The standard List next-page token. + */ + nextPageToken?: string | null; + } + /** + * The response message for Operations.ListOperations. + */ + export interface Schema$ListOperationsResponse { + /** + * The standard List next-page token. + */ + nextPageToken?: string | null; + /** + * A list of operations that matches the specified filter in the request. + */ + operations?: Schema$Operation[]; + } + /** + * A resource that represents Google Cloud Platform location. + */ + export interface Schema$Location { + /** + * The friendly name for this location, typically a nearby city name. For example, "Tokyo". + */ + displayName?: string | null; + /** + * Cross-service attributes for the location. For example {"cloud.googleapis.com/region": "us-east1"\} + */ + labels?: {[key: string]: string} | null; + /** + * The canonical id for this location. For example: `"us-east1"`. + */ + locationId?: string | null; + /** + * Service-specific metadata. For example the available capacity at the given location. + */ + metadata?: {[key: string]: any} | null; + /** + * Resource name for the location, which may vary between implementations. For example: `"projects/example-project/locations/us-east1"` + */ + name?: string | null; + } + /** + * This resource represents a long-running operation that is the result of a network API call. + */ + export interface Schema$Operation { + /** + * 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?: boolean | null; + /** + * The error result of the operation in case of failure or cancellation. + */ + error?: Schema$GoogleRpcStatus; + /** + * 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?: {[key: string]: any} | null; + /** + * 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 | null; + /** + * The normal response of the operation in case of success. 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?: {[key: string]: any} | null; + } + /** + * Represents the metadata of the long-running operation. + */ + export interface Schema$OperationMetadata { + /** + * Output only. API version used to start the operation. + */ + apiVersion?: string | null; + /** + * 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`. + */ + cancelRequested?: boolean | null; + /** + * Output only. The time the operation was created. + */ + createTime?: string | null; + /** + * Output only. The time the operation finished running. + */ + endTime?: string | null; + /** + * Output only. Human-readable status of the operation, if any. + */ + statusDetail?: string | null; + /** + * Output only. Server-defined resource path for the target of the operation. + */ + target?: string | null; + /** + * Output only. Name of the verb executed by the operation. + */ + verb?: string | null; + } + /** + * An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] \}, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", \} \} ], "etag": "BwWWja0YfJA=", "version": 3 \} **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/). + */ + export interface Schema$Policy { + /** + * Specifies cloud audit logging configuration for this policy. + */ + auditConfigs?: Schema$AuditConfig[]; + /** + * Associates a list of `members` to a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one member. + */ + bindings?: Schema$Binding[]; + /** + * `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. + */ + etag?: string | null; + /** + * Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + */ + version?: number | null; + } + /** + * Request message for `SetIamPolicy` method. + */ + export interface Schema$SetIamPolicyRequest { + /** + * REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them. + */ + policy?: Schema$Policy; + /** + * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used: `paths: "bindings, etag"` + */ + updateMask?: string | null; + } + /** + * Request message for `TestIamPermissions` method. + */ + export interface Schema$TestIamPermissionsRequest { + /** + * The set of permissions to check for the `resource`. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + */ + permissions?: string[] | null; + } + /** + * Response message for `TestIamPermissions` method. + */ + export interface Schema$TestIamPermissionsResponse { + /** + * A subset of `TestPermissionsRequest.permissions` that the caller is allowed. + */ + permissions?: string[] | null; + } + + export class Resource$Projects { + context: APIRequestContext; + locations: Resource$Projects$Locations; + constructor(context: APIRequestContext) { + this.context = context; + this.locations = new Resource$Projects$Locations(this.context); + } + } + + export class Resource$Projects$Locations { + context: APIRequestContext; + features: Resource$Projects$Locations$Features; + memberships: Resource$Projects$Locations$Memberships; + operations: Resource$Projects$Locations$Operations; + constructor(context: APIRequestContext) { + this.context = context; + this.features = new Resource$Projects$Locations$Features(this.context); + this.memberships = new Resource$Projects$Locations$Memberships( + this.context + ); + this.operations = new Resource$Projects$Locations$Operations( + this.context + ); + } + + /** + * Gets information about a location. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1beta'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.get({ + * // Resource name for the location. + * name: 'projects/my-project/locations/my-location', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "displayName": "my_displayName", + * // "labels": {}, + * // "locationId": "my_locationId", + * // "metadata": {}, + * // "name": "my_name" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Projects$Locations$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Projects$Locations$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Lists information about the supported locations for this service. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1beta'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.list({ + * // 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). + * filter: 'placeholder-value', + * // The resource that owns the locations collection, if applicable. + * name: 'projects/my-project', + * // The maximum number of results to return. If not set, the service will select a default. + * pageSize: 'placeholder-value', + * // A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. + * pageToken: 'placeholder-value', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "locations": [], + * // "nextPageToken": "my_nextPageToken" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Projects$Locations$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Projects$Locations$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$List, + callback: BodyResponseCallback + ): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Locations$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta/{+name}/locations').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Locations$Get + extends StandardParameters { + /** + * Resource name for the location. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$List + extends StandardParameters { + /** + * 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). + */ + filter?: string; + /** + * The resource that owns the locations collection, if applicable. + */ + name?: string; + /** + * The maximum number of results to return. If not set, the service will select a default. + */ + pageSize?: number; + /** + * A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. + */ + pageToken?: string; + } + + export class Resource$Projects$Locations$Features { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1beta'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.features.getIamPolicy({ + * // Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + * 'options.requestedPolicyVersion': 'placeholder-value', + * // REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. + * resource: 'projects/my-project/locations/my-location/features/my-feature', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "auditConfigs": [], + * // "bindings": [], + * // "etag": "my_etag", + * // "version": 0 + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + getIamPolicy( + params: Params$Resource$Projects$Locations$Features$Getiampolicy, + options: StreamMethodOptions + ): GaxiosPromise; + getIamPolicy( + params?: Params$Resource$Projects$Locations$Features$Getiampolicy, + options?: MethodOptions + ): GaxiosPromise; + getIamPolicy( + params: Params$Resource$Projects$Locations$Features$Getiampolicy, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getIamPolicy( + params: Params$Resource$Projects$Locations$Features$Getiampolicy, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getIamPolicy( + params: Params$Resource$Projects$Locations$Features$Getiampolicy, + callback: BodyResponseCallback + ): void; + getIamPolicy(callback: BodyResponseCallback): void; + getIamPolicy( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Features$Getiampolicy + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Features$Getiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Features$Getiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta/{+resource}:getIamPolicy').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1beta'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.features.setIamPolicy({ + * // REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. + * resource: 'projects/my-project/locations/my-location/features/my-feature', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "policy": {}, + * // "updateMask": "my_updateMask" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "auditConfigs": [], + * // "bindings": [], + * // "etag": "my_etag", + * // "version": 0 + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + setIamPolicy( + params: Params$Resource$Projects$Locations$Features$Setiampolicy, + options: StreamMethodOptions + ): GaxiosPromise; + setIamPolicy( + params?: Params$Resource$Projects$Locations$Features$Setiampolicy, + options?: MethodOptions + ): GaxiosPromise; + setIamPolicy( + params: Params$Resource$Projects$Locations$Features$Setiampolicy, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + setIamPolicy( + params: Params$Resource$Projects$Locations$Features$Setiampolicy, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + setIamPolicy( + params: Params$Resource$Projects$Locations$Features$Setiampolicy, + callback: BodyResponseCallback + ): void; + setIamPolicy(callback: BodyResponseCallback): void; + setIamPolicy( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Features$Setiampolicy + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Features$Setiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Features$Setiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta/{+resource}:setIamPolicy').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1beta'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.features.testIamPermissions({ + * // REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. + * resource: 'projects/my-project/locations/my-location/features/my-feature', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "permissions": [] + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "permissions": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + testIamPermissions( + params: Params$Resource$Projects$Locations$Features$Testiampermissions, + options: StreamMethodOptions + ): GaxiosPromise; + testIamPermissions( + params?: Params$Resource$Projects$Locations$Features$Testiampermissions, + options?: MethodOptions + ): GaxiosPromise; + testIamPermissions( + params: Params$Resource$Projects$Locations$Features$Testiampermissions, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + testIamPermissions( + params: Params$Resource$Projects$Locations$Features$Testiampermissions, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + testIamPermissions( + params: Params$Resource$Projects$Locations$Features$Testiampermissions, + callback: BodyResponseCallback + ): void; + testIamPermissions( + callback: BodyResponseCallback + ): void; + testIamPermissions( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Features$Testiampermissions + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Features$Testiampermissions; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Features$Testiampermissions; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta/{+resource}:testIamPermissions').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Locations$Features$Getiampolicy + extends StandardParameters { + /** + * Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + */ + 'options.requestedPolicyVersion'?: number; + /** + * REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. + */ + resource?: string; + } + export interface Params$Resource$Projects$Locations$Features$Setiampolicy + extends StandardParameters { + /** + * REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$SetIamPolicyRequest; + } + export interface Params$Resource$Projects$Locations$Features$Testiampermissions + extends StandardParameters { + /** + * REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$TestIamPermissionsRequest; + } + + export class Resource$Projects$Locations$Memberships { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1beta'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.memberships.getIamPolicy({ + * // Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + * 'options.requestedPolicyVersion': 'placeholder-value', + * // REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. + * resource: + * 'projects/my-project/locations/my-location/memberships/my-membership', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "auditConfigs": [], + * // "bindings": [], + * // "etag": "my_etag", + * // "version": 0 + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + getIamPolicy( + params: Params$Resource$Projects$Locations$Memberships$Getiampolicy, + options: StreamMethodOptions + ): GaxiosPromise; + getIamPolicy( + params?: Params$Resource$Projects$Locations$Memberships$Getiampolicy, + options?: MethodOptions + ): GaxiosPromise; + getIamPolicy( + params: Params$Resource$Projects$Locations$Memberships$Getiampolicy, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getIamPolicy( + params: Params$Resource$Projects$Locations$Memberships$Getiampolicy, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getIamPolicy( + params: Params$Resource$Projects$Locations$Memberships$Getiampolicy, + callback: BodyResponseCallback + ): void; + getIamPolicy(callback: BodyResponseCallback): void; + getIamPolicy( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Memberships$Getiampolicy + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Memberships$Getiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Memberships$Getiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta/{+resource}:getIamPolicy').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1beta'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.memberships.setIamPolicy({ + * // REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. + * resource: + * 'projects/my-project/locations/my-location/memberships/my-membership', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "policy": {}, + * // "updateMask": "my_updateMask" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "auditConfigs": [], + * // "bindings": [], + * // "etag": "my_etag", + * // "version": 0 + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + setIamPolicy( + params: Params$Resource$Projects$Locations$Memberships$Setiampolicy, + options: StreamMethodOptions + ): GaxiosPromise; + setIamPolicy( + params?: Params$Resource$Projects$Locations$Memberships$Setiampolicy, + options?: MethodOptions + ): GaxiosPromise; + setIamPolicy( + params: Params$Resource$Projects$Locations$Memberships$Setiampolicy, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + setIamPolicy( + params: Params$Resource$Projects$Locations$Memberships$Setiampolicy, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + setIamPolicy( + params: Params$Resource$Projects$Locations$Memberships$Setiampolicy, + callback: BodyResponseCallback + ): void; + setIamPolicy(callback: BodyResponseCallback): void; + setIamPolicy( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Memberships$Setiampolicy + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Memberships$Setiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Memberships$Setiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta/{+resource}:setIamPolicy').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1beta'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.memberships.testIamPermissions({ + * // REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. + * resource: + * 'projects/my-project/locations/my-location/memberships/my-membership', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "permissions": [] + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "permissions": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + testIamPermissions( + params: Params$Resource$Projects$Locations$Memberships$Testiampermissions, + options: StreamMethodOptions + ): GaxiosPromise; + testIamPermissions( + params?: Params$Resource$Projects$Locations$Memberships$Testiampermissions, + options?: MethodOptions + ): GaxiosPromise; + testIamPermissions( + params: Params$Resource$Projects$Locations$Memberships$Testiampermissions, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + testIamPermissions( + params: Params$Resource$Projects$Locations$Memberships$Testiampermissions, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + testIamPermissions( + params: Params$Resource$Projects$Locations$Memberships$Testiampermissions, + callback: BodyResponseCallback + ): void; + testIamPermissions( + callback: BodyResponseCallback + ): void; + testIamPermissions( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Memberships$Testiampermissions + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Memberships$Testiampermissions; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Memberships$Testiampermissions; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta/{+resource}:testIamPermissions').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Locations$Memberships$Getiampolicy + extends StandardParameters { + /** + * Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + */ + 'options.requestedPolicyVersion'?: number; + /** + * REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. + */ + resource?: string; + } + export interface Params$Resource$Projects$Locations$Memberships$Setiampolicy + extends StandardParameters { + /** + * REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$SetIamPolicyRequest; + } + export interface Params$Resource$Projects$Locations$Memberships$Testiampermissions + extends StandardParameters { + /** + * REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$TestIamPermissionsRequest; + } + + export class Resource$Projects$Locations$Operations { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * 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`. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1beta'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.operations.cancel({ + * // The name of the operation resource to be cancelled. + * name: 'projects/my-project/locations/my-location/operations/my-operation', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // {} + * }, + * }); + * console.log(res.data); + * + * // Example response + * // {} + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + cancel( + params: Params$Resource$Projects$Locations$Operations$Cancel, + options: StreamMethodOptions + ): GaxiosPromise; + cancel( + params?: Params$Resource$Projects$Locations$Operations$Cancel, + options?: MethodOptions + ): GaxiosPromise; + cancel( + params: Params$Resource$Projects$Locations$Operations$Cancel, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + cancel( + params: Params$Resource$Projects$Locations$Operations$Cancel, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + cancel( + params: Params$Resource$Projects$Locations$Operations$Cancel, + callback: BodyResponseCallback + ): void; + cancel(callback: BodyResponseCallback): void; + cancel( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Operations$Cancel + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Operations$Cancel; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Operations$Cancel; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta/{+name}:cancel').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * 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`. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1beta'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.operations.delete({ + * // The name of the operation resource to be deleted. + * name: 'projects/my-project/locations/my-location/operations/my-operation', + * }); + * console.log(res.data); + * + * // Example response + * // {} + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + delete( + params: Params$Resource$Projects$Locations$Operations$Delete, + options: StreamMethodOptions + ): GaxiosPromise; + delete( + params?: Params$Resource$Projects$Locations$Operations$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Locations$Operations$Delete, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Operations$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Operations$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Operations$Delete + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Operations$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Operations$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * 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. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1beta'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.operations.get({ + * // The name of the operation resource. + * name: 'projects/my-project/locations/my-location/operations/my-operation', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Projects$Locations$Operations$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Projects$Locations$Operations$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Operations$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Operations$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Operations$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Operations$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Operations$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Operations$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/x/operations`. To override the binding, API services can add a binding such as `"/v1/{name=users/x\}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1beta'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.operations.list({ + * // The standard list filter. + * filter: 'placeholder-value', + * // The name of the operation's parent resource. + * name: 'projects/my-project/locations/my-location', + * // The standard list page size. + * pageSize: 'placeholder-value', + * // The standard list page token. + * pageToken: 'placeholder-value', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "nextPageToken": "my_nextPageToken", + * // "operations": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Projects$Locations$Operations$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Projects$Locations$Operations$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$Operations$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Operations$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Operations$List, + callback: BodyResponseCallback + ): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Operations$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Operations$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Operations$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta/{+name}/operations').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Locations$Operations$Cancel + extends StandardParameters { + /** + * The name of the operation resource to be cancelled. + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$CancelOperationRequest; + } + export interface Params$Resource$Projects$Locations$Operations$Delete + extends StandardParameters { + /** + * The name of the operation resource to be deleted. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Operations$Get + extends StandardParameters { + /** + * The name of the operation resource. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Operations$List + extends StandardParameters { + /** + * The standard list filter. + */ + filter?: string; + /** + * The name of the operation's parent resource. + */ + name?: string; + /** + * The standard list page size. + */ + pageSize?: number; + /** + * The standard list page token. + */ + pageToken?: string; + } +} diff --git a/src/apis/gkehub/v1beta1.ts b/src/apis/gkehub/v1beta1.ts new file mode 100644 index 00000000000..772c3b17c9e --- /dev/null +++ b/src/apis/gkehub/v1beta1.ts @@ -0,0 +1,3309 @@ +// Copyright 2020 Google LLC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/* eslint-disable @typescript-eslint/no-explicit-any */ +/* eslint-disable @typescript-eslint/class-name-casing */ +/* eslint-disable @typescript-eslint/no-unused-vars */ +/* eslint-disable @typescript-eslint/no-empty-interface */ +/* eslint-disable @typescript-eslint/no-namespace */ +/* eslint-disable no-irregular-whitespace */ + +import { + OAuth2Client, + JWT, + Compute, + UserRefreshClient, + BaseExternalAccountClient, + GaxiosPromise, + GoogleConfigurable, + createAPIRequest, + MethodOptions, + StreamMethodOptions, + GlobalOptions, + GoogleAuth, + BodyResponseCallback, + APIRequestContext, +} from 'googleapis-common'; +import {Readable} from 'stream'; + +export namespace gkehub_v1beta1 { + export interface Options extends GlobalOptions { + version: 'v1beta1'; + } + + interface StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: + | string + | OAuth2Client + | JWT + | Compute + | UserRefreshClient + | BaseExternalAccountClient + | GoogleAuth; + + /** + * V1 error format. + */ + '$.xgafv'?: string; + /** + * OAuth access token. + */ + access_token?: string; + /** + * Data format for response. + */ + alt?: string; + /** + * JSONP + */ + callback?: string; + /** + * Selector specifying which fields to include in a partial response. + */ + fields?: string; + /** + * 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. + */ + key?: string; + /** + * OAuth 2.0 token for the current user. + */ + oauth_token?: string; + /** + * Returns response with indentations and line breaks. + */ + prettyPrint?: boolean; + /** + * 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. + */ + quotaUser?: string; + /** + * Legacy upload protocol for media (e.g. "media", "multipart"). + */ + uploadType?: string; + /** + * Upload protocol for media (e.g. "raw", "multipart"). + */ + upload_protocol?: string; + } + + /** + * GKE Hub + * + * + * + * @example + * ```js + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1beta1'); + * ``` + */ + export class Gkehub { + context: APIRequestContext; + projects: Resource$Projects; + + constructor(options: GlobalOptions, google?: GoogleConfigurable) { + this.context = { + _options: options || {}, + google, + }; + + this.projects = new Resource$Projects(this.context); + } + } + + /** + * Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { "audit_configs": [ { "service": "allServices", "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] \}, { "log_type": "DATA_WRITE" \}, { "log_type": "ADMIN_READ" \} ] \}, { "service": "sampleservice.googleapis.com", "audit_log_configs": [ { "log_type": "DATA_READ" \}, { "log_type": "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] \} ] \} ] \} For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging. + */ + export interface Schema$AuditConfig { + /** + * The configuration for logging of each type of permission. + */ + auditLogConfigs?: Schema$AuditLogConfig[]; + /** + * Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services. + */ + service?: string | null; + } + /** + * Provides the configuration for logging a type of permissions. Example: { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] \}, { "log_type": "DATA_WRITE" \} ] \} This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging. + */ + export interface Schema$AuditLogConfig { + /** + * Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members. + */ + exemptedMembers?: string[] | null; + /** + * The log type that this config enables. + */ + logType?: string | null; + } + /** + * Authority encodes how Google will recognize identities from this Membership. See the workload identity documentation for more details: https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity + */ + export interface Schema$Authority { + /** + * Output only. An identity provider that reflects the `issuer` in the workload identity pool. + */ + identityProvider?: string | null; + /** + * Optional. A JSON Web Token (JWT) issuer URI. `issuer` must start with `https://` and be a valid URL with length <2000 characters. If set, then Google will allow valid OIDC tokens from this issuer to authenticate within the workload_identity_pool. OIDC discovery will be performed on this URI to validate tokens from the issuer. Clearing `issuer` disables Workload Identity. `issuer` cannot be directly modified; it must be cleared (and Workload Identity disabled) before using a new issuer (and re-enabling Workload Identity). + */ + issuer?: string | null; + /** + * Optional. OIDC verification keys for this Membership in JWKS format (RFC 7517). When this field is set, OIDC discovery will NOT be performed on `issuer`, and instead OIDC tokens will be validated using this field. + */ + oidcJwks?: string | null; + /** + * Output only. The name of the workload identity pool in which `issuer` will be recognized. There is a single Workload Identity Pool per Hub that is shared between all Memberships that belong to that Hub. For a Hub hosted in {PROJECT_ID\}, the workload pool format is `{PROJECT_ID\}.hub.id.goog`, although this is subject to change in newer versions of this API. + */ + workloadIdentityPool?: string | null; + } + /** + * Associates `members` with a `role`. + */ + export interface Schema$Binding { + /** + * The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + */ + condition?: Schema$Expr; + /** + * Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid\}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid\}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid\}`: An email address that represents a Google group. For example, `admins@example.com`. * `deleted:user:{emailid\}?uid={uniqueid\}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid\}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid\}?uid={uniqueid\}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid\}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid\}?uid={uniqueid\}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid\}` and the recovered group retains the role in the binding. * `domain:{domain\}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. + */ + members?: string[] | null; + /** + * Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + */ + role?: string | null; + } + /** + * The request message for Operations.CancelOperation. + */ + export interface Schema$CancelOperationRequest {} + /** + * ConnectAgentResource represents a Kubernetes resource manifest for Connect Agent deployment. + */ + export interface Schema$ConnectAgentResource { + /** + * YAML manifest of the resource. + */ + manifest?: string | null; + /** + * Kubernetes type of the resource. + */ + type?: Schema$TypeMeta; + } + /** + * 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); \} The JSON representation for `Empty` is empty JSON object `{\}`. + */ + export interface Schema$Empty {} + /** + * Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. + */ + export interface Schema$Expr { + /** + * Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. + */ + description?: string | null; + /** + * Textual representation of an expression in Common Expression Language syntax. + */ + expression?: string | null; + /** + * Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file. + */ + location?: string | null; + /** + * Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression. + */ + title?: string | null; + } + /** + * GenerateConnectManifestResponse contains manifest information for installing/upgrading a Connect agent. + */ + export interface Schema$GenerateConnectManifestResponse { + /** + * The ordered list of Kubernetes resources that need to be applied to the cluster for GKE Connect agent installation/upgrade. + */ + manifest?: Schema$ConnectAgentResource[]; + } + /** + * The response of the exclusivity artifacts manifests for the client to apply. + */ + export interface Schema$GenerateExclusivityManifestResponse { + /** + * The YAML manifest of the membership CRD to apply if a newer version of the CRD is available. Empty if no update needs to be applied. + */ + crdManifest?: string | null; + /** + * The YAML manifest of the membership CR to apply if a new version of the CR is available. Empty if no update needs to be applied. + */ + crManifest?: string | null; + } + /** + * GkeCluster contains information specific to GKE clusters. + */ + export interface Schema$GkeCluster { + /** + * Immutable. Self-link of the GCP resource for the GKE cluster. For example: //container.googleapis.com/projects/my-project/locations/us-west1-a/clusters/my-cluster Zonal clusters are also supported. + */ + resourceLink?: string | null; + } + /** + * 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). + */ + export interface Schema$GoogleRpcStatus { + /** + * The status code, which should be an enum value of google.rpc.Code. + */ + code?: number | null; + /** + * A list of messages that carry the error details. There is a common set of message types for APIs to use. + */ + details?: Array<{[key: string]: any}> | null; + /** + * 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 | null; + } + /** + * KubernetesMetadata provides informational metadata for Memberships representing Kubernetes clusters. + */ + export interface Schema$KubernetesMetadata { + /** + * Output only. Kubernetes API server version string as reported by '/version'. + */ + kubernetesApiServerVersion?: string | null; + /** + * Output only. The total memory capacity as reported by the sum of all Kubernetes nodes resources, defined in MB. + */ + memoryMb?: number | null; + /** + * Output only. Node count as reported by Kubernetes nodes resources. + */ + nodeCount?: number | null; + /** + * Output only. Node providerID as reported by the first node in the list of nodes on the Kubernetes endpoint. On Kubernetes platforms that support zero-node clusters (like GKE-on-GCP), the node_count will be zero and the node_provider_id will be empty. + */ + nodeProviderId?: string | null; + /** + * Output only. The time at which these details were last updated. This update_time is different from the Membership-level update_time since EndpointDetails are updated internally for API consumers. + */ + updateTime?: string | null; + /** + * Output only. vCPU count as reported by Kubernetes nodes resources. + */ + vcpuCount?: number | null; + } + /** + * KubernetesResource contains the YAML manifests and configuration for Membership Kubernetes resources in the cluster. After CreateMembership or UpdateMembership, these resources should be re-applied in the cluster. + */ + export interface Schema$KubernetesResource { + /** + * Output only. The Kubernetes resources for installing the GKE Connect agent This field is only populated in the Membership returned from a successful long-running operation from CreateMembership or UpdateMembership. It is not populated during normal GetMembership or ListMemberships requests. To get the resource manifest after the initial registration, the caller should make a UpdateMembership call with an empty field mask. + */ + connectResources?: Schema$ResourceManifest[]; + /** + * Input only. The YAML representation of the Membership CR. This field is ignored for GKE clusters where Hub can read the CR directly. Callers should provide the CR that is currently present in the cluster during CreateMembership or UpdateMembership, or leave this field empty if none exists. The CR manifest is used to validate the cluster has not been registered with another Membership. + */ + membershipCrManifest?: string | null; + /** + * Output only. Additional Kubernetes resources that need to be applied to the cluster after Membership creation, and after every update. This field is only populated in the Membership returned from a successful long-running operation from CreateMembership or UpdateMembership. It is not populated during normal GetMembership or ListMemberships requests. To get the resource manifest after the initial registration, the caller should make a UpdateMembership call with an empty field mask. + */ + membershipResources?: Schema$ResourceManifest[]; + /** + * Optional. Options for Kubernetes resource generation. + */ + resourceOptions?: Schema$ResourceOptions; + } + /** + * The response message for Locations.ListLocations. + */ + export interface Schema$ListLocationsResponse { + /** + * A list of locations that matches the specified filter in the request. + */ + locations?: Schema$Location[]; + /** + * The standard List next-page token. + */ + nextPageToken?: string | null; + } + /** + * Response message for the `GkeHubMembershipService.ListMemberships` method. + */ + export interface Schema$ListMembershipsResponse { + /** + * A token to request the next page of resources from the `ListMemberships` method. The value of an empty string means that there are no more resources to return. + */ + nextPageToken?: string | null; + /** + * The list of matching Memberships. + */ + resources?: Schema$Membership[]; + /** + * List of locations that could not be reached while fetching this list. + */ + unreachable?: string[] | null; + } + /** + * The response message for Operations.ListOperations. + */ + export interface Schema$ListOperationsResponse { + /** + * The standard List next-page token. + */ + nextPageToken?: string | null; + /** + * A list of operations that matches the specified filter in the request. + */ + operations?: Schema$Operation[]; + } + /** + * A resource that represents Google Cloud Platform location. + */ + export interface Schema$Location { + /** + * The friendly name for this location, typically a nearby city name. For example, "Tokyo". + */ + displayName?: string | null; + /** + * Cross-service attributes for the location. For example {"cloud.googleapis.com/region": "us-east1"\} + */ + labels?: {[key: string]: string} | null; + /** + * The canonical id for this location. For example: `"us-east1"`. + */ + locationId?: string | null; + /** + * Service-specific metadata. For example the available capacity at the given location. + */ + metadata?: {[key: string]: any} | null; + /** + * Resource name for the location, which may vary between implementations. For example: `"projects/example-project/locations/us-east1"` + */ + name?: string | null; + } + /** + * Membership contains information about a member cluster. + */ + export interface Schema$Membership { + /** + * Optional. How to identify workloads from this Membership. See the documentation on Workload Identity for more details: https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity + */ + authority?: Schema$Authority; + /** + * Output only. When the Membership was created. + */ + createTime?: string | null; + /** + * Output only. When the Membership was deleted. + */ + deleteTime?: string | null; + /** + * Optional. Description of this membership, limited to 63 characters. Must match the regex: `a-zA-Z0-9*` + */ + description?: string | null; + /** + * Optional. Endpoint information to reach this member. + */ + endpoint?: Schema$MembershipEndpoint; + /** + * Optional. An externally-generated and managed ID for this Membership. This ID may be modified after creation, but this is not recommended. For GKE clusters, external_id is managed by the Hub API and updates will be ignored. The ID must match the regex: `a-zA-Z0-9*` If this Membership represents a Kubernetes cluster, this value should be set to the UID of the `kube-system` namespace object. + */ + externalId?: string | null; + /** + * Optional. The infrastructure type this Membership is running on. + */ + infrastructureType?: string | null; + /** + * Optional. GCP labels for this membership. + */ + labels?: {[key: string]: string} | null; + /** + * Output only. For clusters using Connect, the timestamp of the most recent connection established with Google Cloud. This time is updated every several minutes, not continuously. For clusters that do not use GKE Connect, or that have never connected successfully, this field will be unset. + */ + lastConnectionTime?: string | null; + /** + * Output only. The full, unique name of this Membership resource in the format `projects/x/locations/x/memberships/{membership_id\}`, set during creation. `membership_id` must be a valid RFC 1123 compliant DNS label: 1. At most 63 characters in length 2. It must consist of lower case alphanumeric characters or `-` 3. It must start and end with an alphanumeric character Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters. + */ + name?: string | null; + /** + * Output only. State of the Membership resource. + */ + state?: Schema$MembershipState; + /** + * Output only. Google-generated UUID for this resource. This is unique across all Membership resources. If a Membership resource is deleted and another resource with the same name is created, it gets a different unique_id. + */ + uniqueId?: string | null; + /** + * Output only. When the Membership was last updated. + */ + updateTime?: string | null; + } + /** + * MembershipEndpoint contains information needed to contact a Kubernetes API, endpoint and any additional Kubernetes metadata. + */ + export interface Schema$MembershipEndpoint { + /** + * Optional. GKE-specific information. Only present if this Membership is a GKE cluster. + */ + gkeCluster?: Schema$GkeCluster; + /** + * Output only. Useful Kubernetes-specific metadata. + */ + kubernetesMetadata?: Schema$KubernetesMetadata; + /** + * Optional. The in-cluster Kubernetes Resources that should be applied for a correctly registered cluster, in the steady state. These resources: * Ensure that the cluster is exclusively registered to one and only one Hub Membership. * Propagate Workload Pool Information available in the Membership Authority field. * Ensure proper initial configuration of default Hub Features. + */ + kubernetesResource?: Schema$KubernetesResource; + } + /** + * State of the Membership resource. + */ + export interface Schema$MembershipState { + /** + * Output only. The current state of the Membership resource. + */ + code?: string | null; + /** + * This field is never set by the Hub Service. + */ + description?: string | null; + /** + * This field is never set by the Hub Service. + */ + updateTime?: string | null; + } + /** + * This resource represents a long-running operation that is the result of a network API call. + */ + export interface Schema$Operation { + /** + * 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?: boolean | null; + /** + * The error result of the operation in case of failure or cancellation. + */ + error?: Schema$GoogleRpcStatus; + /** + * 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?: {[key: string]: any} | null; + /** + * 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 | null; + /** + * The normal response of the operation in case of success. 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?: {[key: string]: any} | null; + } + /** + * Represents the metadata of the long-running operation. + */ + export interface Schema$OperationMetadata { + /** + * Output only. API version used to start the operation. + */ + apiVersion?: string | null; + /** + * 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`. + */ + cancelRequested?: boolean | null; + /** + * Output only. The time the operation was created. + */ + createTime?: string | null; + /** + * Output only. The time the operation finished running. + */ + endTime?: string | null; + /** + * Output only. Human-readable status of the operation, if any. + */ + statusDetail?: string | null; + /** + * Output only. Server-defined resource path for the target of the operation. + */ + target?: string | null; + /** + * Output only. Name of the verb executed by the operation. + */ + verb?: string | null; + } + /** + * An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] \}, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", \} \} ], "etag": "BwWWja0YfJA=", "version": 3 \} **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/). + */ + export interface Schema$Policy { + /** + * Specifies cloud audit logging configuration for this policy. + */ + auditConfigs?: Schema$AuditConfig[]; + /** + * Associates a list of `members` to a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one member. + */ + bindings?: Schema$Binding[]; + /** + * `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. + */ + etag?: string | null; + /** + * Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + */ + version?: number | null; + } + /** + * ResourceManifest represents a single Kubernetes resource to be applied to the cluster. + */ + export interface Schema$ResourceManifest { + /** + * Whether the resource provided in the manifest is `cluster_scoped`. If unset, the manifest is assumed to be namespace scoped. This field is used for REST mapping when applying the resource in a cluster. + */ + clusterScoped?: boolean | null; + /** + * YAML manifest of the resource. + */ + manifest?: string | null; + } + /** + * ResourceOptions represent options for Kubernetes resource generation. + */ + export interface Schema$ResourceOptions { + /** + * Optional. The Connect agent version to use for connect_resources. Defaults to the latest GKE Connect version. The version must be a currently supported version, obsolete versions will be rejected. + */ + connectVersion?: string | null; + /** + * Optional. Use `apiextensions/v1beta1` instead of `apiextensions/v1` for CustomResourceDefinition resources. This option should be set for clusters with Kubernetes apiserver versions <1.16. + */ + v1beta1Crd?: boolean | null; + } + /** + * Request message for `SetIamPolicy` method. + */ + export interface Schema$SetIamPolicyRequest { + /** + * REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them. + */ + policy?: Schema$Policy; + /** + * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used: `paths: "bindings, etag"` + */ + updateMask?: string | null; + } + /** + * Request message for `TestIamPermissions` method. + */ + export interface Schema$TestIamPermissionsRequest { + /** + * The set of permissions to check for the `resource`. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + */ + permissions?: string[] | null; + } + /** + * Response message for `TestIamPermissions` method. + */ + export interface Schema$TestIamPermissionsResponse { + /** + * A subset of `TestPermissionsRequest.permissions` that the caller is allowed. + */ + permissions?: string[] | null; + } + /** + * TypeMeta is the type information needed for content unmarshalling of Kubernetes resources in the manifest. + */ + export interface Schema$TypeMeta { + /** + * APIVersion of the resource (e.g. v1). + */ + apiVersion?: string | null; + /** + * Kind of the resource (e.g. Deployment). + */ + kind?: string | null; + } + /** + * The response of exclusivity artifacts validation result status. + */ + export interface Schema$ValidateExclusivityResponse { + /** + * The validation result. * `OK` means that exclusivity is validated, assuming the manifest produced by GenerateExclusivityManifest is successfully applied. * `ALREADY_EXISTS` means that the Membership CRD is already owned by another Hub. See `status.message` for more information. + */ + status?: Schema$GoogleRpcStatus; + } + + export class Resource$Projects { + context: APIRequestContext; + locations: Resource$Projects$Locations; + constructor(context: APIRequestContext) { + this.context = context; + this.locations = new Resource$Projects$Locations(this.context); + } + } + + export class Resource$Projects$Locations { + context: APIRequestContext; + memberships: Resource$Projects$Locations$Memberships; + operations: Resource$Projects$Locations$Operations; + constructor(context: APIRequestContext) { + this.context = context; + this.memberships = new Resource$Projects$Locations$Memberships( + this.context + ); + this.operations = new Resource$Projects$Locations$Operations( + this.context + ); + } + + /** + * Gets information about a location. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.get({ + * // Resource name for the location. + * name: 'projects/my-project/locations/my-location', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "displayName": "my_displayName", + * // "labels": {}, + * // "locationId": "my_locationId", + * // "metadata": {}, + * // "name": "my_name" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Projects$Locations$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Projects$Locations$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Lists information about the supported locations for this service. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.list({ + * // 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). + * filter: 'placeholder-value', + * // The resource that owns the locations collection, if applicable. + * name: 'projects/my-project', + * // The maximum number of results to return. If not set, the service will select a default. + * pageSize: 'placeholder-value', + * // A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. + * pageToken: 'placeholder-value', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "locations": [], + * // "nextPageToken": "my_nextPageToken" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Projects$Locations$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Projects$Locations$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$List, + callback: BodyResponseCallback + ): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Locations$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}/locations').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Locations$Get + extends StandardParameters { + /** + * Resource name for the location. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$List + extends StandardParameters { + /** + * 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). + */ + filter?: string; + /** + * The resource that owns the locations collection, if applicable. + */ + name?: string; + /** + * The maximum number of results to return. If not set, the service will select a default. + */ + pageSize?: number; + /** + * A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. + */ + pageToken?: string; + } + + export class Resource$Projects$Locations$Memberships { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Adds a new Membership. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.memberships.create({ + * // Required. Client chosen ID for the membership. `membership_id` must be a valid RFC 1123 compliant DNS label: 1. At most 63 characters in length 2. It must consist of lower case alphanumeric characters or `-` 3. It must start and end with an alphanumeric character Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters. + * membershipId: 'placeholder-value', + * // Required. The parent (project and location) where the Memberships will be created. Specified in the format `projects/x/locations/x`. + * parent: 'projects/my-project/locations/my-location', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "authority": {}, + * // "createTime": "my_createTime", + * // "deleteTime": "my_deleteTime", + * // "description": "my_description", + * // "endpoint": {}, + * // "externalId": "my_externalId", + * // "infrastructureType": "my_infrastructureType", + * // "labels": {}, + * // "lastConnectionTime": "my_lastConnectionTime", + * // "name": "my_name", + * // "state": {}, + * // "uniqueId": "my_uniqueId", + * // "updateTime": "my_updateTime" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + create( + params: Params$Resource$Projects$Locations$Memberships$Create, + options: StreamMethodOptions + ): GaxiosPromise; + create( + params?: Params$Resource$Projects$Locations$Memberships$Create, + options?: MethodOptions + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Locations$Memberships$Create, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Locations$Memberships$Create, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Locations$Memberships$Create, + callback: BodyResponseCallback + ): void; + create(callback: BodyResponseCallback): void; + create( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Memberships$Create + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Memberships$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Memberships$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+parent}/memberships').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Removes a Membership. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.memberships.delete({ + * // Required. The Membership resource name in the format `projects/x/locations/x/memberships/x`. + * name: 'projects/my-project/locations/my-location/memberships/my-membership', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + delete( + params: Params$Resource$Projects$Locations$Memberships$Delete, + options: StreamMethodOptions + ): GaxiosPromise; + delete( + params?: Params$Resource$Projects$Locations$Memberships$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Locations$Memberships$Delete, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Memberships$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Memberships$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Memberships$Delete + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Memberships$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Memberships$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Generates the manifest for deployment of the GKE connect agent. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.memberships.generateConnectManifest( + * { + * // Do not set. + * 'connectAgent.name': 'placeholder-value', + * // Optional. Namespace for GKE Connect agent resources. Defaults to `gke-connect`. The Connect Agent is authorized automatically when run in the default namespace. Otherwise, explicit authorization must be granted with an additional IAM binding. + * 'connectAgent.namespace': 'placeholder-value', + * // Optional. URI of a proxy if connectivity from the agent to gkeconnect.googleapis.com requires the use of a proxy. Format must be in the form `http(s)://{proxy_address\}`, depending on the HTTP/HTTPS protocol supported by the proxy. This will direct the connect agent's outbound traffic through a HTTP(S) proxy. + * 'connectAgent.proxy': 'placeholder-value', + * // Optional. The image pull secret content for the registry, if not public. + * imagePullSecretContent: 'placeholder-value', + * // Optional. If true, generate the resources for upgrade only. Some resources generated only for installation (e.g. secrets) will be excluded. + * isUpgrade: 'placeholder-value', + * // Required. The Membership resource name the Agent will associate with, in the format `projects/x/locations/x/memberships/x`. + * name: + * 'projects/my-project/locations/my-location/memberships/my-membership', + * // Optional. The registry to fetch the connect agent image from. Defaults to gcr.io/gkeconnect. + * registry: 'placeholder-value', + * // Optional. The Connect agent version to use. Defaults to the most current version. + * version: 'placeholder-value', + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "manifest": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + generateConnectManifest( + params: Params$Resource$Projects$Locations$Memberships$Generateconnectmanifest, + options: StreamMethodOptions + ): GaxiosPromise; + generateConnectManifest( + params?: Params$Resource$Projects$Locations$Memberships$Generateconnectmanifest, + options?: MethodOptions + ): GaxiosPromise; + generateConnectManifest( + params: Params$Resource$Projects$Locations$Memberships$Generateconnectmanifest, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + generateConnectManifest( + params: Params$Resource$Projects$Locations$Memberships$Generateconnectmanifest, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + generateConnectManifest( + params: Params$Resource$Projects$Locations$Memberships$Generateconnectmanifest, + callback: BodyResponseCallback + ): void; + generateConnectManifest( + callback: BodyResponseCallback + ): void; + generateConnectManifest( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Memberships$Generateconnectmanifest + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Memberships$Generateconnectmanifest; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Memberships$Generateconnectmanifest; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}:generateConnectManifest').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * GenerateExclusivityManifest generates the manifests to update the exclusivity artifacts in the cluster if needed. Exclusivity artifacts include the Membership custom resource definition (CRD) and the singleton Membership custom resource (CR). Combined with ValidateExclusivity, exclusivity artifacts guarantee that a Kubernetes cluster is only registered to a single GKE Hub. The Membership CRD is versioned, and may require conversion when the GKE Hub API server begins serving a newer version of the CRD and corresponding CR. The response will be the converted CRD and CR if there are any differences between the versions. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.memberships.generateExclusivityManifest( + * { + * // Optional. The YAML manifest of the membership CRD retrieved by `kubectl get customresourcedefinitions membership`. Leave empty if the resource does not exist. + * crdManifest: 'placeholder-value', + * // Optional. The YAML manifest of the membership CR retrieved by `kubectl get memberships membership`. Leave empty if the resource does not exist. + * crManifest: 'placeholder-value', + * // Required. The Membership resource name in the format `projects/x/locations/x/memberships/x`. + * name: + * 'projects/my-project/locations/my-location/memberships/my-membership', + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "crManifest": "my_crManifest", + * // "crdManifest": "my_crdManifest" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + generateExclusivityManifest( + params: Params$Resource$Projects$Locations$Memberships$Generateexclusivitymanifest, + options: StreamMethodOptions + ): GaxiosPromise; + generateExclusivityManifest( + params?: Params$Resource$Projects$Locations$Memberships$Generateexclusivitymanifest, + options?: MethodOptions + ): GaxiosPromise; + generateExclusivityManifest( + params: Params$Resource$Projects$Locations$Memberships$Generateexclusivitymanifest, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + generateExclusivityManifest( + params: Params$Resource$Projects$Locations$Memberships$Generateexclusivitymanifest, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + generateExclusivityManifest( + params: Params$Resource$Projects$Locations$Memberships$Generateexclusivitymanifest, + callback: BodyResponseCallback + ): void; + generateExclusivityManifest( + callback: BodyResponseCallback + ): void; + generateExclusivityManifest( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Memberships$Generateexclusivitymanifest + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Memberships$Generateexclusivitymanifest; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Memberships$Generateexclusivitymanifest; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + '/v1beta1/{+name}:generateExclusivityManifest' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Gets the details of a Membership. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.memberships.get({ + * // Required. The Membership resource name in the format `projects/x/locations/x/memberships/x`. + * name: 'projects/my-project/locations/my-location/memberships/my-membership', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "authority": {}, + * // "createTime": "my_createTime", + * // "deleteTime": "my_deleteTime", + * // "description": "my_description", + * // "endpoint": {}, + * // "externalId": "my_externalId", + * // "infrastructureType": "my_infrastructureType", + * // "labels": {}, + * // "lastConnectionTime": "my_lastConnectionTime", + * // "name": "my_name", + * // "state": {}, + * // "uniqueId": "my_uniqueId", + * // "updateTime": "my_updateTime" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Projects$Locations$Memberships$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Projects$Locations$Memberships$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Memberships$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Memberships$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Memberships$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Memberships$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Memberships$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Memberships$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.memberships.getIamPolicy({ + * // Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + * 'options.requestedPolicyVersion': 'placeholder-value', + * // REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. + * resource: + * 'projects/my-project/locations/my-location/memberships/my-membership', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "auditConfigs": [], + * // "bindings": [], + * // "etag": "my_etag", + * // "version": 0 + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + getIamPolicy( + params: Params$Resource$Projects$Locations$Memberships$Getiampolicy, + options: StreamMethodOptions + ): GaxiosPromise; + getIamPolicy( + params?: Params$Resource$Projects$Locations$Memberships$Getiampolicy, + options?: MethodOptions + ): GaxiosPromise; + getIamPolicy( + params: Params$Resource$Projects$Locations$Memberships$Getiampolicy, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getIamPolicy( + params: Params$Resource$Projects$Locations$Memberships$Getiampolicy, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getIamPolicy( + params: Params$Resource$Projects$Locations$Memberships$Getiampolicy, + callback: BodyResponseCallback + ): void; + getIamPolicy(callback: BodyResponseCallback): void; + getIamPolicy( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Memberships$Getiampolicy + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Memberships$Getiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Memberships$Getiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+resource}:getIamPolicy').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Lists Memberships in a given project and location. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.memberships.list({ + * // Optional. Lists Memberships that match the filter expression, following the syntax outlined in https://google.aip.dev/160. Examples: - Name is `bar` in project `foo-proj` and location `global`: name = "projects/foo-proj/locations/global/membership/bar" - Memberships that have a label called `foo`: labels.foo:* - Memberships that have a label called `foo` whose value is `bar`: labels.foo = bar - Memberships in the CREATING state: state = CREATING + * filter: 'placeholder-value', + * // Optional. One or more fields to compare and use to sort the output. See https://google.aip.dev/132#ordering. + * orderBy: 'placeholder-value', + * // Optional. When requesting a 'page' of resources, `page_size` specifies number of resources to return. If unspecified or set to 0, all resources will be returned. + * pageSize: 'placeholder-value', + * // Optional. Token returned by previous call to `ListMemberships` which specifies the position in the list from where to continue listing the resources. + * pageToken: 'placeholder-value', + * // Required. The parent (project and location) where the Memberships will be listed. Specified in the format `projects/x/locations/x`. + * parent: 'projects/my-project/locations/my-location', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "nextPageToken": "my_nextPageToken", + * // "resources": [], + * // "unreachable": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Projects$Locations$Memberships$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Projects$Locations$Memberships$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$Memberships$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Memberships$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Memberships$List, + callback: BodyResponseCallback + ): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Memberships$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Memberships$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Memberships$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+parent}/memberships').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Updates an existing Membership. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.memberships.patch({ + * // Required. The membership resource name in the format: `projects/[project_id]/locations/global/memberships/[membership_id]` + * name: 'projects/my-project/locations/my-location/memberships/my-membership', + * // Required. Mask of fields to update. At least one field path must be specified in this mask. + * updateMask: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "authority": {}, + * // "createTime": "my_createTime", + * // "deleteTime": "my_deleteTime", + * // "description": "my_description", + * // "endpoint": {}, + * // "externalId": "my_externalId", + * // "infrastructureType": "my_infrastructureType", + * // "labels": {}, + * // "lastConnectionTime": "my_lastConnectionTime", + * // "name": "my_name", + * // "state": {}, + * // "uniqueId": "my_uniqueId", + * // "updateTime": "my_updateTime" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + patch( + params: Params$Resource$Projects$Locations$Memberships$Patch, + options: StreamMethodOptions + ): GaxiosPromise; + patch( + params?: Params$Resource$Projects$Locations$Memberships$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Locations$Memberships$Patch, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Locations$Memberships$Patch, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Locations$Memberships$Patch, + callback: BodyResponseCallback + ): void; + patch(callback: BodyResponseCallback): void; + patch( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Memberships$Patch + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Memberships$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Memberships$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.memberships.setIamPolicy({ + * // REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. + * resource: + * 'projects/my-project/locations/my-location/memberships/my-membership', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "policy": {}, + * // "updateMask": "my_updateMask" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "auditConfigs": [], + * // "bindings": [], + * // "etag": "my_etag", + * // "version": 0 + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + setIamPolicy( + params: Params$Resource$Projects$Locations$Memberships$Setiampolicy, + options: StreamMethodOptions + ): GaxiosPromise; + setIamPolicy( + params?: Params$Resource$Projects$Locations$Memberships$Setiampolicy, + options?: MethodOptions + ): GaxiosPromise; + setIamPolicy( + params: Params$Resource$Projects$Locations$Memberships$Setiampolicy, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + setIamPolicy( + params: Params$Resource$Projects$Locations$Memberships$Setiampolicy, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + setIamPolicy( + params: Params$Resource$Projects$Locations$Memberships$Setiampolicy, + callback: BodyResponseCallback + ): void; + setIamPolicy(callback: BodyResponseCallback): void; + setIamPolicy( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Memberships$Setiampolicy + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Memberships$Setiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Memberships$Setiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+resource}:setIamPolicy').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.memberships.testIamPermissions({ + * // REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. + * resource: + * 'projects/my-project/locations/my-location/memberships/my-membership', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "permissions": [] + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "permissions": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + testIamPermissions( + params: Params$Resource$Projects$Locations$Memberships$Testiampermissions, + options: StreamMethodOptions + ): GaxiosPromise; + testIamPermissions( + params?: Params$Resource$Projects$Locations$Memberships$Testiampermissions, + options?: MethodOptions + ): GaxiosPromise; + testIamPermissions( + params: Params$Resource$Projects$Locations$Memberships$Testiampermissions, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + testIamPermissions( + params: Params$Resource$Projects$Locations$Memberships$Testiampermissions, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + testIamPermissions( + params: Params$Resource$Projects$Locations$Memberships$Testiampermissions, + callback: BodyResponseCallback + ): void; + testIamPermissions( + callback: BodyResponseCallback + ): void; + testIamPermissions( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Memberships$Testiampermissions + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Memberships$Testiampermissions; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Memberships$Testiampermissions; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+resource}:testIamPermissions').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * ValidateExclusivity validates the state of exclusivity in the cluster. The validation does not depend on an existing Hub membership resource. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.memberships.validateExclusivity({ + * // Optional. The YAML of the membership CR in the cluster. Empty if the membership CR does not exist. + * crManifest: 'placeholder-value', + * // Required. The intended membership name under the `parent`. This method only does validation in anticipation of a CreateMembership call with the same name. + * intendedMembership: 'placeholder-value', + * // Required. The parent (project and location) where the Memberships will be created. Specified in the format `projects/x/locations/x`. + * parent: 'projects/my-project/locations/my-location', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "status": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + validateExclusivity( + params: Params$Resource$Projects$Locations$Memberships$Validateexclusivity, + options: StreamMethodOptions + ): GaxiosPromise; + validateExclusivity( + params?: Params$Resource$Projects$Locations$Memberships$Validateexclusivity, + options?: MethodOptions + ): GaxiosPromise; + validateExclusivity( + params: Params$Resource$Projects$Locations$Memberships$Validateexclusivity, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + validateExclusivity( + params: Params$Resource$Projects$Locations$Memberships$Validateexclusivity, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + validateExclusivity( + params: Params$Resource$Projects$Locations$Memberships$Validateexclusivity, + callback: BodyResponseCallback + ): void; + validateExclusivity( + callback: BodyResponseCallback + ): void; + validateExclusivity( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Memberships$Validateexclusivity + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Memberships$Validateexclusivity; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Memberships$Validateexclusivity; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + '/v1beta1/{+parent}/memberships:validateExclusivity' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Locations$Memberships$Create + extends StandardParameters { + /** + * Required. Client chosen ID for the membership. `membership_id` must be a valid RFC 1123 compliant DNS label: 1. At most 63 characters in length 2. It must consist of lower case alphanumeric characters or `-` 3. It must start and end with an alphanumeric character Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters. + */ + membershipId?: string; + /** + * Required. The parent (project and location) where the Memberships will be created. Specified in the format `projects/x/locations/x`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Membership; + } + export interface Params$Resource$Projects$Locations$Memberships$Delete + extends StandardParameters { + /** + * Required. The Membership resource name in the format `projects/x/locations/x/memberships/x`. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Memberships$Generateconnectmanifest + extends StandardParameters { + /** + * Do not set. + */ + 'connectAgent.name'?: string; + /** + * Optional. Namespace for GKE Connect agent resources. Defaults to `gke-connect`. The Connect Agent is authorized automatically when run in the default namespace. Otherwise, explicit authorization must be granted with an additional IAM binding. + */ + 'connectAgent.namespace'?: string; + /** + * Optional. URI of a proxy if connectivity from the agent to gkeconnect.googleapis.com requires the use of a proxy. Format must be in the form `http(s)://{proxy_address\}`, depending on the HTTP/HTTPS protocol supported by the proxy. This will direct the connect agent's outbound traffic through a HTTP(S) proxy. + */ + 'connectAgent.proxy'?: string; + /** + * Optional. The image pull secret content for the registry, if not public. + */ + imagePullSecretContent?: string; + /** + * Optional. If true, generate the resources for upgrade only. Some resources generated only for installation (e.g. secrets) will be excluded. + */ + isUpgrade?: boolean; + /** + * Required. The Membership resource name the Agent will associate with, in the format `projects/x/locations/x/memberships/x`. + */ + name?: string; + /** + * Optional. The registry to fetch the connect agent image from. Defaults to gcr.io/gkeconnect. + */ + registry?: string; + /** + * Optional. The Connect agent version to use. Defaults to the most current version. + */ + version?: string; + } + export interface Params$Resource$Projects$Locations$Memberships$Generateexclusivitymanifest + extends StandardParameters { + /** + * Optional. The YAML manifest of the membership CRD retrieved by `kubectl get customresourcedefinitions membership`. Leave empty if the resource does not exist. + */ + crdManifest?: string; + /** + * Optional. The YAML manifest of the membership CR retrieved by `kubectl get memberships membership`. Leave empty if the resource does not exist. + */ + crManifest?: string; + /** + * Required. The Membership resource name in the format `projects/x/locations/x/memberships/x`. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Memberships$Get + extends StandardParameters { + /** + * Required. The Membership resource name in the format `projects/x/locations/x/memberships/x`. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Memberships$Getiampolicy + extends StandardParameters { + /** + * Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + */ + 'options.requestedPolicyVersion'?: number; + /** + * REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. + */ + resource?: string; + } + export interface Params$Resource$Projects$Locations$Memberships$List + extends StandardParameters { + /** + * Optional. Lists Memberships that match the filter expression, following the syntax outlined in https://google.aip.dev/160. Examples: - Name is `bar` in project `foo-proj` and location `global`: name = "projects/foo-proj/locations/global/membership/bar" - Memberships that have a label called `foo`: labels.foo:* - Memberships that have a label called `foo` whose value is `bar`: labels.foo = bar - Memberships in the CREATING state: state = CREATING + */ + filter?: string; + /** + * Optional. One or more fields to compare and use to sort the output. See https://google.aip.dev/132#ordering. + */ + orderBy?: string; + /** + * Optional. When requesting a 'page' of resources, `page_size` specifies number of resources to return. If unspecified or set to 0, all resources will be returned. + */ + pageSize?: number; + /** + * Optional. Token returned by previous call to `ListMemberships` which specifies the position in the list from where to continue listing the resources. + */ + pageToken?: string; + /** + * Required. The parent (project and location) where the Memberships will be listed. Specified in the format `projects/x/locations/x`. + */ + parent?: string; + } + export interface Params$Resource$Projects$Locations$Memberships$Patch + extends StandardParameters { + /** + * Required. The membership resource name in the format: `projects/[project_id]/locations/global/memberships/[membership_id]` + */ + name?: string; + /** + * Required. Mask of fields to update. At least one field path must be specified in this mask. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Membership; + } + export interface Params$Resource$Projects$Locations$Memberships$Setiampolicy + extends StandardParameters { + /** + * REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$SetIamPolicyRequest; + } + export interface Params$Resource$Projects$Locations$Memberships$Testiampermissions + extends StandardParameters { + /** + * REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$TestIamPermissionsRequest; + } + export interface Params$Resource$Projects$Locations$Memberships$Validateexclusivity + extends StandardParameters { + /** + * Optional. The YAML of the membership CR in the cluster. Empty if the membership CR does not exist. + */ + crManifest?: string; + /** + * Required. The intended membership name under the `parent`. This method only does validation in anticipation of a CreateMembership call with the same name. + */ + intendedMembership?: string; + /** + * Required. The parent (project and location) where the Memberships will be created. Specified in the format `projects/x/locations/x`. + */ + parent?: string; + } + + export class Resource$Projects$Locations$Operations { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * 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`. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.operations.cancel({ + * // The name of the operation resource to be cancelled. + * name: 'projects/my-project/locations/my-location/operations/my-operation', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // {} + * }, + * }); + * console.log(res.data); + * + * // Example response + * // {} + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + cancel( + params: Params$Resource$Projects$Locations$Operations$Cancel, + options: StreamMethodOptions + ): GaxiosPromise; + cancel( + params?: Params$Resource$Projects$Locations$Operations$Cancel, + options?: MethodOptions + ): GaxiosPromise; + cancel( + params: Params$Resource$Projects$Locations$Operations$Cancel, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + cancel( + params: Params$Resource$Projects$Locations$Operations$Cancel, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + cancel( + params: Params$Resource$Projects$Locations$Operations$Cancel, + callback: BodyResponseCallback + ): void; + cancel(callback: BodyResponseCallback): void; + cancel( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Operations$Cancel + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Operations$Cancel; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Operations$Cancel; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}:cancel').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * 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`. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.operations.delete({ + * // The name of the operation resource to be deleted. + * name: 'projects/my-project/locations/my-location/operations/my-operation', + * }); + * console.log(res.data); + * + * // Example response + * // {} + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + delete( + params: Params$Resource$Projects$Locations$Operations$Delete, + options: StreamMethodOptions + ): GaxiosPromise; + delete( + params?: Params$Resource$Projects$Locations$Operations$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Locations$Operations$Delete, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Operations$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Operations$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Operations$Delete + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Operations$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Operations$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * 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. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.operations.get({ + * // The name of the operation resource. + * name: 'projects/my-project/locations/my-location/operations/my-operation', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Projects$Locations$Operations$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Projects$Locations$Operations$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Operations$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Operations$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Operations$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Operations$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Operations$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Operations$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/x/operations`. To override the binding, API services can add a binding such as `"/v1/{name=users/x\}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/gkehub.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const gkehub = google.gkehub('v1beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await gkehub.projects.locations.operations.list({ + * // The standard list filter. + * filter: 'placeholder-value', + * // The name of the operation's parent resource. + * name: 'projects/my-project/locations/my-location', + * // The standard list page size. + * pageSize: 'placeholder-value', + * // The standard list page token. + * pageToken: 'placeholder-value', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "nextPageToken": "my_nextPageToken", + * // "operations": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Projects$Locations$Operations$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Projects$Locations$Operations$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$Operations$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Operations$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Operations$List, + callback: BodyResponseCallback + ): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Operations$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Operations$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Operations$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://gkehub.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}/operations').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Locations$Operations$Cancel + extends StandardParameters { + /** + * The name of the operation resource to be cancelled. + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$CancelOperationRequest; + } + export interface Params$Resource$Projects$Locations$Operations$Delete + extends StandardParameters { + /** + * The name of the operation resource to be deleted. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Operations$Get + extends StandardParameters { + /** + * The name of the operation resource. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Operations$List + extends StandardParameters { + /** + * The standard list filter. + */ + filter?: string; + /** + * The name of the operation's parent resource. + */ + name?: string; + /** + * The standard list page size. + */ + pageSize?: number; + /** + * The standard list page token. + */ + pageToken?: string; + } +} diff --git a/src/apis/gkehub/webpack.config.js b/src/apis/gkehub/webpack.config.js new file mode 100644 index 00000000000..101285e35d3 --- /dev/null +++ b/src/apis/gkehub/webpack.config.js @@ -0,0 +1,79 @@ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Use `npm run webpack` to produce Webpack bundle for this library. + +const path = require('path'); + +module.exports = { + entry: './index.ts', + resolve: { + extensions: ['.ts', '.js', '.json'], + fallback: { + crypto: false, + child_process: false, + fs: false, + http2: false, + buffer: 'browserify', + process: false, + os: false, + querystring: false, + path: false, + stream: 'stream-browserify', + url: false, + util: false, + zlib: false, + }, + }, + output: { + library: 'Gkehub', + filename: 'gkehub.min.js', + path: path.resolve(__dirname, 'dist'), + }, + module: { + rules: [ + { + test: /node_modules[\\/]google-auth-library[\\/]src[\\/]crypto[\\/]node[\\/]crypto/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]https-proxy-agent[\\/]/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]gcp-metadata[\\/]/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]gtoken[\\/]/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]pkginfo[\\/]/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]semver[\\/]/, + use: 'null-loader', + }, + { + test: /\.ts$/, + use: 'ts-loader', + exclude: /node_modules/, + }, + ], + }, + mode: 'production', + plugins: [], +}; diff --git a/src/apis/healthcare/v1.ts b/src/apis/healthcare/v1.ts index 8d82d6f4dfc..d50f27e9f92 100644 --- a/src/apis/healthcare/v1.ts +++ b/src/apis/healthcare/v1.ts @@ -899,7 +899,7 @@ export namespace healthcare_v1 { */ export interface Schema$Hl7V2NotificationConfig { /** - * Restricts notifications sent for messages matching a filter. If this is empty, all messages are matched. The following syntax is available: * A string field value can be written as text inside quotation marks, for example `"query text"`. The only valid relational operation for text fields is equality (`=`), where text is searched within the field, rather than having the field be equal to the text. For example, `"Comment = great"` returns messages with `great` in the comment field. * A number field value can be written as an integer, a decimal, or an exponential. The valid relational operators for number fields are the equality operator (`=`), along with the less than/greater than operators (`<`, `<=`, `\>`, `\>=`). Note that there is no inequality (`!=`) operator. You can prepend the `NOT` operator to an expression to negate it. * A date field value must be written in `yyyy-mm-dd` form. Fields with date and time use the RFC3339 time format. Leading zeros are required for one-digit months and days. The valid relational operators for date fields are the equality operator (`=`) , along with the less than/greater than operators (`<`, `<=`, `\>`, `\>=`). Note that there is no inequality (`!=`) operator. You can prepend the `NOT` operator to an expression to negate it. * Multiple field query expressions can be combined in one query by adding `AND` or `OR` operators between the expressions. If a boolean operator appears within a quoted string, it is not treated as special, it's just another part of the character string to be matched. You can prepend the `NOT` operator to an expression to negate it. The following fields and functions are available for filtering: * `message_type`, from the MSH-9.1 field. For example, `NOT message_type = "ADT"`. * `send_date` or `sendDate`, the YYYY-MM-DD date the message was sent in the dataset's time_zone, from the MSH-7 segment. For example, `send_date < "2017-01-02"`. * `send_time`, the timestamp when the message was sent, using the RFC3339 time format for comparisons, from the MSH-7 segment. For example, `send_time < "2017-01-02T00:00:00-05:00"`. * `send_facility`, the care center that the message came from, from the MSH-4 segment. For example, `send_facility = "ABC"`. * `PatientId(value, type)`, which matches if the message lists a patient having an ID of the given value and type in the PID-2, PID-3, or PID-4 segments. For example, `PatientId("123456", "MRN")`. * `labels.x`, a string value of the label with key `x` as set using the Message.labels map. For example, `labels."priority"="high"`. The operator `:*` can be used to assert the existence of a label. For example, `labels."priority":*`. + * Restricts notifications sent for messages matching a filter. If this is empty, all messages are matched. The following syntax is available: * A string field value can be written as text inside quotation marks, for example `"query text"`. The only valid relational operation for text fields is equality (`=`), where text is searched within the field, rather than having the field be equal to the text. For example, `"Comment = great"` returns messages with `great` in the comment field. * A number field value can be written as an integer, a decimal, or an exponential. The valid relational operators for number fields are the equality operator (`=`), along with the less than/greater than operators (`<`, `<=`, `\>`, `\>=`). Note that there is no inequality (`!=`) operator. You can prepend the `NOT` operator to an expression to negate it. * A date field value must be written in `yyyy-mm-dd` form. Fields with date and time use the RFC3339 time format. Leading zeros are required for one-digit months and days. The valid relational operators for date fields are the equality operator (`=`) , along with the less than/greater than operators (`<`, `<=`, `\>`, `\>=`). Note that there is no inequality (`!=`) operator. You can prepend the `NOT` operator to an expression to negate it. * Multiple field query expressions can be combined in one query by adding `AND` or `OR` operators between the expressions. If a boolean operator appears within a quoted string, it is not treated as special, it's just another part of the character string to be matched. You can prepend the `NOT` operator to an expression to negate it. The following fields and functions are available for filtering: * `message_type`, from the MSH-9.1 field. For example, `NOT message_type = "ADT"`. * `send_date` or `sendDate`, the YYYY-MM-DD date the message was sent in the dataset's time_zone, from the MSH-7 segment. For example, `send_date < "2017-01-02"`. * `send_time`, the timestamp when the message was sent, using the RFC3339 time format for comparisons, from the MSH-7 segment. For example, `send_time < "2017-01-02T00:00:00-05:00"`. * `create_time`, the timestamp when the message was created in the HL7v2 store. Use the RFC3339 time format for comparisons. For example, `create_time < "2017-01-02T00:00:00-05:00"`. * `send_facility`, the care center that the message came from, from the MSH-4 segment. For example, `send_facility = "ABC"`. * `PatientId(value, type)`, which matches if the message lists a patient having an ID of the given value and type in the PID-2, PID-3, or PID-4 segments. For example, `PatientId("123456", "MRN")`. * `labels.x`, a string value of the label with key `x` as set using the Message.labels map. For example, `labels."priority"="high"`. The operator `:*` can be used to assert the existence of a label. For example, `labels."priority":*`. */ filter?: string | null; /** @@ -19287,7 +19287,7 @@ export namespace healthcare_v1 { * // Do the magic * const res = await healthcare.projects.locations.datasets.hl7V2Stores.messages.list( * { - * // Restricts messages returned to those matching a filter. The following syntax is available: * A string field value can be written as text inside quotation marks, for example `"query text"`. The only valid relational operation for text fields is equality (`=`), where text is searched within the field, rather than having the field be equal to the text. For example, `"Comment = great"` returns messages with `great` in the comment field. * A number field value can be written as an integer, a decimal, or an exponential. The valid relational operators for number fields are the equality operator (`=`), along with the less than/greater than operators (`<`, `<=`, `\>`, `\>=`). Note that there is no inequality (`!=`) operator. You can prepend the `NOT` operator to an expression to negate it. * A date field value must be written in `yyyy-mm-dd` form. Fields with date and time use the RFC3339 time format. Leading zeros are required for one-digit months and days. The valid relational operators for date fields are the equality operator (`=`) , along with the less than/greater than operators (`<`, `<=`, `\>`, `\>=`). Note that there is no inequality (`!=`) operator. You can prepend the `NOT` operator to an expression to negate it. * Multiple field query expressions can be combined in one query by adding `AND` or `OR` operators between the expressions. If a boolean operator appears within a quoted string, it is not treated as special, it's just another part of the character string to be matched. You can prepend the `NOT` operator to an expression to negate it. Fields/functions available for filtering are: * `message_type`, from the MSH-9.1 field. For example, `NOT message_type = "ADT"`. * `send_date` or `sendDate`, the YYYY-MM-DD date the message was sent in the dataset's time_zone, from the MSH-7 segment. For example, `send_date < "2017-01-02"`. * `send_time`, the timestamp when the message was sent, using the RFC3339 time format for comparisons, from the MSH-7 segment. For example, `send_time < "2017-01-02T00:00:00-05:00"`. * `send_facility`, the care center that the message came from, from the MSH-4 segment. For example, `send_facility = "ABC"`. * `PatientId(value, type)`, which matches if the message lists a patient having an ID of the given value and type in the PID-2, PID-3, or PID-4 segments. For example, `PatientId("123456", "MRN")`. * `labels.x`, a string value of the label with key `x` as set using the Message.labels map. For example, `labels."priority"="high"`. The operator `:*` can be used to assert the existence of a label. For example, `labels."priority":*`. + * // Restricts messages returned to those matching a filter. The following syntax is available: * A string field value can be written as text inside quotation marks, for example `"query text"`. The only valid relational operation for text fields is equality (`=`), where text is searched within the field, rather than having the field be equal to the text. For example, `"Comment = great"` returns messages with `great` in the comment field. * A number field value can be written as an integer, a decimal, or an exponential. The valid relational operators for number fields are the equality operator (`=`), along with the less than/greater than operators (`<`, `<=`, `\>`, `\>=`). Note that there is no inequality (`!=`) operator. You can prepend the `NOT` operator to an expression to negate it. * A date field value must be written in `yyyy-mm-dd` form. Fields with date and time use the RFC3339 time format. Leading zeros are required for one-digit months and days. The valid relational operators for date fields are the equality operator (`=`) , along with the less than/greater than operators (`<`, `<=`, `\>`, `\>=`). Note that there is no inequality (`!=`) operator. You can prepend the `NOT` operator to an expression to negate it. * Multiple field query expressions can be combined in one query by adding `AND` or `OR` operators between the expressions. If a boolean operator appears within a quoted string, it is not treated as special, it's just another part of the character string to be matched. You can prepend the `NOT` operator to an expression to negate it. Fields/functions available for filtering are: * `message_type`, from the MSH-9.1 field. For example, `NOT message_type = "ADT"`. * `send_date` or `sendDate`, the YYYY-MM-DD date the message was sent in the dataset's time_zone, from the MSH-7 segment. For example, `send_date < "2017-01-02"`. * `send_time`, the timestamp when the message was sent, using the RFC3339 time format for comparisons, from the MSH-7 segment. For example, `send_time < "2017-01-02T00:00:00-05:00"`. * `create_time`, the timestamp when the message was created in the HL7v2 store. Use the RFC3339 time format for comparisons. For example, `create_time < "2017-01-02T00:00:00-05:00"`. * `send_facility`, the care center that the message came from, from the MSH-4 segment. For example, `send_facility = "ABC"`. * `PatientId(value, type)`, which matches if the message lists a patient having an ID of the given value and type in the PID-2, PID-3, or PID-4 segments. For example, `PatientId("123456", "MRN")`. * `labels.x`, a string value of the label with key `x` as set using the Message.labels map. For example, `labels."priority"="high"`. The operator `:*` can be used to assert the existence of a label. For example, `labels."priority":*`. * filter: 'placeholder-value', * // Orders messages returned by the specified order_by clause. Syntax: https://cloud.google.com/apis/design/design_patterns#sorting_order Fields available for ordering are: * `send_time` * orderBy: 'placeholder-value', @@ -19610,7 +19610,7 @@ export namespace healthcare_v1 { export interface Params$Resource$Projects$Locations$Datasets$Hl7v2stores$Messages$List extends StandardParameters { /** - * Restricts messages returned to those matching a filter. The following syntax is available: * A string field value can be written as text inside quotation marks, for example `"query text"`. The only valid relational operation for text fields is equality (`=`), where text is searched within the field, rather than having the field be equal to the text. For example, `"Comment = great"` returns messages with `great` in the comment field. * A number field value can be written as an integer, a decimal, or an exponential. The valid relational operators for number fields are the equality operator (`=`), along with the less than/greater than operators (`<`, `<=`, `\>`, `\>=`). Note that there is no inequality (`!=`) operator. You can prepend the `NOT` operator to an expression to negate it. * A date field value must be written in `yyyy-mm-dd` form. Fields with date and time use the RFC3339 time format. Leading zeros are required for one-digit months and days. The valid relational operators for date fields are the equality operator (`=`) , along with the less than/greater than operators (`<`, `<=`, `\>`, `\>=`). Note that there is no inequality (`!=`) operator. You can prepend the `NOT` operator to an expression to negate it. * Multiple field query expressions can be combined in one query by adding `AND` or `OR` operators between the expressions. If a boolean operator appears within a quoted string, it is not treated as special, it's just another part of the character string to be matched. You can prepend the `NOT` operator to an expression to negate it. Fields/functions available for filtering are: * `message_type`, from the MSH-9.1 field. For example, `NOT message_type = "ADT"`. * `send_date` or `sendDate`, the YYYY-MM-DD date the message was sent in the dataset's time_zone, from the MSH-7 segment. For example, `send_date < "2017-01-02"`. * `send_time`, the timestamp when the message was sent, using the RFC3339 time format for comparisons, from the MSH-7 segment. For example, `send_time < "2017-01-02T00:00:00-05:00"`. * `send_facility`, the care center that the message came from, from the MSH-4 segment. For example, `send_facility = "ABC"`. * `PatientId(value, type)`, which matches if the message lists a patient having an ID of the given value and type in the PID-2, PID-3, or PID-4 segments. For example, `PatientId("123456", "MRN")`. * `labels.x`, a string value of the label with key `x` as set using the Message.labels map. For example, `labels."priority"="high"`. The operator `:*` can be used to assert the existence of a label. For example, `labels."priority":*`. + * Restricts messages returned to those matching a filter. The following syntax is available: * A string field value can be written as text inside quotation marks, for example `"query text"`. The only valid relational operation for text fields is equality (`=`), where text is searched within the field, rather than having the field be equal to the text. For example, `"Comment = great"` returns messages with `great` in the comment field. * A number field value can be written as an integer, a decimal, or an exponential. The valid relational operators for number fields are the equality operator (`=`), along with the less than/greater than operators (`<`, `<=`, `\>`, `\>=`). Note that there is no inequality (`!=`) operator. You can prepend the `NOT` operator to an expression to negate it. * A date field value must be written in `yyyy-mm-dd` form. Fields with date and time use the RFC3339 time format. Leading zeros are required for one-digit months and days. The valid relational operators for date fields are the equality operator (`=`) , along with the less than/greater than operators (`<`, `<=`, `\>`, `\>=`). Note that there is no inequality (`!=`) operator. You can prepend the `NOT` operator to an expression to negate it. * Multiple field query expressions can be combined in one query by adding `AND` or `OR` operators between the expressions. If a boolean operator appears within a quoted string, it is not treated as special, it's just another part of the character string to be matched. You can prepend the `NOT` operator to an expression to negate it. Fields/functions available for filtering are: * `message_type`, from the MSH-9.1 field. For example, `NOT message_type = "ADT"`. * `send_date` or `sendDate`, the YYYY-MM-DD date the message was sent in the dataset's time_zone, from the MSH-7 segment. For example, `send_date < "2017-01-02"`. * `send_time`, the timestamp when the message was sent, using the RFC3339 time format for comparisons, from the MSH-7 segment. For example, `send_time < "2017-01-02T00:00:00-05:00"`. * `create_time`, the timestamp when the message was created in the HL7v2 store. Use the RFC3339 time format for comparisons. For example, `create_time < "2017-01-02T00:00:00-05:00"`. * `send_facility`, the care center that the message came from, from the MSH-4 segment. For example, `send_facility = "ABC"`. * `PatientId(value, type)`, which matches if the message lists a patient having an ID of the given value and type in the PID-2, PID-3, or PID-4 segments. For example, `PatientId("123456", "MRN")`. * `labels.x`, a string value of the label with key `x` as set using the Message.labels map. For example, `labels."priority"="high"`. The operator `:*` can be used to assert the existence of a label. For example, `labels."priority":*`. */ filter?: string; /** diff --git a/src/apis/healthcare/v1beta1.ts b/src/apis/healthcare/v1beta1.ts index 5545067328a..045c90a556f 100644 --- a/src/apis/healthcare/v1beta1.ts +++ b/src/apis/healthcare/v1beta1.ts @@ -1307,7 +1307,7 @@ export namespace healthcare_v1beta1 { */ export interface Schema$Hl7V2NotificationConfig { /** - * Restricts notifications sent for messages matching a filter. If this is empty, all messages are matched. The following syntax is available: * A string field value can be written as text inside quotation marks, for example `"query text"`. The only valid relational operation for text fields is equality (`=`), where text is searched within the field, rather than having the field be equal to the text. For example, `"Comment = great"` returns messages with `great` in the comment field. * A number field value can be written as an integer, a decimal, or an exponential. The valid relational operators for number fields are the equality operator (`=`), along with the less than/greater than operators (`<`, `<=`, `\>`, `\>=`). Note that there is no inequality (`!=`) operator. You can prepend the `NOT` operator to an expression to negate it. * A date field value must be written in `yyyy-mm-dd` form. Fields with date and time use the RFC3339 time format. Leading zeros are required for one-digit months and days. The valid relational operators for date fields are the equality operator (`=`) , along with the less than/greater than operators (`<`, `<=`, `\>`, `\>=`). Note that there is no inequality (`!=`) operator. You can prepend the `NOT` operator to an expression to negate it. * Multiple field query expressions can be combined in one query by adding `AND` or `OR` operators between the expressions. If a boolean operator appears within a quoted string, it is not treated as special, it's just another part of the character string to be matched. You can prepend the `NOT` operator to an expression to negate it. Fields/functions available for filtering are: * `message_type`, from the MSH-9.1 field. For example, `NOT message_type = "ADT"`. * `send_date` or `sendDate`, the YYYY-MM-DD date the message was sent in the dataset's time_zone, from the MSH-7 segment. For example, `send_date < "2017-01-02"`. * `send_time`, the timestamp when the message was sent, using the RFC3339 time format for comparisons, from the MSH-7 segment. For example, `send_time < "2017-01-02T00:00:00-05:00"`. * `send_facility`, the care center that the message came from, from the MSH-4 segment. For example, `send_facility = "ABC"`. * `PatientId(value, type)`, which matches if the message lists a patient having an ID of the given value and type in the PID-2, PID-3, or PID-4 segments. For example, `PatientId("123456", "MRN")`. * `labels.x`, a string value of the label with key `x` as set using the Message.labels map. For example, `labels."priority"="high"`. The operator `:*` can be used to assert the existence of a label. For example, `labels."priority":*`. + * Restricts notifications sent for messages matching a filter. If this is empty, all messages are matched. The following syntax is available: * A string field value can be written as text inside quotation marks, for example `"query text"`. The only valid relational operation for text fields is equality (`=`), where text is searched within the field, rather than having the field be equal to the text. For example, `"Comment = great"` returns messages with `great` in the comment field. * A number field value can be written as an integer, a decimal, or an exponential. The valid relational operators for number fields are the equality operator (`=`), along with the less than/greater than operators (`<`, `<=`, `\>`, `\>=`). Note that there is no inequality (`!=`) operator. You can prepend the `NOT` operator to an expression to negate it. * A date field value must be written in `yyyy-mm-dd` form. Fields with date and time use the RFC3339 time format. Leading zeros are required for one-digit months and days. The valid relational operators for date fields are the equality operator (`=`) , along with the less than/greater than operators (`<`, `<=`, `\>`, `\>=`). Note that there is no inequality (`!=`) operator. You can prepend the `NOT` operator to an expression to negate it. * Multiple field query expressions can be combined in one query by adding `AND` or `OR` operators between the expressions. If a boolean operator appears within a quoted string, it is not treated as special, it's just another part of the character string to be matched. You can prepend the `NOT` operator to an expression to negate it. Fields/functions available for filtering are: * `message_type`, from the MSH-9.1 field. For example, `NOT message_type = "ADT"`. * `send_date` or `sendDate`, the YYYY-MM-DD date the message was sent in the dataset's time_zone, from the MSH-7 segment. For example, `send_date < "2017-01-02"`. * `send_time`, the timestamp when the message was sent, using the RFC3339 time format for comparisons, from the MSH-7 segment. For example, `send_time < "2017-01-02T00:00:00-05:00"`. * `create_time`, the timestamp when the message was created in the HL7v2 store. Use the RFC3339 time format for comparisons. For example, `create_time < "2017-01-02T00:00:00-05:00"`. * `send_facility`, the care center that the message came from, from the MSH-4 segment. For example, `send_facility = "ABC"`. * `PatientId(value, type)`, which matches if the message lists a patient having an ID of the given value and type in the PID-2, PID-3, or PID-4 segments. For example, `PatientId("123456", "MRN")`. * `labels.x`, a string value of the label with key `x` as set using the Message.labels map. For example, `labels."priority"="high"`. The operator `:*` can be used to assert the existence of a label. For example, `labels."priority":*`. */ filter?: string | null; /** @@ -23918,7 +23918,7 @@ export namespace healthcare_v1beta1 { * // Do the magic * const res = await healthcare.projects.locations.datasets.hl7V2Stores.messages.list( * { - * // Restricts messages returned to those matching a filter. The following syntax is available: * A string field value can be written as text inside quotation marks, for example `"query text"`. The only valid relational operation for text fields is equality (`=`), where text is searched within the field, rather than having the field be equal to the text. For example, `"Comment = great"` returns messages with `great` in the comment field. * A number field value can be written as an integer, a decimal, or an exponential. The valid relational operators for number fields are the equality operator (`=`), along with the less than/greater than operators (`<`, `<=`, `\>`, `\>=`). Note that there is no inequality (`!=`) operator. You can prepend the `NOT` operator to an expression to negate it. * A date field value must be written in `yyyy-mm-dd` form. Fields with date and time use the RFC3339 time format. Leading zeros are required for one-digit months and days. The valid relational operators for date fields are the equality operator (`=`) , along with the less than/greater than operators (`<`, `<=`, `\>`, `\>=`). Note that there is no inequality (`!=`) operator. You can prepend the `NOT` operator to an expression to negate it. * Multiple field query expressions can be combined in one query by adding `AND` or `OR` operators between the expressions. If a boolean operator appears within a quoted string, it is not treated as special, it's just another part of the character string to be matched. You can prepend the `NOT` operator to an expression to negate it. Fields/functions available for filtering are: * `message_type`, from the MSH-9.1 field. For example, `NOT message_type = "ADT"`. * `send_date` or `sendDate`, the YYYY-MM-DD date the message was sent in the dataset's time_zone, from the MSH-7 segment. For example, `send_date < "2017-01-02"`. * `send_time`, the timestamp when the message was sent, using the RFC3339 time format for comparisons, from the MSH-7 segment. For example, `send_time < "2017-01-02T00:00:00-05:00"`. * `send_facility`, the care center that the message came from, from the MSH-4 segment. For example, `send_facility = "ABC"`. * `PatientId(value, type)`, which matches if the message lists a patient having an ID of the given value and type in the PID-2, PID-3, or PID-4 segments. For example, `PatientId("123456", "MRN")`. * `labels.x`, a string value of the label with key `x` as set using the Message.labels map. For example, `labels."priority"="high"`. The operator `:*` can be used to assert the existence of a label. For example, `labels."priority":*`. + * // Restricts messages returned to those matching a filter. The following syntax is available: * A string field value can be written as text inside quotation marks, for example `"query text"`. The only valid relational operation for text fields is equality (`=`), where text is searched within the field, rather than having the field be equal to the text. For example, `"Comment = great"` returns messages with `great` in the comment field. * A number field value can be written as an integer, a decimal, or an exponential. The valid relational operators for number fields are the equality operator (`=`), along with the less than/greater than operators (`<`, `<=`, `\>`, `\>=`). Note that there is no inequality (`!=`) operator. You can prepend the `NOT` operator to an expression to negate it. * A date field value must be written in `yyyy-mm-dd` form. Fields with date and time use the RFC3339 time format. Leading zeros are required for one-digit months and days. The valid relational operators for date fields are the equality operator (`=`) , along with the less than/greater than operators (`<`, `<=`, `\>`, `\>=`). Note that there is no inequality (`!=`) operator. You can prepend the `NOT` operator to an expression to negate it. * Multiple field query expressions can be combined in one query by adding `AND` or `OR` operators between the expressions. If a boolean operator appears within a quoted string, it is not treated as special, it's just another part of the character string to be matched. You can prepend the `NOT` operator to an expression to negate it. Fields/functions available for filtering are: * `message_type`, from the MSH-9.1 field. For example, `NOT message_type = "ADT"`. * `send_date` or `sendDate`, the YYYY-MM-DD date the message was sent in the dataset's time_zone, from the MSH-7 segment. For example, `send_date < "2017-01-02"`. * `send_time`, the timestamp when the message was sent, using the RFC3339 time format for comparisons, from the MSH-7 segment. For example, `send_time < "2017-01-02T00:00:00-05:00"`. * `create_time`, the timestamp when the message was created in the HL7v2 store. Use the RFC3339 time format for comparisons. For example, `create_time < "2017-01-02T00:00:00-05:00"`. * `send_facility`, the care center that the message came from, from the MSH-4 segment. For example, `send_facility = "ABC"`. * `PatientId(value, type)`, which matches if the message lists a patient having an ID of the given value and type in the PID-2, PID-3, or PID-4 segments. For example, `PatientId("123456", "MRN")`. * `labels.x`, a string value of the label with key `x` as set using the Message.labels map. For example, `labels."priority"="high"`. The operator `:*` can be used to assert the existence of a label. For example, `labels."priority":*`. * filter: 'placeholder-value', * // Orders messages returned by the specified order_by clause. Syntax: https://cloud.google.com/apis/design/design_patterns#sorting_order Fields available for ordering are: * `send_time` * orderBy: 'placeholder-value', @@ -24256,7 +24256,7 @@ export namespace healthcare_v1beta1 { export interface Params$Resource$Projects$Locations$Datasets$Hl7v2stores$Messages$List extends StandardParameters { /** - * Restricts messages returned to those matching a filter. The following syntax is available: * A string field value can be written as text inside quotation marks, for example `"query text"`. The only valid relational operation for text fields is equality (`=`), where text is searched within the field, rather than having the field be equal to the text. For example, `"Comment = great"` returns messages with `great` in the comment field. * A number field value can be written as an integer, a decimal, or an exponential. The valid relational operators for number fields are the equality operator (`=`), along with the less than/greater than operators (`<`, `<=`, `\>`, `\>=`). Note that there is no inequality (`!=`) operator. You can prepend the `NOT` operator to an expression to negate it. * A date field value must be written in `yyyy-mm-dd` form. Fields with date and time use the RFC3339 time format. Leading zeros are required for one-digit months and days. The valid relational operators for date fields are the equality operator (`=`) , along with the less than/greater than operators (`<`, `<=`, `\>`, `\>=`). Note that there is no inequality (`!=`) operator. You can prepend the `NOT` operator to an expression to negate it. * Multiple field query expressions can be combined in one query by adding `AND` or `OR` operators between the expressions. If a boolean operator appears within a quoted string, it is not treated as special, it's just another part of the character string to be matched. You can prepend the `NOT` operator to an expression to negate it. Fields/functions available for filtering are: * `message_type`, from the MSH-9.1 field. For example, `NOT message_type = "ADT"`. * `send_date` or `sendDate`, the YYYY-MM-DD date the message was sent in the dataset's time_zone, from the MSH-7 segment. For example, `send_date < "2017-01-02"`. * `send_time`, the timestamp when the message was sent, using the RFC3339 time format for comparisons, from the MSH-7 segment. For example, `send_time < "2017-01-02T00:00:00-05:00"`. * `send_facility`, the care center that the message came from, from the MSH-4 segment. For example, `send_facility = "ABC"`. * `PatientId(value, type)`, which matches if the message lists a patient having an ID of the given value and type in the PID-2, PID-3, or PID-4 segments. For example, `PatientId("123456", "MRN")`. * `labels.x`, a string value of the label with key `x` as set using the Message.labels map. For example, `labels."priority"="high"`. The operator `:*` can be used to assert the existence of a label. For example, `labels."priority":*`. + * Restricts messages returned to those matching a filter. The following syntax is available: * A string field value can be written as text inside quotation marks, for example `"query text"`. The only valid relational operation for text fields is equality (`=`), where text is searched within the field, rather than having the field be equal to the text. For example, `"Comment = great"` returns messages with `great` in the comment field. * A number field value can be written as an integer, a decimal, or an exponential. The valid relational operators for number fields are the equality operator (`=`), along with the less than/greater than operators (`<`, `<=`, `\>`, `\>=`). Note that there is no inequality (`!=`) operator. You can prepend the `NOT` operator to an expression to negate it. * A date field value must be written in `yyyy-mm-dd` form. Fields with date and time use the RFC3339 time format. Leading zeros are required for one-digit months and days. The valid relational operators for date fields are the equality operator (`=`) , along with the less than/greater than operators (`<`, `<=`, `\>`, `\>=`). Note that there is no inequality (`!=`) operator. You can prepend the `NOT` operator to an expression to negate it. * Multiple field query expressions can be combined in one query by adding `AND` or `OR` operators between the expressions. If a boolean operator appears within a quoted string, it is not treated as special, it's just another part of the character string to be matched. You can prepend the `NOT` operator to an expression to negate it. Fields/functions available for filtering are: * `message_type`, from the MSH-9.1 field. For example, `NOT message_type = "ADT"`. * `send_date` or `sendDate`, the YYYY-MM-DD date the message was sent in the dataset's time_zone, from the MSH-7 segment. For example, `send_date < "2017-01-02"`. * `send_time`, the timestamp when the message was sent, using the RFC3339 time format for comparisons, from the MSH-7 segment. For example, `send_time < "2017-01-02T00:00:00-05:00"`. * `create_time`, the timestamp when the message was created in the HL7v2 store. Use the RFC3339 time format for comparisons. For example, `create_time < "2017-01-02T00:00:00-05:00"`. * `send_facility`, the care center that the message came from, from the MSH-4 segment. For example, `send_facility = "ABC"`. * `PatientId(value, type)`, which matches if the message lists a patient having an ID of the given value and type in the PID-2, PID-3, or PID-4 segments. For example, `PatientId("123456", "MRN")`. * `labels.x`, a string value of the label with key `x` as set using the Message.labels map. For example, `labels."priority"="high"`. The operator `:*` can be used to assert the existence of a label. For example, `labels."priority":*`. */ filter?: string; /** diff --git a/src/apis/iam/v1.ts b/src/apis/iam/v1.ts index 7799343d6de..527547e5c69 100644 --- a/src/apis/iam/v1.ts +++ b/src/apis/iam/v1.ts @@ -6718,7 +6718,7 @@ export namespace iam_v1 { } /** - * **Note:** This method is deprecated and will stop working on July 1, 2021. Use the [`signBlob`](https://cloud.google.com/iam/help/rest-credentials/v1/projects.serviceAccounts/signBlob) method in the IAM Service Account Credentials API instead. If you currently use this method, see the [migration guide](https://cloud.google.com/iam/help/credentials/migrate-api) for instructions. Signs a blob using the system-managed private key for a ServiceAccount. + * **Note:** This method is deprecated. Use the [`signBlob`](https://cloud.google.com/iam/help/rest-credentials/v1/projects.serviceAccounts/signBlob) method in the IAM Service Account Credentials API instead. If you currently use this method, see the [migration guide](https://cloud.google.com/iam/help/credentials/migrate-api) for instructions. Signs a blob using the system-managed private key for a ServiceAccount. * @example * ```js * // Before running the sample: @@ -6856,7 +6856,7 @@ export namespace iam_v1 { } /** - * **Note:** This method is deprecated and will stop working on July 1, 2021. Use the [`signJwt`](https://cloud.google.com/iam/help/rest-credentials/v1/projects.serviceAccounts/signJwt) method in the IAM Service Account Credentials API instead. If you currently use this method, see the [migration guide](https://cloud.google.com/iam/help/credentials/migrate-api) for instructions. Signs a JSON Web Token (JWT) using the system-managed private key for a ServiceAccount. + * **Note:** This method is deprecated. Use the [`signJwt`](https://cloud.google.com/iam/help/rest-credentials/v1/projects.serviceAccounts/signJwt) method in the IAM Service Account Credentials API instead. If you currently use this method, see the [migration guide](https://cloud.google.com/iam/help/credentials/migrate-api) for instructions. Signs a JSON Web Token (JWT) using the system-managed private key for a ServiceAccount. * @example * ```js * // Before running the sample: diff --git a/src/apis/index.ts b/src/apis/index.ts index 3cf04c9780f..dc8ceb6f8e0 100644 --- a/src/apis/index.ts +++ b/src/apis/index.ts @@ -242,6 +242,10 @@ import { VERSIONS as firebaserulesVersions, firebaserules, } from './firebaserules'; +import { + VERSIONS as firebasestorageVersions, + firebasestorage, +} from './firebasestorage'; import {VERSIONS as firestoreVersions, firestore} from './firestore'; import {VERSIONS as fitnessVersions, fitness} from './fitness'; import {VERSIONS as gamesVersions, games} from './games'; @@ -255,6 +259,7 @@ import { } from './gamesManagement'; import {VERSIONS as gameservicesVersions, gameservices} from './gameservices'; import {VERSIONS as genomicsVersions, genomics} from './genomics'; +import {VERSIONS as gkehubVersions, gkehub} from './gkehub'; import {VERSIONS as gmailVersions, gmail} from './gmail'; import { VERSIONS as gmailpostmastertoolsVersions, @@ -322,6 +327,7 @@ import { VERSIONS as ondemandscanningVersions, ondemandscanning, } from './ondemandscanning'; +import {VERSIONS as orgpolicyVersions, orgpolicy} from './orgpolicy'; import {VERSIONS as osconfigVersions, osconfig} from './osconfig'; import {VERSIONS as osloginVersions, oslogin} from './oslogin'; import { @@ -585,6 +591,7 @@ export const APIS: APIList = { firebasehosting: firebasehostingVersions, firebaseml: firebasemlVersions, firebaserules: firebaserulesVersions, + firebasestorage: firebasestorageVersions, firestore: firestoreVersions, fitness: fitnessVersions, games: gamesVersions, @@ -592,6 +599,7 @@ export const APIS: APIList = { gamesManagement: gamesManagementVersions, gameservices: gameservicesVersions, genomics: genomicsVersions, + gkehub: gkehubVersions, gmail: gmailVersions, gmailpostmastertools: gmailpostmastertoolsVersions, groupsmigration: groupsmigrationVersions, @@ -623,6 +631,7 @@ export const APIS: APIList = { notebooks: notebooksVersions, oauth2: oauth2Versions, ondemandscanning: ondemandscanningVersions, + orgpolicy: orgpolicyVersions, osconfig: osconfigVersions, oslogin: osloginVersions, pagespeedonline: pagespeedonlineVersions, @@ -795,6 +804,7 @@ export class GeneratedAPIs { firebasehosting = firebasehosting; firebaseml = firebaseml; firebaserules = firebaserules; + firebasestorage = firebasestorage; firestore = firestore; fitness = fitness; games = games; @@ -802,6 +812,7 @@ export class GeneratedAPIs { gamesManagement = gamesManagement; gameservices = gameservices; genomics = genomics; + gkehub = gkehub; gmail = gmail; gmailpostmastertools = gmailpostmastertools; groupsmigration = groupsmigration; @@ -833,6 +844,7 @@ export class GeneratedAPIs { notebooks = notebooks; oauth2 = oauth2; ondemandscanning = ondemandscanning; + orgpolicy = orgpolicy; osconfig = osconfig; oslogin = oslogin; pagespeedonline = pagespeedonline; diff --git a/src/apis/jobs/v4.ts b/src/apis/jobs/v4.ts index 5de66e6c5f8..ba6b6498c36 100644 --- a/src/apis/jobs/v4.ts +++ b/src/apis/jobs/v4.ts @@ -1299,13 +1299,163 @@ export namespace jobs_v4 { export class Resource$Projects { context: APIRequestContext; + operations: Resource$Projects$Operations; tenants: Resource$Projects$Tenants; constructor(context: APIRequestContext) { this.context = context; + this.operations = new Resource$Projects$Operations(this.context); this.tenants = new Resource$Projects$Tenants(this.context); } } + export class Resource$Projects$Operations { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * 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. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/jobs.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const jobs = google.jobs('v4'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [ + * 'https://www.googleapis.com/auth/cloud-platform', + * 'https://www.googleapis.com/auth/jobs', + * ], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await jobs.projects.operations.get({ + * // The name of the operation resource. + * name: 'projects/my-project/operations/my-operation', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "done": false, + * // "error": {}, + * // "metadata": {}, + * // "name": "my_name", + * // "response": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Projects$Operations$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Projects$Operations$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Operations$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Operations$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Operations$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Operations$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Operations$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Operations$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://jobs.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v4/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Operations$Get + extends StandardParameters { + /** + * The name of the operation resource. + */ + name?: string; + } + export class Resource$Projects$Tenants { context: APIRequestContext; clientEvents: Resource$Projects$Tenants$Clientevents; diff --git a/src/apis/lifesciences/v2beta.ts b/src/apis/lifesciences/v2beta.ts index ded7d21eb69..fae25c2dd0b 100644 --- a/src/apis/lifesciences/v2beta.ts +++ b/src/apis/lifesciences/v2beta.ts @@ -972,13 +972,13 @@ export namespace lifesciences_v2beta { * * // Do the magic * const res = await lifesciences.projects.locations.list({ - * // The standard list 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). * filter: 'placeholder-value', * // The resource that owns the locations collection, if applicable. * name: 'projects/my-project', - * // The standard list page size. + * // The maximum number of results to return. If not set, the service will select a default. * pageSize: 'placeholder-value', - * // The standard list page token. + * // A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. * pageToken: 'placeholder-value', * }); * console.log(res.data); @@ -1097,7 +1097,7 @@ export namespace lifesciences_v2beta { export interface Params$Resource$Projects$Locations$List extends StandardParameters { /** - * The standard list 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). */ filter?: string; /** @@ -1105,11 +1105,11 @@ export namespace lifesciences_v2beta { */ name?: string; /** - * The standard list page size. + * The maximum number of results to return. If not set, the service will select a default. */ pageSize?: number; /** - * The standard list page token. + * A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. */ pageToken?: string; } diff --git a/src/apis/logging/v2.ts b/src/apis/logging/v2.ts index 5a04b99f46b..e5b54e52d6c 100644 --- a/src/apis/logging/v2.ts +++ b/src/apis/logging/v2.ts @@ -2449,13 +2449,13 @@ export namespace logging_v2 { * * // Do the magic * const res = await logging.billingAccounts.locations.list({ - * // The standard list 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). * filter: 'placeholder-value', * // The resource that owns the locations collection, if applicable. * name: 'billingAccounts/my-billingAccount', - * // The standard list page size. + * // The maximum number of results to return. If not set, the service will select a default. * pageSize: 'placeholder-value', - * // The standard list page token. + * // A page token received from the next_page_token field in the response. Send that page token to receive the subsequent page. * pageToken: 'placeholder-value', * }); * console.log(res.data); @@ -2574,7 +2574,7 @@ export namespace logging_v2 { export interface Params$Resource$Billingaccounts$Locations$List extends StandardParameters { /** - * The standard list 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). */ filter?: string; /** @@ -2582,11 +2582,11 @@ export namespace logging_v2 { */ name?: string; /** - * The standard list page size. + * The maximum number of results to return. If not set, the service will select a default. */ pageSize?: number; /** - * The standard list page token. + * A page token received from the next_page_token field in the response. Send that page token to receive the subsequent page. */ pageToken?: string; } @@ -7490,13 +7490,13 @@ export namespace logging_v2 { * * // Do the magic * const res = await logging.folders.locations.list({ - * // The standard list 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). * filter: 'placeholder-value', * // The resource that owns the locations collection, if applicable. * name: 'folders/my-folder', - * // The standard list page size. + * // The maximum number of results to return. If not set, the service will select a default. * pageSize: 'placeholder-value', - * // The standard list page token. + * // A page token received from the next_page_token field in the response. Send that page token to receive the subsequent page. * pageToken: 'placeholder-value', * }); * console.log(res.data); @@ -7615,7 +7615,7 @@ export namespace logging_v2 { export interface Params$Resource$Folders$Locations$List extends StandardParameters { /** - * The standard list 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). */ filter?: string; /** @@ -7623,11 +7623,11 @@ export namespace logging_v2 { */ name?: string; /** - * The standard list page size. + * The maximum number of results to return. If not set, the service will select a default. */ pageSize?: number; /** - * The standard list page token. + * A page token received from the next_page_token field in the response. Send that page token to receive the subsequent page. */ pageToken?: string; } @@ -10802,13 +10802,13 @@ export namespace logging_v2 { * * // Do the magic * const res = await logging.locations.list({ - * // The standard list 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). * filter: 'placeholder-value', * // The resource that owns the locations collection, if applicable. * name: '[^/]+/[^/]+', - * // The standard list page size. + * // The maximum number of results to return. If not set, the service will select a default. * pageSize: 'placeholder-value', - * // The standard list page token. + * // A page token received from the next_page_token field in the response. Send that page token to receive the subsequent page. * pageToken: 'placeholder-value', * }); * console.log(res.data); @@ -10924,7 +10924,7 @@ export namespace logging_v2 { } export interface Params$Resource$Locations$List extends StandardParameters { /** - * The standard list 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). */ filter?: string; /** @@ -10932,11 +10932,11 @@ export namespace logging_v2 { */ name?: string; /** - * The standard list page size. + * The maximum number of results to return. If not set, the service will select a default. */ pageSize?: number; /** - * The standard list page token. + * A page token received from the next_page_token field in the response. Send that page token to receive the subsequent page. */ pageToken?: string; } @@ -14370,13 +14370,13 @@ export namespace logging_v2 { * * // Do the magic * const res = await logging.organizations.locations.list({ - * // The standard list 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). * filter: 'placeholder-value', * // The resource that owns the locations collection, if applicable. * name: 'organizations/my-organization', - * // The standard list page size. + * // The maximum number of results to return. If not set, the service will select a default. * pageSize: 'placeholder-value', - * // The standard list page token. + * // A page token received from the next_page_token field in the response. Send that page token to receive the subsequent page. * pageToken: 'placeholder-value', * }); * console.log(res.data); @@ -14495,7 +14495,7 @@ export namespace logging_v2 { export interface Params$Resource$Organizations$Locations$List extends StandardParameters { /** - * The standard list 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). */ filter?: string; /** @@ -14503,11 +14503,11 @@ export namespace logging_v2 { */ name?: string; /** - * The standard list page size. + * The maximum number of results to return. If not set, the service will select a default. */ pageSize?: number; /** - * The standard list page token. + * A page token received from the next_page_token field in the response. Send that page token to receive the subsequent page. */ pageToken?: string; } @@ -18479,13 +18479,13 @@ export namespace logging_v2 { * * // Do the magic * const res = await logging.projects.locations.list({ - * // The standard list 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). * filter: 'placeholder-value', * // The resource that owns the locations collection, if applicable. * name: 'projects/my-project', - * // The standard list page size. + * // The maximum number of results to return. If not set, the service will select a default. * pageSize: 'placeholder-value', - * // The standard list page token. + * // A page token received from the next_page_token field in the response. Send that page token to receive the subsequent page. * pageToken: 'placeholder-value', * }); * console.log(res.data); @@ -18604,7 +18604,7 @@ export namespace logging_v2 { export interface Params$Resource$Projects$Locations$List extends StandardParameters { /** - * The standard list 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). */ filter?: string; /** @@ -18612,11 +18612,11 @@ export namespace logging_v2 { */ name?: string; /** - * The standard list page size. + * The maximum number of results to return. If not set, the service will select a default. */ pageSize?: number; /** - * The standard list page token. + * A page token received from the next_page_token field in the response. Send that page token to receive the subsequent page. */ pageToken?: string; } diff --git a/src/apis/managedidentities/v1.ts b/src/apis/managedidentities/v1.ts index 697f0ae6a36..26109ec3886 100644 --- a/src/apis/managedidentities/v1.ts +++ b/src/apis/managedidentities/v1.ts @@ -447,7 +447,7 @@ export namespace managedidentities_v1 { */ export interface Schema$GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSchedule { /** - * Can this scheduled update be rescheduled? By default, it's true and API needs to do explicitly check whether it's set, if it's set as false explicitly, it's false + * This field will be deprecated, and will be always set to true since reschedule can happen multiple times now. */ canReschedule?: boolean | null; /** diff --git a/src/apis/managedidentities/v1alpha1.ts b/src/apis/managedidentities/v1alpha1.ts index b9041fcf1d9..5fb3f8d55dc 100644 --- a/src/apis/managedidentities/v1alpha1.ts +++ b/src/apis/managedidentities/v1alpha1.ts @@ -445,7 +445,7 @@ export namespace managedidentities_v1alpha1 { */ export interface Schema$GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSchedule { /** - * Can this scheduled update be rescheduled? By default, it's true and API needs to do explicitly check whether it's set, if it's set as false explicitly, it's false + * This field will be deprecated, and will be always set to true since reschedule can happen multiple times now. */ canReschedule?: boolean | null; /** @@ -1311,6 +1311,7 @@ export namespace managedidentities_v1alpha1 { context: APIRequestContext; domains: Resource$Projects$Locations$Global$Domains; operations: Resource$Projects$Locations$Global$Operations; + peerings: Resource$Projects$Locations$Global$Peerings; constructor(context: APIRequestContext) { this.context = context; this.domains = new Resource$Projects$Locations$Global$Domains( @@ -1319,6 +1320,9 @@ export namespace managedidentities_v1alpha1 { this.operations = new Resource$Projects$Locations$Global$Operations( this.context ); + this.peerings = new Resource$Projects$Locations$Global$Peerings( + this.context + ); } } @@ -1503,7 +1507,7 @@ export namespace managedidentities_v1alpha1 { * * // Do the magic * const res = await managedidentities.projects.locations.global.domains.create({ - * // The fully qualified domain name. e.g. mydomain.myorganization.com, with the following restrictions: * Must contain only lowercase letters, numbers, periods and hyphens. * Must start with a letter. * Must contain between 2-64 characters. * Must end with a number or a letter. * Must not start with period. * Must be unique within the project. * First segement length (mydomain form example above) shouldn't exceed 15 chars. * The last segment cannot be fully numeric. + * // The fully qualified domain name. e.g. mydomain.myorganization.com, with the following restrictions: * Must contain only lowercase letters, numbers, periods and hyphens. * Must start with a letter. * Must contain between 2-64 characters. * Must end with a number or a letter. * Must not start with period. * Must be unique within the project. * First segment length (mydomain form example above) shouldn't exceed 15 chars. * The last segment cannot be fully numeric. * domainName: 'placeholder-value', * // Resource project name and location using the form: `projects/{project_id\}/locations/global` * parent: 'projects/my-project/locations/global', @@ -3216,7 +3220,7 @@ export namespace managedidentities_v1alpha1 { export interface Params$Resource$Projects$Locations$Global$Domains$Create extends StandardParameters { /** - * The fully qualified domain name. e.g. mydomain.myorganization.com, with the following restrictions: * Must contain only lowercase letters, numbers, periods and hyphens. * Must start with a letter. * Must contain between 2-64 characters. * Must end with a number or a letter. * Must not start with period. * Must be unique within the project. * First segement length (mydomain form example above) shouldn't exceed 15 chars. * The last segment cannot be fully numeric. + * The fully qualified domain name. e.g. mydomain.myorganization.com, with the following restrictions: * Must contain only lowercase letters, numbers, periods and hyphens. * Must start with a letter. * Must contain between 2-64 characters. * Must end with a number or a letter. * Must not start with period. * Must be unique within the project. * First segment length (mydomain form example above) shouldn't exceed 15 chars. * The last segment cannot be fully numeric. */ domainName?: string; /** @@ -4277,4 +4281,472 @@ export namespace managedidentities_v1alpha1 { */ pageToken?: string; } + + export class Resource$Projects$Locations$Global$Peerings { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/managedidentities.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const managedidentities = google.managedidentities('v1alpha1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await managedidentities.projects.locations.global.peerings.getIamPolicy( + * { + * // Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + * 'options.requestedPolicyVersion': 'placeholder-value', + * // REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. + * resource: 'projects/my-project/locations/global/peerings/my-peering', + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "bindings": [], + * // "etag": "my_etag", + * // "version": 0 + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + getIamPolicy( + params: Params$Resource$Projects$Locations$Global$Peerings$Getiampolicy, + options: StreamMethodOptions + ): GaxiosPromise; + getIamPolicy( + params?: Params$Resource$Projects$Locations$Global$Peerings$Getiampolicy, + options?: MethodOptions + ): GaxiosPromise; + getIamPolicy( + params: Params$Resource$Projects$Locations$Global$Peerings$Getiampolicy, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getIamPolicy( + params: Params$Resource$Projects$Locations$Global$Peerings$Getiampolicy, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getIamPolicy( + params: Params$Resource$Projects$Locations$Global$Peerings$Getiampolicy, + callback: BodyResponseCallback + ): void; + getIamPolicy(callback: BodyResponseCallback): void; + getIamPolicy( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Peerings$Getiampolicy + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Peerings$Getiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Peerings$Getiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://managedidentities.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha1/{+resource}:getIamPolicy').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/managedidentities.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const managedidentities = google.managedidentities('v1alpha1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await managedidentities.projects.locations.global.peerings.setIamPolicy( + * { + * // REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. + * resource: 'projects/my-project/locations/global/peerings/my-peering', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "policy": {} + * // } + * }, + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "bindings": [], + * // "etag": "my_etag", + * // "version": 0 + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + setIamPolicy( + params: Params$Resource$Projects$Locations$Global$Peerings$Setiampolicy, + options: StreamMethodOptions + ): GaxiosPromise; + setIamPolicy( + params?: Params$Resource$Projects$Locations$Global$Peerings$Setiampolicy, + options?: MethodOptions + ): GaxiosPromise; + setIamPolicy( + params: Params$Resource$Projects$Locations$Global$Peerings$Setiampolicy, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + setIamPolicy( + params: Params$Resource$Projects$Locations$Global$Peerings$Setiampolicy, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + setIamPolicy( + params: Params$Resource$Projects$Locations$Global$Peerings$Setiampolicy, + callback: BodyResponseCallback + ): void; + setIamPolicy(callback: BodyResponseCallback): void; + setIamPolicy( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Peerings$Setiampolicy + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Peerings$Setiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Peerings$Setiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://managedidentities.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha1/{+resource}:setIamPolicy').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/managedidentities.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const managedidentities = google.managedidentities('v1alpha1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await managedidentities.projects.locations.global.peerings.testIamPermissions( + * { + * // REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. + * resource: 'projects/my-project/locations/global/peerings/my-peering', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "permissions": [] + * // } + * }, + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "permissions": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + testIamPermissions( + params: Params$Resource$Projects$Locations$Global$Peerings$Testiampermissions, + options: StreamMethodOptions + ): GaxiosPromise; + testIamPermissions( + params?: Params$Resource$Projects$Locations$Global$Peerings$Testiampermissions, + options?: MethodOptions + ): GaxiosPromise; + testIamPermissions( + params: Params$Resource$Projects$Locations$Global$Peerings$Testiampermissions, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + testIamPermissions( + params: Params$Resource$Projects$Locations$Global$Peerings$Testiampermissions, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + testIamPermissions( + params: Params$Resource$Projects$Locations$Global$Peerings$Testiampermissions, + callback: BodyResponseCallback + ): void; + testIamPermissions( + callback: BodyResponseCallback + ): void; + testIamPermissions( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Peerings$Testiampermissions + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Peerings$Testiampermissions; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Peerings$Testiampermissions; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://managedidentities.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha1/{+resource}:testIamPermissions').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Locations$Global$Peerings$Getiampolicy + extends StandardParameters { + /** + * Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + */ + 'options.requestedPolicyVersion'?: number; + /** + * REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. + */ + resource?: string; + } + export interface Params$Resource$Projects$Locations$Global$Peerings$Setiampolicy + extends StandardParameters { + /** + * REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$SetIamPolicyRequest; + } + export interface Params$Resource$Projects$Locations$Global$Peerings$Testiampermissions + extends StandardParameters { + /** + * REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$TestIamPermissionsRequest; + } } diff --git a/src/apis/managedidentities/v1beta1.ts b/src/apis/managedidentities/v1beta1.ts index 0b68b216f2c..ebe7a49ec38 100644 --- a/src/apis/managedidentities/v1beta1.ts +++ b/src/apis/managedidentities/v1beta1.ts @@ -451,7 +451,7 @@ export namespace managedidentities_v1beta1 { */ export interface Schema$GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSchedule { /** - * Can this scheduled update be rescheduled? By default, it's true and API needs to do explicitly check whether it's set, if it's set as false explicitly, it's false + * This field will be deprecated, and will be always set to true since reschedule can happen multiple times now. */ canReschedule?: boolean | null; /** @@ -861,7 +861,7 @@ export namespace managedidentities_v1beta1 { */ name?: string | null; /** - * The full resource name of an integrated sql instance Reference to: http://google3/google/cloud/sql/v1/cloud_sql_resources.proto?l=351&rcl=354416019 + * The full resource name of an integrated sql instance */ sqlInstance?: string | null; /** @@ -1336,6 +1336,7 @@ export namespace managedidentities_v1beta1 { context: APIRequestContext; domains: Resource$Projects$Locations$Global$Domains; operations: Resource$Projects$Locations$Global$Operations; + peerings: Resource$Projects$Locations$Global$Peerings; constructor(context: APIRequestContext) { this.context = context; this.domains = new Resource$Projects$Locations$Global$Domains( @@ -1344,6 +1345,9 @@ export namespace managedidentities_v1beta1 { this.operations = new Resource$Projects$Locations$Global$Operations( this.context ); + this.peerings = new Resource$Projects$Locations$Global$Peerings( + this.context + ); } } @@ -1528,7 +1532,7 @@ export namespace managedidentities_v1beta1 { * * // Do the magic * const res = await managedidentities.projects.locations.global.domains.create({ - * // Required. A domain name, e.g. mydomain.myorg.com, with the following restrictions: * Must contain only lowercase letters, numbers, periods and hyphens. * Must start with a letter. * Must contain between 2-64 characters. * Must end with a number or a letter. * Must not start with period. * First segement length (mydomain form example above) shouldn't exceed 15 chars. * The last segment cannot be fully numeric. * Must be unique within the customer project. + * // Required. A domain name, e.g. mydomain.myorg.com, with the following restrictions: * Must contain only lowercase letters, numbers, periods and hyphens. * Must start with a letter. * Must contain between 2-64 characters. * Must end with a number or a letter. * Must not start with period. * First segment length (mydomain form example above) shouldn't exceed 15 chars. * The last segment cannot be fully numeric. * Must be unique within the customer project. * domainName: 'placeholder-value', * // Required. The resource project name and location using the form: `projects/{project_id\}/locations/global` * parent: 'projects/my-project/locations/global', @@ -3242,7 +3246,7 @@ export namespace managedidentities_v1beta1 { export interface Params$Resource$Projects$Locations$Global$Domains$Create extends StandardParameters { /** - * Required. A domain name, e.g. mydomain.myorg.com, with the following restrictions: * Must contain only lowercase letters, numbers, periods and hyphens. * Must start with a letter. * Must contain between 2-64 characters. * Must end with a number or a letter. * Must not start with period. * First segement length (mydomain form example above) shouldn't exceed 15 chars. * The last segment cannot be fully numeric. * Must be unique within the customer project. + * Required. A domain name, e.g. mydomain.myorg.com, with the following restrictions: * Must contain only lowercase letters, numbers, periods and hyphens. * Must start with a letter. * Must contain between 2-64 characters. * Must end with a number or a letter. * Must not start with period. * First segment length (mydomain form example above) shouldn't exceed 15 chars. * The last segment cannot be fully numeric. * Must be unique within the customer project. */ domainName?: string; /** @@ -4300,4 +4304,472 @@ export namespace managedidentities_v1beta1 { */ pageToken?: string; } + + export class Resource$Projects$Locations$Global$Peerings { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/managedidentities.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const managedidentities = google.managedidentities('v1beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await managedidentities.projects.locations.global.peerings.getIamPolicy( + * { + * // Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + * 'options.requestedPolicyVersion': 'placeholder-value', + * // REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. + * resource: 'projects/my-project/locations/global/peerings/my-peering', + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "bindings": [], + * // "etag": "my_etag", + * // "version": 0 + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + getIamPolicy( + params: Params$Resource$Projects$Locations$Global$Peerings$Getiampolicy, + options: StreamMethodOptions + ): GaxiosPromise; + getIamPolicy( + params?: Params$Resource$Projects$Locations$Global$Peerings$Getiampolicy, + options?: MethodOptions + ): GaxiosPromise; + getIamPolicy( + params: Params$Resource$Projects$Locations$Global$Peerings$Getiampolicy, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getIamPolicy( + params: Params$Resource$Projects$Locations$Global$Peerings$Getiampolicy, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getIamPolicy( + params: Params$Resource$Projects$Locations$Global$Peerings$Getiampolicy, + callback: BodyResponseCallback + ): void; + getIamPolicy(callback: BodyResponseCallback): void; + getIamPolicy( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Peerings$Getiampolicy + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Peerings$Getiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Peerings$Getiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://managedidentities.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+resource}:getIamPolicy').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/managedidentities.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const managedidentities = google.managedidentities('v1beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await managedidentities.projects.locations.global.peerings.setIamPolicy( + * { + * // REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. + * resource: 'projects/my-project/locations/global/peerings/my-peering', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "policy": {} + * // } + * }, + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "bindings": [], + * // "etag": "my_etag", + * // "version": 0 + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + setIamPolicy( + params: Params$Resource$Projects$Locations$Global$Peerings$Setiampolicy, + options: StreamMethodOptions + ): GaxiosPromise; + setIamPolicy( + params?: Params$Resource$Projects$Locations$Global$Peerings$Setiampolicy, + options?: MethodOptions + ): GaxiosPromise; + setIamPolicy( + params: Params$Resource$Projects$Locations$Global$Peerings$Setiampolicy, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + setIamPolicy( + params: Params$Resource$Projects$Locations$Global$Peerings$Setiampolicy, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + setIamPolicy( + params: Params$Resource$Projects$Locations$Global$Peerings$Setiampolicy, + callback: BodyResponseCallback + ): void; + setIamPolicy(callback: BodyResponseCallback): void; + setIamPolicy( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Peerings$Setiampolicy + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Peerings$Setiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Peerings$Setiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://managedidentities.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+resource}:setIamPolicy').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/managedidentities.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const managedidentities = google.managedidentities('v1beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await managedidentities.projects.locations.global.peerings.testIamPermissions( + * { + * // REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. + * resource: 'projects/my-project/locations/global/peerings/my-peering', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "permissions": [] + * // } + * }, + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "permissions": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + testIamPermissions( + params: Params$Resource$Projects$Locations$Global$Peerings$Testiampermissions, + options: StreamMethodOptions + ): GaxiosPromise; + testIamPermissions( + params?: Params$Resource$Projects$Locations$Global$Peerings$Testiampermissions, + options?: MethodOptions + ): GaxiosPromise; + testIamPermissions( + params: Params$Resource$Projects$Locations$Global$Peerings$Testiampermissions, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + testIamPermissions( + params: Params$Resource$Projects$Locations$Global$Peerings$Testiampermissions, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + testIamPermissions( + params: Params$Resource$Projects$Locations$Global$Peerings$Testiampermissions, + callback: BodyResponseCallback + ): void; + testIamPermissions( + callback: BodyResponseCallback + ): void; + testIamPermissions( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Global$Peerings$Testiampermissions + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Global$Peerings$Testiampermissions; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Global$Peerings$Testiampermissions; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://managedidentities.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+resource}:testIamPermissions').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Locations$Global$Peerings$Getiampolicy + extends StandardParameters { + /** + * Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + */ + 'options.requestedPolicyVersion'?: number; + /** + * REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. + */ + resource?: string; + } + export interface Params$Resource$Projects$Locations$Global$Peerings$Setiampolicy + extends StandardParameters { + /** + * REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$SetIamPolicyRequest; + } + export interface Params$Resource$Projects$Locations$Global$Peerings$Testiampermissions + extends StandardParameters { + /** + * REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$TestIamPermissionsRequest; + } } diff --git a/src/apis/metastore/v1alpha.ts b/src/apis/metastore/v1alpha.ts index 2bd28caf4cc..020d80dcc9e 100644 --- a/src/apis/metastore/v1alpha.ts +++ b/src/apis/metastore/v1alpha.ts @@ -189,6 +189,15 @@ export namespace metastore_v1alpha { */ type?: string | null; } + /** + * Specifies how metastore metadata should be integrated with the Data Catalog service. + */ + export interface Schema$DataCatalogConfig { + /** + * Defines whether the metastore metadata should be synced to Data Catalog. The default value is to disable syncing metastore metadata to Data Catalog. + */ + enabled?: boolean | null; + } /** * 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); \} The JSON representation for Empty is empty JSON object {\}. */ @@ -202,7 +211,7 @@ export namespace metastore_v1alpha { */ databaseDumpType?: string | null; /** - * Required. A Cloud Storage URI of a folder that metadata are exported to, in the format gs:///. A sub-folder containing exported files will be created below it. + * A Cloud Storage URI of a folder, in the format gs:///. A sub-folder containing exported files will be created below it. */ destinationGcsFolder?: string | null; /** @@ -240,7 +249,7 @@ export namespace metastore_v1alpha { */ configOverrides?: {[key: string]: string} | null; /** - * Information used to configure the Hive metastore service as a service principal in a Kerberos realm. To disable Kerberos, use the UpdateService method and specify this field's path ("hive_metastore_config.kerberos_config") in the request's update_mask while omitting this field from the request's service. + * Information used to configure the Hive metastore service as a service principal in a Kerberos realm. To disable Kerberos, use the UpdateService method and specify this field's path (hive_metastore_config.kerberos_config) in the request's update_mask while omitting this field from the request's service. */ kerberosConfig?: Schema$KerberosConfig; /** @@ -274,7 +283,7 @@ export namespace metastore_v1alpha { */ krb5ConfigGcsUri?: string | null; /** - * A Kerberos principal that exists in the both the keytab the KDC to authenticate as. A typical principal is of the form "primary/instance@REALM", but there is no exact format. + * A Kerberos principal that exists in the both the keytab the KDC to authenticate as. A typical principal is of the form primary/instance@REALM, but there is no exact format. */ principal?: string | null; } @@ -394,7 +403,7 @@ export namespace metastore_v1alpha { */ databaseDumpType?: string | null; /** - * Output only. A Cloud Storage URI of a folder that metadata are exported to, in the form of gs:////, where ` is automatically generated. + * Output only. A Cloud Storage URI of a folder that metadata are exported to, in the form of gs:////, where is automatically generated. */ destinationGcsUri?: string | null; /** @@ -427,7 +436,7 @@ export namespace metastore_v1alpha { */ description?: string | null; /** - * Immutable. The relative resource name of the metadata import, of the form:"projects/{project_number\}/locations/{location_id\}/services/{service_id\}/metadataImports/{metadata_import_id\}". + * Immutable. The relative resource name of the metadata import, of the form:projects/{project_number\}/locations/{location_id\}/services/{service_id\}/metadataImports/{metadata_import_id\}. */ name?: string | null; /** @@ -442,7 +451,12 @@ export namespace metastore_v1alpha { /** * Specifies how metastore metadata should be integrated with external services. */ - export interface Schema$MetadataIntegration {} + export interface Schema$MetadataIntegration { + /** + * The integration config for the Data Catalog service. + */ + dataCatalogConfig?: Schema$DataCatalogConfig; + } /** * The metadata management activities of the metastore service. */ @@ -507,7 +521,7 @@ export namespace metastore_v1alpha { */ export interface Schema$Restore { /** - * Output only. The relative resource name of the metastore service backup to restore from, in the following form:projects/{project_id\}/locations/{location_id\}/services/{service_id\}/backups/{backup_id\} + * Output only. The relative resource name of the metastore service backup to restore from, in the following form:projects/{project_id\}/locations/{location_id\}/services/{service_id\}/backups/{backup_id\}. */ backup?: string | null; /** @@ -536,7 +550,7 @@ export namespace metastore_v1alpha { */ export interface Schema$Secret { /** - * The relative resource name of a Secret Manager secret version, in the following form:"projects/{project_number\}/secrets/{secret_id\}/versions/{version_id\}". + * The relative resource name of a Secret Manager secret version, in the following form:projects/{project_number\}/secrets/{secret_id\}/versions/{version_id\}. */ cloudSecret?: string | null; } @@ -577,17 +591,21 @@ export namespace metastore_v1alpha { */ metadataManagementActivity?: Schema$MetadataManagementActivity; /** - * Immutable. The relative resource name of the metastore service, of the form:"projects/{project_number\}/locations/{location_id\}/services/{service_id\}". + * Immutable. The relative resource name of the metastore service, of the form:projects/{project_number\}/locations/{location_id\}/services/{service_id\}. */ name?: string | null; /** - * Immutable. The relative resource name of the VPC network on which the instance can be accessed. It is specified in the following form:"projects/{project_number\}/global/networks/{network_id\}". + * Immutable. The relative resource name of the VPC network on which the instance can be accessed. It is specified in the following form:projects/{project_number\}/global/networks/{network_id\}. */ network?: string | null; /** * The TCP port at which the metastore service is reached. Default: 9083. */ port?: number | null; + /** + * Immutable. The release channel of the service. If unspecified, defaults to STABLE. + */ + releaseChannel?: string | null; /** * Output only. The current state of the metastore service. */ @@ -836,13 +854,13 @@ export namespace metastore_v1alpha { * * // Do the magic * const res = await metastore.projects.locations.list({ - * // The standard list 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). * filter: 'placeholder-value', * // The resource that owns the locations collection, if applicable. * name: 'projects/my-project', - * // The standard list page size. + * // The maximum number of results to return. If not set, the service will select a default. * pageSize: 'placeholder-value', - * // The standard list page token. + * // A page token received from the next_page_token field in the response. Send that page token to receive the subsequent page. * pageToken: 'placeholder-value', * }); * console.log(res.data); @@ -961,7 +979,7 @@ export namespace metastore_v1alpha { export interface Params$Resource$Projects$Locations$List extends StandardParameters { /** - * The standard list 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). */ filter?: string; /** @@ -969,11 +987,11 @@ export namespace metastore_v1alpha { */ name?: string; /** - * The standard list page size. + * The maximum number of results to return. If not set, the service will select a default. */ pageSize?: number; /** - * The standard list page token. + * A page token received from the next_page_token field in the response. Send that page token to receive the subsequent page. */ pageToken?: string; } @@ -1451,7 +1469,7 @@ export namespace metastore_v1alpha { * * // Do the magic * const res = await metastore.projects.locations.services.create({ - * // Required. The relative resource name of the location in which to create a metastore service, in the following form:"projects/{project_number\}/locations/{location_id\}". + * // Required. The relative resource name of the location in which to create a metastore service, in the following form:projects/{project_number\}/locations/{location_id\}. * parent: 'projects/my-project/locations/my-location', * // Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. * requestId: 'placeholder-value', @@ -1473,6 +1491,7 @@ export namespace metastore_v1alpha { * // "name": "my_name", * // "network": "my_network", * // "port": 0, + * // "releaseChannel": "my_releaseChannel", * // "state": "my_state", * // "stateMessage": "my_stateMessage", * // "tier": "my_tier", @@ -1611,7 +1630,7 @@ export namespace metastore_v1alpha { * * // Do the magic * const res = await metastore.projects.locations.services.delete({ - * // Required. The relative resource name of the metastore service to delete, in the following form:"projects/{project_number\}/locations/{location_id\}/services/{service_id\}". + * // Required. The relative resource name of the metastore service to delete, in the following form:projects/{project_number\}/locations/{location_id\}/services/{service_id\}. * name: 'projects/my-project/locations/my-location/services/my-service', * // Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. * requestId: 'placeholder-value', @@ -1743,7 +1762,7 @@ export namespace metastore_v1alpha { * * // Do the magic * const res = await metastore.projects.locations.services.exportMetadata({ - * // Required. The relative resource name of the metastore service to run export, in the following form:"projects/{project_id\}/locations/{location_id\}/services/{service_id\} + * // Required. The relative resource name of the metastore service to run export, in the following form:projects/{project_id\}/locations/{location_id\}/services/{service_id\}. * service: 'projects/my-project/locations/my-location/services/my-service', * * // Request body metadata @@ -1886,7 +1905,7 @@ export namespace metastore_v1alpha { * * // Do the magic * const res = await metastore.projects.locations.services.get({ - * // Required. The relative resource name of the metastore service to retrieve, in the following form:"projects/{project_number\}/locations/{location_id\}/services/{service_id\}". + * // Required. The relative resource name of the metastore service to retrieve, in the following form:projects/{project_number\}/locations/{location_id\}/services/{service_id\}. * name: 'projects/my-project/locations/my-location/services/my-service', * }); * console.log(res.data); @@ -1904,6 +1923,7 @@ export namespace metastore_v1alpha { * // "name": "my_name", * // "network": "my_network", * // "port": 0, + * // "releaseChannel": "my_releaseChannel", * // "state": "my_state", * // "stateMessage": "my_stateMessage", * // "tier": "my_tier", @@ -2163,13 +2183,13 @@ export namespace metastore_v1alpha { * const res = await metastore.projects.locations.services.list({ * // Optional. The filter to apply to list results. * filter: 'placeholder-value', - * // Optional. Specify the ordering of results as described in Sorting Order. If not specified, the results will be sorted in the default order. + * // Optional. Specify the ordering of results as described in Sorting Order (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not specified, the results will be sorted in the default order. * orderBy: 'placeholder-value', * // Optional. The maximum number of services to return. The response may contain less than the maximum number. If unspecified, no more than 500 services are returned. The maximum value is 1000; values above 1000 are changed to 1000. * pageSize: 'placeholder-value', * // Optional. A page token, received from a previous DataprocMetastore.ListServices call. Provide this token to retrieve the subsequent page.To retrieve the first page, supply an empty page token.When paginating, other parameters provided to DataprocMetastore.ListServices must match the call that provided the page token. * pageToken: 'placeholder-value', - * // Required. The relative resource name of the location of metastore services to list, in the following form:"projects/{project_number\}/locations/{location_id\}". + * // Required. The relative resource name of the location of metastore services to list, in the following form:projects/{project_number\}/locations/{location_id\}. * parent: 'projects/my-project/locations/my-location', * }); * console.log(res.data); @@ -2305,7 +2325,7 @@ export namespace metastore_v1alpha { * * // Do the magic * const res = await metastore.projects.locations.services.patch({ - * // Immutable. The relative resource name of the metastore service, of the form:"projects/{project_number\}/locations/{location_id\}/services/{service_id\}". + * // Immutable. The relative resource name of the metastore service, of the form:projects/{project_number\}/locations/{location_id\}/services/{service_id\}. * name: 'projects/my-project/locations/my-location/services/my-service', * // Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. * requestId: 'placeholder-value', @@ -2327,6 +2347,7 @@ export namespace metastore_v1alpha { * // "name": "my_name", * // "network": "my_network", * // "port": 0, + * // "releaseChannel": "my_releaseChannel", * // "state": "my_state", * // "stateMessage": "my_stateMessage", * // "tier": "my_tier", @@ -2724,7 +2745,7 @@ export namespace metastore_v1alpha { export interface Params$Resource$Projects$Locations$Services$Create extends StandardParameters { /** - * Required. The relative resource name of the location in which to create a metastore service, in the following form:"projects/{project_number\}/locations/{location_id\}". + * Required. The relative resource name of the location in which to create a metastore service, in the following form:projects/{project_number\}/locations/{location_id\}. */ parent?: string; /** @@ -2744,7 +2765,7 @@ export namespace metastore_v1alpha { export interface Params$Resource$Projects$Locations$Services$Delete extends StandardParameters { /** - * Required. The relative resource name of the metastore service to delete, in the following form:"projects/{project_number\}/locations/{location_id\}/services/{service_id\}". + * Required. The relative resource name of the metastore service to delete, in the following form:projects/{project_number\}/locations/{location_id\}/services/{service_id\}. */ name?: string; /** @@ -2755,7 +2776,7 @@ export namespace metastore_v1alpha { export interface Params$Resource$Projects$Locations$Services$Exportmetadata extends StandardParameters { /** - * Required. The relative resource name of the metastore service to run export, in the following form:"projects/{project_id\}/locations/{location_id\}/services/{service_id\} + * Required. The relative resource name of the metastore service to run export, in the following form:projects/{project_id\}/locations/{location_id\}/services/{service_id\}. */ service?: string; @@ -2767,7 +2788,7 @@ export namespace metastore_v1alpha { export interface Params$Resource$Projects$Locations$Services$Get extends StandardParameters { /** - * Required. The relative resource name of the metastore service to retrieve, in the following form:"projects/{project_number\}/locations/{location_id\}/services/{service_id\}". + * Required. The relative resource name of the metastore service to retrieve, in the following form:projects/{project_number\}/locations/{location_id\}/services/{service_id\}. */ name?: string; } @@ -2789,7 +2810,7 @@ export namespace metastore_v1alpha { */ filter?: string; /** - * Optional. Specify the ordering of results as described in Sorting Order. If not specified, the results will be sorted in the default order. + * Optional. Specify the ordering of results as described in Sorting Order (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not specified, the results will be sorted in the default order. */ orderBy?: string; /** @@ -2801,14 +2822,14 @@ export namespace metastore_v1alpha { */ pageToken?: string; /** - * Required. The relative resource name of the location of metastore services to list, in the following form:"projects/{project_number\}/locations/{location_id\}". + * Required. The relative resource name of the location of metastore services to list, in the following form:projects/{project_number\}/locations/{location_id\}. */ parent?: string; } export interface Params$Resource$Projects$Locations$Services$Patch extends StandardParameters { /** - * Immutable. The relative resource name of the metastore service, of the form:"projects/{project_number\}/locations/{location_id\}/services/{service_id\}". + * Immutable. The relative resource name of the metastore service, of the form:projects/{project_number\}/locations/{location_id\}/services/{service_id\}. */ name?: string; /** @@ -2886,7 +2907,7 @@ export namespace metastore_v1alpha { * { * // Required. The ID of the metadata import, which is used as the final component of the metadata import's name.This value must be between 1 and 64 characters long, begin with a letter, end with a letter or number, and consist of alpha-numeric ASCII characters or hyphens. * metadataImportId: 'placeholder-value', - * // Required. The relative resource name of the service in which to create a metastore import, in the following form:"projects/{project_number\}/locations/{location_id\}/services/{service_id\}" + * // Required. The relative resource name of the service in which to create a metastore import, in the following form:projects/{project_number\}/locations/{location_id\}/services/{service_id\}. * parent: 'projects/my-project/locations/my-location/services/my-service', * // Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. * requestId: 'placeholder-value', @@ -3035,7 +3056,7 @@ export namespace metastore_v1alpha { * * // Do the magic * const res = await metastore.projects.locations.services.metadataImports.get({ - * // Required. The relative resource name of the metadata import to retrieve, in the following form:"projects/{project_number\}/locations/{location_id\}/services/{service_id\}/metadataImports/{import_id\}". + * // Required. The relative resource name of the metadata import to retrieve, in the following form:projects/{project_number\}/locations/{location_id\}/services/{service_id\}/metadataImports/{import_id\}. * name: * 'projects/my-project/locations/my-location/services/my-service/metadataImports/my-metadataImport', * }); @@ -3169,13 +3190,13 @@ export namespace metastore_v1alpha { * const res = await metastore.projects.locations.services.metadataImports.list({ * // Optional. The filter to apply to list results. * filter: 'placeholder-value', - * // Optional. Specify the ordering of results as described in Sorting Order. If not specified, the results will be sorted in the default order. + * // Optional. Specify the ordering of results as described in Sorting Order (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not specified, the results will be sorted in the default order. * orderBy: 'placeholder-value', * // Optional. The maximum number of imports to return. The response may contain less than the maximum number. If unspecified, no more than 500 imports are returned. The maximum value is 1000; values above 1000 are changed to 1000. * pageSize: 'placeholder-value', * // Optional. A page token, received from a previous DataprocMetastore.ListServices call. Provide this token to retrieve the subsequent page.To retrieve the first page, supply an empty page token.When paginating, other parameters provided to DataprocMetastore.ListServices must match the call that provided the page token. * pageToken: 'placeholder-value', - * // Required. The relative resource name of the service whose metadata imports to list, in the following form:"projects/{project_number\}/locations/{location_id\}/services/{service_id\}/metadataImports". + * // Required. The relative resource name of the service whose metadata imports to list, in the following form:projects/{project_number\}/locations/{location_id\}/services/{service_id\}/metadataImports. * parent: 'projects/my-project/locations/my-location/services/my-service', * }); * console.log(res.data); @@ -3314,7 +3335,7 @@ export namespace metastore_v1alpha { * // Do the magic * const res = await metastore.projects.locations.services.metadataImports.patch( * { - * // Immutable. The relative resource name of the metadata import, of the form:"projects/{project_number\}/locations/{location_id\}/services/{service_id\}/metadataImports/{metadata_import_id\}". + * // Immutable. The relative resource name of the metadata import, of the form:projects/{project_number\}/locations/{location_id\}/services/{service_id\}/metadataImports/{metadata_import_id\}. * name: * 'projects/my-project/locations/my-location/services/my-service/metadataImports/my-metadataImport', * // Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. @@ -3444,7 +3465,7 @@ export namespace metastore_v1alpha { */ metadataImportId?: string; /** - * Required. The relative resource name of the service in which to create a metastore import, in the following form:"projects/{project_number\}/locations/{location_id\}/services/{service_id\}" + * Required. The relative resource name of the service in which to create a metastore import, in the following form:projects/{project_number\}/locations/{location_id\}/services/{service_id\}. */ parent?: string; /** @@ -3460,7 +3481,7 @@ export namespace metastore_v1alpha { export interface Params$Resource$Projects$Locations$Services$Metadataimports$Get extends StandardParameters { /** - * Required. The relative resource name of the metadata import to retrieve, in the following form:"projects/{project_number\}/locations/{location_id\}/services/{service_id\}/metadataImports/{import_id\}". + * Required. The relative resource name of the metadata import to retrieve, in the following form:projects/{project_number\}/locations/{location_id\}/services/{service_id\}/metadataImports/{import_id\}. */ name?: string; } @@ -3471,7 +3492,7 @@ export namespace metastore_v1alpha { */ filter?: string; /** - * Optional. Specify the ordering of results as described in Sorting Order. If not specified, the results will be sorted in the default order. + * Optional. Specify the ordering of results as described in Sorting Order (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not specified, the results will be sorted in the default order. */ orderBy?: string; /** @@ -3483,14 +3504,14 @@ export namespace metastore_v1alpha { */ pageToken?: string; /** - * Required. The relative resource name of the service whose metadata imports to list, in the following form:"projects/{project_number\}/locations/{location_id\}/services/{service_id\}/metadataImports". + * Required. The relative resource name of the service whose metadata imports to list, in the following form:projects/{project_number\}/locations/{location_id\}/services/{service_id\}/metadataImports. */ parent?: string; } export interface Params$Resource$Projects$Locations$Services$Metadataimports$Patch extends StandardParameters { /** - * Immutable. The relative resource name of the metadata import, of the form:"projects/{project_number\}/locations/{location_id\}/services/{service_id\}/metadataImports/{metadata_import_id\}". + * Immutable. The relative resource name of the metadata import, of the form:projects/{project_number\}/locations/{location_id\}/services/{service_id\}/metadataImports/{metadata_import_id\}. */ name?: string; /** diff --git a/src/apis/metastore/v1beta.ts b/src/apis/metastore/v1beta.ts index 166a4d47a17..e041e4cc828 100644 --- a/src/apis/metastore/v1beta.ts +++ b/src/apis/metastore/v1beta.ts @@ -189,6 +189,15 @@ export namespace metastore_v1beta { */ type?: string | null; } + /** + * Specifies how metastore metadata should be integrated with the Data Catalog service. + */ + export interface Schema$DataCatalogConfig { + /** + * Defines whether the metastore metadata should be synced to Data Catalog. The default value is to disable syncing metastore metadata to Data Catalog. + */ + enabled?: boolean | null; + } /** * 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); \} The JSON representation for Empty is empty JSON object {\}. */ @@ -202,7 +211,7 @@ export namespace metastore_v1beta { */ databaseDumpType?: string | null; /** - * Required. A Cloud Storage URI of a folder that metadata are exported to, in the format gs:///. A sub-folder containing exported files will be created below it. + * A Cloud Storage URI of a folder, in the format gs:///. A sub-folder containing exported files will be created below it. */ destinationGcsFolder?: string | null; /** @@ -240,7 +249,7 @@ export namespace metastore_v1beta { */ configOverrides?: {[key: string]: string} | null; /** - * Information used to configure the Hive metastore service as a service principal in a Kerberos realm. To disable Kerberos, use the UpdateService method and specify this field's path ("hive_metastore_config.kerberos_config") in the request's update_mask while omitting this field from the request's service. + * Information used to configure the Hive metastore service as a service principal in a Kerberos realm. To disable Kerberos, use the UpdateService method and specify this field's path (hive_metastore_config.kerberos_config) in the request's update_mask while omitting this field from the request's service. */ kerberosConfig?: Schema$KerberosConfig; /** @@ -274,7 +283,7 @@ export namespace metastore_v1beta { */ krb5ConfigGcsUri?: string | null; /** - * A Kerberos principal that exists in the both the keytab the KDC to authenticate as. A typical principal is of the form "primary/instance@REALM", but there is no exact format. + * A Kerberos principal that exists in the both the keytab the KDC to authenticate as. A typical principal is of the form primary/instance@REALM, but there is no exact format. */ principal?: string | null; } @@ -394,7 +403,7 @@ export namespace metastore_v1beta { */ databaseDumpType?: string | null; /** - * Output only. A Cloud Storage URI of a folder that metadata are exported to, in the form of gs:////, where ` is automatically generated. + * Output only. A Cloud Storage URI of a folder that metadata are exported to, in the form of gs:////, where is automatically generated. */ destinationGcsUri?: string | null; /** @@ -427,7 +436,7 @@ export namespace metastore_v1beta { */ description?: string | null; /** - * Immutable. The relative resource name of the metadata import, of the form:"projects/{project_number\}/locations/{location_id\}/services/{service_id\}/metadataImports/{metadata_import_id\}". + * Immutable. The relative resource name of the metadata import, of the form:projects/{project_number\}/locations/{location_id\}/services/{service_id\}/metadataImports/{metadata_import_id\}. */ name?: string | null; /** @@ -442,7 +451,12 @@ export namespace metastore_v1beta { /** * Specifies how metastore metadata should be integrated with external services. */ - export interface Schema$MetadataIntegration {} + export interface Schema$MetadataIntegration { + /** + * The integration config for the Data Catalog service. + */ + dataCatalogConfig?: Schema$DataCatalogConfig; + } /** * The metadata management activities of the metastore service. */ @@ -507,7 +521,7 @@ export namespace metastore_v1beta { */ export interface Schema$Restore { /** - * Output only. The relative resource name of the metastore service backup to restore from, in the following form:projects/{project_id\}/locations/{location_id\}/services/{service_id\}/backups/{backup_id\} + * Output only. The relative resource name of the metastore service backup to restore from, in the following form:projects/{project_id\}/locations/{location_id\}/services/{service_id\}/backups/{backup_id\}. */ backup?: string | null; /** @@ -536,7 +550,7 @@ export namespace metastore_v1beta { */ export interface Schema$Secret { /** - * The relative resource name of a Secret Manager secret version, in the following form:"projects/{project_number\}/secrets/{secret_id\}/versions/{version_id\}". + * The relative resource name of a Secret Manager secret version, in the following form:projects/{project_number\}/secrets/{secret_id\}/versions/{version_id\}. */ cloudSecret?: string | null; } @@ -577,17 +591,21 @@ export namespace metastore_v1beta { */ metadataManagementActivity?: Schema$MetadataManagementActivity; /** - * Immutable. The relative resource name of the metastore service, of the form:"projects/{project_number\}/locations/{location_id\}/services/{service_id\}". + * Immutable. The relative resource name of the metastore service, of the form:projects/{project_number\}/locations/{location_id\}/services/{service_id\}. */ name?: string | null; /** - * Immutable. The relative resource name of the VPC network on which the instance can be accessed. It is specified in the following form:"projects/{project_number\}/global/networks/{network_id\}". + * Immutable. The relative resource name of the VPC network on which the instance can be accessed. It is specified in the following form:projects/{project_number\}/global/networks/{network_id\}. */ network?: string | null; /** * The TCP port at which the metastore service is reached. Default: 9083. */ port?: number | null; + /** + * Immutable. The release channel of the service. If unspecified, defaults to STABLE. + */ + releaseChannel?: string | null; /** * Output only. The current state of the metastore service. */ @@ -836,13 +854,13 @@ export namespace metastore_v1beta { * * // Do the magic * const res = await metastore.projects.locations.list({ - * // The standard list 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). * filter: 'placeholder-value', * // The resource that owns the locations collection, if applicable. * name: 'projects/my-project', - * // The standard list page size. + * // The maximum number of results to return. If not set, the service will select a default. * pageSize: 'placeholder-value', - * // The standard list page token. + * // A page token received from the next_page_token field in the response. Send that page token to receive the subsequent page. * pageToken: 'placeholder-value', * }); * console.log(res.data); @@ -961,7 +979,7 @@ export namespace metastore_v1beta { export interface Params$Resource$Projects$Locations$List extends StandardParameters { /** - * The standard list 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). */ filter?: string; /** @@ -969,11 +987,11 @@ export namespace metastore_v1beta { */ name?: string; /** - * The standard list page size. + * The maximum number of results to return. If not set, the service will select a default. */ pageSize?: number; /** - * The standard list page token. + * A page token received from the next_page_token field in the response. Send that page token to receive the subsequent page. */ pageToken?: string; } @@ -1451,7 +1469,7 @@ export namespace metastore_v1beta { * * // Do the magic * const res = await metastore.projects.locations.services.create({ - * // Required. The relative resource name of the location in which to create a metastore service, in the following form:"projects/{project_number\}/locations/{location_id\}". + * // Required. The relative resource name of the location in which to create a metastore service, in the following form:projects/{project_number\}/locations/{location_id\}. * parent: 'projects/my-project/locations/my-location', * // Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. * requestId: 'placeholder-value', @@ -1473,6 +1491,7 @@ export namespace metastore_v1beta { * // "name": "my_name", * // "network": "my_network", * // "port": 0, + * // "releaseChannel": "my_releaseChannel", * // "state": "my_state", * // "stateMessage": "my_stateMessage", * // "tier": "my_tier", @@ -1611,7 +1630,7 @@ export namespace metastore_v1beta { * * // Do the magic * const res = await metastore.projects.locations.services.delete({ - * // Required. The relative resource name of the metastore service to delete, in the following form:"projects/{project_number\}/locations/{location_id\}/services/{service_id\}". + * // Required. The relative resource name of the metastore service to delete, in the following form:projects/{project_number\}/locations/{location_id\}/services/{service_id\}. * name: 'projects/my-project/locations/my-location/services/my-service', * // Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. * requestId: 'placeholder-value', @@ -1743,7 +1762,7 @@ export namespace metastore_v1beta { * * // Do the magic * const res = await metastore.projects.locations.services.exportMetadata({ - * // Required. The relative resource name of the metastore service to run export, in the following form:"projects/{project_id\}/locations/{location_id\}/services/{service_id\} + * // Required. The relative resource name of the metastore service to run export, in the following form:projects/{project_id\}/locations/{location_id\}/services/{service_id\}. * service: 'projects/my-project/locations/my-location/services/my-service', * * // Request body metadata @@ -1886,7 +1905,7 @@ export namespace metastore_v1beta { * * // Do the magic * const res = await metastore.projects.locations.services.get({ - * // Required. The relative resource name of the metastore service to retrieve, in the following form:"projects/{project_number\}/locations/{location_id\}/services/{service_id\}". + * // Required. The relative resource name of the metastore service to retrieve, in the following form:projects/{project_number\}/locations/{location_id\}/services/{service_id\}. * name: 'projects/my-project/locations/my-location/services/my-service', * }); * console.log(res.data); @@ -1904,6 +1923,7 @@ export namespace metastore_v1beta { * // "name": "my_name", * // "network": "my_network", * // "port": 0, + * // "releaseChannel": "my_releaseChannel", * // "state": "my_state", * // "stateMessage": "my_stateMessage", * // "tier": "my_tier", @@ -2163,13 +2183,13 @@ export namespace metastore_v1beta { * const res = await metastore.projects.locations.services.list({ * // Optional. The filter to apply to list results. * filter: 'placeholder-value', - * // Optional. Specify the ordering of results as described in Sorting Order. If not specified, the results will be sorted in the default order. + * // Optional. Specify the ordering of results as described in Sorting Order (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not specified, the results will be sorted in the default order. * orderBy: 'placeholder-value', * // Optional. The maximum number of services to return. The response may contain less than the maximum number. If unspecified, no more than 500 services are returned. The maximum value is 1000; values above 1000 are changed to 1000. * pageSize: 'placeholder-value', * // Optional. A page token, received from a previous DataprocMetastore.ListServices call. Provide this token to retrieve the subsequent page.To retrieve the first page, supply an empty page token.When paginating, other parameters provided to DataprocMetastore.ListServices must match the call that provided the page token. * pageToken: 'placeholder-value', - * // Required. The relative resource name of the location of metastore services to list, in the following form:"projects/{project_number\}/locations/{location_id\}". + * // Required. The relative resource name of the location of metastore services to list, in the following form:projects/{project_number\}/locations/{location_id\}. * parent: 'projects/my-project/locations/my-location', * }); * console.log(res.data); @@ -2305,7 +2325,7 @@ export namespace metastore_v1beta { * * // Do the magic * const res = await metastore.projects.locations.services.patch({ - * // Immutable. The relative resource name of the metastore service, of the form:"projects/{project_number\}/locations/{location_id\}/services/{service_id\}". + * // Immutable. The relative resource name of the metastore service, of the form:projects/{project_number\}/locations/{location_id\}/services/{service_id\}. * name: 'projects/my-project/locations/my-location/services/my-service', * // Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. * requestId: 'placeholder-value', @@ -2327,6 +2347,7 @@ export namespace metastore_v1beta { * // "name": "my_name", * // "network": "my_network", * // "port": 0, + * // "releaseChannel": "my_releaseChannel", * // "state": "my_state", * // "stateMessage": "my_stateMessage", * // "tier": "my_tier", @@ -2724,7 +2745,7 @@ export namespace metastore_v1beta { export interface Params$Resource$Projects$Locations$Services$Create extends StandardParameters { /** - * Required. The relative resource name of the location in which to create a metastore service, in the following form:"projects/{project_number\}/locations/{location_id\}". + * Required. The relative resource name of the location in which to create a metastore service, in the following form:projects/{project_number\}/locations/{location_id\}. */ parent?: string; /** @@ -2744,7 +2765,7 @@ export namespace metastore_v1beta { export interface Params$Resource$Projects$Locations$Services$Delete extends StandardParameters { /** - * Required. The relative resource name of the metastore service to delete, in the following form:"projects/{project_number\}/locations/{location_id\}/services/{service_id\}". + * Required. The relative resource name of the metastore service to delete, in the following form:projects/{project_number\}/locations/{location_id\}/services/{service_id\}. */ name?: string; /** @@ -2755,7 +2776,7 @@ export namespace metastore_v1beta { export interface Params$Resource$Projects$Locations$Services$Exportmetadata extends StandardParameters { /** - * Required. The relative resource name of the metastore service to run export, in the following form:"projects/{project_id\}/locations/{location_id\}/services/{service_id\} + * Required. The relative resource name of the metastore service to run export, in the following form:projects/{project_id\}/locations/{location_id\}/services/{service_id\}. */ service?: string; @@ -2767,7 +2788,7 @@ export namespace metastore_v1beta { export interface Params$Resource$Projects$Locations$Services$Get extends StandardParameters { /** - * Required. The relative resource name of the metastore service to retrieve, in the following form:"projects/{project_number\}/locations/{location_id\}/services/{service_id\}". + * Required. The relative resource name of the metastore service to retrieve, in the following form:projects/{project_number\}/locations/{location_id\}/services/{service_id\}. */ name?: string; } @@ -2789,7 +2810,7 @@ export namespace metastore_v1beta { */ filter?: string; /** - * Optional. Specify the ordering of results as described in Sorting Order. If not specified, the results will be sorted in the default order. + * Optional. Specify the ordering of results as described in Sorting Order (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not specified, the results will be sorted in the default order. */ orderBy?: string; /** @@ -2801,14 +2822,14 @@ export namespace metastore_v1beta { */ pageToken?: string; /** - * Required. The relative resource name of the location of metastore services to list, in the following form:"projects/{project_number\}/locations/{location_id\}". + * Required. The relative resource name of the location of metastore services to list, in the following form:projects/{project_number\}/locations/{location_id\}. */ parent?: string; } export interface Params$Resource$Projects$Locations$Services$Patch extends StandardParameters { /** - * Immutable. The relative resource name of the metastore service, of the form:"projects/{project_number\}/locations/{location_id\}/services/{service_id\}". + * Immutable. The relative resource name of the metastore service, of the form:projects/{project_number\}/locations/{location_id\}/services/{service_id\}. */ name?: string; /** @@ -2886,7 +2907,7 @@ export namespace metastore_v1beta { * { * // Required. The ID of the metadata import, which is used as the final component of the metadata import's name.This value must be between 1 and 64 characters long, begin with a letter, end with a letter or number, and consist of alpha-numeric ASCII characters or hyphens. * metadataImportId: 'placeholder-value', - * // Required. The relative resource name of the service in which to create a metastore import, in the following form:"projects/{project_number\}/locations/{location_id\}/services/{service_id\}" + * // Required. The relative resource name of the service in which to create a metastore import, in the following form:projects/{project_number\}/locations/{location_id\}/services/{service_id\}. * parent: 'projects/my-project/locations/my-location/services/my-service', * // Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. * requestId: 'placeholder-value', @@ -3035,7 +3056,7 @@ export namespace metastore_v1beta { * * // Do the magic * const res = await metastore.projects.locations.services.metadataImports.get({ - * // Required. The relative resource name of the metadata import to retrieve, in the following form:"projects/{project_number\}/locations/{location_id\}/services/{service_id\}/metadataImports/{import_id\}". + * // Required. The relative resource name of the metadata import to retrieve, in the following form:projects/{project_number\}/locations/{location_id\}/services/{service_id\}/metadataImports/{import_id\}. * name: * 'projects/my-project/locations/my-location/services/my-service/metadataImports/my-metadataImport', * }); @@ -3169,13 +3190,13 @@ export namespace metastore_v1beta { * const res = await metastore.projects.locations.services.metadataImports.list({ * // Optional. The filter to apply to list results. * filter: 'placeholder-value', - * // Optional. Specify the ordering of results as described in Sorting Order. If not specified, the results will be sorted in the default order. + * // Optional. Specify the ordering of results as described in Sorting Order (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not specified, the results will be sorted in the default order. * orderBy: 'placeholder-value', * // Optional. The maximum number of imports to return. The response may contain less than the maximum number. If unspecified, no more than 500 imports are returned. The maximum value is 1000; values above 1000 are changed to 1000. * pageSize: 'placeholder-value', * // Optional. A page token, received from a previous DataprocMetastore.ListServices call. Provide this token to retrieve the subsequent page.To retrieve the first page, supply an empty page token.When paginating, other parameters provided to DataprocMetastore.ListServices must match the call that provided the page token. * pageToken: 'placeholder-value', - * // Required. The relative resource name of the service whose metadata imports to list, in the following form:"projects/{project_number\}/locations/{location_id\}/services/{service_id\}/metadataImports". + * // Required. The relative resource name of the service whose metadata imports to list, in the following form:projects/{project_number\}/locations/{location_id\}/services/{service_id\}/metadataImports. * parent: 'projects/my-project/locations/my-location/services/my-service', * }); * console.log(res.data); @@ -3314,7 +3335,7 @@ export namespace metastore_v1beta { * // Do the magic * const res = await metastore.projects.locations.services.metadataImports.patch( * { - * // Immutable. The relative resource name of the metadata import, of the form:"projects/{project_number\}/locations/{location_id\}/services/{service_id\}/metadataImports/{metadata_import_id\}". + * // Immutable. The relative resource name of the metadata import, of the form:projects/{project_number\}/locations/{location_id\}/services/{service_id\}/metadataImports/{metadata_import_id\}. * name: * 'projects/my-project/locations/my-location/services/my-service/metadataImports/my-metadataImport', * // Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported. @@ -3444,7 +3465,7 @@ export namespace metastore_v1beta { */ metadataImportId?: string; /** - * Required. The relative resource name of the service in which to create a metastore import, in the following form:"projects/{project_number\}/locations/{location_id\}/services/{service_id\}" + * Required. The relative resource name of the service in which to create a metastore import, in the following form:projects/{project_number\}/locations/{location_id\}/services/{service_id\}. */ parent?: string; /** @@ -3460,7 +3481,7 @@ export namespace metastore_v1beta { export interface Params$Resource$Projects$Locations$Services$Metadataimports$Get extends StandardParameters { /** - * Required. The relative resource name of the metadata import to retrieve, in the following form:"projects/{project_number\}/locations/{location_id\}/services/{service_id\}/metadataImports/{import_id\}". + * Required. The relative resource name of the metadata import to retrieve, in the following form:projects/{project_number\}/locations/{location_id\}/services/{service_id\}/metadataImports/{import_id\}. */ name?: string; } @@ -3471,7 +3492,7 @@ export namespace metastore_v1beta { */ filter?: string; /** - * Optional. Specify the ordering of results as described in Sorting Order. If not specified, the results will be sorted in the default order. + * Optional. Specify the ordering of results as described in Sorting Order (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not specified, the results will be sorted in the default order. */ orderBy?: string; /** @@ -3483,14 +3504,14 @@ export namespace metastore_v1beta { */ pageToken?: string; /** - * Required. The relative resource name of the service whose metadata imports to list, in the following form:"projects/{project_number\}/locations/{location_id\}/services/{service_id\}/metadataImports". + * Required. The relative resource name of the service whose metadata imports to list, in the following form:projects/{project_number\}/locations/{location_id\}/services/{service_id\}/metadataImports. */ parent?: string; } export interface Params$Resource$Projects$Locations$Services$Metadataimports$Patch extends StandardParameters { /** - * Immutable. The relative resource name of the metadata import, of the form:"projects/{project_number\}/locations/{location_id\}/services/{service_id\}/metadataImports/{metadata_import_id\}". + * Immutable. The relative resource name of the metadata import, of the form:projects/{project_number\}/locations/{location_id\}/services/{service_id\}/metadataImports/{metadata_import_id\}. */ name?: string; /** diff --git a/src/apis/monitoring/v1.ts b/src/apis/monitoring/v1.ts index 4bd3f986f9c..f4785106df1 100644 --- a/src/apis/monitoring/v1.ts +++ b/src/apis/monitoring/v1.ts @@ -867,7 +867,7 @@ export namespace monitoring_v1 { } /** - * Deletes an existing custom dashboard.This method requires the monitoring.dashboards.delete permission on the specified dashboard. For more information, see Google Cloud IAM (https://cloud.google.com/iam). + * Deletes an existing custom dashboard.This method requires the monitoring.dashboards.delete permission on the specified dashboard. For more information, see Cloud Identity and Access Management (https://cloud.google.com/iam). * @example * ```js * // Before running the sample: @@ -995,7 +995,7 @@ export namespace monitoring_v1 { } /** - * Fetches a specific dashboard.This method requires the monitoring.dashboards.get permission on the specified dashboard. For more information, see Google Cloud IAM (https://cloud.google.com/iam). + * Fetches a specific dashboard.This method requires the monitoring.dashboards.get permission on the specified dashboard. For more information, see Cloud Identity and Access Management (https://cloud.google.com/iam). * @example * ```js * // Before running the sample: @@ -1131,7 +1131,7 @@ export namespace monitoring_v1 { } /** - * Lists the existing dashboards.This method requires the monitoring.dashboards.list permission on the specified project. For more information, see Google Cloud IAM (https://cloud.google.com/iam). + * Lists the existing dashboards.This method requires the monitoring.dashboards.list permission on the specified project. For more information, see Cloud Identity and Access Management (https://cloud.google.com/iam). * @example * ```js * // Before running the sample: @@ -1274,7 +1274,7 @@ export namespace monitoring_v1 { } /** - * Replaces an existing custom dashboard with a new definition.This method requires the monitoring.dashboards.update permission on the specified dashboard. For more information, see Google Cloud IAM (https://cloud.google.com/iam). + * Replaces an existing custom dashboard with a new definition.This method requires the monitoring.dashboards.update permission on the specified dashboard. For more information, see Cloud Identity and Access Management (https://cloud.google.com/iam). * @example * ```js * // Before running the sample: diff --git a/src/apis/monitoring/v3.ts b/src/apis/monitoring/v3.ts index dd9a5d396c4..70b5c735009 100644 --- a/src/apis/monitoring/v3.ts +++ b/src/apis/monitoring/v3.ts @@ -1831,7 +1831,7 @@ export namespace monitoring_v3 { */ isInternal?: boolean | null; /** - * The monitored resource (https://cloud.google.com/monitoring/api/resources) associated with the configuration. The following monitored resource types are supported for Uptime checks: uptime_url, gce_instance, gae_app, aws_ec2_instance, aws_elb_load_balancer + * The monitored resource (https://cloud.google.com/monitoring/api/resources) associated with the configuration. The following monitored resource types are valid for this field: uptime_url, gce_instance, gae_app, aws_ec2_instance, aws_elb_load_balancer */ monitoredResource?: Schema$MonitoredResource; /** diff --git a/src/apis/networkmanagement/v1.ts b/src/apis/networkmanagement/v1.ts index 19257a971ae..5aad17f90f8 100644 --- a/src/apis/networkmanagement/v1.ts +++ b/src/apis/networkmanagement/v1.ts @@ -168,7 +168,6 @@ export namespace networkmanagement_v1 { * Associates `members` with a `role`. */ export interface Schema$Binding { - bindingId?: string | null; /** * The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). */ @@ -349,7 +348,7 @@ export namespace networkmanagement_v1 { title?: string | null; } /** - * For display only. Metadata associated with a Compute Engine firewall rule. + * For display only. Metadata associated with a VPC firewall rule, an implied VPC firewall rule, or a hierarchical firewall policy rule. */ export interface Schema$FirewallInfo { /** @@ -361,27 +360,35 @@ export namespace networkmanagement_v1 { */ direction?: string | null; /** - * Name of a Compute Engine firewall rule. + * The display name of the VPC firewall rule. This field is not applicable to hierarchical firewall policy rules. */ displayName?: string | null; /** - * URI of a Compute Engine network. + * The firewall rule's type. + */ + firewallRuleType?: string | null; + /** + * The URI of the VPC network that the firewall rule is associated with. This field is not applicable to hierarchical firewall policy rules. */ networkUri?: string | null; /** - * Priority of the firewall rule. + * The hierarchical firewall policy that this rule is associated with. This field is not applicable to VPC firewall rules. + */ + policy?: string | null; + /** + * The priority of the firewall rule. */ priority?: number | null; /** - * Target service accounts of the firewall rule. + * The target service accounts specified by the firewall rule. */ targetServiceAccounts?: string[] | null; /** - * Target tags of the firewall rule. + * The target tags defined by the VPC firewall rule. This field is not applicable to hierarchical firewall policy rules. */ targetTags?: string[] | null; /** - * URI of a Compute Engine firewall rule. Implied default rule does not have URI. + * The URI of the VPC firewall rule. This field is not applicable to implied firewall rules or hierarchical firewall policy rules. */ uri?: string | null; } @@ -683,7 +690,7 @@ export namespace networkmanagement_v1 { version?: number | null; } /** - * The details of reachability state from the latest run. + * Results of the configuration analysis from the last run of the test. */ export interface Schema$ReachabilityDetails { /** @@ -691,7 +698,7 @@ export namespace networkmanagement_v1 { */ error?: Schema$Status; /** - * The overall reachability result of the test. + * The overall result of the test's configuration analysis. */ result?: string | null; /** @@ -699,7 +706,7 @@ export namespace networkmanagement_v1 { */ traces?: Schema$Trace[]; /** - * The time the reachability state was verified. + * The time of the configuration analysis. */ verifyTime?: string | null; } @@ -803,7 +810,7 @@ export namespace networkmanagement_v1 { */ drop?: Schema$DropInfo; /** - * Display info of the source and destination under analysis. The endpiont info in an intermediate state may differ with the initial input, as it might be modified by state like NAT, or Connection Proxy. + * Display info of the source and destination under analysis. The endpoint info in an intermediate state may differ with the initial input, as it might be modified by state like NAT, or Connection Proxy. */ endpoint?: Schema$EndpointInfo; /** @@ -870,7 +877,7 @@ export namespace networkmanagement_v1 { permissions?: string[] | null; } /** - * Trace represents one simulated packet forwarding path. - Each trace contains multiple ordered steps. - Each step is in a particular state and has an associated configuration. - State is categorized as a final or non-final state. - Each final state has a reason associated with it. - Each trace must end with a final state (the last step). |---------------------Trace----------------------| Step1(State) Step2(State) --- StepN(State(final)) + * Trace represents one simulated packet forwarding path. * Each trace contains multiple ordered Steps. * Each step is in a particular state with associated configuration. * State is categorized as final or non-final states. * Each final state has a reason associated. * Each trace must end with a final state (the last step). ``` |---------------------Trace----------------------| Step1(State) Step2(State) --- StepN(State(final)) ``` */ export interface Schema$Trace { /** @@ -1128,13 +1135,13 @@ export namespace networkmanagement_v1 { * * // Do the magic * const res = await networkmanagement.projects.locations.list({ - * // The standard list 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). * filter: 'placeholder-value', * // The resource that owns the locations collection, if applicable. * name: 'projects/my-project', - * // The standard list page size. + * // The maximum number of results to return. If not set, the service will select a default. * pageSize: 'placeholder-value', - * // The standard list page token. + * // A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. * pageToken: 'placeholder-value', * }); * console.log(res.data); @@ -1254,7 +1261,7 @@ export namespace networkmanagement_v1 { export interface Params$Resource$Projects$Locations$List extends StandardParameters { /** - * The standard list 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). */ filter?: string; /** @@ -1262,11 +1269,11 @@ export namespace networkmanagement_v1 { */ name?: string; /** - * The standard list page size. + * The maximum number of results to return. If not set, the service will select a default. */ pageSize?: number; /** - * The standard list page token. + * A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. */ pageToken?: string; } diff --git a/src/apis/networkmanagement/v1beta1.ts b/src/apis/networkmanagement/v1beta1.ts index 0b6f5756443..f00b3e1fe3e 100644 --- a/src/apis/networkmanagement/v1beta1.ts +++ b/src/apis/networkmanagement/v1beta1.ts @@ -168,7 +168,6 @@ export namespace networkmanagement_v1beta1 { * Associates `members` with a `role`. */ export interface Schema$Binding { - bindingId?: string | null; /** * The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). */ @@ -390,7 +389,7 @@ export namespace networkmanagement_v1beta1 { title?: string | null; } /** - * For display only. Metadata associated with a Compute Engine firewall rule. + * For display only. Metadata associated with a VPC firewall rule, an implied VPC firewall rule, or a hierarchical firewall policy rule. */ export interface Schema$FirewallInfo { /** @@ -402,27 +401,35 @@ export namespace networkmanagement_v1beta1 { */ direction?: string | null; /** - * Name of a Compute Engine firewall rule. + * The display name of the VPC firewall rule. This field is not applicable to hierarchical firewall policy rules. */ displayName?: string | null; /** - * URI of a Compute Engine network. + * The firewall rule's type. + */ + firewallRuleType?: string | null; + /** + * The URI of the VPC network that the firewall rule is associated with. This field is not applicable to hierarchical firewall policy rules. */ networkUri?: string | null; /** - * Priority of the firewall rule. + * The hierarchical firewall policy that this rule is associated with. This field is not applicable to VPC firewall rules. + */ + policy?: string | null; + /** + * The priority of the firewall rule. */ priority?: number | null; /** - * Target service accounts of the firewall rule. + * The target service accounts specified by the firewall rule. */ targetServiceAccounts?: string[] | null; /** - * Target tags of the firewall rule. + * The target tags defined by the VPC firewall rule. This field is not applicable to hierarchical firewall policy rules. */ targetTags?: string[] | null; /** - * URI of a Compute Engine firewall rule. Implied default rule does not have URI. + * The URI of the VPC firewall rule. This field is not applicable to implied firewall rules or hierarchical firewall policy rules. */ uri?: string | null; } @@ -767,27 +774,27 @@ export namespace networkmanagement_v1beta1 { version?: number | null; } /** - * The details of probing from the latest run. + * Results of active probing from the last run of the test. */ export interface Schema$ProbingDetails { /** - * Causes that the probing was aborted. + * The reason probing was aborted. */ abortCause?: string | null; /** - * Derived from the test input. The actual source and destination endpoint where the probing was run. + * The source and destination endpoints derived from the test input and used for active probing. */ endpointInfo?: Schema$EndpointInfo; /** - * The details of an internal failure or a cancellation of reachability analysis. + * Details about an internal failure or the cancellation of active probing. */ error?: Schema$Status; /** - * One way probing latency distribution. The latency is measured as duration of packet traversal of Google Cloud network, from source to destination endpoint. + * Latency as measured by active probing in one direction: from the source to the destination endpoint. */ probingLatency?: Schema$LatencyDistribution; /** - * The overall reachability result of the test. + * The overall result of active probing. */ result?: string | null; /** @@ -795,16 +802,16 @@ export namespace networkmanagement_v1beta1 { */ sentProbeCount?: number | null; /** - * Number of probes that reached destination. + * Number of probes that reached the destination. */ successfulProbeCount?: number | null; /** - * The time the reachability state was verified. + * The time that reachability was assessed through active probing. */ verifyTime?: string | null; } /** - * The details of reachability state from the latest run. + * Results of the configuration analysis from the last run of the test. */ export interface Schema$ReachabilityDetails { /** @@ -812,7 +819,7 @@ export namespace networkmanagement_v1beta1 { */ error?: Schema$Status; /** - * The overall reachability result of the test. + * The overall result of the test's configuration analysis. */ result?: string | null; /** @@ -820,7 +827,7 @@ export namespace networkmanagement_v1beta1 { */ traces?: Schema$Trace[]; /** - * The time the reachability state was verified. + * The time of the configuration analysis. */ verifyTime?: string | null; } @@ -928,7 +935,7 @@ export namespace networkmanagement_v1beta1 { */ drop?: Schema$DropInfo; /** - * Display info of the source and destination under analysis. The endpiont info in an intermediate state may differ with the initial input, as it might be modified by state like NAT, or Connection Proxy. + * Display info of the source and destination under analysis. The endpoint info in an intermediate state may differ with the initial input, as it might be modified by state like NAT, or Connection Proxy. */ endpoint?: Schema$EndpointInfo; /** @@ -999,7 +1006,7 @@ export namespace networkmanagement_v1beta1 { permissions?: string[] | null; } /** - * Trace represents one simulated packet forwarding path. - Each trace contains multiple ordered steps. - Each step is in a particular state and has an associated configuration. - State is categorized as a final or non-final state. - Each final state has a reason associated with it. - Each trace must end with a final state (the last step). |---------------------Trace----------------------| Step1(State) Step2(State) --- StepN(State(final)) + * Trace represents one simulated packet forwarding path. * Each trace contains multiple ordered Steps. * Each step is in a particular state with associated configuration. * State is categorized as final or non-final states. * Each final state has a reason associated. * Each trace must end with a final state (the last step). ``` |---------------------Trace----------------------| Step1(State) Step2(State) --- StepN(State(final)) ``` */ export interface Schema$Trace { /** @@ -1257,13 +1264,13 @@ export namespace networkmanagement_v1beta1 { * * // Do the magic * const res = await networkmanagement.projects.locations.list({ - * // The standard list 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). * filter: 'placeholder-value', * // The resource that owns the locations collection, if applicable. * name: 'projects/my-project', - * // The standard list page size. + * // The maximum number of results to return. If not set, the service will select a default. * pageSize: 'placeholder-value', - * // The standard list page token. + * // A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. * pageToken: 'placeholder-value', * }); * console.log(res.data); @@ -1383,7 +1390,7 @@ export namespace networkmanagement_v1beta1 { export interface Params$Resource$Projects$Locations$List extends StandardParameters { /** - * The standard list 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). */ filter?: string; /** @@ -1391,11 +1398,11 @@ export namespace networkmanagement_v1beta1 { */ name?: string; /** - * The standard list page size. + * The maximum number of results to return. If not set, the service will select a default. */ pageSize?: number; /** - * The standard list page token. + * A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. */ pageToken?: string; } diff --git a/src/apis/notebooks/v1.ts b/src/apis/notebooks/v1.ts index 2c5c31ef7ba..78a10089b68 100644 --- a/src/apis/notebooks/v1.ts +++ b/src/apis/notebooks/v1.ts @@ -524,6 +524,10 @@ export namespace notebooks_v1 { * If an instance is upgradeable. */ upgradeable?: boolean | null; + /** + * The new image self link this instance will be upgraded to if calling the upgrade endpoint. This field will only be populated if field upgradeable is true. + */ + upgradeImage?: string | null; /** * Additional information about upgrade. */ @@ -3318,6 +3322,7 @@ export namespace notebooks_v1 { * * // Example response * // { + * // "upgradeImage": "my_upgradeImage", * // "upgradeInfo": "my_upgradeInfo", * // "upgradeVersion": "my_upgradeVersion", * // "upgradeable": false diff --git a/src/apis/orgpolicy/README.md b/src/apis/orgpolicy/README.md new file mode 100644 index 00000000000..964b8e1c961 --- /dev/null +++ b/src/apis/orgpolicy/README.md @@ -0,0 +1,56 @@ +Google Inc. logo + +# orgpolicy + +> The Org Policy API allows users to configure governance ruleson their GCP resources across the Cloud Resource Hierarchy. + +## Support status +**Note**: Google provides multiple libraries for this service. This library is in +maintenance mode, and will continue to be made available for users who have +existing applications. If you're building a new application, or modernizing a +legacy application, please use [@google-cloud/org-policy](https://www.npmjs.com/package/@google-cloud/org-policy) instead. +The [@google-cloud/org-policy](https://www.npmjs.com/package/@google-cloud/org-policy) library is faster, easier to use, and better maintained. + +To learn more, see [Client Libraries Explained](https://cloud.google.com/apis/docs/client-libraries-explained). + +## Installation + +```sh +$ npm install googleapis +``` + +## Usage +All documentation and usage information can be found on [GitHub](https://github.com/googleapis/google-api-nodejs-client). + +## Building a browser bundle + +This library can be used in a browser. To prepare a single file bundle, clone the +[repository](https://github.com/googleapis/google-api-nodejs-client) and run + +```sh +$ cd src/apis/orgpolicy +$ npm install +$ npm run webpack +``` + +The generated bundle will be written to `dist/orgpolicy.min.js`. Use it from your HTML file: + +```html + + +``` + +## License +This library is licensed under Apache 2.0. Full license text is available in [LICENSE](https://github.com/googleapis/google-api-nodejs-client/blob/master/LICENSE). + +## Contributing +We love contributions! Before submitting a Pull Request, it's always good to start with a new issue first. To learn more, see [CONTRIBUTING](https://github.com/google/google-api-nodejs-client/blob/master/.github/CONTRIBUTING.md). + +## Questions/problems? +* Ask your development related questions on [StackOverflow](http://stackoverflow.com/questions/tagged/google-api-nodejs-client). +* If you've found an bug/issue, please [file it on GitHub](https://github.com/googleapis/google-api-nodejs-client/issues). + + +*Crafted with ❤️ by the Google Node.js team* diff --git a/src/apis/orgpolicy/index.ts b/src/apis/orgpolicy/index.ts new file mode 100644 index 00000000000..ab236c4becc --- /dev/null +++ b/src/apis/orgpolicy/index.ts @@ -0,0 +1,46 @@ +// Copyright 2020 Google LLC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/*! THIS FILE IS AUTO-GENERATED */ + +import {AuthPlus, getAPI, GoogleConfigurable} from 'googleapis-common'; +import {orgpolicy_v2} from './v2'; + +export const VERSIONS = { + v2: orgpolicy_v2.Orgpolicy, +}; + +export function orgpolicy(version: 'v2'): orgpolicy_v2.Orgpolicy; +export function orgpolicy( + options: orgpolicy_v2.Options +): orgpolicy_v2.Orgpolicy; +export function orgpolicy( + this: GoogleConfigurable, + versionOrOptions: 'v2' | orgpolicy_v2.Options +) { + return getAPI('orgpolicy', versionOrOptions, VERSIONS, this); +} + +const auth = new AuthPlus(); +export {auth}; +export {orgpolicy_v2}; +export { + AuthPlus, + GlobalOptions, + APIRequestContext, + GoogleConfigurable, + StreamMethodOptions, + GaxiosPromise, + MethodOptions, + BodyResponseCallback, +} from 'googleapis-common'; diff --git a/src/apis/orgpolicy/package.json b/src/apis/orgpolicy/package.json new file mode 100644 index 00000000000..d1422b244db --- /dev/null +++ b/src/apis/orgpolicy/package.json @@ -0,0 +1,43 @@ +{ + "name": "@googleapis/orgpolicy", + "version": "0.1.0", + "description": "orgpolicy", + "main": "build/index.js", + "types": "build/index.d.ts", + "keywords": [ + "google" + ], + "author": "Google LLC", + "license": "Apache-2.0", + "homepage": "https://github.com/googleapis/google-api-nodejs-client", + "bugs": { + "url": "https://github.com/googleapis/google-api-nodejs-client/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/googleapis/google-api-nodejs-client.git" + }, + "engines": { + "node": ">=10.0.0" + }, + "scripts": { + "fix": "gts fix", + "lint": "gts check", + "compile": "tsc -p .", + "prepare": "npm run compile", + "webpack": "webpack" + }, + "dependencies": { + "googleapis-common": "^5.0.1" + }, + "devDependencies": { + "@microsoft/api-documenter": "^7.8.10", + "@microsoft/api-extractor": "^7.8.10", + "gts": "^2.0.0", + "null-loader": "^4.0.0", + "ts-loader": "^8.0.0", + "typescript": "~3.7.0", + "webpack": "^5.0.0", + "webpack-cli": "^4.0.0" + } +} diff --git a/src/apis/orgpolicy/tsconfig.json b/src/apis/orgpolicy/tsconfig.json new file mode 100644 index 00000000000..e0810904968 --- /dev/null +++ b/src/apis/orgpolicy/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "./node_modules/gts/tsconfig-google.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build" + }, + "include": [ + "*.ts", + ] +} diff --git a/src/apis/orgpolicy/v2.ts b/src/apis/orgpolicy/v2.ts new file mode 100644 index 00000000000..7c86a5eed89 --- /dev/null +++ b/src/apis/orgpolicy/v2.ts @@ -0,0 +1,3554 @@ +// Copyright 2020 Google LLC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/* eslint-disable @typescript-eslint/no-explicit-any */ +/* eslint-disable @typescript-eslint/class-name-casing */ +/* eslint-disable @typescript-eslint/no-unused-vars */ +/* eslint-disable @typescript-eslint/no-empty-interface */ +/* eslint-disable @typescript-eslint/no-namespace */ +/* eslint-disable no-irregular-whitespace */ + +import { + OAuth2Client, + JWT, + Compute, + UserRefreshClient, + BaseExternalAccountClient, + GaxiosPromise, + GoogleConfigurable, + createAPIRequest, + MethodOptions, + StreamMethodOptions, + GlobalOptions, + GoogleAuth, + BodyResponseCallback, + APIRequestContext, +} from 'googleapis-common'; +import {Readable} from 'stream'; + +export namespace orgpolicy_v2 { + export interface Options extends GlobalOptions { + version: 'v2'; + } + + interface StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: + | string + | OAuth2Client + | JWT + | Compute + | UserRefreshClient + | BaseExternalAccountClient + | GoogleAuth; + + /** + * V1 error format. + */ + '$.xgafv'?: string; + /** + * OAuth access token. + */ + access_token?: string; + /** + * Data format for response. + */ + alt?: string; + /** + * JSONP + */ + callback?: string; + /** + * Selector specifying which fields to include in a partial response. + */ + fields?: string; + /** + * 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. + */ + key?: string; + /** + * OAuth 2.0 token for the current user. + */ + oauth_token?: string; + /** + * Returns response with indentations and line breaks. + */ + prettyPrint?: boolean; + /** + * 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. + */ + quotaUser?: string; + /** + * Legacy upload protocol for media (e.g. "media", "multipart"). + */ + uploadType?: string; + /** + * Upload protocol for media (e.g. "raw", "multipart"). + */ + upload_protocol?: string; + } + + /** + * Organization Policy API + * + * The Org Policy API allows users to configure governance ruleson their GCP resources across the Cloud Resource Hierarchy. + * + * @example + * ```js + * const {google} = require('googleapis'); + * const orgpolicy = google.orgpolicy('v2'); + * ``` + */ + export class Orgpolicy { + context: APIRequestContext; + folders: Resource$Folders; + organizations: Resource$Organizations; + projects: Resource$Projects; + + constructor(options: GlobalOptions, google?: GoogleConfigurable) { + this.context = { + _options: options || {}, + google, + }; + + this.folders = new Resource$Folders(this.context); + this.organizations = new Resource$Organizations(this.context); + this.projects = new Resource$Projects(this.context); + } + } + + /** + * A `constraint` describes a way to restrict resource's configuration. For example, you could enforce a constraint that controls which cloud services can be activated across an organization, or whether a Compute Engine instance can have serial port connections established. `Constraints` can be configured by the organization's policy adminstrator to fit the needs of the organzation by setting a `policy` that includes `constraints` at different locations in the organization's resource hierarchy. Policies are inherited down the resource hierarchy from higher levels, but can also be overridden. For details about the inheritance rules please read about `policies`. `Constraints` have a default behavior determined by the `constraint_default` field, which is the enforcement behavior that is used in the absence of a `policy` being defined or inherited for the resource in question. + */ + export interface Schema$GoogleCloudOrgpolicyV2Constraint { + /** + * Defines this constraint as being a BooleanConstraint. + */ + booleanConstraint?: Schema$GoogleCloudOrgpolicyV2ConstraintBooleanConstraint; + /** + * The evaluation behavior of this constraint in the absence of 'Policy'. + */ + constraintDefault?: string | null; + /** + * Detailed description of what this `Constraint` controls as well as how and where it is enforced. Mutable. + */ + description?: string | null; + /** + * The human readable name. Mutable. + */ + displayName?: string | null; + /** + * Defines this constraint as being a ListConstraint. + */ + listConstraint?: Schema$GoogleCloudOrgpolicyV2ConstraintListConstraint; + /** + * Immutable. The resource name of the Constraint. Must be in one of the following forms: * `projects/{project_number\}/constraints/{constraint_name\}` * `folders/{folder_id\}/constraints/{constraint_name\}` * `organizations/{organization_id\}/constraints/{constraint_name\}` For example, "/projects/123/constraints/compute.disableSerialPortAccess". + */ + name?: string | null; + } + /** + * A `Constraint` that is either enforced or not. For example a constraint `constraints/compute.disableSerialPortAccess`. If it is enforced on a VM instance, serial port connections will not be opened to that instance. + */ + export interface Schema$GoogleCloudOrgpolicyV2ConstraintBooleanConstraint {} + /** + * A `Constraint` that allows or disallows a list of string values, which are configured by an Organization's policy administrator with a `Policy`. + */ + export interface Schema$GoogleCloudOrgpolicyV2ConstraintListConstraint { + /** + * Indicates whether values grouped into categories can be used in `Policy.allowed_values` and `Policy.denied_values`. For example, `"in:Python"` would match any value in the 'Python' group. + */ + supportsIn?: boolean | null; + /** + * Indicates whether subtrees of Cloud Resource Manager resource hierarchy can be used in `Policy.allowed_values` and `Policy.denied_values`. For example, `"under:folders/123"` would match any resource under the 'folders/123' folder. + */ + supportsUnder?: boolean | null; + } + /** + * The response returned from the ListConstraints method. + */ + export interface Schema$GoogleCloudOrgpolicyV2ListConstraintsResponse { + /** + * The collection of constraints that are available on the targeted resource. + */ + constraints?: Schema$GoogleCloudOrgpolicyV2Constraint[]; + /** + * Page token used to retrieve the next page. This is currently not used. + */ + nextPageToken?: string | null; + } + /** + * The response returned from the ListPolicies method. It will be empty if no `Policies` are set on the resource. + */ + export interface Schema$GoogleCloudOrgpolicyV2ListPoliciesResponse { + /** + * Page token used to retrieve the next page. This is currently not used, but the server may at any point start supplying a valid token. + */ + nextPageToken?: string | null; + /** + * All `Policies` that exist on the resource. It will be empty if no `Policies` are set. + */ + policies?: Schema$GoogleCloudOrgpolicyV2Policy[]; + } + /** + * Defines a Cloud Organization `Policy` which is used to specify `Constraints` for configurations of Cloud Platform resources. + */ + export interface Schema$GoogleCloudOrgpolicyV2Policy { + /** + * Immutable. The resource name of the Policy. Must be one of the following forms, where constraint_name is the name of the constraint which this Policy configures: * `projects/{project_number\}/policies/{constraint_name\}` * `folders/{folder_id\}/policies/{constraint_name\}` * `organizations/{organization_id\}/policies/{constraint_name\}` For example, "projects/123/policies/compute.disableSerialPortAccess". Note: `projects/{project_id\}/policies/{constraint_name\}` is also an acceptable name for API requests, but responses will return the name using the equivalent project number. + */ + name?: string | null; + /** + * Basic information about the Organization Policy. + */ + spec?: Schema$GoogleCloudOrgpolicyV2PolicySpec; + } + /** + * Defines a Cloud Organization `PolicySpec` which is used to specify `Constraints` for configurations of Cloud Platform resources. + */ + export interface Schema$GoogleCloudOrgpolicyV2PolicySpec { + /** + * An opaque tag indicating the current version of the `Policy`, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the `Policy` is returned from either a `GetPolicy` or a `ListPolicies` request, this `etag` indicates the version of the current `Policy` to use when executing a read-modify-write loop. When the `Policy` is returned from a `GetEffectivePolicy` request, the `etag` will be unset. + */ + etag?: string | null; + /** + * Determines the inheritance behavior for this `Policy`. If `inherit_from_parent` is true, PolicyRules set higher up in the hierarchy (up to the closest root) are inherited and present in the effective policy. If it is false, then no rules are inherited, and this Policy becomes the new root for evaluation. This field can be set only for Policies which configure list constraints. + */ + inheritFromParent?: boolean | null; + /** + * Ignores policies set above this resource and restores the `constraint_default` enforcement behavior of the specific `Constraint` at this resource. This field can be set in policies for either list or boolean constraints. If set, `rules` must be empty and `inherit_from_parent` must be set to false. + */ + reset?: boolean | null; + /** + * Up to 10 PolicyRules are allowed. In Policies for boolean constraints, the following requirements apply: - There must be one and only one PolicyRule where condition is unset. - BooleanPolicyRules with conditions must set `enforced` to the opposite of the PolicyRule without a condition. - During policy evaluation, PolicyRules with conditions that are true for a target resource take precedence. + */ + rules?: Schema$GoogleCloudOrgpolicyV2PolicySpecPolicyRule[]; + /** + * Output only. The time stamp this was previously updated. This represents the last time a call to `CreatePolicy` or `UpdatePolicy` was made for that `Policy`. + */ + updateTime?: string | null; + } + /** + * A rule used to express this policy. + */ + export interface Schema$GoogleCloudOrgpolicyV2PolicySpecPolicyRule { + /** + * Setting this to true means that all values are allowed. This field can be set only in Policies for list constraints. + */ + allowAll?: boolean | null; + /** + * A condition which determines whether this rule is used in the evaluation of the policy. When set, the `expression` field in the `Expr' must include from 1 to 10 subexpressions, joined by the "||" or "&&" operators. Each subexpression must be of the form "resource.matchTag('/tag_key_short_name, 'tag_value_short_name')". or "resource.matchTagId('tagKeys/key_id', 'tagValues/value_id')". where key_name and value_name are the resource names for Label Keys and Values. These names are available from the Tag Manager Service. An example expression is: "resource.matchTag('123456789/environment, 'prod')". or "resource.matchTagId('tagKeys/123', 'tagValues/456')". + */ + condition?: Schema$GoogleTypeExpr; + /** + * Setting this to true means that all values are denied. This field can be set only in Policies for list constraints. + */ + denyAll?: boolean | null; + /** + * If `true`, then the `Policy` is enforced. If `false`, then any configuration is acceptable. This field can be set only in Policies for boolean constraints. + */ + enforce?: boolean | null; + /** + * List of values to be used for this PolicyRule. This field can be set only in Policies for list constraints. + */ + values?: Schema$GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues; + } + /** + * A message that holds specific allowed and denied values. This message can define specific values and subtrees of Cloud Resource Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that are allowed or denied. This is achieved by using the `under:` and optional `is:` prefixes. The `under:` prefix is used to denote resource subtree values. The `is:` prefix is used to denote specific values, and is required only if the value contains a ":". Values prefixed with "is:" are treated the same as values with no prefix. Ancestry subtrees must be in one of the following formats: - "projects/", e.g. "projects/tokyo-rain-123" - "folders/", e.g. "folders/1234" - "organizations/", e.g. "organizations/1234" The `supports_under` field of the associated `Constraint` defines whether ancestry prefixes can be used. + */ + export interface Schema$GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues { + /** + * List of values allowed at this resource. + */ + allowedValues?: string[] | null; + /** + * List of values denied at this resource. + */ + deniedValues?: string[] | null; + } + /** + * 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); \} The JSON representation for `Empty` is empty JSON object `{\}`. + */ + export interface Schema$GoogleProtobufEmpty {} + /** + * Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. + */ + export interface Schema$GoogleTypeExpr { + /** + * Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. + */ + description?: string | null; + /** + * Textual representation of an expression in Common Expression Language syntax. + */ + expression?: string | null; + /** + * Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file. + */ + location?: string | null; + /** + * Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression. + */ + title?: string | null; + } + + export class Resource$Folders { + context: APIRequestContext; + constraints: Resource$Folders$Constraints; + policies: Resource$Folders$Policies; + constructor(context: APIRequestContext) { + this.context = context; + this.constraints = new Resource$Folders$Constraints(this.context); + this.policies = new Resource$Folders$Policies(this.context); + } + } + + export class Resource$Folders$Constraints { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Lists `Constraints` that could be applied on the specified resource. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/orgpolicy.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const orgpolicy = google.orgpolicy('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await orgpolicy.folders.constraints.list({ + * // Size of the pages to be returned. This is currently unsupported and will be ignored. The server may at any point start using this field to limit page size. + * pageSize: 'placeholder-value', + * // Page token used to retrieve the next page. This is currently unsupported and will be ignored. The server may at any point start using this field. + * pageToken: 'placeholder-value', + * // Required. The Cloud resource that parents the constraint. Must be in one of the following forms: * `projects/{project_number\}` * `projects/{project_id\}` * `folders/{folder_id\}` * `organizations/{organization_id\}` + * parent: 'folders/my-folder', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "constraints": [], + * // "nextPageToken": "my_nextPageToken" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Folders$Constraints$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Folders$Constraints$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Folders$Constraints$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Folders$Constraints$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Folders$Constraints$List, + callback: BodyResponseCallback + ): void; + list( + callback: BodyResponseCallback + ): void; + list( + paramsOrCallback?: + | Params$Resource$Folders$Constraints$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Folders$Constraints$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Folders$Constraints$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://orgpolicy.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/constraints').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + } + + export interface Params$Resource$Folders$Constraints$List + extends StandardParameters { + /** + * Size of the pages to be returned. This is currently unsupported and will be ignored. The server may at any point start using this field to limit page size. + */ + pageSize?: number; + /** + * Page token used to retrieve the next page. This is currently unsupported and will be ignored. The server may at any point start using this field. + */ + pageToken?: string; + /** + * Required. The Cloud resource that parents the constraint. Must be in one of the following forms: * `projects/{project_number\}` * `projects/{project_id\}` * `folders/{folder_id\}` * `organizations/{organization_id\}` + */ + parent?: string; + } + + export class Resource$Folders$Policies { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Creates a Policy. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the constraint does not exist. Returns a `google.rpc.Status` with `google.rpc.Code.ALREADY_EXISTS` if the policy already exists on the given Cloud resource. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/orgpolicy.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const orgpolicy = google.orgpolicy('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await orgpolicy.folders.policies.create({ + * // Required. The Cloud resource that will parent the new Policy. Must be in one of the following forms: * `projects/{project_number\}` * `projects/{project_id\}` * `folders/{folder_id\}` * `organizations/{organization_id\}` + * parent: 'folders/my-folder', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "name": "my_name", + * // "spec": {} + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "name": "my_name", + * // "spec": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + create( + params: Params$Resource$Folders$Policies$Create, + options: StreamMethodOptions + ): GaxiosPromise; + create( + params?: Params$Resource$Folders$Policies$Create, + options?: MethodOptions + ): GaxiosPromise; + create( + params: Params$Resource$Folders$Policies$Create, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Folders$Policies$Create, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Folders$Policies$Create, + callback: BodyResponseCallback + ): void; + create( + callback: BodyResponseCallback + ): void; + create( + paramsOrCallback?: + | Params$Resource$Folders$Policies$Create + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Folders$Policies$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Folders$Policies$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://orgpolicy.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/policies').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Deletes a Policy. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the constraint or Org Policy does not exist. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/orgpolicy.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const orgpolicy = google.orgpolicy('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await orgpolicy.folders.policies.delete({ + * // Required. Name of the policy to delete. See `Policy` for naming rules. + * name: 'folders/my-folder/policies/my-policie', + * }); + * console.log(res.data); + * + * // Example response + * // {} + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + delete( + params: Params$Resource$Folders$Policies$Delete, + options: StreamMethodOptions + ): GaxiosPromise; + delete( + params?: Params$Resource$Folders$Policies$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Folders$Policies$Delete, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Folders$Policies$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Folders$Policies$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Folders$Policies$Delete + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Folders$Policies$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Folders$Policies$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://orgpolicy.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Gets a `Policy` on a resource. If no `Policy` is set on the resource, NOT_FOUND is returned. The `etag` value can be used with `UpdatePolicy()` to update a `Policy` during read-modify-write. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/orgpolicy.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const orgpolicy = google.orgpolicy('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await orgpolicy.folders.policies.get({ + * // Required. Resource name of the policy. See `Policy` for naming requirements. + * name: 'folders/my-folder/policies/my-policie', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "name": "my_name", + * // "spec": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Folders$Policies$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Folders$Policies$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Folders$Policies$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Folders$Policies$Get, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Folders$Policies$Get, + callback: BodyResponseCallback + ): void; + get( + callback: BodyResponseCallback + ): void; + get( + paramsOrCallback?: + | Params$Resource$Folders$Policies$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Folders$Policies$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Folders$Policies$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://orgpolicy.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Gets the effective `Policy` on a resource. This is the result of merging `Policies` in the resource hierarchy and evaluating conditions. The returned `Policy` will not have an `etag` or `condition` set because it is a computed `Policy` across multiple resources. Subtrees of Resource Manager resource hierarchy with 'under:' prefix will not be expanded. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/orgpolicy.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const orgpolicy = google.orgpolicy('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await orgpolicy.folders.policies.getEffectivePolicy({ + * // Required. The effective policy to compute. See `Policy` for naming rules. + * name: 'folders/my-folder/policies/my-policie', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "name": "my_name", + * // "spec": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + getEffectivePolicy( + params: Params$Resource$Folders$Policies$Geteffectivepolicy, + options: StreamMethodOptions + ): GaxiosPromise; + getEffectivePolicy( + params?: Params$Resource$Folders$Policies$Geteffectivepolicy, + options?: MethodOptions + ): GaxiosPromise; + getEffectivePolicy( + params: Params$Resource$Folders$Policies$Geteffectivepolicy, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getEffectivePolicy( + params: Params$Resource$Folders$Policies$Geteffectivepolicy, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getEffectivePolicy( + params: Params$Resource$Folders$Policies$Geteffectivepolicy, + callback: BodyResponseCallback + ): void; + getEffectivePolicy( + callback: BodyResponseCallback + ): void; + getEffectivePolicy( + paramsOrCallback?: + | Params$Resource$Folders$Policies$Geteffectivepolicy + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Folders$Policies$Geteffectivepolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Folders$Policies$Geteffectivepolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://orgpolicy.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}:getEffectivePolicy').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Retrieves all of the `Policies` that exist on a particular resource. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/orgpolicy.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const orgpolicy = google.orgpolicy('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await orgpolicy.folders.policies.list({ + * // Size of the pages to be returned. This is currently unsupported and will be ignored. The server may at any point start using this field to limit page size. + * pageSize: 'placeholder-value', + * // Page token used to retrieve the next page. This is currently unsupported and will be ignored. The server may at any point start using this field. + * pageToken: 'placeholder-value', + * // Required. The target Cloud resource that parents the set of constraints and policies that will be returned from this call. Must be in one of the following forms: * `projects/{project_number\}` * `projects/{project_id\}` * `folders/{folder_id\}` * `organizations/{organization_id\}` + * parent: 'folders/my-folder', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "nextPageToken": "my_nextPageToken", + * // "policies": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Folders$Policies$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Folders$Policies$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Folders$Policies$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Folders$Policies$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Folders$Policies$List, + callback: BodyResponseCallback + ): void; + list( + callback: BodyResponseCallback + ): void; + list( + paramsOrCallback?: + | Params$Resource$Folders$Policies$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Folders$Policies$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Folders$Policies$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://orgpolicy.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/policies').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Updates a Policy. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the constraint or the policy do not exist. Returns a `google.rpc.Status` with `google.rpc.Code.ABORTED` if the etag supplied in the request does not match the persisted etag of the policy Note: the supplied policy will perform a full overwrite of all fields. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/orgpolicy.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const orgpolicy = google.orgpolicy('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await orgpolicy.folders.policies.patch({ + * // Immutable. The resource name of the Policy. Must be one of the following forms, where constraint_name is the name of the constraint which this Policy configures: * `projects/{project_number\}/policies/{constraint_name\}` * `folders/{folder_id\}/policies/{constraint_name\}` * `organizations/{organization_id\}/policies/{constraint_name\}` For example, "projects/123/policies/compute.disableSerialPortAccess". Note: `projects/{project_id\}/policies/{constraint_name\}` is also an acceptable name for API requests, but responses will return the name using the equivalent project number. + * name: 'folders/my-folder/policies/my-policie', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "name": "my_name", + * // "spec": {} + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "name": "my_name", + * // "spec": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + patch( + params: Params$Resource$Folders$Policies$Patch, + options: StreamMethodOptions + ): GaxiosPromise; + patch( + params?: Params$Resource$Folders$Policies$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Folders$Policies$Patch, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Folders$Policies$Patch, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Folders$Policies$Patch, + callback: BodyResponseCallback + ): void; + patch( + callback: BodyResponseCallback + ): void; + patch( + paramsOrCallback?: + | Params$Resource$Folders$Policies$Patch + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Folders$Policies$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Folders$Policies$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://orgpolicy.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + } + + export interface Params$Resource$Folders$Policies$Create + extends StandardParameters { + /** + * Required. The Cloud resource that will parent the new Policy. Must be in one of the following forms: * `projects/{project_number\}` * `projects/{project_id\}` * `folders/{folder_id\}` * `organizations/{organization_id\}` + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudOrgpolicyV2Policy; + } + export interface Params$Resource$Folders$Policies$Delete + extends StandardParameters { + /** + * Required. Name of the policy to delete. See `Policy` for naming rules. + */ + name?: string; + } + export interface Params$Resource$Folders$Policies$Get + extends StandardParameters { + /** + * Required. Resource name of the policy. See `Policy` for naming requirements. + */ + name?: string; + } + export interface Params$Resource$Folders$Policies$Geteffectivepolicy + extends StandardParameters { + /** + * Required. The effective policy to compute. See `Policy` for naming rules. + */ + name?: string; + } + export interface Params$Resource$Folders$Policies$List + extends StandardParameters { + /** + * Size of the pages to be returned. This is currently unsupported and will be ignored. The server may at any point start using this field to limit page size. + */ + pageSize?: number; + /** + * Page token used to retrieve the next page. This is currently unsupported and will be ignored. The server may at any point start using this field. + */ + pageToken?: string; + /** + * Required. The target Cloud resource that parents the set of constraints and policies that will be returned from this call. Must be in one of the following forms: * `projects/{project_number\}` * `projects/{project_id\}` * `folders/{folder_id\}` * `organizations/{organization_id\}` + */ + parent?: string; + } + export interface Params$Resource$Folders$Policies$Patch + extends StandardParameters { + /** + * Immutable. The resource name of the Policy. Must be one of the following forms, where constraint_name is the name of the constraint which this Policy configures: * `projects/{project_number\}/policies/{constraint_name\}` * `folders/{folder_id\}/policies/{constraint_name\}` * `organizations/{organization_id\}/policies/{constraint_name\}` For example, "projects/123/policies/compute.disableSerialPortAccess". Note: `projects/{project_id\}/policies/{constraint_name\}` is also an acceptable name for API requests, but responses will return the name using the equivalent project number. + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudOrgpolicyV2Policy; + } + + export class Resource$Organizations { + context: APIRequestContext; + constraints: Resource$Organizations$Constraints; + policies: Resource$Organizations$Policies; + constructor(context: APIRequestContext) { + this.context = context; + this.constraints = new Resource$Organizations$Constraints(this.context); + this.policies = new Resource$Organizations$Policies(this.context); + } + } + + export class Resource$Organizations$Constraints { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Lists `Constraints` that could be applied on the specified resource. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/orgpolicy.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const orgpolicy = google.orgpolicy('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await orgpolicy.organizations.constraints.list({ + * // Size of the pages to be returned. This is currently unsupported and will be ignored. The server may at any point start using this field to limit page size. + * pageSize: 'placeholder-value', + * // Page token used to retrieve the next page. This is currently unsupported and will be ignored. The server may at any point start using this field. + * pageToken: 'placeholder-value', + * // Required. The Cloud resource that parents the constraint. Must be in one of the following forms: * `projects/{project_number\}` * `projects/{project_id\}` * `folders/{folder_id\}` * `organizations/{organization_id\}` + * parent: 'organizations/my-organization', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "constraints": [], + * // "nextPageToken": "my_nextPageToken" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Organizations$Constraints$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Organizations$Constraints$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Organizations$Constraints$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Organizations$Constraints$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Organizations$Constraints$List, + callback: BodyResponseCallback + ): void; + list( + callback: BodyResponseCallback + ): void; + list( + paramsOrCallback?: + | Params$Resource$Organizations$Constraints$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Organizations$Constraints$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Organizations$Constraints$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://orgpolicy.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/constraints').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + } + + export interface Params$Resource$Organizations$Constraints$List + extends StandardParameters { + /** + * Size of the pages to be returned. This is currently unsupported and will be ignored. The server may at any point start using this field to limit page size. + */ + pageSize?: number; + /** + * Page token used to retrieve the next page. This is currently unsupported and will be ignored. The server may at any point start using this field. + */ + pageToken?: string; + /** + * Required. The Cloud resource that parents the constraint. Must be in one of the following forms: * `projects/{project_number\}` * `projects/{project_id\}` * `folders/{folder_id\}` * `organizations/{organization_id\}` + */ + parent?: string; + } + + export class Resource$Organizations$Policies { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Creates a Policy. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the constraint does not exist. Returns a `google.rpc.Status` with `google.rpc.Code.ALREADY_EXISTS` if the policy already exists on the given Cloud resource. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/orgpolicy.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const orgpolicy = google.orgpolicy('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await orgpolicy.organizations.policies.create({ + * // Required. The Cloud resource that will parent the new Policy. Must be in one of the following forms: * `projects/{project_number\}` * `projects/{project_id\}` * `folders/{folder_id\}` * `organizations/{organization_id\}` + * parent: 'organizations/my-organization', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "name": "my_name", + * // "spec": {} + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "name": "my_name", + * // "spec": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + create( + params: Params$Resource$Organizations$Policies$Create, + options: StreamMethodOptions + ): GaxiosPromise; + create( + params?: Params$Resource$Organizations$Policies$Create, + options?: MethodOptions + ): GaxiosPromise; + create( + params: Params$Resource$Organizations$Policies$Create, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Organizations$Policies$Create, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Organizations$Policies$Create, + callback: BodyResponseCallback + ): void; + create( + callback: BodyResponseCallback + ): void; + create( + paramsOrCallback?: + | Params$Resource$Organizations$Policies$Create + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Organizations$Policies$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Organizations$Policies$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://orgpolicy.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/policies').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Deletes a Policy. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the constraint or Org Policy does not exist. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/orgpolicy.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const orgpolicy = google.orgpolicy('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await orgpolicy.organizations.policies.delete({ + * // Required. Name of the policy to delete. See `Policy` for naming rules. + * name: 'organizations/my-organization/policies/my-policie', + * }); + * console.log(res.data); + * + * // Example response + * // {} + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + delete( + params: Params$Resource$Organizations$Policies$Delete, + options: StreamMethodOptions + ): GaxiosPromise; + delete( + params?: Params$Resource$Organizations$Policies$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Organizations$Policies$Delete, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Organizations$Policies$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Organizations$Policies$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Organizations$Policies$Delete + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Organizations$Policies$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Organizations$Policies$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://orgpolicy.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Gets a `Policy` on a resource. If no `Policy` is set on the resource, NOT_FOUND is returned. The `etag` value can be used with `UpdatePolicy()` to update a `Policy` during read-modify-write. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/orgpolicy.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const orgpolicy = google.orgpolicy('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await orgpolicy.organizations.policies.get({ + * // Required. Resource name of the policy. See `Policy` for naming requirements. + * name: 'organizations/my-organization/policies/my-policie', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "name": "my_name", + * // "spec": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Organizations$Policies$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Organizations$Policies$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Organizations$Policies$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Organizations$Policies$Get, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Organizations$Policies$Get, + callback: BodyResponseCallback + ): void; + get( + callback: BodyResponseCallback + ): void; + get( + paramsOrCallback?: + | Params$Resource$Organizations$Policies$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Organizations$Policies$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Organizations$Policies$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://orgpolicy.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Gets the effective `Policy` on a resource. This is the result of merging `Policies` in the resource hierarchy and evaluating conditions. The returned `Policy` will not have an `etag` or `condition` set because it is a computed `Policy` across multiple resources. Subtrees of Resource Manager resource hierarchy with 'under:' prefix will not be expanded. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/orgpolicy.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const orgpolicy = google.orgpolicy('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await orgpolicy.organizations.policies.getEffectivePolicy({ + * // Required. The effective policy to compute. See `Policy` for naming rules. + * name: 'organizations/my-organization/policies/my-policie', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "name": "my_name", + * // "spec": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + getEffectivePolicy( + params: Params$Resource$Organizations$Policies$Geteffectivepolicy, + options: StreamMethodOptions + ): GaxiosPromise; + getEffectivePolicy( + params?: Params$Resource$Organizations$Policies$Geteffectivepolicy, + options?: MethodOptions + ): GaxiosPromise; + getEffectivePolicy( + params: Params$Resource$Organizations$Policies$Geteffectivepolicy, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getEffectivePolicy( + params: Params$Resource$Organizations$Policies$Geteffectivepolicy, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getEffectivePolicy( + params: Params$Resource$Organizations$Policies$Geteffectivepolicy, + callback: BodyResponseCallback + ): void; + getEffectivePolicy( + callback: BodyResponseCallback + ): void; + getEffectivePolicy( + paramsOrCallback?: + | Params$Resource$Organizations$Policies$Geteffectivepolicy + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Organizations$Policies$Geteffectivepolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Organizations$Policies$Geteffectivepolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://orgpolicy.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}:getEffectivePolicy').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Retrieves all of the `Policies` that exist on a particular resource. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/orgpolicy.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const orgpolicy = google.orgpolicy('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await orgpolicy.organizations.policies.list({ + * // Size of the pages to be returned. This is currently unsupported and will be ignored. The server may at any point start using this field to limit page size. + * pageSize: 'placeholder-value', + * // Page token used to retrieve the next page. This is currently unsupported and will be ignored. The server may at any point start using this field. + * pageToken: 'placeholder-value', + * // Required. The target Cloud resource that parents the set of constraints and policies that will be returned from this call. Must be in one of the following forms: * `projects/{project_number\}` * `projects/{project_id\}` * `folders/{folder_id\}` * `organizations/{organization_id\}` + * parent: 'organizations/my-organization', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "nextPageToken": "my_nextPageToken", + * // "policies": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Organizations$Policies$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Organizations$Policies$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Organizations$Policies$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Organizations$Policies$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Organizations$Policies$List, + callback: BodyResponseCallback + ): void; + list( + callback: BodyResponseCallback + ): void; + list( + paramsOrCallback?: + | Params$Resource$Organizations$Policies$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Organizations$Policies$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Organizations$Policies$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://orgpolicy.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/policies').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Updates a Policy. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the constraint or the policy do not exist. Returns a `google.rpc.Status` with `google.rpc.Code.ABORTED` if the etag supplied in the request does not match the persisted etag of the policy Note: the supplied policy will perform a full overwrite of all fields. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/orgpolicy.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const orgpolicy = google.orgpolicy('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await orgpolicy.organizations.policies.patch({ + * // Immutable. The resource name of the Policy. Must be one of the following forms, where constraint_name is the name of the constraint which this Policy configures: * `projects/{project_number\}/policies/{constraint_name\}` * `folders/{folder_id\}/policies/{constraint_name\}` * `organizations/{organization_id\}/policies/{constraint_name\}` For example, "projects/123/policies/compute.disableSerialPortAccess". Note: `projects/{project_id\}/policies/{constraint_name\}` is also an acceptable name for API requests, but responses will return the name using the equivalent project number. + * name: 'organizations/my-organization/policies/my-policie', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "name": "my_name", + * // "spec": {} + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "name": "my_name", + * // "spec": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + patch( + params: Params$Resource$Organizations$Policies$Patch, + options: StreamMethodOptions + ): GaxiosPromise; + patch( + params?: Params$Resource$Organizations$Policies$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Organizations$Policies$Patch, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Organizations$Policies$Patch, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Organizations$Policies$Patch, + callback: BodyResponseCallback + ): void; + patch( + callback: BodyResponseCallback + ): void; + patch( + paramsOrCallback?: + | Params$Resource$Organizations$Policies$Patch + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Organizations$Policies$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Organizations$Policies$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://orgpolicy.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + } + + export interface Params$Resource$Organizations$Policies$Create + extends StandardParameters { + /** + * Required. The Cloud resource that will parent the new Policy. Must be in one of the following forms: * `projects/{project_number\}` * `projects/{project_id\}` * `folders/{folder_id\}` * `organizations/{organization_id\}` + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudOrgpolicyV2Policy; + } + export interface Params$Resource$Organizations$Policies$Delete + extends StandardParameters { + /** + * Required. Name of the policy to delete. See `Policy` for naming rules. + */ + name?: string; + } + export interface Params$Resource$Organizations$Policies$Get + extends StandardParameters { + /** + * Required. Resource name of the policy. See `Policy` for naming requirements. + */ + name?: string; + } + export interface Params$Resource$Organizations$Policies$Geteffectivepolicy + extends StandardParameters { + /** + * Required. The effective policy to compute. See `Policy` for naming rules. + */ + name?: string; + } + export interface Params$Resource$Organizations$Policies$List + extends StandardParameters { + /** + * Size of the pages to be returned. This is currently unsupported and will be ignored. The server may at any point start using this field to limit page size. + */ + pageSize?: number; + /** + * Page token used to retrieve the next page. This is currently unsupported and will be ignored. The server may at any point start using this field. + */ + pageToken?: string; + /** + * Required. The target Cloud resource that parents the set of constraints and policies that will be returned from this call. Must be in one of the following forms: * `projects/{project_number\}` * `projects/{project_id\}` * `folders/{folder_id\}` * `organizations/{organization_id\}` + */ + parent?: string; + } + export interface Params$Resource$Organizations$Policies$Patch + extends StandardParameters { + /** + * Immutable. The resource name of the Policy. Must be one of the following forms, where constraint_name is the name of the constraint which this Policy configures: * `projects/{project_number\}/policies/{constraint_name\}` * `folders/{folder_id\}/policies/{constraint_name\}` * `organizations/{organization_id\}/policies/{constraint_name\}` For example, "projects/123/policies/compute.disableSerialPortAccess". Note: `projects/{project_id\}/policies/{constraint_name\}` is also an acceptable name for API requests, but responses will return the name using the equivalent project number. + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudOrgpolicyV2Policy; + } + + export class Resource$Projects { + context: APIRequestContext; + constraints: Resource$Projects$Constraints; + policies: Resource$Projects$Policies; + constructor(context: APIRequestContext) { + this.context = context; + this.constraints = new Resource$Projects$Constraints(this.context); + this.policies = new Resource$Projects$Policies(this.context); + } + } + + export class Resource$Projects$Constraints { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Lists `Constraints` that could be applied on the specified resource. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/orgpolicy.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const orgpolicy = google.orgpolicy('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await orgpolicy.projects.constraints.list({ + * // Size of the pages to be returned. This is currently unsupported and will be ignored. The server may at any point start using this field to limit page size. + * pageSize: 'placeholder-value', + * // Page token used to retrieve the next page. This is currently unsupported and will be ignored. The server may at any point start using this field. + * pageToken: 'placeholder-value', + * // Required. The Cloud resource that parents the constraint. Must be in one of the following forms: * `projects/{project_number\}` * `projects/{project_id\}` * `folders/{folder_id\}` * `organizations/{organization_id\}` + * parent: 'projects/my-project', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "constraints": [], + * // "nextPageToken": "my_nextPageToken" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Projects$Constraints$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Projects$Constraints$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Constraints$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Constraints$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Constraints$List, + callback: BodyResponseCallback + ): void; + list( + callback: BodyResponseCallback + ): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Constraints$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Constraints$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Constraints$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://orgpolicy.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/constraints').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + } + + export interface Params$Resource$Projects$Constraints$List + extends StandardParameters { + /** + * Size of the pages to be returned. This is currently unsupported and will be ignored. The server may at any point start using this field to limit page size. + */ + pageSize?: number; + /** + * Page token used to retrieve the next page. This is currently unsupported and will be ignored. The server may at any point start using this field. + */ + pageToken?: string; + /** + * Required. The Cloud resource that parents the constraint. Must be in one of the following forms: * `projects/{project_number\}` * `projects/{project_id\}` * `folders/{folder_id\}` * `organizations/{organization_id\}` + */ + parent?: string; + } + + export class Resource$Projects$Policies { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Creates a Policy. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the constraint does not exist. Returns a `google.rpc.Status` with `google.rpc.Code.ALREADY_EXISTS` if the policy already exists on the given Cloud resource. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/orgpolicy.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const orgpolicy = google.orgpolicy('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await orgpolicy.projects.policies.create({ + * // Required. The Cloud resource that will parent the new Policy. Must be in one of the following forms: * `projects/{project_number\}` * `projects/{project_id\}` * `folders/{folder_id\}` * `organizations/{organization_id\}` + * parent: 'projects/my-project', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "name": "my_name", + * // "spec": {} + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "name": "my_name", + * // "spec": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + create( + params: Params$Resource$Projects$Policies$Create, + options: StreamMethodOptions + ): GaxiosPromise; + create( + params?: Params$Resource$Projects$Policies$Create, + options?: MethodOptions + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Policies$Create, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Policies$Create, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Policies$Create, + callback: BodyResponseCallback + ): void; + create( + callback: BodyResponseCallback + ): void; + create( + paramsOrCallback?: + | Params$Resource$Projects$Policies$Create + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Policies$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Policies$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://orgpolicy.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/policies').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Deletes a Policy. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the constraint or Org Policy does not exist. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/orgpolicy.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const orgpolicy = google.orgpolicy('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await orgpolicy.projects.policies.delete({ + * // Required. Name of the policy to delete. See `Policy` for naming rules. + * name: 'projects/my-project/policies/my-policie', + * }); + * console.log(res.data); + * + * // Example response + * // {} + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + delete( + params: Params$Resource$Projects$Policies$Delete, + options: StreamMethodOptions + ): GaxiosPromise; + delete( + params?: Params$Resource$Projects$Policies$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Policies$Delete, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Policies$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Policies$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Projects$Policies$Delete + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Policies$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Policies$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://orgpolicy.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Gets a `Policy` on a resource. If no `Policy` is set on the resource, NOT_FOUND is returned. The `etag` value can be used with `UpdatePolicy()` to update a `Policy` during read-modify-write. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/orgpolicy.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const orgpolicy = google.orgpolicy('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await orgpolicy.projects.policies.get({ + * // Required. Resource name of the policy. See `Policy` for naming requirements. + * name: 'projects/my-project/policies/my-policie', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "name": "my_name", + * // "spec": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Projects$Policies$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Projects$Policies$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Policies$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Policies$Get, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Policies$Get, + callback: BodyResponseCallback + ): void; + get( + callback: BodyResponseCallback + ): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Policies$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Policies$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Policies$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://orgpolicy.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Gets the effective `Policy` on a resource. This is the result of merging `Policies` in the resource hierarchy and evaluating conditions. The returned `Policy` will not have an `etag` or `condition` set because it is a computed `Policy` across multiple resources. Subtrees of Resource Manager resource hierarchy with 'under:' prefix will not be expanded. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/orgpolicy.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const orgpolicy = google.orgpolicy('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await orgpolicy.projects.policies.getEffectivePolicy({ + * // Required. The effective policy to compute. See `Policy` for naming rules. + * name: 'projects/my-project/policies/my-policie', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "name": "my_name", + * // "spec": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + getEffectivePolicy( + params: Params$Resource$Projects$Policies$Geteffectivepolicy, + options: StreamMethodOptions + ): GaxiosPromise; + getEffectivePolicy( + params?: Params$Resource$Projects$Policies$Geteffectivepolicy, + options?: MethodOptions + ): GaxiosPromise; + getEffectivePolicy( + params: Params$Resource$Projects$Policies$Geteffectivepolicy, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getEffectivePolicy( + params: Params$Resource$Projects$Policies$Geteffectivepolicy, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getEffectivePolicy( + params: Params$Resource$Projects$Policies$Geteffectivepolicy, + callback: BodyResponseCallback + ): void; + getEffectivePolicy( + callback: BodyResponseCallback + ): void; + getEffectivePolicy( + paramsOrCallback?: + | Params$Resource$Projects$Policies$Geteffectivepolicy + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Policies$Geteffectivepolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Policies$Geteffectivepolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://orgpolicy.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}:getEffectivePolicy').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Retrieves all of the `Policies` that exist on a particular resource. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/orgpolicy.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const orgpolicy = google.orgpolicy('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await orgpolicy.projects.policies.list({ + * // Size of the pages to be returned. This is currently unsupported and will be ignored. The server may at any point start using this field to limit page size. + * pageSize: 'placeholder-value', + * // Page token used to retrieve the next page. This is currently unsupported and will be ignored. The server may at any point start using this field. + * pageToken: 'placeholder-value', + * // Required. The target Cloud resource that parents the set of constraints and policies that will be returned from this call. Must be in one of the following forms: * `projects/{project_number\}` * `projects/{project_id\}` * `folders/{folder_id\}` * `organizations/{organization_id\}` + * parent: 'projects/my-project', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "nextPageToken": "my_nextPageToken", + * // "policies": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Projects$Policies$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Projects$Policies$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Policies$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Policies$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Policies$List, + callback: BodyResponseCallback + ): void; + list( + callback: BodyResponseCallback + ): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Policies$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Policies$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Policies$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://orgpolicy.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+parent}/policies').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Updates a Policy. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the constraint or the policy do not exist. Returns a `google.rpc.Status` with `google.rpc.Code.ABORTED` if the etag supplied in the request does not match the persisted etag of the policy Note: the supplied policy will perform a full overwrite of all fields. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/orgpolicy.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const orgpolicy = google.orgpolicy('v2'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await orgpolicy.projects.policies.patch({ + * // Immutable. The resource name of the Policy. Must be one of the following forms, where constraint_name is the name of the constraint which this Policy configures: * `projects/{project_number\}/policies/{constraint_name\}` * `folders/{folder_id\}/policies/{constraint_name\}` * `organizations/{organization_id\}/policies/{constraint_name\}` For example, "projects/123/policies/compute.disableSerialPortAccess". Note: `projects/{project_id\}/policies/{constraint_name\}` is also an acceptable name for API requests, but responses will return the name using the equivalent project number. + * name: 'projects/my-project/policies/my-policie', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "name": "my_name", + * // "spec": {} + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "name": "my_name", + * // "spec": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + patch( + params: Params$Resource$Projects$Policies$Patch, + options: StreamMethodOptions + ): GaxiosPromise; + patch( + params?: Params$Resource$Projects$Policies$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Policies$Patch, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Policies$Patch, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Policies$Patch, + callback: BodyResponseCallback + ): void; + patch( + callback: BodyResponseCallback + ): void; + patch( + paramsOrCallback?: + | Params$Resource$Projects$Policies$Patch + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Policies$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Policies$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://orgpolicy.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v2/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + } + + export interface Params$Resource$Projects$Policies$Create + extends StandardParameters { + /** + * Required. The Cloud resource that will parent the new Policy. Must be in one of the following forms: * `projects/{project_number\}` * `projects/{project_id\}` * `folders/{folder_id\}` * `organizations/{organization_id\}` + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudOrgpolicyV2Policy; + } + export interface Params$Resource$Projects$Policies$Delete + extends StandardParameters { + /** + * Required. Name of the policy to delete. See `Policy` for naming rules. + */ + name?: string; + } + export interface Params$Resource$Projects$Policies$Get + extends StandardParameters { + /** + * Required. Resource name of the policy. See `Policy` for naming requirements. + */ + name?: string; + } + export interface Params$Resource$Projects$Policies$Geteffectivepolicy + extends StandardParameters { + /** + * Required. The effective policy to compute. See `Policy` for naming rules. + */ + name?: string; + } + export interface Params$Resource$Projects$Policies$List + extends StandardParameters { + /** + * Size of the pages to be returned. This is currently unsupported and will be ignored. The server may at any point start using this field to limit page size. + */ + pageSize?: number; + /** + * Page token used to retrieve the next page. This is currently unsupported and will be ignored. The server may at any point start using this field. + */ + pageToken?: string; + /** + * Required. The target Cloud resource that parents the set of constraints and policies that will be returned from this call. Must be in one of the following forms: * `projects/{project_number\}` * `projects/{project_id\}` * `folders/{folder_id\}` * `organizations/{organization_id\}` + */ + parent?: string; + } + export interface Params$Resource$Projects$Policies$Patch + extends StandardParameters { + /** + * Immutable. The resource name of the Policy. Must be one of the following forms, where constraint_name is the name of the constraint which this Policy configures: * `projects/{project_number\}/policies/{constraint_name\}` * `folders/{folder_id\}/policies/{constraint_name\}` * `organizations/{organization_id\}/policies/{constraint_name\}` For example, "projects/123/policies/compute.disableSerialPortAccess". Note: `projects/{project_id\}/policies/{constraint_name\}` is also an acceptable name for API requests, but responses will return the name using the equivalent project number. + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudOrgpolicyV2Policy; + } +} diff --git a/src/apis/orgpolicy/webpack.config.js b/src/apis/orgpolicy/webpack.config.js new file mode 100644 index 00000000000..8969f9d4333 --- /dev/null +++ b/src/apis/orgpolicy/webpack.config.js @@ -0,0 +1,79 @@ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Use `npm run webpack` to produce Webpack bundle for this library. + +const path = require('path'); + +module.exports = { + entry: './index.ts', + resolve: { + extensions: ['.ts', '.js', '.json'], + fallback: { + crypto: false, + child_process: false, + fs: false, + http2: false, + buffer: 'browserify', + process: false, + os: false, + querystring: false, + path: false, + stream: 'stream-browserify', + url: false, + util: false, + zlib: false, + }, + }, + output: { + library: 'Orgpolicy', + filename: 'orgpolicy.min.js', + path: path.resolve(__dirname, 'dist'), + }, + module: { + rules: [ + { + test: /node_modules[\\/]google-auth-library[\\/]src[\\/]crypto[\\/]node[\\/]crypto/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]https-proxy-agent[\\/]/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]gcp-metadata[\\/]/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]gtoken[\\/]/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]pkginfo[\\/]/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]semver[\\/]/, + use: 'null-loader', + }, + { + test: /\.ts$/, + use: 'ts-loader', + exclude: /node_modules/, + }, + ], + }, + mode: 'production', + plugins: [], +}; diff --git a/src/apis/osconfig/v1.ts b/src/apis/osconfig/v1.ts index da2abee0e8d..b694b48cb87 100644 --- a/src/apis/osconfig/v1.ts +++ b/src/apis/osconfig/v1.ts @@ -113,6 +113,7 @@ export namespace osconfig_v1 { */ export class Osconfig { context: APIRequestContext; + operations: Resource$Operations; projects: Resource$Projects; constructor(options: GlobalOptions, google?: GoogleConfigurable) { @@ -121,6 +122,7 @@ export namespace osconfig_v1 { google, }; + this.operations = new Resource$Operations(this.context); this.projects = new Resource$Projects(this.context); } } @@ -484,6 +486,19 @@ export namespace osconfig_v1 { */ summary?: string | null; } + /** + * The response message for Operations.ListOperations. + */ + export interface Schema$ListOperationsResponse { + /** + * The standard List next-page token. + */ + nextPageToken?: string | null; + /** + * A list of operations that matches the specified filter in the request. + */ + operations?: Schema$Operation[]; + } /** * A response message for listing patch deployments. */ @@ -545,6 +560,31 @@ export namespace osconfig_v1 { */ executeTime?: string | null; } + /** + * This resource represents a long-running operation that is the result of a network API call. + */ + export interface Schema$Operation { + /** + * 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?: boolean | null; + /** + * The error result of the operation in case of failure or cancellation. + */ + error?: Schema$Status; + /** + * 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?: {[key: string]: any} | null; + /** + * 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 | null; + /** + * The normal response of the operation in case of success. 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?: {[key: string]: any} | null; + } /** * Patch configuration specifications. Contains details on how to apply the patch(es) to a VM instance. */ @@ -874,6 +914,23 @@ export namespace osconfig_v1 { */ weekly?: Schema$WeeklySchedule; } + /** + * 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). + */ + export interface Schema$Status { + /** + * The status code, which should be an enum value of google.rpc.Code. + */ + code?: number | null; + /** + * A list of messages that carry the error details. There is a common set of message types for APIs to use. + */ + details?: Array<{[key: string]: any}> | null; + /** + * 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 | null; + } /** * 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`. */ @@ -998,6 +1055,300 @@ export namespace osconfig_v1 { withUpdate?: boolean | null; } + export class Resource$Operations { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * 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`. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/osconfig.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const osconfig = google.osconfig('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await osconfig.operations.delete({ + * // The name of the operation resource to be deleted. + * name: 'operations/.*', + * }); + * console.log(res.data); + * + * // Example response + * // {} + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + delete( + params: Params$Resource$Operations$Delete, + options: StreamMethodOptions + ): GaxiosPromise; + delete( + params?: Params$Resource$Operations$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Operations$Delete, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Operations$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Operations$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Operations$Delete + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Operations$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Operations$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://osconfig.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/x/operations`. To override the binding, API services can add a binding such as `"/v1/{name=users/x\}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/osconfig.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const osconfig = google.osconfig('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: [], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await osconfig.operations.list({ + * // The standard list filter. + * filter: 'placeholder-value', + * // The name of the operation's parent resource. + * name: 'operations', + * // The standard list page size. + * pageSize: 'placeholder-value', + * // The standard list page token. + * pageToken: 'placeholder-value', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "nextPageToken": "my_nextPageToken", + * // "operations": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Operations$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Operations$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Operations$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Operations$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Operations$List, + callback: BodyResponseCallback + ): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: + | Params$Resource$Operations$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Operations$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Operations$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://osconfig.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Operations$Delete + extends StandardParameters { + /** + * The name of the operation resource to be deleted. + */ + name?: string; + } + export interface Params$Resource$Operations$List extends StandardParameters { + /** + * The standard list filter. + */ + filter?: string; + /** + * The name of the operation's parent resource. + */ + name?: string; + /** + * The standard list page size. + */ + pageSize?: number; + /** + * The standard list page token. + */ + pageToken?: string; + } + export class Resource$Projects { context: APIRequestContext; patchDeployments: Resource$Projects$Patchdeployments; diff --git a/src/apis/people/v1.ts b/src/apis/people/v1.ts index 4657da25cfa..51ef2f20e06 100644 --- a/src/apis/people/v1.ts +++ b/src/apis/people/v1.ts @@ -195,6 +195,41 @@ export namespace people_v1 { */ metadata?: Schema$FieldMetadata; } + /** + * A request to create a batch of contacts. + */ + export interface Schema$BatchCreateContactsRequest { + /** + * Required. The contact to create. Allows up to 200 contacts in a single request. + */ + contacts?: Schema$ContactToCreate[]; + /** + * Required. A field mask to restrict which fields on each person are returned in the response. Multiple fields can be specified by separating them with commas. If read mask is left empty, the post-mutate-get is skipped and no data will be returned in the response. Valid values are: * addresses * ageRanges * biographies * birthdays * calendarUrls * clientData * coverPhotos * emailAddresses * events * externalIds * genders * imClients * interests * locales * locations * memberships * metadata * miscKeywords * names * nicknames * occupations * organizations * phoneNumbers * photos * relations * sipAddresses * skills * urls * userDefined + */ + readMask?: string | null; + /** + * Optional. A mask of what source types to return in the post mutate read. Defaults to READ_SOURCE_TYPE_CONTACT and READ_SOURCE_TYPE_PROFILE if not set. + */ + sources?: string[] | null; + } + /** + * The response to a request to create a batch of contacts. + */ + export interface Schema$BatchCreateContactsResponse { + /** + * The contacts that were created, unless the request `read_mask` is empty. + */ + createdPeople?: Schema$PersonResponse[]; + } + /** + * A request to delete a batch of existing contacts. + */ + export interface Schema$BatchDeleteContactsRequest { + /** + * Required. The resource names of the contact to delete. It's repeatable. Allows up to 500 resource names in a single request. + */ + resourceNames?: string[] | null; + } /** * The response to a batch get contact groups request. */ @@ -204,6 +239,36 @@ export namespace people_v1 { */ responses?: Schema$ContactGroupResponse[]; } + /** + * A request to update a batch of contacts. + */ + export interface Schema$BatchUpdateContactsRequest { + /** + * Required. A map of resource names to the person data to be updated. Allows up to 200 contacts in a single request. + */ + contacts?: {[key: string]: Schema$Person} | null; + /** + * Required. A field mask to restrict which fields on each person are returned. Multiple fields can be specified by separating them with commas. If read mask is left empty, the post-mutate-get is skipped and no data will be returned in the response. Valid values are: * addresses * ageRanges * biographies * birthdays * calendarUrls * clientData * coverPhotos * emailAddresses * events * externalIds * genders * imClients * interests * locales * locations * memberships * metadata * miscKeywords * names * nicknames * occupations * organizations * phoneNumbers * photos * relations * sipAddresses * skills * urls * userDefined + */ + readMask?: string | null; + /** + * Optional. A mask of what source types to return. Defaults to READ_SOURCE_TYPE_CONTACT and READ_SOURCE_TYPE_PROFILE if not set. + */ + sources?: string[] | null; + /** + * Required. A field mask to restrict which fields on the person are updated. Multiple fields can be specified by separating them with commas. All specified fields will be replaced, or cleared if left empty for each person. Valid values are: * addresses * biographies * birthdays * calendarUrls * clientData * emailAddresses * events * externalIds * genders * imClients * interests * locales * locations * memberships * miscKeywords * names * nicknames * occupations * organizations * phoneNumbers * relations * sipAddresses * urls * userDefined + */ + updateMask?: string | null; + } + /** + * The response to a request to create a batch of contacts. + */ + export interface Schema$BatchUpdateContactsResponse { + /** + * A map of resource names to the contacts that were updated, unless the request `read_mask` is empty. + */ + updateResult?: {[key: string]: Schema$PersonResponse} | null; + } /** * A person's short biography. */ @@ -373,6 +438,15 @@ export namespace people_v1 { */ status?: Schema$Status; } + /** + * A wrapper that contains the person data to populate a newly created source. + */ + export interface Schema$ContactToCreate { + /** + * Required. The person data to populate a newly created source. + */ + contactPerson?: Schema$Person; + } /** * A request to copy an "Other contact" to my contacts group. */ @@ -3156,6 +3230,425 @@ export namespace people_v1 { this.connections = new Resource$People$Connections(this.context); } + /** + * Create a batch of new contacts and return the PersonResponses for the newly created contacts. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/people.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const people = google.people('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/contacts'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await people.people.batchCreateContacts({ + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "contacts": [], + * // "readMask": "my_readMask", + * // "sources": [] + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "createdPeople": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + batchCreateContacts( + params: Params$Resource$People$Batchcreatecontacts, + options: StreamMethodOptions + ): GaxiosPromise; + batchCreateContacts( + params?: Params$Resource$People$Batchcreatecontacts, + options?: MethodOptions + ): GaxiosPromise; + batchCreateContacts( + params: Params$Resource$People$Batchcreatecontacts, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + batchCreateContacts( + params: Params$Resource$People$Batchcreatecontacts, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + batchCreateContacts( + params: Params$Resource$People$Batchcreatecontacts, + callback: BodyResponseCallback + ): void; + batchCreateContacts( + callback: BodyResponseCallback + ): void; + batchCreateContacts( + paramsOrCallback?: + | Params$Resource$People$Batchcreatecontacts + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$People$Batchcreatecontacts; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$People$Batchcreatecontacts; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://people.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/people:batchCreateContacts').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: [], + pathParams: [], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Delete a batch of contacts. Any non-contact data will not be deleted. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/people.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const people = google.people('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/contacts'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await people.people.batchDeleteContacts({ + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "resourceNames": [] + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // {} + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + batchDeleteContacts( + params: Params$Resource$People$Batchdeletecontacts, + options: StreamMethodOptions + ): GaxiosPromise; + batchDeleteContacts( + params?: Params$Resource$People$Batchdeletecontacts, + options?: MethodOptions + ): GaxiosPromise; + batchDeleteContacts( + params: Params$Resource$People$Batchdeletecontacts, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + batchDeleteContacts( + params: Params$Resource$People$Batchdeletecontacts, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + batchDeleteContacts( + params: Params$Resource$People$Batchdeletecontacts, + callback: BodyResponseCallback + ): void; + batchDeleteContacts(callback: BodyResponseCallback): void; + batchDeleteContacts( + paramsOrCallback?: + | Params$Resource$People$Batchdeletecontacts + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$People$Batchdeletecontacts; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$People$Batchdeletecontacts; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://people.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/people:batchDeleteContacts').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: [], + pathParams: [], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Update a batch of contacts and return a map of resource names to PersonResponses for the updated contacts. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/people.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const people = google.people('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/contacts'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await people.people.batchUpdateContacts({ + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "contacts": {}, + * // "readMask": "my_readMask", + * // "sources": [], + * // "updateMask": "my_updateMask" + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "updateResult": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + batchUpdateContacts( + params: Params$Resource$People$Batchupdatecontacts, + options: StreamMethodOptions + ): GaxiosPromise; + batchUpdateContacts( + params?: Params$Resource$People$Batchupdatecontacts, + options?: MethodOptions + ): GaxiosPromise; + batchUpdateContacts( + params: Params$Resource$People$Batchupdatecontacts, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + batchUpdateContacts( + params: Params$Resource$People$Batchupdatecontacts, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + batchUpdateContacts( + params: Params$Resource$People$Batchupdatecontacts, + callback: BodyResponseCallback + ): void; + batchUpdateContacts( + callback: BodyResponseCallback + ): void; + batchUpdateContacts( + paramsOrCallback?: + | Params$Resource$People$Batchupdatecontacts + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$People$Batchupdatecontacts; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$People$Batchupdatecontacts; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://people.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/people:batchUpdateContacts').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: [], + pathParams: [], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + /** * Create a new contact and return the person resource for that contact. The request returns a 400 error if more than one field is specified on a field that is a singleton for contact sources: * biographies * birthdays * genders * names * @example @@ -4769,6 +5262,27 @@ export namespace people_v1 { } } + export interface Params$Resource$People$Batchcreatecontacts + extends StandardParameters { + /** + * Request body metadata + */ + requestBody?: Schema$BatchCreateContactsRequest; + } + export interface Params$Resource$People$Batchdeletecontacts + extends StandardParameters { + /** + * Request body metadata + */ + requestBody?: Schema$BatchDeleteContactsRequest; + } + export interface Params$Resource$People$Batchupdatecontacts + extends StandardParameters { + /** + * Request body metadata + */ + requestBody?: Schema$BatchUpdateContactsRequest; + } export interface Params$Resource$People$Createcontact extends StandardParameters { /** diff --git a/src/apis/policysimulator/v1beta1.ts b/src/apis/policysimulator/v1beta1.ts index c789a0473e6..4b9d4c78506 100644 --- a/src/apis/policysimulator/v1beta1.ts +++ b/src/apis/policysimulator/v1beta1.ts @@ -380,6 +380,78 @@ export namespace policysimulator_v1beta1 { */ unchangedCount?: number | null; } + /** + * A resource describing a `Replay`, or simulation. + */ + export interface Schema$GoogleCloudPolicysimulatorV1Replay { + /** + * Required. The configuration used for the `Replay`. + */ + config?: Schema$GoogleCloudPolicysimulatorV1ReplayConfig; + /** + * Output only. The resource name of the `Replay`, which has the following format: `{projects|folders|organizations\}/{resource-id\}/locations/global/replays/{replay-id\}`, where `{resource-id\}` is the ID of the project, folder, or organization that owns the Replay. Example: `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36` + */ + name?: string | null; + /** + * Output only. Summary statistics about the replayed log entries. + */ + resultsSummary?: Schema$GoogleCloudPolicysimulatorV1ReplayResultsSummary; + /** + * Output only. The current state of the `Replay`. + */ + state?: string | null; + } + /** + * The configuration used for a Replay. + */ + export interface Schema$GoogleCloudPolicysimulatorV1ReplayConfig { + /** + * The logs to use as input for the Replay. + */ + logSource?: string | null; + /** + * A mapping of the resources that you want to simulate policies for and the policies that you want to simulate. Keys are the full resource names for the resources. For example, `//cloudresourcemanager.googleapis.com/projects/my-project`. For examples of full resource names for Google Cloud services, see https://cloud.google.com/iam/help/troubleshooter/full-resource-names. Values are Policy objects representing the policies that you want to simulate. Replays automatically take into account any IAM policies inherited through the resource hierarchy, and any policies set on descendant resources. You do not need to include these policies in the policy overlay. + */ + policyOverlay?: {[key: string]: Schema$GoogleIamV1Policy} | null; + } + /** + * Metadata about a Replay operation. + */ + export interface Schema$GoogleCloudPolicysimulatorV1ReplayOperationMetadata { + /** + * Time when the request was received. + */ + startTime?: string | null; + } + /** + * Summary statistics about the replayed log entries. + */ + export interface Schema$GoogleCloudPolicysimulatorV1ReplayResultsSummary { + /** + * The number of replayed log entries with a difference between baseline and simulated policies. + */ + differenceCount?: number | null; + /** + * The number of log entries that could not be replayed. + */ + errorCount?: number | null; + /** + * The total number of log entries replayed. + */ + logCount?: number | null; + /** + * The date of the newest log entry replayed. + */ + newestDate?: Schema$GoogleTypeDate; + /** + * The date of the oldest log entry replayed. + */ + oldestDate?: Schema$GoogleTypeDate; + /** + * The number of replayed log entries with no difference between baseline and simulated policies. + */ + unchangedCount?: number | null; + } /** * Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { "audit_configs": [ { "service": "allServices", "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] \}, { "log_type": "DATA_WRITE" \}, { "log_type": "ADMIN_READ" \} ] \}, { "service": "sampleservice.googleapis.com", "audit_log_configs": [ { "log_type": "DATA_READ" \}, { "log_type": "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] \} ] \} ] \} For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging. */ diff --git a/src/apis/privateca/v1beta1.ts b/src/apis/privateca/v1beta1.ts index f405c3d9a31..f46666cb964 100644 --- a/src/apis/privateca/v1beta1.ts +++ b/src/apis/privateca/v1beta1.ts @@ -216,15 +216,6 @@ export namespace privateca_v1beta1 { */ logType?: string | null; } - /** - * Message for reporting billing requests through Eventstream. - */ - export interface Schema$BillingView { - /** - * Billing requests to be reported for cloud.eventstream.v2.ResourceEvent Each request contains billing operations to be reported under a service name. See go/billing-view-construction for documentation on constructing billing view report requests. - */ - reportRequests?: Schema$GoogleApiServicecontrolV1ReportRequest[]; - } /** * Associates `members` with a `role`. */ @@ -544,23 +535,6 @@ export namespace privateca_v1beta1 { */ requestId?: string | null; } - /** - * Exemplars are example points that may be used to annotate aggregated distribution values. They are metadata that gives information about a particular value added to a Distribution bucket, such as a trace ID that was active when a value was added. They may contain further information, such as a example values and timestamps, origin, etc. - */ - export interface Schema$Exemplar { - /** - * Contextual information about the example value. Examples are: Trace: type.googleapis.com/google.monitoring.v3.SpanContext Literal string: type.googleapis.com/google.protobuf.StringValue Labels dropped during aggregation: type.googleapis.com/google.monitoring.v3.DroppedLabels There may be only a single attachment of any given message type in a single exemplar, and this is enforced by the system. - */ - attachments?: Array<{[key: string]: any}> | null; - /** - * The observation (sampling) time of the above value. - */ - timestamp?: string | null; - /** - * Value of the exemplar point. This value determines to which bucket the exemplar belongs. - */ - value?: number | null; - } /** * Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. */ @@ -620,502 +594,6 @@ export namespace privateca_v1beta1 { */ pemCsr?: string | null; } - /** - * A set of attributes, each in the format `[KEY]:[VALUE]`. - */ - export interface Schema$GoogleApiServicecontrolV1Attributes { - /** - * The set of attributes. Each attribute's key can be up to 128 bytes long. The value can be a string up to 256 bytes, a signed 64-bit integer, or the Boolean values `true` and `false`. For example: "/instance_id": "my-instance" "/http/user_agent": "" "/http/request_bytes": 300 "abc.com/myattribute": true - */ - attributeMap?: { - [key: string]: Schema$GoogleApiServicecontrolV1AttributeValue; - } | null; - /** - * The number of attributes that were discarded. Attributes can be discarded because their keys are too long or because there are too many attributes. If this value is 0 then all attributes are valid. - */ - droppedAttributesCount?: number | null; - } - /** - * The allowed types for [VALUE] in a `[KEY]:[VALUE]` attribute. - */ - export interface Schema$GoogleApiServicecontrolV1AttributeValue { - /** - * A Boolean value represented by `true` or `false`. - */ - boolValue?: boolean | null; - /** - * A 64-bit signed integer. - */ - intValue?: string | null; - /** - * A string up to 256 bytes long. - */ - stringValue?: Schema$GoogleApiServicecontrolV1TruncatableString; - } - /** - * Distribution represents a frequency distribution of double-valued sample points. It contains the size of the population of sample points plus additional optional information: - the arithmetic mean of the samples - the minimum and maximum of the samples - the sum-squared-deviation of the samples, used to compute variance - a histogram of the values of the sample points - */ - export interface Schema$GoogleApiServicecontrolV1Distribution { - /** - * The number of samples in each histogram bucket. `bucket_counts` are optional. If present, they must sum to the `count` value. The buckets are defined below in `bucket_option`. There are N buckets. `bucket_counts[0]` is the number of samples in the underflow bucket. `bucket_counts[1]` to `bucket_counts[N-1]` are the numbers of samples in each of the finite buckets. And `bucket_counts[N] is the number of samples in the overflow bucket. See the comments of `bucket_option` below for more details. Any suffix of trailing zeros may be omitted. - */ - bucketCounts?: string[] | null; - /** - * The total number of samples in the distribution. Must be \>= 0. - */ - count?: string | null; - /** - * Example points. Must be in increasing order of `value` field. - */ - exemplars?: Schema$Exemplar[]; - /** - * Buckets with arbitrary user-provided width. - */ - explicitBuckets?: Schema$GoogleApiServicecontrolV1ExplicitBuckets; - /** - * Buckets with exponentially growing width. - */ - exponentialBuckets?: Schema$GoogleApiServicecontrolV1ExponentialBuckets; - /** - * Buckets with constant width. - */ - linearBuckets?: Schema$GoogleApiServicecontrolV1LinearBuckets; - /** - * The maximum of the population of values. Ignored if `count` is zero. - */ - maximum?: number | null; - /** - * The arithmetic mean of the samples in the distribution. If `count` is zero then this field must be zero. - */ - mean?: number | null; - /** - * The minimum of the population of values. Ignored if `count` is zero. - */ - minimum?: number | null; - /** - * The sum of squared deviations from the mean: Sum[i=1..count]((x_i - mean)^2) where each x_i is a sample values. If `count` is zero then this field must be zero, otherwise validation of the request fails. - */ - sumOfSquaredDeviation?: number | null; - } - /** - * Describing buckets with arbitrary user-provided width. - */ - export interface Schema$GoogleApiServicecontrolV1ExplicitBuckets { - /** - * 'bound' is a list of strictly increasing boundaries between buckets. Note that a list of length N-1 defines N buckets because of fenceposting. See comments on `bucket_options` for details. The i'th finite bucket covers the interval [bound[i-1], bound[i]) where i ranges from 1 to bound_size() - 1. Note that there are no finite buckets at all if 'bound' only contains a single element; in that special case the single bound defines the boundary between the underflow and overflow buckets. bucket number lower bound upper bound i == 0 (underflow) -inf bound[i] 0 < i < bound_size() bound[i-1] bound[i] i == bound_size() (overflow) bound[i-1] +inf - */ - bounds?: number[] | null; - } - /** - * Describing buckets with exponentially growing width. - */ - export interface Schema$GoogleApiServicecontrolV1ExponentialBuckets { - /** - * The i'th exponential bucket covers the interval [scale * growth_factor^(i-1), scale * growth_factor^i) where i ranges from 1 to num_finite_buckets inclusive. Must be larger than 1.0. - */ - growthFactor?: number | null; - /** - * The number of finite buckets. With the underflow and overflow buckets, the total number of buckets is `num_finite_buckets` + 2. See comments on `bucket_options` for details. - */ - numFiniteBuckets?: number | null; - /** - * The i'th exponential bucket covers the interval [scale * growth_factor^(i-1), scale * growth_factor^i) where i ranges from 1 to num_finite_buckets inclusive. Must be \> 0. - */ - scale?: number | null; - } - /** - * A common proto for logging HTTP requests. Only contains semantics defined by the HTTP specification. Product-specific logging information MUST be defined in a separate message. - */ - export interface Schema$GoogleApiServicecontrolV1HttpRequest { - /** - * The number of HTTP response bytes inserted into cache. Set only when a cache fill was attempted. - */ - cacheFillBytes?: string | null; - /** - * Whether or not an entity was served from cache (with or without validation). - */ - cacheHit?: boolean | null; - /** - * Whether or not a cache lookup was attempted. - */ - cacheLookup?: boolean | null; - /** - * Whether or not the response was validated with the origin server before being served from cache. This field is only meaningful if `cache_hit` is True. - */ - cacheValidatedWithOriginServer?: boolean | null; - /** - * The request processing latency on the server, from the time the request was received until the response was sent. - */ - latency?: string | null; - /** - * Protocol used for the request. Examples: "HTTP/1.1", "HTTP/2", "websocket" - */ - protocol?: string | null; - /** - * The referer URL of the request, as defined in [HTTP/1.1 Header Field Definitions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). - */ - referer?: string | null; - /** - * The IP address (IPv4 or IPv6) of the client that issued the HTTP request. Examples: `"192.168.1.1"`, `"FE80::0202:B3FF:FE1E:8329"`. - */ - remoteIp?: string | null; - /** - * The request method. Examples: `"GET"`, `"HEAD"`, `"PUT"`, `"POST"`. - */ - requestMethod?: string | null; - /** - * The size of the HTTP request message in bytes, including the request headers and the request body. - */ - requestSize?: string | null; - /** - * The scheme (http, https), the host name, the path, and the query portion of the URL that was requested. Example: `"http://example.com/some/info?color=red"`. - */ - requestUrl?: string | null; - /** - * The size of the HTTP response message sent back to the client, in bytes, including the response headers and the response body. - */ - responseSize?: string | null; - /** - * The IP address (IPv4 or IPv6) of the origin server that the request was sent to. - */ - serverIp?: string | null; - /** - * The response code indicating the status of the response. Examples: 200, 404. - */ - status?: number | null; - /** - * The user agent sent by the client. Example: `"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)"`. - */ - userAgent?: string | null; - } - /** - * Describing buckets with constant width. - */ - export interface Schema$GoogleApiServicecontrolV1LinearBuckets { - /** - * The number of finite buckets. With the underflow and overflow buckets, the total number of buckets is `num_finite_buckets` + 2. See comments on `bucket_options` for details. - */ - numFiniteBuckets?: number | null; - /** - * The i'th linear bucket covers the interval [offset + (i-1) * width, offset + i * width) where i ranges from 1 to num_finite_buckets, inclusive. - */ - offset?: number | null; - /** - * The i'th linear bucket covers the interval [offset + (i-1) * width, offset + i * width) where i ranges from 1 to num_finite_buckets, inclusive. Must be strictly positive. - */ - width?: number | null; - } - /** - * An individual log entry. - */ - export interface Schema$GoogleApiServicecontrolV1LogEntry { - /** - * Optional. Information about the HTTP request associated with this log entry, if applicable. - */ - httpRequest?: Schema$GoogleApiServicecontrolV1HttpRequest; - /** - * A unique ID for the log entry used for deduplication. If omitted, the implementation will generate one based on operation_id. - */ - insertId?: string | null; - /** - * A set of user-defined (key, value) data that provides additional information about the log entry. - */ - labels?: {[key: string]: string} | null; - /** - * Required. The log to which this log entry belongs. Examples: `"syslog"`, `"book_log"`. - */ - name?: string | null; - /** - * Optional. Information about an operation associated with the log entry, if applicable. - */ - operation?: Schema$GoogleApiServicecontrolV1LogEntryOperation; - /** - * The log entry payload, represented as a protocol buffer that is expressed as a JSON object. The only accepted type currently is AuditLog. - */ - protoPayload?: {[key: string]: any} | null; - /** - * The severity of the log entry. The default value is `LogSeverity.DEFAULT`. - */ - severity?: string | null; - /** - * Optional. Source code location information associated with the log entry, if any. - */ - sourceLocation?: Schema$GoogleApiServicecontrolV1LogEntrySourceLocation; - /** - * The log entry payload, represented as a structure that is expressed as a JSON object. - */ - structPayload?: {[key: string]: any} | null; - /** - * The log entry payload, represented as a Unicode string (UTF-8). - */ - textPayload?: string | null; - /** - * The time the event described by the log entry occurred. If omitted, defaults to operation start time. - */ - timestamp?: string | null; - /** - * Optional. Resource name of the trace associated with the log entry, if any. If this field contains a relative resource name, you can assume the name is relative to `//tracing.googleapis.com`. Example: `projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824` - */ - trace?: string | null; - } - /** - * Additional information about a potentially long-running operation with which a log entry is associated. - */ - export interface Schema$GoogleApiServicecontrolV1LogEntryOperation { - /** - * Optional. Set this to True if this is the first log entry in the operation. - */ - first?: boolean | null; - /** - * Optional. An arbitrary operation identifier. Log entries with the same identifier are assumed to be part of the same operation. - */ - id?: string | null; - /** - * Optional. Set this to True if this is the last log entry in the operation. - */ - last?: boolean | null; - /** - * Optional. An arbitrary producer identifier. The combination of `id` and `producer` must be globally unique. Examples for `producer`: `"MyDivision.MyBigCompany.com"`, `"github.com/MyProject/MyApplication"`. - */ - producer?: string | null; - } - /** - * Additional information about the source code location that produced the log entry. - */ - export interface Schema$GoogleApiServicecontrolV1LogEntrySourceLocation { - /** - * Optional. Source file name. Depending on the runtime environment, this might be a simple name or a fully-qualified name. - */ - file?: string | null; - /** - * Optional. Human-readable name of the function or method being invoked, with optional context such as the class or package name. This information may be used in contexts such as the logs viewer, where a file and line number are less meaningful. The format can vary by language. For example: `qual.if.ied.Class.method` (Java), `dir/package.func` (Go), `function` (Python). - */ - function?: string | null; - /** - * Optional. Line within the source file. 1-based; 0 indicates no line number available. - */ - line?: string | null; - } - /** - * Represents a single metric value. - */ - export interface Schema$GoogleApiServicecontrolV1MetricValue { - /** - * A boolean value. - */ - boolValue?: boolean | null; - /** - * A distribution value. - */ - distributionValue?: Schema$GoogleApiServicecontrolV1Distribution; - /** - * A double precision floating point value. - */ - doubleValue?: number | null; - /** - * The end of the time period over which this metric value's measurement applies. If not specified, google.api.servicecontrol.v1.Operation.end_time will be used. - */ - endTime?: string | null; - /** - * A signed 64-bit integer value. - */ - int64Value?: string | null; - /** - * The labels describing the metric value. See comments on google.api.servicecontrol.v1.Operation.labels for the overriding relationship. Note that this map must not contain monitored resource labels. - */ - labels?: {[key: string]: string} | null; - /** - * A money value. - */ - moneyValue?: Schema$Money; - /** - * The start of the time period over which this metric value's measurement applies. The time period has different semantics for different metric types (cumulative, delta, and gauge). See the metric definition documentation in the service configuration for details. If not specified, google.api.servicecontrol.v1.Operation.start_time will be used. - */ - startTime?: string | null; - /** - * A text string value. - */ - stringValue?: string | null; - } - /** - * Represents a set of metric values in the same metric. Each metric value in the set should have a unique combination of start time, end time, and label values. - */ - export interface Schema$GoogleApiServicecontrolV1MetricValueSet { - /** - * The metric name defined in the service configuration. - */ - metricName?: string | null; - /** - * The values in this metric. - */ - metricValues?: Schema$GoogleApiServicecontrolV1MetricValue[]; - } - /** - * Represents information regarding an operation. - */ - export interface Schema$GoogleApiServicecontrolV1Operation { - /** - * Identity of the consumer who is using the service. This field should be filled in for the operations initiated by a consumer, but not for service-initiated operations that are not related to a specific consumer. - This can be in one of the following formats: - project:PROJECT_ID, - project`_`number:PROJECT_NUMBER, - projects/PROJECT_ID or PROJECT_NUMBER, - folders/FOLDER_NUMBER, - organizations/ORGANIZATION_NUMBER, - api`_`key:API_KEY. - */ - consumerId?: string | null; - /** - * End time of the operation. Required when the operation is used in ServiceController.Report, but optional when the operation is used in ServiceController.Check. - */ - endTime?: string | null; - /** - * Unimplemented. - */ - extensions?: Array<{[key: string]: any}> | null; - /** - * DO NOT USE. This is an experimental field. - */ - importance?: string | null; - /** - * Labels describing the operation. Only the following labels are allowed: - Labels describing monitored resources as defined in the service configuration. - Default labels of metric values. When specified, labels defined in the metric value override these default. - The following labels defined by Google Cloud Platform: - `cloud.googleapis.com/location` describing the location where the operation happened, - `servicecontrol.googleapis.com/user_agent` describing the user agent of the API request, - `servicecontrol.googleapis.com/service_agent` describing the service used to handle the API request (e.g. ESP), - `servicecontrol.googleapis.com/platform` describing the platform where the API is served, such as App Engine, Compute Engine, or Kubernetes Engine. - */ - labels?: {[key: string]: string} | null; - /** - * Represents information to be logged. - */ - logEntries?: Schema$GoogleApiServicecontrolV1LogEntry[]; - /** - * Represents information about this operation. Each MetricValueSet corresponds to a metric defined in the service configuration. The data type used in the MetricValueSet must agree with the data type specified in the metric definition. Within a single operation, it is not allowed to have more than one MetricValue instances that have the same metric names and identical label value combinations. If a request has such duplicated MetricValue instances, the entire request is rejected with an invalid argument error. - */ - metricValueSets?: Schema$GoogleApiServicecontrolV1MetricValueSet[]; - /** - * Identity of the operation. This must be unique within the scope of the service that generated the operation. If the service calls Check() and Report() on the same operation, the two calls should carry the same id. UUID version 4 is recommended, though not required. In scenarios where an operation is computed from existing information and an idempotent id is desirable for deduplication purpose, UUID version 5 is recommended. See RFC 4122 for details. - */ - operationId?: string | null; - /** - * Fully qualified name of the operation. Reserved for future use. - */ - operationName?: string | null; - /** - * Represents the properties needed for quota check. Applicable only if this operation is for a quota check request. If this is not specified, no quota check will be performed. - */ - quotaProperties?: Schema$GoogleApiServicecontrolV1QuotaProperties; - /** - * The resources that are involved in the operation. The maximum supported number of entries in this field is 100. - */ - resources?: Schema$GoogleApiServicecontrolV1ResourceInfo[]; - /** - * Required. Start time of the operation. - */ - startTime?: string | null; - /** - * Unimplemented. A list of Cloud Trace spans. The span names shall contain the id of the destination project which can be either the produce or the consumer project. - */ - traceSpans?: Schema$GoogleApiServicecontrolV1TraceSpan[]; - /** - * Private Preview. This feature is only available for approved services. User defined labels for the resource that this operation is associated with. - */ - userLabels?: {[key: string]: string} | null; - } - /** - * Represents the properties needed for quota operations. - */ - export interface Schema$GoogleApiServicecontrolV1QuotaProperties { - /** - * Quota mode for this operation. - */ - quotaMode?: string | null; - } - /** - * Request message for the Report method. - */ - export interface Schema$GoogleApiServicecontrolV1ReportRequest { - /** - * Operations to be reported. Typically the service should report one operation per request. Putting multiple operations into a single request is allowed, but should be used only when multiple operations are natually available at the time of the report. There is no limit on the number of operations in the same ReportRequest, however the ReportRequest size should be no larger than 1MB. See ReportResponse.report_errors for partial failure behavior. - */ - operations?: Schema$GoogleApiServicecontrolV1Operation[]; - /** - * Specifies which version of service config should be used to process the request. If unspecified or no matching version can be found, the latest one will be used. - */ - serviceConfigId?: string | null; - /** - * The service name as specified in its service configuration. For example, `"pubsub.googleapis.com"`. See [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) for the definition of a service name. - */ - serviceName?: string | null; - } - /** - * Describes a resource associated with this operation. - */ - export interface Schema$GoogleApiServicecontrolV1ResourceInfo { - /** - * The identifier of the parent of this resource instance. Must be in one of the following formats: - `projects/` - `folders/` - `organizations/` - */ - resourceContainer?: string | null; - /** - * The location of the resource. If not empty, the resource will be checked against location policy. The value must be a valid zone, region or multiregion. For example: "europe-west4" or "northamerica-northeast1-a" - */ - resourceLocation?: string | null; - /** - * Name of the resource. This is used for auditing purposes. - */ - resourceName?: string | null; - } - /** - * A span represents a single operation within a trace. Spans can be nested to form a trace tree. Often, a trace contains a root span that describes the end-to-end latency, and one or more subspans for its sub-operations. A trace can also contain multiple root spans, or none at all. Spans do not need to be contiguous—there may be gaps or overlaps between spans in a trace. - */ - export interface Schema$GoogleApiServicecontrolV1TraceSpan { - /** - * A set of attributes on the span. You can have up to 32 attributes per span. - */ - attributes?: Schema$GoogleApiServicecontrolV1Attributes; - /** - * An optional number of child spans that were generated while this span was active. If set, allows implementation to detect missing child spans. - */ - childSpanCount?: number | null; - /** - * A description of the span's operation (up to 128 bytes). Stackdriver Trace displays the description in the Google Cloud Platform Console. For example, the display name can be a qualified method name or a file name and a line number where the operation is called. A best practice is to use the same display name within an application and at the same call point. This makes it easier to correlate spans in different traces. - */ - displayName?: Schema$GoogleApiServicecontrolV1TruncatableString; - /** - * The end time of the span. On the client side, this is the time kept by the local machine where the span execution ends. On the server side, this is the time when the server application handler stops running. - */ - endTime?: string | null; - /** - * The resource name of the span in the following format: projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/SPAN_ID is a unique identifier for a trace within a project; it is a 32-character hexadecimal encoding of a 16-byte array. [SPAN_ID] is a unique identifier for a span within a trace; it is a 16-character hexadecimal encoding of an 8-byte array. - */ - name?: string | null; - /** - * The [SPAN_ID] of this span's parent span. If this is a root span, then this field must be empty. - */ - parentSpanId?: string | null; - /** - * (Optional) Set this parameter to indicate whether this span is in the same process as its parent. If you do not set this parameter, Stackdriver Trace is unable to take advantage of this helpful information. - */ - sameProcessAsParentSpan?: boolean | null; - /** - * The [SPAN_ID] portion of the span's resource name. - */ - spanId?: string | null; - /** - * Distinguishes between spans generated in a particular context. For example, two spans with the same name may be distinguished using `CLIENT` (caller) and `SERVER` (callee) to identify an RPC call. - */ - spanKind?: string | null; - /** - * The start time of the span. On the client side, this is the time kept by the local machine where the span execution starts. On the server side, this is the time when the server's application handler starts running. - */ - startTime?: string | null; - /** - * An optional final status for this span. - */ - status?: Schema$Status; - } - /** - * Represents a string that might be shortened to a specified length. - */ - export interface Schema$GoogleApiServicecontrolV1TruncatableString { - /** - * The number of bytes removed from the original string. If this value is 0, then the string was not shortened. - */ - truncatedByteCount?: number | null; - /** - * The shortened string. For example, if the original string is 500 bytes long and the limit of the string is 128 bytes, then `value` contains the first 128 bytes of the 500-byte string. Truncation always happens on a UTF8 character boundary. If there are multi-byte characters in the string, then the length of the shortened string might be less than the size limit. - */ - value?: string | null; - } /** * IssuanceModes specifies the allowed ways in which Certificates may be requested from this CertificateAuthority. */ @@ -1341,23 +819,6 @@ export namespace privateca_v1beta1 { */ name?: string | null; } - /** - * Represents an amount of money with its currency type. - */ - export interface Schema$Money { - /** - * The three-letter currency code defined in ISO 4217. - */ - currencyCode?: string | null; - /** - * Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. - */ - nanos?: number | null; - /** - * The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. - */ - units?: string | null; - } /** * An ObjectId specifies an object identifier (OID). These provide context and describe types in ASN.1 messages. */ @@ -1459,6 +920,15 @@ export namespace privateca_v1beta1 { */ type?: string | null; } + /** + * Operation metadata returned by the CLH during resource state reconciliation. + */ + export interface Schema$ReconciliationOperationMetadata { + /** + * If set to TRUE, the resource has to be deleted. When using this bit, the CLH should fail the operation. + */ + deleteResource?: boolean | null; + } /** * Request message for CertificateAuthorityService.RestoreCertificateAuthority. */ @@ -1971,13 +1441,13 @@ export namespace privateca_v1beta1 { * * // Do the magic * const res = await privateca.projects.locations.list({ - * // The standard list 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). * filter: 'placeholder-value', * // The resource that owns the locations collection, if applicable. * name: 'projects/my-project', - * // The standard list page size. + * // The maximum number of results to return. If not set, the service will select a default. * pageSize: 'placeholder-value', - * // The standard list page token. + * // A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. * pageToken: 'placeholder-value', * }); * console.log(res.data); @@ -2096,7 +1566,7 @@ export namespace privateca_v1beta1 { export interface Params$Resource$Projects$Locations$List extends StandardParameters { /** - * The standard list 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). */ filter?: string; /** @@ -2104,11 +1574,11 @@ export namespace privateca_v1beta1 { */ name?: string; /** - * The standard list page size. + * The maximum number of results to return. If not set, the service will select a default. */ pageSize?: number; /** - * The standard list page token. + * A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. */ pageToken?: string; } diff --git a/src/apis/prod_tt_sasportal/v1alpha1.ts b/src/apis/prod_tt_sasportal/v1alpha1.ts index 7e296cd0b0e..6c0f611cede 100644 --- a/src/apis/prod_tt_sasportal/v1alpha1.ts +++ b/src/apis/prod_tt_sasportal/v1alpha1.ts @@ -146,6 +146,19 @@ export namespace prod_tt_sasportal_v1alpha1 { */ role?: string | null; } + /** + * The channel with score. + */ + export interface Schema$SasPortalChannelWithScore { + /** + * The frequency range of the channel. + */ + frequencyRange?: Schema$SasPortalFrequencyRange; + /** + * The channel score, normalized to be in [0,100]. + */ + score?: number | null; + } /** * Request for CreateSignedDevice. */ @@ -206,6 +219,10 @@ export namespace prod_tt_sasportal_v1alpha1 { * Output only. Current configuration of the device as registered to the SAS. */ activeConfig?: Schema$SasPortalDeviceConfig; + /** + * Output only. Current channels with scores. + */ + currentChannels?: Schema$SasPortalChannelWithScore[]; /** * Device parameters that can be overridden by both SAS Portal and SAS registration requests. */ @@ -2141,6 +2158,7 @@ export namespace prod_tt_sasportal_v1alpha1 { * // request body parameters * // { * // "activeConfig": {}, + * // "currentChannels": [], * // "deviceMetadata": {}, * // "displayName": "my_displayName", * // "fccId": "my_fccId", @@ -2158,6 +2176,7 @@ export namespace prod_tt_sasportal_v1alpha1 { * // Example response * // { * // "activeConfig": {}, + * // "currentChannels": [], * // "deviceMetadata": {}, * // "displayName": "my_displayName", * // "fccId": "my_fccId", @@ -2308,6 +2327,7 @@ export namespace prod_tt_sasportal_v1alpha1 { * // Example response * // { * // "activeConfig": {}, + * // "currentChannels": [], * // "deviceMetadata": {}, * // "displayName": "my_displayName", * // "fccId": "my_fccId", @@ -2644,6 +2664,7 @@ export namespace prod_tt_sasportal_v1alpha1 { * // request body parameters * // { * // "activeConfig": {}, + * // "currentChannels": [], * // "deviceMetadata": {}, * // "displayName": "my_displayName", * // "fccId": "my_fccId", @@ -2661,6 +2682,7 @@ export namespace prod_tt_sasportal_v1alpha1 { * // Example response * // { * // "activeConfig": {}, + * // "currentChannels": [], * // "deviceMetadata": {}, * // "displayName": "my_displayName", * // "fccId": "my_fccId", @@ -2809,6 +2831,7 @@ export namespace prod_tt_sasportal_v1alpha1 { * // Example response * // { * // "activeConfig": {}, + * // "currentChannels": [], * // "deviceMetadata": {}, * // "displayName": "my_displayName", * // "fccId": "my_fccId", @@ -3073,6 +3096,7 @@ export namespace prod_tt_sasportal_v1alpha1 { * // Example response * // { * // "activeConfig": {}, + * // "currentChannels": [], * // "deviceMetadata": {}, * // "displayName": "my_displayName", * // "fccId": "my_fccId", @@ -3502,6 +3526,7 @@ export namespace prod_tt_sasportal_v1alpha1 { * // request body parameters * // { * // "activeConfig": {}, + * // "currentChannels": [], * // "deviceMetadata": {}, * // "displayName": "my_displayName", * // "fccId": "my_fccId", @@ -3519,6 +3544,7 @@ export namespace prod_tt_sasportal_v1alpha1 { * // Example response * // { * // "activeConfig": {}, + * // "currentChannels": [], * // "deviceMetadata": {}, * // "displayName": "my_displayName", * // "fccId": "my_fccId", @@ -3800,6 +3826,7 @@ export namespace prod_tt_sasportal_v1alpha1 { * // Example response * // { * // "activeConfig": {}, + * // "currentChannels": [], * // "deviceMetadata": {}, * // "displayName": "my_displayName", * // "fccId": "my_fccId", @@ -5303,6 +5330,7 @@ export namespace prod_tt_sasportal_v1alpha1 { * // request body parameters * // { * // "activeConfig": {}, + * // "currentChannels": [], * // "deviceMetadata": {}, * // "displayName": "my_displayName", * // "fccId": "my_fccId", @@ -5320,6 +5348,7 @@ export namespace prod_tt_sasportal_v1alpha1 { * // Example response * // { * // "activeConfig": {}, + * // "currentChannels": [], * // "deviceMetadata": {}, * // "displayName": "my_displayName", * // "fccId": "my_fccId", @@ -5468,6 +5497,7 @@ export namespace prod_tt_sasportal_v1alpha1 { * // Example response * // { * // "activeConfig": {}, + * // "currentChannels": [], * // "deviceMetadata": {}, * // "displayName": "my_displayName", * // "fccId": "my_fccId", @@ -6403,6 +6433,7 @@ export namespace prod_tt_sasportal_v1alpha1 { * // Example response * // { * // "activeConfig": {}, + * // "currentChannels": [], * // "deviceMetadata": {}, * // "displayName": "my_displayName", * // "fccId": "my_fccId", @@ -6686,6 +6717,7 @@ export namespace prod_tt_sasportal_v1alpha1 { * // request body parameters * // { * // "activeConfig": {}, + * // "currentChannels": [], * // "deviceMetadata": {}, * // "displayName": "my_displayName", * // "fccId": "my_fccId", @@ -6703,6 +6735,7 @@ export namespace prod_tt_sasportal_v1alpha1 { * // Example response * // { * // "activeConfig": {}, + * // "currentChannels": [], * // "deviceMetadata": {}, * // "displayName": "my_displayName", * // "fccId": "my_fccId", @@ -6984,6 +7017,7 @@ export namespace prod_tt_sasportal_v1alpha1 { * // Example response * // { * // "activeConfig": {}, + * // "currentChannels": [], * // "deviceMetadata": {}, * // "displayName": "my_displayName", * // "fccId": "my_fccId", @@ -8422,6 +8456,7 @@ export namespace prod_tt_sasportal_v1alpha1 { * // request body parameters * // { * // "activeConfig": {}, + * // "currentChannels": [], * // "deviceMetadata": {}, * // "displayName": "my_displayName", * // "fccId": "my_fccId", @@ -8439,6 +8474,7 @@ export namespace prod_tt_sasportal_v1alpha1 { * // Example response * // { * // "activeConfig": {}, + * // "currentChannels": [], * // "deviceMetadata": {}, * // "displayName": "my_displayName", * // "fccId": "my_fccId", @@ -8587,6 +8623,7 @@ export namespace prod_tt_sasportal_v1alpha1 { * // Example response * // { * // "activeConfig": {}, + * // "currentChannels": [], * // "deviceMetadata": {}, * // "displayName": "my_displayName", * // "fccId": "my_fccId", @@ -8923,6 +8960,7 @@ export namespace prod_tt_sasportal_v1alpha1 { * // request body parameters * // { * // "activeConfig": {}, + * // "currentChannels": [], * // "deviceMetadata": {}, * // "displayName": "my_displayName", * // "fccId": "my_fccId", @@ -8940,6 +8978,7 @@ export namespace prod_tt_sasportal_v1alpha1 { * // Example response * // { * // "activeConfig": {}, + * // "currentChannels": [], * // "deviceMetadata": {}, * // "displayName": "my_displayName", * // "fccId": "my_fccId", @@ -9088,6 +9127,7 @@ export namespace prod_tt_sasportal_v1alpha1 { * // Example response * // { * // "activeConfig": {}, + * // "currentChannels": [], * // "deviceMetadata": {}, * // "displayName": "my_displayName", * // "fccId": "my_fccId", @@ -9352,6 +9392,7 @@ export namespace prod_tt_sasportal_v1alpha1 { * // Example response * // { * // "activeConfig": {}, + * // "currentChannels": [], * // "deviceMetadata": {}, * // "displayName": "my_displayName", * // "fccId": "my_fccId", @@ -9781,6 +9822,7 @@ export namespace prod_tt_sasportal_v1alpha1 { * // request body parameters * // { * // "activeConfig": {}, + * // "currentChannels": [], * // "deviceMetadata": {}, * // "displayName": "my_displayName", * // "fccId": "my_fccId", @@ -9798,6 +9840,7 @@ export namespace prod_tt_sasportal_v1alpha1 { * // Example response * // { * // "activeConfig": {}, + * // "currentChannels": [], * // "deviceMetadata": {}, * // "displayName": "my_displayName", * // "fccId": "my_fccId", @@ -10079,6 +10122,7 @@ export namespace prod_tt_sasportal_v1alpha1 { * // Example response * // { * // "activeConfig": {}, + * // "currentChannels": [], * // "deviceMetadata": {}, * // "displayName": "my_displayName", * // "fccId": "my_fccId", @@ -11576,6 +11620,7 @@ export namespace prod_tt_sasportal_v1alpha1 { * // request body parameters * // { * // "activeConfig": {}, + * // "currentChannels": [], * // "deviceMetadata": {}, * // "displayName": "my_displayName", * // "fccId": "my_fccId", @@ -11593,6 +11638,7 @@ export namespace prod_tt_sasportal_v1alpha1 { * // Example response * // { * // "activeConfig": {}, + * // "currentChannels": [], * // "deviceMetadata": {}, * // "displayName": "my_displayName", * // "fccId": "my_fccId", @@ -11741,6 +11787,7 @@ export namespace prod_tt_sasportal_v1alpha1 { * // Example response * // { * // "activeConfig": {}, + * // "currentChannels": [], * // "deviceMetadata": {}, * // "displayName": "my_displayName", * // "fccId": "my_fccId", diff --git a/src/apis/pubsublite/v1.ts b/src/apis/pubsublite/v1.ts index 6eb50c0ec5a..1d889f33a2c 100644 --- a/src/apis/pubsublite/v1.ts +++ b/src/apis/pubsublite/v1.ts @@ -425,6 +425,8 @@ export namespace pubsublite_v1 { * const res = await pubsublite.admin.projects.locations.subscriptions.create({ * // Required. The parent location in which to create the subscription. Structured like `projects/{project_number\}/locations/{location\}`. * parent: 'projects/my-project/locations/my-location', + * // If true, the newly created subscription will only receive messages published after the subscription was created. Otherwise, the entire message backlog will be received on the subscription. Defaults to false. + * skipBacklog: 'placeholder-value', * // Required. The ID to use for the subscription, which will become the final component of the subscription's name. This value is structured like: `my-sub-name`. * subscriptionId: 'placeholder-value', * @@ -1082,6 +1084,10 @@ export namespace pubsublite_v1 { * Required. The parent location in which to create the subscription. Structured like `projects/{project_number\}/locations/{location\}`. */ parent?: string; + /** + * If true, the newly created subscription will only receive messages published after the subscription was created. Otherwise, the entire message backlog will be received on the subscription. Defaults to false. + */ + skipBacklog?: boolean; /** * Required. The ID to use for the subscription, which will become the final component of the subscription's name. This value is structured like: `my-sub-name`. */ diff --git a/src/apis/realtimebidding/v1.ts b/src/apis/realtimebidding/v1.ts index d6918087031..d3a386fa397 100644 --- a/src/apis/realtimebidding/v1.ts +++ b/src/apis/realtimebidding/v1.ts @@ -170,6 +170,23 @@ export namespace realtimebidding_v1 { */ targetingMode?: string | null; } + /** + * The list of detected Ad Technology Providers for this creative. Bids placed for inventory that will serve to EEA or UK users are expected to comply with GDPR requirements. You must ensure that the creatives used in such bids should contain only user consented ad technology providers as indicated in the bid request. Google reserves the right to filter non-compliant bids. User consented ad technology providers can be found in the [Google Protocol](https://developers.google.com/authorized-buyers/rtb/downloads/realtime-bidding-proto) with the `BidRequest.adslot.consented_providers_settings` field, and can be found as an [OpenRTB extension](https://developers.google.com/authorized-buyers/rtb/downloads/openrtb-adx-proto) with the `BidRequest.user.ext.consented_providers_settings` and `BidRequest.user.ext.consent` fields. See https://support.google.com/authorizedbuyers/answer/9789378 for additional information about the Google TCF v2 integration. + */ + export interface Schema$AdTechnologyProviders { + /** + * The detected IAB Global Vendor List (GVL) IDs for this creative. See the IAB Global Vendor List at https://vendorlist.consensu.org/v2/vendor-list.json for details about the vendors. + */ + detectedGvlIds?: string[] | null; + /** + * The detected [Google Ad Tech Providers (ATP)](https://support.google.com/admanager/answer/9012903) for this creative. See https://storage.googleapis.com/adx-rtb-dictionaries/providers.csv for mapping of provider ID to provided name, a privacy policy URL, and a list of domains which can be attributed to the provider. + */ + detectedProviderIds?: string[] | null; + /** + * Domains of detected unidentified ad technology providers (if any). You must ensure that the creatives used in bids placed for inventory that will serve to EEA or UK users does not contain unidentified ad technology providers. Google reserves the right to filter non-compliant bids. + */ + unidentifiedProviderDomains?: string[] | null; + } /** * Detected advertiser and brand information. */ @@ -204,6 +221,60 @@ export namespace realtimebidding_v1 { */ mobileAppTargeting?: Schema$StringTargetingDimension; } + /** + * Bidder settings. + */ + export interface Schema$Bidder { + /** + * Output only. A flag to bypass pretargeting for private auctions and preferred deals. When true, bid requests from these nonguaranteed deals will always be sent. When false, bid requests will be subject to regular pretargeting configurations. Programmatic Guaranteed deals will always be sent to the bidder, regardless of the value for this flag. Auction packages are not impacted by this value and are subject to the regular pretargeting configurations. + */ + bypassNonguaranteedDealsPretargeting?: boolean | null; + /** + * Output only. The buyer's network ID used for cookie matching. This ID corresponds to the `google_nid` parameter in the URL used in cookie match requests. Refer to https://developers.google.com/authorized-buyers/rtb/cookie-guide for further information. + */ + cookieMatchingNetworkId?: string | null; + /** + * Output only. The base URL used in cookie match requests. Refer to https://developers.google.com/authorized-buyers/rtb/cookie-guide for further information. + */ + cookieMatchingUrl?: string | null; + /** + * Output only. The billing ID for the deals pretargeting config. This billing ID is sent on the bid request for guaranteed and nonguaranteed deals matched in pretargeting. + */ + dealsBillingId?: string | null; + /** + * Output only. Name of the bidder resource that must follow the pattern `bidders/{bidderAccountId\}`, where `{bidderAccountId\}` is the account ID of the bidder whose information is to be received. One can get their account ID on the Authorized Buyers or Open Bidding UI, or by contacting their Google account manager. + */ + name?: string | null; + } + /** + * RTB Buyer account information. + */ + export interface Schema$Buyer { + /** + * Output only. The number of creatives that this buyer submitted via the API or bid with in the last 30 days. This is counted against the maximum number of active creatives. + */ + activeCreativeCount?: string | null; + /** + * Output only. The name of the bidder resource that is responsible for receiving bidding traffic for this account. The bidder name must follow the pattern `bidders/{bidderAccountId\}`, where `{bidderAccountId\}` is the account ID of the bidder receiving traffic for this buyer. + */ + bidder?: string | null; + /** + * Output only. A list of billing IDs associated with this account. These IDs appear on: 1. A bid request, to signal which buyers are eligible to bid on a given opportunity, and which pretargeting configurations were matched for each eligible buyer. 2. The bid response, to attribute a winning impression to a specific account for billing, reporting, policy and publisher block enforcement. + */ + billingIds?: string[] | null; + /** + * Output only. The diplay name associated with this buyer account, as visible to sellers. + */ + displayName?: string | null; + /** + * Output only. The maximum number of active creatives that this buyer can have. + */ + maximumActiveCreativeCount?: string | null; + /** + * Output only. Name of the buyer resource that must follow the pattern `buyers/{buyerAccountId\}`, where `{buyerAccountId\}` is the account ID of the buyer account whose information is to be received. One can get their account ID on the Authorized Buyers or Open Bidding UI, or by contacting their Google account manager. + */ + name?: string | null; + } /** * A request to close a specified user list. */ @@ -310,6 +381,10 @@ export namespace realtimebidding_v1 { * Top level status and detected attributes of a creative. */ export interface Schema$CreativeServingDecision { + /** + * The detected ad technology providers. + */ + adTechnologyProviders?: Schema$AdTechnologyProviders; /** * The policy compliance of this creative in China. When approved or disapproved, this applies to both deals and open auction in China. When pending review, this creative is allowed to serve for deals but not for open auction. */ @@ -490,6 +565,31 @@ export namespace realtimebidding_v1 { * 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); \} The JSON representation for `Empty` is empty JSON object `{\}`. */ export interface Schema$Empty {} + /** + * Bidder endpoint that receives bid requests. + */ + export interface Schema$Endpoint { + /** + * The protocol that the bidder endpoint is using. + */ + bidProtocol?: string | null; + /** + * The maximum number of queries per second allowed to be sent to this server. + */ + maximumQps?: string | null; + /** + * Output only. Name of the endpoint resource that must follow the pattern `bidders/{bidderAccountId\}/endpoints/{endpointId\}`, where {bidderAccountId\} is the account ID of the bidder who operates this endpoint, and {endpointId\} is a unique ID assigned by the server. + */ + name?: string | null; + /** + * The trading location that bid requests should be sent from. See https://developers.google.com/authorized-buyers/rtb/peer-guide#trading-locations for further information. + */ + tradingLocation?: string | null; + /** + * Output only. The URL that bid requests should be sent to. + */ + url?: string | null; + } /** * Response for a request to get remarketing tag. */ @@ -555,6 +655,32 @@ export namespace realtimebidding_v1 { */ width?: number | null; } + /** + * A response containing bidders. + */ + export interface Schema$ListBiddersResponse { + /** + * List of bidders. + */ + bidders?: Schema$Bidder[]; + /** + * A token which can be passed to a subsequent call to the `ListBidders` method to retrieve the next page of results in ListBiddersRequest.pageToken. + */ + nextPageToken?: string | null; + } + /** + * A response containing buyer account information. + */ + export interface Schema$ListBuyersResponse { + /** + * List of buyers. + */ + buyers?: Schema$Buyer[]; + /** + * A token which can be passed to a subsequent call to the `ListBuyers` method to retrieve the next page of results in ListBuyersRequest.pageToken. + */ + nextPageToken?: string | null; + } /** * A response for listing creatives. */ @@ -568,6 +694,19 @@ export namespace realtimebidding_v1 { */ nextPageToken?: string | null; } + /** + * A response containing bidder endpoints. + */ + export interface Schema$ListEndpointsResponse { + /** + * List of bidder endpoints. + */ + endpoints?: Schema$Endpoint[]; + /** + * A token which can be passed to a subsequent call to the `ListEndpoints` method to retrieve the next page of results in ListEndpointsRequest.pageToken. + */ + nextPageToken?: string | null; + } /** * A response containing pretargeting configurations. */ @@ -1011,24 +1150,19 @@ export namespace realtimebidding_v1 { export class Resource$Bidders { context: APIRequestContext; creatives: Resource$Bidders$Creatives; + endpoints: Resource$Bidders$Endpoints; pretargetingConfigs: Resource$Bidders$Pretargetingconfigs; constructor(context: APIRequestContext) { this.context = context; this.creatives = new Resource$Bidders$Creatives(this.context); + this.endpoints = new Resource$Bidders$Endpoints(this.context); this.pretargetingConfigs = new Resource$Bidders$Pretargetingconfigs( this.context ); } - } - - export class Resource$Bidders$Creatives { - context: APIRequestContext; - constructor(context: APIRequestContext) { - this.context = context; - } /** - * Lists creatives. + * Gets a bidder account by its name. * @example * ```js * // Before running the sample: @@ -1053,24 +1187,19 @@ export namespace realtimebidding_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await realtimebidding.bidders.creatives.list({ - * // Query string to filter creatives. If no filter is specified, all active creatives will be returned. Example: 'accountId=12345 AND (dealsStatus:DISAPPROVED AND disapprovalReason:UNACCEPTABLE_CONTENT) OR declaredAttributes:IS_COOKIE_TARGETED' - * filter: 'placeholder-value', - * // Requested page size. The server may return fewer creatives than requested (due to timeout constraint) even if more are available via another call. If unspecified, server will pick an appropriate default. Acceptable values are 1 to 1000, inclusive. - * pageSize: 'placeholder-value', - * // A token identifying a page of results the server should return. Typically, this is the value of ListCreativesResponse.nextPageToken returned from the previous call to the 'ListCreatives' method. - * pageToken: 'placeholder-value', - * // Required. Name of the parent buyer that owns the creatives. The pattern for this resource is either `buyers/{buyerAccountId\}` or `bidders/{bidderAccountId\}`. For `buyers/{buyerAccountId\}`, the `buyerAccountId` can be one of the following: 1. The ID of the buyer that is accessing their own creatives. 2. The ID of the child seat buyer under a bidder account. So for listing creatives pertaining to the child seat buyer (`456`) under bidder account (`123`), you would use the pattern: `buyers/456`. 3. The ID of the bidder itself. So for listing creatives pertaining to bidder (`123`), you would use `buyers/123`. If you want to access all creatives pertaining to both the bidder and all of its child seat accounts, you would use `bidders/{bidderAccountId\}`, e.g., for all creatives pertaining to bidder (`123`), use `bidders/123`. - * parent: 'bidders/my-bidder', - * // Controls the amount of information included in the response. By default only creativeServingDecision is included. To retrieve the entire creative resource (including the declared fields and the creative content) specify the view as "FULL". - * view: 'placeholder-value', + * const res = await realtimebidding.bidders.get({ + * // Required. Name of the bidder to get. Format: `bidders/{bidderAccountId\}` + * name: 'bidders/my-bidder', * }); * console.log(res.data); * * // Example response * // { - * // "creatives": [], - * // "nextPageToken": "my_nextPageToken" + * // "bypassNonguaranteedDealsPretargeting": false, + * // "cookieMatchingNetworkId": "my_cookieMatchingNetworkId", + * // "cookieMatchingUrl": "my_cookieMatchingUrl", + * // "dealsBillingId": "my_dealsBillingId", + * // "name": "my_name" * // } * } * @@ -1086,55 +1215,49 @@ export namespace realtimebidding_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - list( - params: Params$Resource$Bidders$Creatives$List, + get( + params: Params$Resource$Bidders$Get, options: StreamMethodOptions ): GaxiosPromise; - list( - params?: Params$Resource$Bidders$Creatives$List, + get( + params?: Params$Resource$Bidders$Get, options?: MethodOptions - ): GaxiosPromise; - list( - params: Params$Resource$Bidders$Creatives$List, + ): GaxiosPromise; + get( + params: Params$Resource$Bidders$Get, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Bidders$Creatives$List, - options: - | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + get( + params: Params$Resource$Bidders$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Bidders$Creatives$List, - callback: BodyResponseCallback + get( + params: Params$Resource$Bidders$Get, + callback: BodyResponseCallback ): void; - list(callback: BodyResponseCallback): void; - list( + get(callback: BodyResponseCallback): void; + get( paramsOrCallback?: - | Params$Resource$Bidders$Creatives$List - | BodyResponseCallback + | Params$Resource$Bidders$Get + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): - | void - | GaxiosPromise - | GaxiosPromise { - let params = (paramsOrCallback || - {}) as Params$Resource$Bidders$Creatives$List; + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Bidders$Get; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Bidders$Creatives$List; + params = {} as Params$Resource$Bidders$Get; options = {}; } @@ -1148,31 +1271,28 @@ export namespace realtimebidding_v1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v1/{+parent}/creatives').replace( - /([^:]\/)\/+/g, - '$1' - ), + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), method: 'GET', }, options ), params, - requiredParams: ['parent'], - pathParams: ['parent'], + requiredParams: ['name'], + pathParams: ['name'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Watches all creatives pertaining to a bidder. It is sufficient to invoke this endpoint once per bidder. A Pub/Sub topic will be created and notifications will be pushed to the topic when any of the bidder's creatives change status. All of the bidder's service accounts will have access to read from the topic. Subsequent invocations of this method will return the existing Pub/Sub configuration. + * Lists all the bidder accounts that belong to the caller. * @example * ```js * // Before running the sample: @@ -1197,22 +1317,18 @@ export namespace realtimebidding_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await realtimebidding.bidders.creatives.watch({ - * // Required. To watch all creatives pertaining to the bidder and all its child seat accounts, the bidder must follow the pattern `bidders/{bidderAccountId\}`. - * parent: 'bidders/my-bidder', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // {} - * }, + * const res = await realtimebidding.bidders.list({ + * // The maximum number of bidders to return. If unspecified, at most 100 bidders will be returned. The maximum value is 500; values above 500 will be coerced to 500. + * pageSize: 'placeholder-value', + * // A token identifying a page of results the server should return. This value is received from a previous `ListBidders` call in ListBiddersResponse.nextPageToken. + * pageToken: 'placeholder-value', * }); * console.log(res.data); * * // Example response * // { - * // "subscription": "my_subscription", - * // "topic": "my_topic" + * // "bidders": [], + * // "nextPageToken": "my_nextPageToken" * // } * } * @@ -1228,55 +1344,673 @@ export namespace realtimebidding_v1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - watch( - params: Params$Resource$Bidders$Creatives$Watch, + list( + params: Params$Resource$Bidders$List, options: StreamMethodOptions ): GaxiosPromise; - watch( - params?: Params$Resource$Bidders$Creatives$Watch, + list( + params?: Params$Resource$Bidders$List, options?: MethodOptions - ): GaxiosPromise; - watch( - params: Params$Resource$Bidders$Creatives$Watch, + ): GaxiosPromise; + list( + params: Params$Resource$Bidders$List, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - watch( - params: Params$Resource$Bidders$Creatives$Watch, - options: - | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + list( + params: Params$Resource$Bidders$List, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - watch( - params: Params$Resource$Bidders$Creatives$Watch, - callback: BodyResponseCallback + list( + params: Params$Resource$Bidders$List, + callback: BodyResponseCallback ): void; - watch(callback: BodyResponseCallback): void; - watch( + list(callback: BodyResponseCallback): void; + list( paramsOrCallback?: - | Params$Resource$Bidders$Creatives$Watch - | BodyResponseCallback + | Params$Resource$Bidders$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Bidders$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Bidders$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://realtimebidding.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/bidders').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: [], + pathParams: [], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Bidders$Get extends StandardParameters { + /** + * Required. Name of the bidder to get. Format: `bidders/{bidderAccountId\}` + */ + name?: string; + } + export interface Params$Resource$Bidders$List extends StandardParameters { + /** + * The maximum number of bidders to return. If unspecified, at most 100 bidders will be returned. The maximum value is 500; values above 500 will be coerced to 500. + */ + pageSize?: number; + /** + * A token identifying a page of results the server should return. This value is received from a previous `ListBidders` call in ListBiddersResponse.nextPageToken. + */ + pageToken?: string; + } + + export class Resource$Bidders$Creatives { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Lists creatives. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/realtimebidding.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const realtimebidding = google.realtimebidding('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/realtime-bidding'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await realtimebidding.bidders.creatives.list({ + * // Query string to filter creatives. If no filter is specified, all active creatives will be returned. Example: 'accountId=12345 AND (dealsStatus:DISAPPROVED AND disapprovalReason:UNACCEPTABLE_CONTENT) OR declaredAttributes:IS_COOKIE_TARGETED' + * filter: 'placeholder-value', + * // Requested page size. The server may return fewer creatives than requested (due to timeout constraint) even if more are available via another call. If unspecified, server will pick an appropriate default. Acceptable values are 1 to 1000, inclusive. + * pageSize: 'placeholder-value', + * // A token identifying a page of results the server should return. Typically, this is the value of ListCreativesResponse.nextPageToken returned from the previous call to the 'ListCreatives' method. + * pageToken: 'placeholder-value', + * // Required. Name of the parent buyer that owns the creatives. The pattern for this resource is either `buyers/{buyerAccountId\}` or `bidders/{bidderAccountId\}`. For `buyers/{buyerAccountId\}`, the `buyerAccountId` can be one of the following: 1. The ID of the buyer that is accessing their own creatives. 2. The ID of the child seat buyer under a bidder account. So for listing creatives pertaining to the child seat buyer (`456`) under bidder account (`123`), you would use the pattern: `buyers/456`. 3. The ID of the bidder itself. So for listing creatives pertaining to bidder (`123`), you would use `buyers/123`. If you want to access all creatives pertaining to both the bidder and all of its child seat accounts, you would use `bidders/{bidderAccountId\}`, e.g., for all creatives pertaining to bidder (`123`), use `bidders/123`. + * parent: 'bidders/my-bidder', + * // Controls the amount of information included in the response. By default only creativeServingDecision is included. To retrieve the entire creative resource (including the declared fields and the creative content) specify the view as "FULL". + * view: 'placeholder-value', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "creatives": [], + * // "nextPageToken": "my_nextPageToken" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Bidders$Creatives$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Bidders$Creatives$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Bidders$Creatives$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Bidders$Creatives$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Bidders$Creatives$List, + callback: BodyResponseCallback + ): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: + | Params$Resource$Bidders$Creatives$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Bidders$Creatives$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Bidders$Creatives$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://realtimebidding.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+parent}/creatives').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Watches all creatives pertaining to a bidder. It is sufficient to invoke this endpoint once per bidder. A Pub/Sub topic will be created and notifications will be pushed to the topic when any of the bidder's creatives change status. All of the bidder's service accounts will have access to read from the topic. Subsequent invocations of this method will return the existing Pub/Sub configuration. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/realtimebidding.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const realtimebidding = google.realtimebidding('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/realtime-bidding'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await realtimebidding.bidders.creatives.watch({ + * // Required. To watch all creatives pertaining to the bidder and all its child seat accounts, the bidder must follow the pattern `bidders/{bidderAccountId\}`. + * parent: 'bidders/my-bidder', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // {} + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "subscription": "my_subscription", + * // "topic": "my_topic" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + watch( + params: Params$Resource$Bidders$Creatives$Watch, + options: StreamMethodOptions + ): GaxiosPromise; + watch( + params?: Params$Resource$Bidders$Creatives$Watch, + options?: MethodOptions + ): GaxiosPromise; + watch( + params: Params$Resource$Bidders$Creatives$Watch, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + watch( + params: Params$Resource$Bidders$Creatives$Watch, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + watch( + params: Params$Resource$Bidders$Creatives$Watch, + callback: BodyResponseCallback + ): void; + watch(callback: BodyResponseCallback): void; + watch( + paramsOrCallback?: + | Params$Resource$Bidders$Creatives$Watch + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Bidders$Creatives$Watch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Bidders$Creatives$Watch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://realtimebidding.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+parent}/creatives:watch').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Bidders$Creatives$List + extends StandardParameters { + /** + * Query string to filter creatives. If no filter is specified, all active creatives will be returned. Example: 'accountId=12345 AND (dealsStatus:DISAPPROVED AND disapprovalReason:UNACCEPTABLE_CONTENT) OR declaredAttributes:IS_COOKIE_TARGETED' + */ + filter?: string; + /** + * Requested page size. The server may return fewer creatives than requested (due to timeout constraint) even if more are available via another call. If unspecified, server will pick an appropriate default. Acceptable values are 1 to 1000, inclusive. + */ + pageSize?: number; + /** + * A token identifying a page of results the server should return. Typically, this is the value of ListCreativesResponse.nextPageToken returned from the previous call to the 'ListCreatives' method. + */ + pageToken?: string; + /** + * Required. Name of the parent buyer that owns the creatives. The pattern for this resource is either `buyers/{buyerAccountId\}` or `bidders/{bidderAccountId\}`. For `buyers/{buyerAccountId\}`, the `buyerAccountId` can be one of the following: 1. The ID of the buyer that is accessing their own creatives. 2. The ID of the child seat buyer under a bidder account. So for listing creatives pertaining to the child seat buyer (`456`) under bidder account (`123`), you would use the pattern: `buyers/456`. 3. The ID of the bidder itself. So for listing creatives pertaining to bidder (`123`), you would use `buyers/123`. If you want to access all creatives pertaining to both the bidder and all of its child seat accounts, you would use `bidders/{bidderAccountId\}`, e.g., for all creatives pertaining to bidder (`123`), use `bidders/123`. + */ + parent?: string; + /** + * Controls the amount of information included in the response. By default only creativeServingDecision is included. To retrieve the entire creative resource (including the declared fields and the creative content) specify the view as "FULL". + */ + view?: string; + } + export interface Params$Resource$Bidders$Creatives$Watch + extends StandardParameters { + /** + * Required. To watch all creatives pertaining to the bidder and all its child seat accounts, the bidder must follow the pattern `bidders/{bidderAccountId\}`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$WatchCreativesRequest; + } + + export class Resource$Bidders$Endpoints { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Gets a bidder endpoint by its name. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/realtimebidding.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const realtimebidding = google.realtimebidding('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/realtime-bidding'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await realtimebidding.bidders.endpoints.get({ + * // Required. Name of the bidder endpoint to get. Format: `bidders/{bidderAccountId\}/endpoints/{endpointId\}` + * name: 'bidders/my-bidder/endpoints/my-endpoint', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "bidProtocol": "my_bidProtocol", + * // "maximumQps": "my_maximumQps", + * // "name": "my_name", + * // "tradingLocation": "my_tradingLocation", + * // "url": "my_url" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Bidders$Endpoints$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Bidders$Endpoints$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Bidders$Endpoints$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Bidders$Endpoints$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Bidders$Endpoints$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Bidders$Endpoints$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Bidders$Endpoints$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Bidders$Endpoints$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://realtimebidding.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Lists all the bidder's endpoints. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/realtimebidding.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const realtimebidding = google.realtimebidding('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/realtime-bidding'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await realtimebidding.bidders.endpoints.list({ + * // The maximum number of endpoints to return. If unspecified, at most 100 endpoints will be returned. The maximum value is 500; values above 500 will be coerced to 500. + * pageSize: 'placeholder-value', + * // A token identifying a page of results the server should return. This value is received from a previous `ListEndpoints` call in ListEndpointsResponse.nextPageToken. + * pageToken: 'placeholder-value', + * // Required. Name of the bidder whose endpoints will be listed. Format: `bidders/{bidderAccountId\}` + * parent: 'bidders/my-bidder', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "endpoints": [], + * // "nextPageToken": "my_nextPageToken" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Bidders$Endpoints$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Bidders$Endpoints$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Bidders$Endpoints$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Bidders$Endpoints$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Bidders$Endpoints$List, + callback: BodyResponseCallback + ): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: + | Params$Resource$Bidders$Endpoints$List + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Bidders$Creatives$Watch; + {}) as Params$Resource$Bidders$Endpoints$List; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Bidders$Creatives$Watch; + params = {} as Params$Resource$Bidders$Endpoints$List; options = {}; } @@ -1290,11 +2024,11 @@ export namespace realtimebidding_v1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v1/{+parent}/creatives:watch').replace( + url: (rootUrl + '/v1/{+parent}/endpoints').replace( /([^:]\/)\/+/g, '$1' ), - method: 'POST', + method: 'GET', }, options ), @@ -1304,50 +2038,37 @@ export namespace realtimebidding_v1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } } - export interface Params$Resource$Bidders$Creatives$List + export interface Params$Resource$Bidders$Endpoints$Get extends StandardParameters { /** - * Query string to filter creatives. If no filter is specified, all active creatives will be returned. Example: 'accountId=12345 AND (dealsStatus:DISAPPROVED AND disapprovalReason:UNACCEPTABLE_CONTENT) OR declaredAttributes:IS_COOKIE_TARGETED' + * Required. Name of the bidder endpoint to get. Format: `bidders/{bidderAccountId\}/endpoints/{endpointId\}` */ - filter?: string; + name?: string; + } + export interface Params$Resource$Bidders$Endpoints$List + extends StandardParameters { /** - * Requested page size. The server may return fewer creatives than requested (due to timeout constraint) even if more are available via another call. If unspecified, server will pick an appropriate default. Acceptable values are 1 to 1000, inclusive. + * The maximum number of endpoints to return. If unspecified, at most 100 endpoints will be returned. The maximum value is 500; values above 500 will be coerced to 500. */ pageSize?: number; /** - * A token identifying a page of results the server should return. Typically, this is the value of ListCreativesResponse.nextPageToken returned from the previous call to the 'ListCreatives' method. + * A token identifying a page of results the server should return. This value is received from a previous `ListEndpoints` call in ListEndpointsResponse.nextPageToken. */ pageToken?: string; /** - * Required. Name of the parent buyer that owns the creatives. The pattern for this resource is either `buyers/{buyerAccountId\}` or `bidders/{bidderAccountId\}`. For `buyers/{buyerAccountId\}`, the `buyerAccountId` can be one of the following: 1. The ID of the buyer that is accessing their own creatives. 2. The ID of the child seat buyer under a bidder account. So for listing creatives pertaining to the child seat buyer (`456`) under bidder account (`123`), you would use the pattern: `buyers/456`. 3. The ID of the bidder itself. So for listing creatives pertaining to bidder (`123`), you would use `buyers/123`. If you want to access all creatives pertaining to both the bidder and all of its child seat accounts, you would use `bidders/{bidderAccountId\}`, e.g., for all creatives pertaining to bidder (`123`), use `bidders/123`. - */ - parent?: string; - /** - * Controls the amount of information included in the response. By default only creativeServingDecision is included. To retrieve the entire creative resource (including the declared fields and the creative content) specify the view as "FULL". - */ - view?: string; - } - export interface Params$Resource$Bidders$Creatives$Watch - extends StandardParameters { - /** - * Required. To watch all creatives pertaining to the bidder and all its child seat accounts, the bidder must follow the pattern `bidders/{bidderAccountId\}`. + * Required. Name of the bidder whose endpoints will be listed. Format: `bidders/{bidderAccountId\}` */ parent?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$WatchCreativesRequest; } export class Resource$Bidders$Pretargetingconfigs { @@ -3638,6 +4359,137 @@ export namespace realtimebidding_v1 { this.userLists = new Resource$Buyers$Userlists(this.context); } + /** + * Gets a buyer account by its name. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/realtimebidding.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const realtimebidding = google.realtimebidding('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/realtime-bidding'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await realtimebidding.buyers.get({ + * // Required. Name of the buyer to get. Format: `buyers/{buyerId\}` + * name: 'buyers/my-buyer', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "activeCreativeCount": "my_activeCreativeCount", + * // "bidder": "my_bidder", + * // "billingIds": [], + * // "displayName": "my_displayName", + * // "maximumActiveCreativeCount": "my_maximumActiveCreativeCount", + * // "name": "my_name" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Buyers$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Buyers$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Buyers$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Buyers$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Buyers$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Buyers$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Buyers$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Buyers$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://realtimebidding.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + /** * Gets remarketing tag for a buyer. A remarketing tag is a piece of JavaScript code that can be placed on a web page. When a user visits a page containing a remarketing tag, Google adds the user to a user list. * @example @@ -3774,8 +4626,146 @@ export namespace realtimebidding_v1 { return createAPIRequest(parameters); } } + + /** + * Lists all buyer account information the calling buyer user or service account is permissioned to manage. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/realtimebidding.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const realtimebidding = google.realtimebidding('v1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/realtime-bidding'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await realtimebidding.buyers.list({ + * // The maximum number of buyers to return. If unspecified, at most 100 buyers will be returned. The maximum value is 500; values above 500 will be coerced to 500. + * pageSize: 'placeholder-value', + * // A token identifying a page of results the server should return. This value is received from a previous `ListBuyers` call in ListBuyersResponse.nextPageToken. + * pageToken: 'placeholder-value', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "buyers": [], + * // "nextPageToken": "my_nextPageToken" + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Buyers$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Buyers$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Buyers$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Buyers$List, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Buyers$List, + callback: BodyResponseCallback + ): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: + | Params$Resource$Buyers$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || {}) as Params$Resource$Buyers$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Buyers$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://realtimebidding.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/buyers').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: [], + pathParams: [], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } } + export interface Params$Resource$Buyers$Get extends StandardParameters { + /** + * Required. Name of the buyer to get. Format: `buyers/{buyerId\}` + */ + name?: string; + } export interface Params$Resource$Buyers$Getremarketingtag extends StandardParameters { /** @@ -3783,6 +4773,16 @@ export namespace realtimebidding_v1 { */ name?: string; } + export interface Params$Resource$Buyers$List extends StandardParameters { + /** + * The maximum number of buyers to return. If unspecified, at most 100 buyers will be returned. The maximum value is 500; values above 500 will be coerced to 500. + */ + pageSize?: number; + /** + * A token identifying a page of results the server should return. This value is received from a previous `ListBuyers` call in ListBuyersResponse.nextPageToken. + */ + pageToken?: string; + } export class Resource$Buyers$Creatives { context: APIRequestContext; diff --git a/src/apis/recommender/v1.ts b/src/apis/recommender/v1.ts index 91931f5928b..73d2f6a85e2 100644 --- a/src/apis/recommender/v1.ts +++ b/src/apis/recommender/v1.ts @@ -688,7 +688,7 @@ export namespace recommender_v1 { * pageSize: 'placeholder-value', * // Optional. If present, retrieves the next batch of results from the preceding call to this method. `page_token` must be the value of `next_page_token` from the previous response. The values of other method parameters must be identical to those in the previous call. * pageToken: 'placeholder-value', - * // Required. The container resource on which to execute the request. Acceptable formats: 1. "projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]", LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types.) + * // Required. The container resource on which to execute the request. Acceptable formats: 1. `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 2. `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 3. `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 4. `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types.) * parent: * 'billingAccounts/my-billingAccount/locations/my-location/insightTypes/my-insightType', * } @@ -985,7 +985,7 @@ export namespace recommender_v1 { */ pageToken?: string; /** - * Required. The container resource on which to execute the request. Acceptable formats: 1. "projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]", LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types.) + * Required. The container resource on which to execute the request. Acceptable formats: 1. `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 2. `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 3. `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 4. `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types.) */ parent?: string; } @@ -1200,7 +1200,7 @@ export namespace recommender_v1 { * pageSize: 'placeholder-value', * // Optional. If present, retrieves the next batch of results from the preceding call to this method. `page_token` must be the value of `next_page_token` from the previous response. The values of other method parameters must be identical to those in the previous call. * pageToken: 'placeholder-value', - * // Required. The container resource on which to execute the request. Acceptable formats: 1. "projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]", LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders. + * // Required. The container resource on which to execute the request. Acceptable formats: 1. `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 2. `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 3. `folders/[FOLDER_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 4. `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders. * parent: * 'billingAccounts/my-billingAccount/locations/my-location/recommenders/my-recommender', * } @@ -1814,7 +1814,7 @@ export namespace recommender_v1 { */ pageToken?: string; /** - * Required. The container resource on which to execute the request. Acceptable formats: 1. "projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]", LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders. + * Required. The container resource on which to execute the request. Acceptable formats: 1. `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 2. `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 3. `folders/[FOLDER_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 4. `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders. */ parent?: string; } @@ -2075,7 +2075,7 @@ export namespace recommender_v1 { * pageSize: 'placeholder-value', * // Optional. If present, retrieves the next batch of results from the preceding call to this method. `page_token` must be the value of `next_page_token` from the previous response. The values of other method parameters must be identical to those in the previous call. * pageToken: 'placeholder-value', - * // Required. The container resource on which to execute the request. Acceptable formats: 1. "projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]", LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types.) + * // Required. The container resource on which to execute the request. Acceptable formats: 1. `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 2. `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 3. `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 4. `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types.) * parent: * 'folders/my-folder/locations/my-location/insightTypes/my-insightType', * }); @@ -2371,7 +2371,7 @@ export namespace recommender_v1 { */ pageToken?: string; /** - * Required. The container resource on which to execute the request. Acceptable formats: 1. "projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]", LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types.) + * Required. The container resource on which to execute the request. Acceptable formats: 1. `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 2. `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 3. `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 4. `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types.) */ parent?: string; } @@ -2586,7 +2586,7 @@ export namespace recommender_v1 { * pageSize: 'placeholder-value', * // Optional. If present, retrieves the next batch of results from the preceding call to this method. `page_token` must be the value of `next_page_token` from the previous response. The values of other method parameters must be identical to those in the previous call. * pageToken: 'placeholder-value', - * // Required. The container resource on which to execute the request. Acceptable formats: 1. "projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]", LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders. + * // Required. The container resource on which to execute the request. Acceptable formats: 1. `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 2. `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 3. `folders/[FOLDER_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 4. `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders. * parent: * 'folders/my-folder/locations/my-location/recommenders/my-recommender', * } @@ -3200,7 +3200,7 @@ export namespace recommender_v1 { */ pageToken?: string; /** - * Required. The container resource on which to execute the request. Acceptable formats: 1. "projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]", LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders. + * Required. The container resource on which to execute the request. Acceptable formats: 1. `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 2. `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 3. `folders/[FOLDER_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 4. `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders. */ parent?: string; } @@ -3464,7 +3464,7 @@ export namespace recommender_v1 { * pageSize: 'placeholder-value', * // Optional. If present, retrieves the next batch of results from the preceding call to this method. `page_token` must be the value of `next_page_token` from the previous response. The values of other method parameters must be identical to those in the previous call. * pageToken: 'placeholder-value', - * // Required. The container resource on which to execute the request. Acceptable formats: 1. "projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]", LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types.) + * // Required. The container resource on which to execute the request. Acceptable formats: 1. `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 2. `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 3. `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 4. `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types.) * parent: * 'organizations/my-organization/locations/my-location/insightTypes/my-insightType', * } @@ -3761,7 +3761,7 @@ export namespace recommender_v1 { */ pageToken?: string; /** - * Required. The container resource on which to execute the request. Acceptable formats: 1. "projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]", LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types.) + * Required. The container resource on which to execute the request. Acceptable formats: 1. `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 2. `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 3. `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 4. `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types.) */ parent?: string; } @@ -3976,7 +3976,7 @@ export namespace recommender_v1 { * pageSize: 'placeholder-value', * // Optional. If present, retrieves the next batch of results from the preceding call to this method. `page_token` must be the value of `next_page_token` from the previous response. The values of other method parameters must be identical to those in the previous call. * pageToken: 'placeholder-value', - * // Required. The container resource on which to execute the request. Acceptable formats: 1. "projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]", LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders. + * // Required. The container resource on which to execute the request. Acceptable formats: 1. `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 2. `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 3. `folders/[FOLDER_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 4. `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders. * parent: * 'organizations/my-organization/locations/my-location/recommenders/my-recommender', * } @@ -4590,7 +4590,7 @@ export namespace recommender_v1 { */ pageToken?: string; /** - * Required. The container resource on which to execute the request. Acceptable formats: 1. "projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]", LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders. + * Required. The container resource on which to execute the request. Acceptable formats: 1. `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 2. `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 3. `folders/[FOLDER_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 4. `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders. */ parent?: string; } @@ -4851,7 +4851,7 @@ export namespace recommender_v1 { * pageSize: 'placeholder-value', * // Optional. If present, retrieves the next batch of results from the preceding call to this method. `page_token` must be the value of `next_page_token` from the previous response. The values of other method parameters must be identical to those in the previous call. * pageToken: 'placeholder-value', - * // Required. The container resource on which to execute the request. Acceptable formats: 1. "projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]", LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types.) + * // Required. The container resource on which to execute the request. Acceptable formats: 1. `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 2. `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 3. `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 4. `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types.) * parent: * 'projects/my-project/locations/my-location/insightTypes/my-insightType', * }); @@ -5147,7 +5147,7 @@ export namespace recommender_v1 { */ pageToken?: string; /** - * Required. The container resource on which to execute the request. Acceptable formats: 1. "projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]", LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types.) + * Required. The container resource on which to execute the request. Acceptable formats: 1. `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 2. `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 3. `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 4. `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types.) */ parent?: string; } @@ -5362,7 +5362,7 @@ export namespace recommender_v1 { * pageSize: 'placeholder-value', * // Optional. If present, retrieves the next batch of results from the preceding call to this method. `page_token` must be the value of `next_page_token` from the previous response. The values of other method parameters must be identical to those in the previous call. * pageToken: 'placeholder-value', - * // Required. The container resource on which to execute the request. Acceptable formats: 1. "projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]", LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders. + * // Required. The container resource on which to execute the request. Acceptable formats: 1. `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 2. `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 3. `folders/[FOLDER_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 4. `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders. * parent: * 'projects/my-project/locations/my-location/recommenders/my-recommender', * } @@ -5976,7 +5976,7 @@ export namespace recommender_v1 { */ pageToken?: string; /** - * Required. The container resource on which to execute the request. Acceptable formats: 1. "projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]", LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders. + * Required. The container resource on which to execute the request. Acceptable formats: 1. `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 2. `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 3. `folders/[FOLDER_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 4. `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders. */ parent?: string; } diff --git a/src/apis/recommender/v1beta1.ts b/src/apis/recommender/v1beta1.ts index 6b44a23242e..9367fbbd364 100644 --- a/src/apis/recommender/v1beta1.ts +++ b/src/apis/recommender/v1beta1.ts @@ -688,7 +688,7 @@ export namespace recommender_v1beta1 { * pageSize: 'placeholder-value', * // Optional. If present, retrieves the next batch of results from the preceding call to this method. `page_token` must be the value of `next_page_token` from the previous response. The values of other method parameters must be identical to those in the previous call. * pageToken: 'placeholder-value', - * // Required. The container resource on which to execute the request. Acceptable formats: 1. "projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]", LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types. + * // Required. The container resource on which to execute the request. Acceptable formats: 1. `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 2. `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 3. `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 4. `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types. * parent: * 'billingAccounts/my-billingAccount/locations/my-location/insightTypes/my-insightType', * } @@ -985,7 +985,7 @@ export namespace recommender_v1beta1 { */ pageToken?: string; /** - * Required. The container resource on which to execute the request. Acceptable formats: 1. "projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]", LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types. + * Required. The container resource on which to execute the request. Acceptable formats: 1. `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 2. `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 3. `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 4. `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types. */ parent?: string; } @@ -1200,7 +1200,7 @@ export namespace recommender_v1beta1 { * pageSize: 'placeholder-value', * // Optional. If present, retrieves the next batch of results from the preceding call to this method. `page_token` must be the value of `next_page_token` from the previous response. The values of other method parameters must be identical to those in the previous call. * pageToken: 'placeholder-value', - * // Required. The container resource on which to execute the request. Acceptable formats: 1. "projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]", LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders. + * // Required. The container resource on which to execute the request. Acceptable formats: 1. `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 2. `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 3. `folders/[FOLDER_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 4. `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders. * parent: * 'billingAccounts/my-billingAccount/locations/my-location/recommenders/my-recommender', * } @@ -1814,7 +1814,7 @@ export namespace recommender_v1beta1 { */ pageToken?: string; /** - * Required. The container resource on which to execute the request. Acceptable formats: 1. "projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]", LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders. + * Required. The container resource on which to execute the request. Acceptable formats: 1. `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 2. `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 3. `folders/[FOLDER_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 4. `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders. */ parent?: string; } @@ -2075,7 +2075,7 @@ export namespace recommender_v1beta1 { * pageSize: 'placeholder-value', * // Optional. If present, retrieves the next batch of results from the preceding call to this method. `page_token` must be the value of `next_page_token` from the previous response. The values of other method parameters must be identical to those in the previous call. * pageToken: 'placeholder-value', - * // Required. The container resource on which to execute the request. Acceptable formats: 1. "projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]", LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types. + * // Required. The container resource on which to execute the request. Acceptable formats: 1. `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 2. `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 3. `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 4. `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types. * parent: * 'folders/my-folder/locations/my-location/insightTypes/my-insightType', * }); @@ -2371,7 +2371,7 @@ export namespace recommender_v1beta1 { */ pageToken?: string; /** - * Required. The container resource on which to execute the request. Acceptable formats: 1. "projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]", LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types. + * Required. The container resource on which to execute the request. Acceptable formats: 1. `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 2. `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 3. `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 4. `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types. */ parent?: string; } @@ -2586,7 +2586,7 @@ export namespace recommender_v1beta1 { * pageSize: 'placeholder-value', * // Optional. If present, retrieves the next batch of results from the preceding call to this method. `page_token` must be the value of `next_page_token` from the previous response. The values of other method parameters must be identical to those in the previous call. * pageToken: 'placeholder-value', - * // Required. The container resource on which to execute the request. Acceptable formats: 1. "projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]", LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders. + * // Required. The container resource on which to execute the request. Acceptable formats: 1. `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 2. `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 3. `folders/[FOLDER_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 4. `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders. * parent: * 'folders/my-folder/locations/my-location/recommenders/my-recommender', * } @@ -3200,7 +3200,7 @@ export namespace recommender_v1beta1 { */ pageToken?: string; /** - * Required. The container resource on which to execute the request. Acceptable formats: 1. "projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]", LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders. + * Required. The container resource on which to execute the request. Acceptable formats: 1. `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 2. `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 3. `folders/[FOLDER_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 4. `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders. */ parent?: string; } @@ -3464,7 +3464,7 @@ export namespace recommender_v1beta1 { * pageSize: 'placeholder-value', * // Optional. If present, retrieves the next batch of results from the preceding call to this method. `page_token` must be the value of `next_page_token` from the previous response. The values of other method parameters must be identical to those in the previous call. * pageToken: 'placeholder-value', - * // Required. The container resource on which to execute the request. Acceptable formats: 1. "projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]", LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types. + * // Required. The container resource on which to execute the request. Acceptable formats: 1. `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 2. `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 3. `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 4. `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types. * parent: * 'organizations/my-organization/locations/my-location/insightTypes/my-insightType', * } @@ -3761,7 +3761,7 @@ export namespace recommender_v1beta1 { */ pageToken?: string; /** - * Required. The container resource on which to execute the request. Acceptable formats: 1. "projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]", LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types. + * Required. The container resource on which to execute the request. Acceptable formats: 1. `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 2. `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 3. `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 4. `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types. */ parent?: string; } @@ -3976,7 +3976,7 @@ export namespace recommender_v1beta1 { * pageSize: 'placeholder-value', * // Optional. If present, retrieves the next batch of results from the preceding call to this method. `page_token` must be the value of `next_page_token` from the previous response. The values of other method parameters must be identical to those in the previous call. * pageToken: 'placeholder-value', - * // Required. The container resource on which to execute the request. Acceptable formats: 1. "projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]", LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders. + * // Required. The container resource on which to execute the request. Acceptable formats: 1. `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 2. `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 3. `folders/[FOLDER_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 4. `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders. * parent: * 'organizations/my-organization/locations/my-location/recommenders/my-recommender', * } @@ -4590,7 +4590,7 @@ export namespace recommender_v1beta1 { */ pageToken?: string; /** - * Required. The container resource on which to execute the request. Acceptable formats: 1. "projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]", LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders. + * Required. The container resource on which to execute the request. Acceptable formats: 1. `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 2. `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 3. `folders/[FOLDER_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 4. `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders. */ parent?: string; } @@ -4851,7 +4851,7 @@ export namespace recommender_v1beta1 { * pageSize: 'placeholder-value', * // Optional. If present, retrieves the next batch of results from the preceding call to this method. `page_token` must be the value of `next_page_token` from the previous response. The values of other method parameters must be identical to those in the previous call. * pageToken: 'placeholder-value', - * // Required. The container resource on which to execute the request. Acceptable formats: 1. "projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]", LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types. + * // Required. The container resource on which to execute the request. Acceptable formats: 1. `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 2. `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 3. `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 4. `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types. * parent: * 'projects/my-project/locations/my-location/insightTypes/my-insightType', * }); @@ -5147,7 +5147,7 @@ export namespace recommender_v1beta1 { */ pageToken?: string; /** - * Required. The container resource on which to execute the request. Acceptable formats: 1. "projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]", LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types. + * Required. The container resource on which to execute the request. Acceptable formats: 1. `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 2. `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 3. `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` 4. `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types. */ parent?: string; } @@ -5362,7 +5362,7 @@ export namespace recommender_v1beta1 { * pageSize: 'placeholder-value', * // Optional. If present, retrieves the next batch of results from the preceding call to this method. `page_token` must be the value of `next_page_token` from the previous response. The values of other method parameters must be identical to those in the previous call. * pageToken: 'placeholder-value', - * // Required. The container resource on which to execute the request. Acceptable formats: 1. "projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]", LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders. + * // Required. The container resource on which to execute the request. Acceptable formats: 1. `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 2. `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 3. `folders/[FOLDER_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 4. `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders. * parent: * 'projects/my-project/locations/my-location/recommenders/my-recommender', * } @@ -5976,7 +5976,7 @@ export namespace recommender_v1beta1 { */ pageToken?: string; /** - * Required. The container resource on which to execute the request. Acceptable formats: 1. "projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]", LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders. + * Required. The container resource on which to execute the request. Acceptable formats: 1. `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 2. `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 3. `folders/[FOLDER_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` 4. `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders. */ parent?: string; } diff --git a/src/apis/redis/v1.ts b/src/apis/redis/v1.ts index 9b2e007589c..56de86005a1 100644 --- a/src/apis/redis/v1.ts +++ b/src/apis/redis/v1.ts @@ -296,7 +296,7 @@ export namespace redis_v1 { */ redisConfigs?: {[key: string]: string} | null; /** - * Optional. The version of Redis software. If not provided, latest supported version will be used. Currently, the supported values are: * `REDIS_3_2` for Redis 3.2 compatibility * `REDIS_4_0` for Redis 4.0 compatibility (default) * `REDIS_5_0` for Redis 5.0 compatibility * `REDIS_6_0` for Redis 6.0 compatibility + * Optional. The version of Redis software. If not provided, latest supported version will be used. Currently, the supported values are: * `REDIS_3_2` for Redis 3.2 compatibility * `REDIS_4_0` for Redis 4.0 compatibility (default) * `REDIS_5_0` for Redis 5.0 compatibility * `REDIS_6_X` for Redis 6.x compatibility */ redisVersion?: string | null; /** @@ -665,13 +665,13 @@ export namespace redis_v1 { * * // Do the magic * const res = await redis.projects.locations.list({ - * // The standard list 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). * filter: 'placeholder-value', * // The resource that owns the locations collection, if applicable. * name: 'projects/my-project', - * // The standard list page size. + * // The maximum number of results to return. If not set, the service will select a default. * pageSize: 'placeholder-value', - * // The standard list page token. + * // A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. * pageToken: 'placeholder-value', * }); * console.log(res.data); @@ -790,7 +790,7 @@ export namespace redis_v1 { export interface Params$Resource$Projects$Locations$List extends StandardParameters { /** - * The standard list 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). */ filter?: string; /** @@ -798,11 +798,11 @@ export namespace redis_v1 { */ name?: string; /** - * The standard list page size. + * The maximum number of results to return. If not set, the service will select a default. */ pageSize?: number; /** - * The standard list page token. + * A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. */ pageToken?: string; } diff --git a/src/apis/redis/v1beta1.ts b/src/apis/redis/v1beta1.ts index a953f52acc2..a5759e90e4b 100644 --- a/src/apis/redis/v1beta1.ts +++ b/src/apis/redis/v1beta1.ts @@ -665,13 +665,13 @@ export namespace redis_v1beta1 { * * // Do the magic * const res = await redis.projects.locations.list({ - * // The standard list 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). * filter: 'placeholder-value', * // The resource that owns the locations collection, if applicable. * name: 'projects/my-project', - * // The standard list page size. + * // The maximum number of results to return. If not set, the service will select a default. * pageSize: 'placeholder-value', - * // The standard list page token. + * // A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. * pageToken: 'placeholder-value', * }); * console.log(res.data); @@ -790,7 +790,7 @@ export namespace redis_v1beta1 { export interface Params$Resource$Projects$Locations$List extends StandardParameters { /** - * The standard list 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). */ filter?: string; /** @@ -798,11 +798,11 @@ export namespace redis_v1beta1 { */ name?: string; /** - * The standard list page size. + * The maximum number of results to return. If not set, the service will select a default. */ pageSize?: number; /** - * The standard list page token. + * A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. */ pageToken?: string; } diff --git a/src/apis/remotebuildexecution/v1.ts b/src/apis/remotebuildexecution/v1.ts index 2f321e18a2f..63815ce8b7d 100644 --- a/src/apis/remotebuildexecution/v1.ts +++ b/src/apis/remotebuildexecution/v1.ts @@ -538,10 +538,22 @@ export namespace remotebuildexecution_v1 { * An identifier that ties multiple requests to the same action. For example, multiple requests to the CAS, Action Cache, and Execution API are used in order to compile foo.cc. */ actionId?: string | null; + /** + * A brief description of the kind of action, for example, CppCompile or GoLink. There is no standard agreed set of values for this, and they are expected to vary between different client tools. + */ + actionMnemonic?: string | null; + /** + * An identifier for the configuration in which the target was built, e.g. for differentiating building host tools or different target platforms. There is no expectation that this value will have any particular structure, or equality across invocations, though some client tools may offer these guarantees. + */ + configurationId?: string | null; /** * An identifier to tie multiple tool invocations together. For example, runs of foo_test, bar_test and baz_test on a post-submit of a given patch. */ correlatedInvocationsId?: string | null; + /** + * An identifier for the target which produced this action. No guarantees are made around how many actions may relate to a single target. + */ + targetId?: string | null; /** * The details for the tool invoking the requests. */ diff --git a/src/apis/remotebuildexecution/v1alpha.ts b/src/apis/remotebuildexecution/v1alpha.ts index 177bb2a49c2..91ea8019ce9 100644 --- a/src/apis/remotebuildexecution/v1alpha.ts +++ b/src/apis/remotebuildexecution/v1alpha.ts @@ -534,10 +534,22 @@ export namespace remotebuildexecution_v1alpha { * An identifier that ties multiple requests to the same action. For example, multiple requests to the CAS, Action Cache, and Execution API are used in order to compile foo.cc. */ actionId?: string | null; + /** + * A brief description of the kind of action, for example, CppCompile or GoLink. There is no standard agreed set of values for this, and they are expected to vary between different client tools. + */ + actionMnemonic?: string | null; + /** + * An identifier for the configuration in which the target was built, e.g. for differentiating building host tools or different target platforms. There is no expectation that this value will have any particular structure, or equality across invocations, though some client tools may offer these guarantees. + */ + configurationId?: string | null; /** * An identifier to tie multiple tool invocations together. For example, runs of foo_test, bar_test and baz_test on a post-submit of a given patch. */ correlatedInvocationsId?: string | null; + /** + * An identifier for the target which produced this action. No guarantees are made around how many actions may relate to a single target. + */ + targetId?: string | null; /** * The details for the tool invoking the requests. */ diff --git a/src/apis/remotebuildexecution/v2.ts b/src/apis/remotebuildexecution/v2.ts index e0497ced546..bf360290b9c 100644 --- a/src/apis/remotebuildexecution/v2.ts +++ b/src/apis/remotebuildexecution/v2.ts @@ -316,6 +316,10 @@ export namespace remotebuildexecution_v2 { * Maximum total size of blobs to be uploaded/downloaded using batch methods. A value of 0 means no limit is set, although in practice there will always be a message size limitation of the protocol in use, e.g. GRPC. */ maxBatchTotalSizeBytes?: string | null; + /** + * Compressors supported by the "compressed-blobs" bytestream resources. Servers MUST support identity/no-compression, even if it is not listed here. Note that this does not imply which if any compressors are supported by the server at the gRPC level. + */ + supportedCompressor?: string[] | null; /** * Whether absolute symlink targets are supported. */ @@ -753,10 +757,22 @@ export namespace remotebuildexecution_v2 { * An identifier that ties multiple requests to the same action. For example, multiple requests to the CAS, Action Cache, and Execution API are used in order to compile foo.cc. */ actionId?: string | null; + /** + * A brief description of the kind of action, for example, CppCompile or GoLink. There is no standard agreed set of values for this, and they are expected to vary between different client tools. + */ + actionMnemonic?: string | null; + /** + * An identifier for the configuration in which the target was built, e.g. for differentiating building host tools or different target platforms. There is no expectation that this value will have any particular structure, or equality across invocations, though some client tools may offer these guarantees. + */ + configurationId?: string | null; /** * An identifier to tie multiple tool invocations together. For example, runs of foo_test, bar_test and baz_test on a post-submit of a given patch. */ correlatedInvocationsId?: string | null; + /** + * An identifier for the target which produced this action. No guarantees are made around how many actions may relate to a single target. + */ + targetId?: string | null; /** * The details for the tool invoking the requests. */ diff --git a/src/apis/retail/v2.ts b/src/apis/retail/v2.ts index 3725c44431d..aba4d9419b0 100644 --- a/src/apis/retail/v2.ts +++ b/src/apis/retail/v2.ts @@ -726,159 +726,12 @@ export namespace retail_v2 { */ nextPageToken?: string | null; } - /** - * Configuration of destination for Export related errors. - */ - export interface Schema$GoogleCloudRetailV2mainExportErrorsConfig { - /** - * Google Cloud Storage path for import errors. This must be an empty, existing Cloud Storage bucket. Export errors will be written to a file in this bucket, one per line, as a JSON-encoded `google.rpc.Status` message. - */ - gcsPrefix?: string | null; - } - /** - * Metadata related to the progress of the Export operation. This will be returned by the google.longrunning.Operation.metadata field. - */ - export interface Schema$GoogleCloudRetailV2mainExportMetadata { - /** - * Operation create time. - */ - createTime?: string | null; - /** - * Operation last update time. If the operation is done, this is also the finish time. - */ - updateTime?: string | null; - } - /** - * Response of the ExportProductsRequest. If the long running operation is done, then this message is returned by the google.longrunning.Operations.response field if the operation was successful. - */ - export interface Schema$GoogleCloudRetailV2mainExportProductsResponse { - /** - * A sample of errors encountered while processing the request. - */ - errorSamples?: Schema$GoogleRpcStatus[]; - /** - * Echoes the destination for the complete errors in the request if set. - */ - errorsConfig?: Schema$GoogleCloudRetailV2mainExportErrorsConfig; - } - /** - * Response of the ExportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful. - */ - export interface Schema$GoogleCloudRetailV2mainExportUserEventsResponse { - /** - * A sample of errors encountered while processing the request. - */ - errorSamples?: Schema$GoogleRpcStatus[]; - /** - * Echoes the destination for the complete errors if this field was set in the request. - */ - errorsConfig?: Schema$GoogleCloudRetailV2mainExportErrorsConfig; - } - /** - * Configuration of destination for Import related errors. - */ - export interface Schema$GoogleCloudRetailV2mainImportErrorsConfig { - /** - * Google Cloud Storage path for import errors. This must be an empty, existing Cloud Storage bucket. Import errors will be written to a file in this bucket, one per line, as a JSON-encoded `google.rpc.Status` message. - */ - gcsPrefix?: string | null; - } - /** - * Metadata related to the progress of the Import operation. This will be returned by the google.longrunning.Operation.metadata field. - */ - export interface Schema$GoogleCloudRetailV2mainImportMetadata { - /** - * Operation create time. - */ - createTime?: string | null; - /** - * Count of entries that encountered errors while processing. - */ - failureCount?: string | null; - /** - * Count of entries that were processed successfully. - */ - successCount?: string | null; - /** - * Operation last update time. If the operation is done, this is also the finish time. - */ - updateTime?: string | null; - } - /** - * Response of the ImportProductsRequest. If the long running operation is done, then this message is returned by the google.longrunning.Operations.response field if the operation was successful. - */ - export interface Schema$GoogleCloudRetailV2mainImportProductsResponse { - /** - * A sample of errors encountered while processing the request. - */ - errorSamples?: Schema$GoogleRpcStatus[]; - /** - * Echoes the destination for the complete errors in the request if set. - */ - errorsConfig?: Schema$GoogleCloudRetailV2mainImportErrorsConfig; - } - /** - * Response of the ImportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful. - */ - export interface Schema$GoogleCloudRetailV2mainImportUserEventsResponse { - /** - * A sample of errors encountered while processing the request. - */ - errorSamples?: Schema$GoogleRpcStatus[]; - /** - * Echoes the destination for the complete errors if this field was set in the request. - */ - errorsConfig?: Schema$GoogleCloudRetailV2mainImportErrorsConfig; - /** - * Aggregated statistics of user event import status. - */ - importSummary?: Schema$GoogleCloudRetailV2mainUserEventImportSummary; - } - /** - * Metadata related to the progress of the Purge operation. This will be returned by the google.longrunning.Operation.metadata field. - */ - export interface Schema$GoogleCloudRetailV2mainPurgeMetadata {} - /** - * Response of the PurgeUserEventsRequest. If the long running operation is successfully done, then this message is returned by the google.longrunning.Operations.response field. - */ - export interface Schema$GoogleCloudRetailV2mainPurgeUserEventsResponse { - /** - * The total count of events purged as a result of the operation. - */ - purgedEventsCount?: string | null; - } - /** - * Metadata for RejoinUserEvents method. - */ - export interface Schema$GoogleCloudRetailV2mainRejoinUserEventsMetadata {} - /** - * Response message for RejoinUserEvents method. - */ - export interface Schema$GoogleCloudRetailV2mainRejoinUserEventsResponse { - /** - * Number of user events that were joined with latest product catalog. - */ - rejoinedUserEventsCount?: string | null; - } - /** - * A summary of import result. The UserEventImportSummary summarizes the import status for user events. - */ - export interface Schema$GoogleCloudRetailV2mainUserEventImportSummary { - /** - * Count of user events imported with complete existing catalog information. - */ - joinedEventsCount?: string | null; - /** - * Count of user events imported, but with catalog information not found in the imported catalog. - */ - unjoinedEventsCount?: string | null; - } /** * Request message for Predict method. */ export interface Schema$GoogleCloudRetailV2PredictRequest { /** - * Filter for restricting prediction results with a length limit of 5,000 characters. Accepts values for tags and the `filterOutOfStockItems` flag. * Tag expressions. Restricts predictions to products that match all of the specified tags. Boolean operators `OR` and `NOT` are supported if the expression is enclosed in parentheses, and must be separated from the tag values by a space. `-"tagA"` is also supported and is equivalent to `NOT "tagA"`. Tag values must be double quoted UTF-8 encoded strings with a size limit of 1,000 characters. * filterOutOfStockItems. Restricts predictions to products that do not have a stockState value of OUT_OF_STOCK. Examples: * tag=("Red" OR "Blue") tag="New-Arrival" tag=(NOT "promotional") * filterOutOfStockItems tag=(-"promotional") * filterOutOfStockItems If your filter blocks all prediction results, nothing will be returned. If you want generic (unfiltered) popular products to be returned instead, set `strictFiltering` to false in `PredictRequest.params`. + * Filter for restricting prediction results with a length limit of 5,000 characters. Accepts values for tags and the `filterOutOfStockItems` flag. * Tag expressions. Restricts predictions to products that match all of the specified tags. Boolean operators `OR` and `NOT` are supported if the expression is enclosed in parentheses, and must be separated from the tag values by a space. `-"tagA"` is also supported and is equivalent to `NOT "tagA"`. Tag values must be double quoted UTF-8 encoded strings with a size limit of 1,000 characters. Note: "Recently viewed" models don't support tag filtering at the moment. * filterOutOfStockItems. Restricts predictions to products that do not have a stockState value of OUT_OF_STOCK. Examples: * tag=("Red" OR "Blue") tag="New-Arrival" tag=(NOT "promotional") * filterOutOfStockItems tag=(-"promotional") * filterOutOfStockItems If your filter blocks all prediction results, nothing will be returned. If you want generic (unfiltered) popular products to be returned instead, set `strictFiltering` to false in `PredictRequest.params`. */ filter?: string | null; /** @@ -3077,7 +2930,7 @@ export namespace retail_v2 { * * // Do the magic * const res = await retail.projects.locations.catalogs.placements.predict({ - * // Required. Full resource name of the format: {name=projects/x/locations/global/catalogs/default_catalog/placements/x\} The id of the recommendation engine placement. This id is used to identify the set of models that will be used to make the prediction. We currently support three placements with the following IDs by default: * `shopping_cart`: Predicts products frequently bought together with one or more products in the same shopping session. Commonly displayed after `add-to-cart` events, on product detail pages, or on the shopping cart page. * `home_page`: Predicts the next product that a user will most likely engage with or purchase based on the shopping or viewing history of the specified `userId` or `visitorId`. For example - Recommendations for you. * `product_detail`: Predicts the next product that a user will most likely engage with or purchase. The prediction is based on the shopping or viewing history of the specified `userId` or `visitorId` and its relevance to a specified `CatalogItem`. Typically used on product detail pages. For example - More products like this. * `recently_viewed_default`: Returns up to 75 products recently viewed by the specified `userId` or `visitorId`, most recent ones first. Returns nothing if neither of them has viewed any products yet. For example - Recently viewed. The full list of available placements can be seen at https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements + * // Required. Full resource name of the format: {name=projects/x/locations/global/catalogs/default_catalog/placements/x\} The ID of the Recommendations AI placement. Before you can request predictions from your model, you must create at least one placement for it. For more information, see [Managing placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements). The full list of available placements can be seen at https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements * placement: * 'projects/my-project/locations/my-location/catalogs/my-catalog/placements/my-placement', * @@ -3210,7 +3063,7 @@ export namespace retail_v2 { export interface Params$Resource$Projects$Locations$Catalogs$Placements$Predict extends StandardParameters { /** - * Required. Full resource name of the format: {name=projects/x/locations/global/catalogs/default_catalog/placements/x\} The id of the recommendation engine placement. This id is used to identify the set of models that will be used to make the prediction. We currently support three placements with the following IDs by default: * `shopping_cart`: Predicts products frequently bought together with one or more products in the same shopping session. Commonly displayed after `add-to-cart` events, on product detail pages, or on the shopping cart page. * `home_page`: Predicts the next product that a user will most likely engage with or purchase based on the shopping or viewing history of the specified `userId` or `visitorId`. For example - Recommendations for you. * `product_detail`: Predicts the next product that a user will most likely engage with or purchase. The prediction is based on the shopping or viewing history of the specified `userId` or `visitorId` and its relevance to a specified `CatalogItem`. Typically used on product detail pages. For example - More products like this. * `recently_viewed_default`: Returns up to 75 products recently viewed by the specified `userId` or `visitorId`, most recent ones first. Returns nothing if neither of them has viewed any products yet. For example - Recently viewed. The full list of available placements can be seen at https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements + * Required. Full resource name of the format: {name=projects/x/locations/global/catalogs/default_catalog/placements/x\} The ID of the Recommendations AI placement. Before you can request predictions from your model, you must create at least one placement for it. For more information, see [Managing placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements). The full list of available placements can be seen at https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements */ placement?: string; diff --git a/src/apis/retail/v2alpha.ts b/src/apis/retail/v2alpha.ts index edf5882ef4a..882074fa7d2 100644 --- a/src/apis/retail/v2alpha.ts +++ b/src/apis/retail/v2alpha.ts @@ -485,7 +485,7 @@ export namespace retail_v2alpha { */ export interface Schema$GoogleCloudRetailV2alphaPredictRequest { /** - * Filter for restricting prediction results with a length limit of 5,000 characters. Accepts values for tags and the `filterOutOfStockItems` flag. * Tag expressions. Restricts predictions to products that match all of the specified tags. Boolean operators `OR` and `NOT` are supported if the expression is enclosed in parentheses, and must be separated from the tag values by a space. `-"tagA"` is also supported and is equivalent to `NOT "tagA"`. Tag values must be double quoted UTF-8 encoded strings with a size limit of 1,000 characters. * filterOutOfStockItems. Restricts predictions to products that do not have a stockState value of OUT_OF_STOCK. Examples: * tag=("Red" OR "Blue") tag="New-Arrival" tag=(NOT "promotional") * filterOutOfStockItems tag=(-"promotional") * filterOutOfStockItems If your filter blocks all prediction results, nothing will be returned. If you want generic (unfiltered) popular products to be returned instead, set `strictFiltering` to false in `PredictRequest.params`. + * Filter for restricting prediction results with a length limit of 5,000 characters. Accepts values for tags and the `filterOutOfStockItems` flag. * Tag expressions. Restricts predictions to products that match all of the specified tags. Boolean operators `OR` and `NOT` are supported if the expression is enclosed in parentheses, and must be separated from the tag values by a space. `-"tagA"` is also supported and is equivalent to `NOT "tagA"`. Tag values must be double quoted UTF-8 encoded strings with a size limit of 1,000 characters. Note: "Recently viewed" models don't support tag filtering at the moment. * filterOutOfStockItems. Restricts predictions to products that do not have a stockState value of OUT_OF_STOCK. Examples: * tag=("Red" OR "Blue") tag="New-Arrival" tag=(NOT "promotional") * filterOutOfStockItems tag=(-"promotional") * filterOutOfStockItems If your filter blocks all prediction results, nothing will be returned. If you want generic (unfiltered) popular products to be returned instead, set `strictFiltering` to false in `PredictRequest.params`. */ filter?: string | null; /** @@ -1094,153 +1094,6 @@ export namespace retail_v2alpha { */ importSummary?: Schema$GoogleCloudRetailV2UserEventImportSummary; } - /** - * Configuration of destination for Export related errors. - */ - export interface Schema$GoogleCloudRetailV2mainExportErrorsConfig { - /** - * Google Cloud Storage path for import errors. This must be an empty, existing Cloud Storage bucket. Export errors will be written to a file in this bucket, one per line, as a JSON-encoded `google.rpc.Status` message. - */ - gcsPrefix?: string | null; - } - /** - * Metadata related to the progress of the Export operation. This will be returned by the google.longrunning.Operation.metadata field. - */ - export interface Schema$GoogleCloudRetailV2mainExportMetadata { - /** - * Operation create time. - */ - createTime?: string | null; - /** - * Operation last update time. If the operation is done, this is also the finish time. - */ - updateTime?: string | null; - } - /** - * Response of the ExportProductsRequest. If the long running operation is done, then this message is returned by the google.longrunning.Operations.response field if the operation was successful. - */ - export interface Schema$GoogleCloudRetailV2mainExportProductsResponse { - /** - * A sample of errors encountered while processing the request. - */ - errorSamples?: Schema$GoogleRpcStatus[]; - /** - * Echoes the destination for the complete errors in the request if set. - */ - errorsConfig?: Schema$GoogleCloudRetailV2mainExportErrorsConfig; - } - /** - * Response of the ExportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful. - */ - export interface Schema$GoogleCloudRetailV2mainExportUserEventsResponse { - /** - * A sample of errors encountered while processing the request. - */ - errorSamples?: Schema$GoogleRpcStatus[]; - /** - * Echoes the destination for the complete errors if this field was set in the request. - */ - errorsConfig?: Schema$GoogleCloudRetailV2mainExportErrorsConfig; - } - /** - * Configuration of destination for Import related errors. - */ - export interface Schema$GoogleCloudRetailV2mainImportErrorsConfig { - /** - * Google Cloud Storage path for import errors. This must be an empty, existing Cloud Storage bucket. Import errors will be written to a file in this bucket, one per line, as a JSON-encoded `google.rpc.Status` message. - */ - gcsPrefix?: string | null; - } - /** - * Metadata related to the progress of the Import operation. This will be returned by the google.longrunning.Operation.metadata field. - */ - export interface Schema$GoogleCloudRetailV2mainImportMetadata { - /** - * Operation create time. - */ - createTime?: string | null; - /** - * Count of entries that encountered errors while processing. - */ - failureCount?: string | null; - /** - * Count of entries that were processed successfully. - */ - successCount?: string | null; - /** - * Operation last update time. If the operation is done, this is also the finish time. - */ - updateTime?: string | null; - } - /** - * Response of the ImportProductsRequest. If the long running operation is done, then this message is returned by the google.longrunning.Operations.response field if the operation was successful. - */ - export interface Schema$GoogleCloudRetailV2mainImportProductsResponse { - /** - * A sample of errors encountered while processing the request. - */ - errorSamples?: Schema$GoogleRpcStatus[]; - /** - * Echoes the destination for the complete errors in the request if set. - */ - errorsConfig?: Schema$GoogleCloudRetailV2mainImportErrorsConfig; - } - /** - * Response of the ImportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful. - */ - export interface Schema$GoogleCloudRetailV2mainImportUserEventsResponse { - /** - * A sample of errors encountered while processing the request. - */ - errorSamples?: Schema$GoogleRpcStatus[]; - /** - * Echoes the destination for the complete errors if this field was set in the request. - */ - errorsConfig?: Schema$GoogleCloudRetailV2mainImportErrorsConfig; - /** - * Aggregated statistics of user event import status. - */ - importSummary?: Schema$GoogleCloudRetailV2mainUserEventImportSummary; - } - /** - * Metadata related to the progress of the Purge operation. This will be returned by the google.longrunning.Operation.metadata field. - */ - export interface Schema$GoogleCloudRetailV2mainPurgeMetadata {} - /** - * Response of the PurgeUserEventsRequest. If the long running operation is successfully done, then this message is returned by the google.longrunning.Operations.response field. - */ - export interface Schema$GoogleCloudRetailV2mainPurgeUserEventsResponse { - /** - * The total count of events purged as a result of the operation. - */ - purgedEventsCount?: string | null; - } - /** - * Metadata for RejoinUserEvents method. - */ - export interface Schema$GoogleCloudRetailV2mainRejoinUserEventsMetadata {} - /** - * Response message for RejoinUserEvents method. - */ - export interface Schema$GoogleCloudRetailV2mainRejoinUserEventsResponse { - /** - * Number of user events that were joined with latest product catalog. - */ - rejoinedUserEventsCount?: string | null; - } - /** - * A summary of import result. The UserEventImportSummary summarizes the import status for user events. - */ - export interface Schema$GoogleCloudRetailV2mainUserEventImportSummary { - /** - * Count of user events imported with complete existing catalog information. - */ - joinedEventsCount?: string | null; - /** - * Count of user events imported, but with catalog information not found in the imported catalog. - */ - unjoinedEventsCount?: string | null; - } /** * Metadata related to the progress of the Purge operation. This will be returned by the google.longrunning.Operation.metadata field. */ @@ -3085,7 +2938,7 @@ export namespace retail_v2alpha { * * // Do the magic * const res = await retail.projects.locations.catalogs.placements.predict({ - * // Required. Full resource name of the format: {name=projects/x/locations/global/catalogs/default_catalog/placements/x\} The id of the recommendation engine placement. This id is used to identify the set of models that will be used to make the prediction. We currently support three placements with the following IDs by default: * `shopping_cart`: Predicts products frequently bought together with one or more products in the same shopping session. Commonly displayed after `add-to-cart` events, on product detail pages, or on the shopping cart page. * `home_page`: Predicts the next product that a user will most likely engage with or purchase based on the shopping or viewing history of the specified `userId` or `visitorId`. For example - Recommendations for you. * `product_detail`: Predicts the next product that a user will most likely engage with or purchase. The prediction is based on the shopping or viewing history of the specified `userId` or `visitorId` and its relevance to a specified `CatalogItem`. Typically used on product detail pages. For example - More products like this. * `recently_viewed_default`: Returns up to 75 products recently viewed by the specified `userId` or `visitorId`, most recent ones first. Returns nothing if neither of them has viewed any products yet. For example - Recently viewed. The full list of available placements can be seen at https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements + * // Required. Full resource name of the format: {name=projects/x/locations/global/catalogs/default_catalog/placements/x\} The ID of the Recommendations AI placement. Before you can request predictions from your model, you must create at least one placement for it. For more information, see [Managing placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements). The full list of available placements can be seen at https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements * placement: * 'projects/my-project/locations/my-location/catalogs/my-catalog/placements/my-placement', * @@ -3218,7 +3071,7 @@ export namespace retail_v2alpha { export interface Params$Resource$Projects$Locations$Catalogs$Placements$Predict extends StandardParameters { /** - * Required. Full resource name of the format: {name=projects/x/locations/global/catalogs/default_catalog/placements/x\} The id of the recommendation engine placement. This id is used to identify the set of models that will be used to make the prediction. We currently support three placements with the following IDs by default: * `shopping_cart`: Predicts products frequently bought together with one or more products in the same shopping session. Commonly displayed after `add-to-cart` events, on product detail pages, or on the shopping cart page. * `home_page`: Predicts the next product that a user will most likely engage with or purchase based on the shopping or viewing history of the specified `userId` or `visitorId`. For example - Recommendations for you. * `product_detail`: Predicts the next product that a user will most likely engage with or purchase. The prediction is based on the shopping or viewing history of the specified `userId` or `visitorId` and its relevance to a specified `CatalogItem`. Typically used on product detail pages. For example - More products like this. * `recently_viewed_default`: Returns up to 75 products recently viewed by the specified `userId` or `visitorId`, most recent ones first. Returns nothing if neither of them has viewed any products yet. For example - Recently viewed. The full list of available placements can be seen at https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements + * Required. Full resource name of the format: {name=projects/x/locations/global/catalogs/default_catalog/placements/x\} The ID of the Recommendations AI placement. Before you can request predictions from your model, you must create at least one placement for it. For more information, see [Managing placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements). The full list of available placements can be seen at https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements */ placement?: string; diff --git a/src/apis/retail/v2beta.ts b/src/apis/retail/v2beta.ts index 86f014718cf..63f7a54dff2 100644 --- a/src/apis/retail/v2beta.ts +++ b/src/apis/retail/v2beta.ts @@ -632,7 +632,7 @@ export namespace retail_v2beta { */ export interface Schema$GoogleCloudRetailV2betaPredictRequest { /** - * Filter for restricting prediction results with a length limit of 5,000 characters. Accepts values for tags and the `filterOutOfStockItems` flag. * Tag expressions. Restricts predictions to products that match all of the specified tags. Boolean operators `OR` and `NOT` are supported if the expression is enclosed in parentheses, and must be separated from the tag values by a space. `-"tagA"` is also supported and is equivalent to `NOT "tagA"`. Tag values must be double quoted UTF-8 encoded strings with a size limit of 1,000 characters. * filterOutOfStockItems. Restricts predictions to products that do not have a stockState value of OUT_OF_STOCK. Examples: * tag=("Red" OR "Blue") tag="New-Arrival" tag=(NOT "promotional") * filterOutOfStockItems tag=(-"promotional") * filterOutOfStockItems If your filter blocks all prediction results, nothing will be returned. If you want generic (unfiltered) popular products to be returned instead, set `strictFiltering` to false in `PredictRequest.params`. + * Filter for restricting prediction results with a length limit of 5,000 characters. Accepts values for tags and the `filterOutOfStockItems` flag. * Tag expressions. Restricts predictions to products that match all of the specified tags. Boolean operators `OR` and `NOT` are supported if the expression is enclosed in parentheses, and must be separated from the tag values by a space. `-"tagA"` is also supported and is equivalent to `NOT "tagA"`. Tag values must be double quoted UTF-8 encoded strings with a size limit of 1,000 characters. Note: "Recently viewed" models don't support tag filtering at the moment. * filterOutOfStockItems. Restricts predictions to products that do not have a stockState value of OUT_OF_STOCK. Examples: * tag=("Red" OR "Blue") tag="New-Arrival" tag=(NOT "promotional") * filterOutOfStockItems tag=(-"promotional") * filterOutOfStockItems If your filter blocks all prediction results, nothing will be returned. If you want generic (unfiltered) popular products to be returned instead, set `strictFiltering` to false in `PredictRequest.params`. */ filter?: string | null; /** @@ -1094,153 +1094,6 @@ export namespace retail_v2beta { */ importSummary?: Schema$GoogleCloudRetailV2UserEventImportSummary; } - /** - * Configuration of destination for Export related errors. - */ - export interface Schema$GoogleCloudRetailV2mainExportErrorsConfig { - /** - * Google Cloud Storage path for import errors. This must be an empty, existing Cloud Storage bucket. Export errors will be written to a file in this bucket, one per line, as a JSON-encoded `google.rpc.Status` message. - */ - gcsPrefix?: string | null; - } - /** - * Metadata related to the progress of the Export operation. This will be returned by the google.longrunning.Operation.metadata field. - */ - export interface Schema$GoogleCloudRetailV2mainExportMetadata { - /** - * Operation create time. - */ - createTime?: string | null; - /** - * Operation last update time. If the operation is done, this is also the finish time. - */ - updateTime?: string | null; - } - /** - * Response of the ExportProductsRequest. If the long running operation is done, then this message is returned by the google.longrunning.Operations.response field if the operation was successful. - */ - export interface Schema$GoogleCloudRetailV2mainExportProductsResponse { - /** - * A sample of errors encountered while processing the request. - */ - errorSamples?: Schema$GoogleRpcStatus[]; - /** - * Echoes the destination for the complete errors in the request if set. - */ - errorsConfig?: Schema$GoogleCloudRetailV2mainExportErrorsConfig; - } - /** - * Response of the ExportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful. - */ - export interface Schema$GoogleCloudRetailV2mainExportUserEventsResponse { - /** - * A sample of errors encountered while processing the request. - */ - errorSamples?: Schema$GoogleRpcStatus[]; - /** - * Echoes the destination for the complete errors if this field was set in the request. - */ - errorsConfig?: Schema$GoogleCloudRetailV2mainExportErrorsConfig; - } - /** - * Configuration of destination for Import related errors. - */ - export interface Schema$GoogleCloudRetailV2mainImportErrorsConfig { - /** - * Google Cloud Storage path for import errors. This must be an empty, existing Cloud Storage bucket. Import errors will be written to a file in this bucket, one per line, as a JSON-encoded `google.rpc.Status` message. - */ - gcsPrefix?: string | null; - } - /** - * Metadata related to the progress of the Import operation. This will be returned by the google.longrunning.Operation.metadata field. - */ - export interface Schema$GoogleCloudRetailV2mainImportMetadata { - /** - * Operation create time. - */ - createTime?: string | null; - /** - * Count of entries that encountered errors while processing. - */ - failureCount?: string | null; - /** - * Count of entries that were processed successfully. - */ - successCount?: string | null; - /** - * Operation last update time. If the operation is done, this is also the finish time. - */ - updateTime?: string | null; - } - /** - * Response of the ImportProductsRequest. If the long running operation is done, then this message is returned by the google.longrunning.Operations.response field if the operation was successful. - */ - export interface Schema$GoogleCloudRetailV2mainImportProductsResponse { - /** - * A sample of errors encountered while processing the request. - */ - errorSamples?: Schema$GoogleRpcStatus[]; - /** - * Echoes the destination for the complete errors in the request if set. - */ - errorsConfig?: Schema$GoogleCloudRetailV2mainImportErrorsConfig; - } - /** - * Response of the ImportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful. - */ - export interface Schema$GoogleCloudRetailV2mainImportUserEventsResponse { - /** - * A sample of errors encountered while processing the request. - */ - errorSamples?: Schema$GoogleRpcStatus[]; - /** - * Echoes the destination for the complete errors if this field was set in the request. - */ - errorsConfig?: Schema$GoogleCloudRetailV2mainImportErrorsConfig; - /** - * Aggregated statistics of user event import status. - */ - importSummary?: Schema$GoogleCloudRetailV2mainUserEventImportSummary; - } - /** - * Metadata related to the progress of the Purge operation. This will be returned by the google.longrunning.Operation.metadata field. - */ - export interface Schema$GoogleCloudRetailV2mainPurgeMetadata {} - /** - * Response of the PurgeUserEventsRequest. If the long running operation is successfully done, then this message is returned by the google.longrunning.Operations.response field. - */ - export interface Schema$GoogleCloudRetailV2mainPurgeUserEventsResponse { - /** - * The total count of events purged as a result of the operation. - */ - purgedEventsCount?: string | null; - } - /** - * Metadata for RejoinUserEvents method. - */ - export interface Schema$GoogleCloudRetailV2mainRejoinUserEventsMetadata {} - /** - * Response message for RejoinUserEvents method. - */ - export interface Schema$GoogleCloudRetailV2mainRejoinUserEventsResponse { - /** - * Number of user events that were joined with latest product catalog. - */ - rejoinedUserEventsCount?: string | null; - } - /** - * A summary of import result. The UserEventImportSummary summarizes the import status for user events. - */ - export interface Schema$GoogleCloudRetailV2mainUserEventImportSummary { - /** - * Count of user events imported with complete existing catalog information. - */ - joinedEventsCount?: string | null; - /** - * Count of user events imported, but with catalog information not found in the imported catalog. - */ - unjoinedEventsCount?: string | null; - } /** * Metadata related to the progress of the Purge operation. This will be returned by the google.longrunning.Operation.metadata field. */ @@ -3085,7 +2938,7 @@ export namespace retail_v2beta { * * // Do the magic * const res = await retail.projects.locations.catalogs.placements.predict({ - * // Required. Full resource name of the format: {name=projects/x/locations/global/catalogs/default_catalog/placements/x\} The id of the recommendation engine placement. This id is used to identify the set of models that will be used to make the prediction. We currently support three placements with the following IDs by default: * `shopping_cart`: Predicts products frequently bought together with one or more products in the same shopping session. Commonly displayed after `add-to-cart` events, on product detail pages, or on the shopping cart page. * `home_page`: Predicts the next product that a user will most likely engage with or purchase based on the shopping or viewing history of the specified `userId` or `visitorId`. For example - Recommendations for you. * `product_detail`: Predicts the next product that a user will most likely engage with or purchase. The prediction is based on the shopping or viewing history of the specified `userId` or `visitorId` and its relevance to a specified `CatalogItem`. Typically used on product detail pages. For example - More products like this. * `recently_viewed_default`: Returns up to 75 products recently viewed by the specified `userId` or `visitorId`, most recent ones first. Returns nothing if neither of them has viewed any products yet. For example - Recently viewed. The full list of available placements can be seen at https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements + * // Required. Full resource name of the format: {name=projects/x/locations/global/catalogs/default_catalog/placements/x\} The ID of the Recommendations AI placement. Before you can request predictions from your model, you must create at least one placement for it. For more information, see [Managing placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements). The full list of available placements can be seen at https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements * placement: * 'projects/my-project/locations/my-location/catalogs/my-catalog/placements/my-placement', * @@ -3218,7 +3071,7 @@ export namespace retail_v2beta { export interface Params$Resource$Projects$Locations$Catalogs$Placements$Predict extends StandardParameters { /** - * Required. Full resource name of the format: {name=projects/x/locations/global/catalogs/default_catalog/placements/x\} The id of the recommendation engine placement. This id is used to identify the set of models that will be used to make the prediction. We currently support three placements with the following IDs by default: * `shopping_cart`: Predicts products frequently bought together with one or more products in the same shopping session. Commonly displayed after `add-to-cart` events, on product detail pages, or on the shopping cart page. * `home_page`: Predicts the next product that a user will most likely engage with or purchase based on the shopping or viewing history of the specified `userId` or `visitorId`. For example - Recommendations for you. * `product_detail`: Predicts the next product that a user will most likely engage with or purchase. The prediction is based on the shopping or viewing history of the specified `userId` or `visitorId` and its relevance to a specified `CatalogItem`. Typically used on product detail pages. For example - More products like this. * `recently_viewed_default`: Returns up to 75 products recently viewed by the specified `userId` or `visitorId`, most recent ones first. Returns nothing if neither of them has viewed any products yet. For example - Recently viewed. The full list of available placements can be seen at https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements + * Required. Full resource name of the format: {name=projects/x/locations/global/catalogs/default_catalog/placements/x\} The ID of the Recommendations AI placement. Before you can request predictions from your model, you must create at least one placement for it. For more information, see [Managing placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements). The full list of available placements can be seen at https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements */ placement?: string; diff --git a/src/apis/run/v1.ts b/src/apis/run/v1.ts index 9ce0da09308..bee7dff5978 100644 --- a/src/apis/run/v1.ts +++ b/src/apis/run/v1.ts @@ -1421,7 +1421,7 @@ export namespace run_v1 { */ tag?: string | null; /** - * Output only. URL displays the URL for accessing tagged traffic targets. URL is displayed in status, and is disallowed on spec. URL must contain a scheme (e.g. http://) and a hostname, but may not contain anything else (e.g. basic auth, url path, etc. Not currently supported in Cloud Run. + * Output only. URL displays the URL for accessing tagged traffic targets. URL is displayed in status, and is disallowed on spec. URL must contain a scheme (e.g. http://) and a hostname, but may not contain anything else (e.g. basic auth, url path, etc.) */ url?: string | null; } @@ -2024,6 +2024,8 @@ export namespace run_v1 { * * // Do the magic * const res = await run.namespaces.domainmappings.create({ + * // DryRun is a query string parameter which indicates that the server should run validation without persisting the request. + * dryRun: 'placeholder-value', * // The namespace in which the domain mapping should be created. For Cloud Run (fully managed), replace {namespace_id\} with the project ID or number. * parent: 'namespaces/my-namespace', * @@ -2170,6 +2172,8 @@ export namespace run_v1 { * const res = await run.namespaces.domainmappings.delete({ * // Cloud Run currently ignores this parameter. * apiVersion: 'placeholder-value', + * // DryRun is a query string parameter which indicates that the server should run validation without persisting the request. + * dryRun: 'placeholder-value', * // Cloud Run currently ignores this parameter. * kind: 'placeholder-value', * // The name of the domain mapping to delete. For Cloud Run (fully managed), replace {namespace_id\} with the project ID or number. @@ -2570,6 +2574,10 @@ export namespace run_v1 { export interface Params$Resource$Namespaces$Domainmappings$Create extends StandardParameters { + /** + * DryRun is a query string parameter which indicates that the server should run validation without persisting the request. + */ + dryRun?: string; /** * The namespace in which the domain mapping should be created. For Cloud Run (fully managed), replace {namespace_id\} with the project ID or number. */ @@ -2586,6 +2594,10 @@ export namespace run_v1 { * Cloud Run currently ignores this parameter. */ apiVersion?: string; + /** + * DryRun is a query string parameter which indicates that the server should run validation without persisting the request. + */ + dryRun?: string; /** * Cloud Run currently ignores this parameter. */ @@ -2677,6 +2689,8 @@ export namespace run_v1 { * const res = await run.namespaces.revisions.delete({ * // Cloud Run currently ignores this parameter. * apiVersion: 'placeholder-value', + * // DryRun is a query string parameter which indicates that the server should run validation without persisting the request. + * dryRun: 'placeholder-value', * // Cloud Run currently ignores this parameter. * kind: 'placeholder-value', * // The name of the revision to delete. For Cloud Run (fully managed), replace {namespace_id\} with the project ID or number. @@ -3079,6 +3093,10 @@ export namespace run_v1 { * Cloud Run currently ignores this parameter. */ apiVersion?: string; + /** + * DryRun is a query string parameter which indicates that the server should run validation without persisting the request. + */ + dryRun?: string; /** * Cloud Run currently ignores this parameter. */ @@ -3500,6 +3518,8 @@ export namespace run_v1 { * * // Do the magic * const res = await run.namespaces.services.create({ + * // DryRun is a query string parameter which indicates that the server should run validation without persisting the request. + * dryRun: 'placeholder-value', * // The namespace in which the service should be created. For Cloud Run (fully managed), replace {namespace_id\} with the project ID or number. * parent: 'namespaces/my-namespace', * @@ -3646,6 +3666,8 @@ export namespace run_v1 { * const res = await run.namespaces.services.delete({ * // Cloud Run currently ignores this parameter. * apiVersion: 'placeholder-value', + * // DryRun is a query string parameter which indicates that the server should run validation without persisting the request. + * dryRun: 'placeholder-value', * // Cloud Run currently ignores this parameter. * kind: 'placeholder-value', * // The name of the service to delete. For Cloud Run (fully managed), replace {namespace_id\} with the project ID or number. @@ -4068,6 +4090,8 @@ export namespace run_v1 { * * // Do the magic * const res = await run.namespaces.services.replaceService({ + * // DryRun is a query string parameter which indicates that the server should run validation without persisting the request. + * dryRun: 'placeholder-value', * // The name of the service being replaced. For Cloud Run (fully managed), replace {namespace_id\} with the project ID or number. * name: 'namespaces/my-namespace/services/my-service', * @@ -4189,6 +4213,10 @@ export namespace run_v1 { export interface Params$Resource$Namespaces$Services$Create extends StandardParameters { + /** + * DryRun is a query string parameter which indicates that the server should run validation without persisting the request. + */ + dryRun?: string; /** * The namespace in which the service should be created. For Cloud Run (fully managed), replace {namespace_id\} with the project ID or number. */ @@ -4205,6 +4233,10 @@ export namespace run_v1 { * Cloud Run currently ignores this parameter. */ apiVersion?: string; + /** + * DryRun is a query string parameter which indicates that the server should run validation without persisting the request. + */ + dryRun?: string; /** * Cloud Run currently ignores this parameter. */ @@ -4262,6 +4294,10 @@ export namespace run_v1 { } export interface Params$Resource$Namespaces$Services$Replaceservice extends StandardParameters { + /** + * DryRun is a query string parameter which indicates that the server should run validation without persisting the request. + */ + dryRun?: string; /** * The name of the service being replaced. For Cloud Run (fully managed), replace {namespace_id\} with the project ID or number. */ @@ -4503,13 +4539,13 @@ export namespace run_v1 { * * // Do the magic * const res = await run.projects.locations.list({ - * // The standard list 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). * filter: 'placeholder-value', * // The resource that owns the locations collection, if applicable. * name: 'projects/my-project', - * // The standard list page size. + * // The maximum number of results to return. If not set, the service will select a default. * pageSize: 'placeholder-value', - * // The standard list page token. + * // A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. * pageToken: 'placeholder-value', * }); * console.log(res.data); @@ -4621,7 +4657,7 @@ export namespace run_v1 { export interface Params$Resource$Projects$Locations$List extends StandardParameters { /** - * The standard list 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). */ filter?: string; /** @@ -4629,11 +4665,11 @@ export namespace run_v1 { */ name?: string; /** - * The standard list page size. + * The maximum number of results to return. If not set, the service will select a default. */ pageSize?: number; /** - * The standard list page token. + * A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. */ pageToken?: string; } @@ -5172,6 +5208,8 @@ export namespace run_v1 { * * // Do the magic * const res = await run.projects.locations.domainmappings.create({ + * // DryRun is a query string parameter which indicates that the server should run validation without persisting the request. + * dryRun: 'placeholder-value', * // The namespace in which the domain mapping should be created. For Cloud Run (fully managed), replace {namespace_id\} with the project ID or number. * parent: 'projects/my-project/locations/my-location', * @@ -5319,6 +5357,8 @@ export namespace run_v1 { * const res = await run.projects.locations.domainmappings.delete({ * // Cloud Run currently ignores this parameter. * apiVersion: 'placeholder-value', + * // DryRun is a query string parameter which indicates that the server should run validation without persisting the request. + * dryRun: 'placeholder-value', * // Cloud Run currently ignores this parameter. * kind: 'placeholder-value', * // The name of the domain mapping to delete. For Cloud Run (fully managed), replace {namespace_id\} with the project ID or number. @@ -5716,6 +5756,10 @@ export namespace run_v1 { export interface Params$Resource$Projects$Locations$Domainmappings$Create extends StandardParameters { + /** + * DryRun is a query string parameter which indicates that the server should run validation without persisting the request. + */ + dryRun?: string; /** * The namespace in which the domain mapping should be created. For Cloud Run (fully managed), replace {namespace_id\} with the project ID or number. */ @@ -5732,6 +5776,10 @@ export namespace run_v1 { * Cloud Run currently ignores this parameter. */ apiVersion?: string; + /** + * DryRun is a query string parameter which indicates that the server should run validation without persisting the request. + */ + dryRun?: string; /** * Cloud Run currently ignores this parameter. */ @@ -5823,6 +5871,8 @@ export namespace run_v1 { * const res = await run.projects.locations.revisions.delete({ * // Cloud Run currently ignores this parameter. * apiVersion: 'placeholder-value', + * // DryRun is a query string parameter which indicates that the server should run validation without persisting the request. + * dryRun: 'placeholder-value', * // Cloud Run currently ignores this parameter. * kind: 'placeholder-value', * // The name of the revision to delete. For Cloud Run (fully managed), replace {namespace_id\} with the project ID or number. @@ -6220,6 +6270,10 @@ export namespace run_v1 { * Cloud Run currently ignores this parameter. */ apiVersion?: string; + /** + * DryRun is a query string parameter which indicates that the server should run validation without persisting the request. + */ + dryRun?: string; /** * Cloud Run currently ignores this parameter. */ @@ -6639,6 +6693,8 @@ export namespace run_v1 { * * // Do the magic * const res = await run.projects.locations.services.create({ + * // DryRun is a query string parameter which indicates that the server should run validation without persisting the request. + * dryRun: 'placeholder-value', * // The namespace in which the service should be created. For Cloud Run (fully managed), replace {namespace_id\} with the project ID or number. * parent: 'projects/my-project/locations/my-location', * @@ -6786,6 +6842,8 @@ export namespace run_v1 { * const res = await run.projects.locations.services.delete({ * // Cloud Run currently ignores this parameter. * apiVersion: 'placeholder-value', + * // DryRun is a query string parameter which indicates that the server should run validation without persisting the request. + * dryRun: 'placeholder-value', * // Cloud Run currently ignores this parameter. * kind: 'placeholder-value', * // The name of the service to delete. For Cloud Run (fully managed), replace {namespace_id\} with the project ID or number. @@ -7337,6 +7395,8 @@ export namespace run_v1 { * * // Do the magic * const res = await run.projects.locations.services.replaceService({ + * // DryRun is a query string parameter which indicates that the server should run validation without persisting the request. + * dryRun: 'placeholder-value', * // The name of the service being replaced. For Cloud Run (fully managed), replace {namespace_id\} with the project ID or number. * name: 'projects/my-project/locations/my-location/services/my-service', * @@ -7740,6 +7800,10 @@ export namespace run_v1 { export interface Params$Resource$Projects$Locations$Services$Create extends StandardParameters { + /** + * DryRun is a query string parameter which indicates that the server should run validation without persisting the request. + */ + dryRun?: string; /** * The namespace in which the service should be created. For Cloud Run (fully managed), replace {namespace_id\} with the project ID or number. */ @@ -7756,6 +7820,10 @@ export namespace run_v1 { * Cloud Run currently ignores this parameter. */ apiVersion?: string; + /** + * DryRun is a query string parameter which indicates that the server should run validation without persisting the request. + */ + dryRun?: string; /** * Cloud Run currently ignores this parameter. */ @@ -7824,6 +7892,10 @@ export namespace run_v1 { } export interface Params$Resource$Projects$Locations$Services$Replaceservice extends StandardParameters { + /** + * DryRun is a query string parameter which indicates that the server should run validation without persisting the request. + */ + dryRun?: string; /** * The name of the service being replaced. For Cloud Run (fully managed), replace {namespace_id\} with the project ID or number. */ diff --git a/src/apis/run/v1alpha1.ts b/src/apis/run/v1alpha1.ts index a856f2f583d..ca1f4f57340 100644 --- a/src/apis/run/v1alpha1.ts +++ b/src/apis/run/v1alpha1.ts @@ -5506,13 +5506,13 @@ export namespace run_v1alpha1 { * * // Do the magic * const res = await run.projects.locations.list({ - * // The standard list 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). * filter: 'placeholder-value', * // The resource that owns the locations collection, if applicable. * name: 'projects/my-project', - * // The standard list page size. + * // The maximum number of results to return. If not set, the service will select a default. * pageSize: 'placeholder-value', - * // The standard list page token. + * // A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. * pageToken: 'placeholder-value', * }); * console.log(res.data); @@ -5624,7 +5624,7 @@ export namespace run_v1alpha1 { export interface Params$Resource$Projects$Locations$List extends StandardParameters { /** - * The standard list 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). */ filter?: string; /** @@ -5632,11 +5632,11 @@ export namespace run_v1alpha1 { */ name?: string; /** - * The standard list page size. + * The maximum number of results to return. If not set, the service will select a default. */ pageSize?: number; /** - * The standard list page token. + * A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. */ pageToken?: string; } diff --git a/src/apis/sasportal/v1alpha1.ts b/src/apis/sasportal/v1alpha1.ts index a4d6ea8dfd0..1dc8568a513 100644 --- a/src/apis/sasportal/v1alpha1.ts +++ b/src/apis/sasportal/v1alpha1.ts @@ -146,6 +146,19 @@ export namespace sasportal_v1alpha1 { */ role?: string | null; } + /** + * The channel with score. + */ + export interface Schema$SasPortalChannelWithScore { + /** + * The frequency range of the channel. + */ + frequencyRange?: Schema$SasPortalFrequencyRange; + /** + * The channel score, normalized to be in [0,100]. + */ + score?: number | null; + } /** * Request for CreateSignedDevice. */ @@ -206,6 +219,10 @@ export namespace sasportal_v1alpha1 { * Output only. Current configuration of the device as registered to the SAS. */ activeConfig?: Schema$SasPortalDeviceConfig; + /** + * Output only. Current channels with scores. + */ + currentChannels?: Schema$SasPortalChannelWithScore[]; /** * Device parameters that can be overridden by both SAS Portal and SAS registration requests. */ @@ -2132,6 +2149,7 @@ export namespace sasportal_v1alpha1 { * // request body parameters * // { * // "activeConfig": {}, + * // "currentChannels": [], * // "deviceMetadata": {}, * // "displayName": "my_displayName", * // "fccId": "my_fccId", @@ -2149,6 +2167,7 @@ export namespace sasportal_v1alpha1 { * // Example response * // { * // "activeConfig": {}, + * // "currentChannels": [], * // "deviceMetadata": {}, * // "displayName": "my_displayName", * // "fccId": "my_fccId", @@ -2296,6 +2315,7 @@ export namespace sasportal_v1alpha1 { * // Example response * // { * // "activeConfig": {}, + * // "currentChannels": [], * // "deviceMetadata": {}, * // "displayName": "my_displayName", * // "fccId": "my_fccId", @@ -2630,6 +2650,7 @@ export namespace sasportal_v1alpha1 { * // request body parameters * // { * // "activeConfig": {}, + * // "currentChannels": [], * // "deviceMetadata": {}, * // "displayName": "my_displayName", * // "fccId": "my_fccId", @@ -2647,6 +2668,7 @@ export namespace sasportal_v1alpha1 { * // Example response * // { * // "activeConfig": {}, + * // "currentChannels": [], * // "deviceMetadata": {}, * // "displayName": "my_displayName", * // "fccId": "my_fccId", @@ -2794,6 +2816,7 @@ export namespace sasportal_v1alpha1 { * // Example response * // { * // "activeConfig": {}, + * // "currentChannels": [], * // "deviceMetadata": {}, * // "displayName": "my_displayName", * // "fccId": "my_fccId", @@ -3056,6 +3079,7 @@ export namespace sasportal_v1alpha1 { * // Example response * // { * // "activeConfig": {}, + * // "currentChannels": [], * // "deviceMetadata": {}, * // "displayName": "my_displayName", * // "fccId": "my_fccId", @@ -3482,6 +3506,7 @@ export namespace sasportal_v1alpha1 { * // request body parameters * // { * // "activeConfig": {}, + * // "currentChannels": [], * // "deviceMetadata": {}, * // "displayName": "my_displayName", * // "fccId": "my_fccId", @@ -3499,6 +3524,7 @@ export namespace sasportal_v1alpha1 { * // Example response * // { * // "activeConfig": {}, + * // "currentChannels": [], * // "deviceMetadata": {}, * // "displayName": "my_displayName", * // "fccId": "my_fccId", @@ -3778,6 +3804,7 @@ export namespace sasportal_v1alpha1 { * // Example response * // { * // "activeConfig": {}, + * // "currentChannels": [], * // "deviceMetadata": {}, * // "displayName": "my_displayName", * // "fccId": "my_fccId", @@ -5272,6 +5299,7 @@ export namespace sasportal_v1alpha1 { * // request body parameters * // { * // "activeConfig": {}, + * // "currentChannels": [], * // "deviceMetadata": {}, * // "displayName": "my_displayName", * // "fccId": "my_fccId", @@ -5289,6 +5317,7 @@ export namespace sasportal_v1alpha1 { * // Example response * // { * // "activeConfig": {}, + * // "currentChannels": [], * // "deviceMetadata": {}, * // "displayName": "my_displayName", * // "fccId": "my_fccId", @@ -5436,6 +5465,7 @@ export namespace sasportal_v1alpha1 { * // Example response * // { * // "activeConfig": {}, + * // "currentChannels": [], * // "deviceMetadata": {}, * // "displayName": "my_displayName", * // "fccId": "my_fccId", @@ -6365,6 +6395,7 @@ export namespace sasportal_v1alpha1 { * // Example response * // { * // "activeConfig": {}, + * // "currentChannels": [], * // "deviceMetadata": {}, * // "displayName": "my_displayName", * // "fccId": "my_fccId", @@ -6646,6 +6677,7 @@ export namespace sasportal_v1alpha1 { * // request body parameters * // { * // "activeConfig": {}, + * // "currentChannels": [], * // "deviceMetadata": {}, * // "displayName": "my_displayName", * // "fccId": "my_fccId", @@ -6663,6 +6695,7 @@ export namespace sasportal_v1alpha1 { * // Example response * // { * // "activeConfig": {}, + * // "currentChannels": [], * // "deviceMetadata": {}, * // "displayName": "my_displayName", * // "fccId": "my_fccId", @@ -6942,6 +6975,7 @@ export namespace sasportal_v1alpha1 { * // Example response * // { * // "activeConfig": {}, + * // "currentChannels": [], * // "deviceMetadata": {}, * // "displayName": "my_displayName", * // "fccId": "my_fccId", @@ -8371,6 +8405,7 @@ export namespace sasportal_v1alpha1 { * // request body parameters * // { * // "activeConfig": {}, + * // "currentChannels": [], * // "deviceMetadata": {}, * // "displayName": "my_displayName", * // "fccId": "my_fccId", @@ -8388,6 +8423,7 @@ export namespace sasportal_v1alpha1 { * // Example response * // { * // "activeConfig": {}, + * // "currentChannels": [], * // "deviceMetadata": {}, * // "displayName": "my_displayName", * // "fccId": "my_fccId", @@ -8535,6 +8571,7 @@ export namespace sasportal_v1alpha1 { * // Example response * // { * // "activeConfig": {}, + * // "currentChannels": [], * // "deviceMetadata": {}, * // "displayName": "my_displayName", * // "fccId": "my_fccId", @@ -8869,6 +8906,7 @@ export namespace sasportal_v1alpha1 { * // request body parameters * // { * // "activeConfig": {}, + * // "currentChannels": [], * // "deviceMetadata": {}, * // "displayName": "my_displayName", * // "fccId": "my_fccId", @@ -8886,6 +8924,7 @@ export namespace sasportal_v1alpha1 { * // Example response * // { * // "activeConfig": {}, + * // "currentChannels": [], * // "deviceMetadata": {}, * // "displayName": "my_displayName", * // "fccId": "my_fccId", @@ -9033,6 +9072,7 @@ export namespace sasportal_v1alpha1 { * // Example response * // { * // "activeConfig": {}, + * // "currentChannels": [], * // "deviceMetadata": {}, * // "displayName": "my_displayName", * // "fccId": "my_fccId", @@ -9295,6 +9335,7 @@ export namespace sasportal_v1alpha1 { * // Example response * // { * // "activeConfig": {}, + * // "currentChannels": [], * // "deviceMetadata": {}, * // "displayName": "my_displayName", * // "fccId": "my_fccId", @@ -9721,6 +9762,7 @@ export namespace sasportal_v1alpha1 { * // request body parameters * // { * // "activeConfig": {}, + * // "currentChannels": [], * // "deviceMetadata": {}, * // "displayName": "my_displayName", * // "fccId": "my_fccId", @@ -9738,6 +9780,7 @@ export namespace sasportal_v1alpha1 { * // Example response * // { * // "activeConfig": {}, + * // "currentChannels": [], * // "deviceMetadata": {}, * // "displayName": "my_displayName", * // "fccId": "my_fccId", @@ -10017,6 +10060,7 @@ export namespace sasportal_v1alpha1 { * // Example response * // { * // "activeConfig": {}, + * // "currentChannels": [], * // "deviceMetadata": {}, * // "displayName": "my_displayName", * // "fccId": "my_fccId", @@ -11505,6 +11549,7 @@ export namespace sasportal_v1alpha1 { * // request body parameters * // { * // "activeConfig": {}, + * // "currentChannels": [], * // "deviceMetadata": {}, * // "displayName": "my_displayName", * // "fccId": "my_fccId", @@ -11522,6 +11567,7 @@ export namespace sasportal_v1alpha1 { * // Example response * // { * // "activeConfig": {}, + * // "currentChannels": [], * // "deviceMetadata": {}, * // "displayName": "my_displayName", * // "fccId": "my_fccId", @@ -11669,6 +11715,7 @@ export namespace sasportal_v1alpha1 { * // Example response * // { * // "activeConfig": {}, + * // "currentChannels": [], * // "deviceMetadata": {}, * // "displayName": "my_displayName", * // "fccId": "my_fccId", diff --git a/src/apis/secretmanager/v1.ts b/src/apis/secretmanager/v1.ts index 4b002b47837..65bf67920f7 100644 --- a/src/apis/secretmanager/v1.ts +++ b/src/apis/secretmanager/v1.ts @@ -507,7 +507,7 @@ export namespace secretmanager_v1 { permissions?: string[] | null; } /** - * A Pub/Sub topic which SM will publish to when control plane events occur on this secret. + * A Pub/Sub topic which Secret Manager will publish to when control plane events occur on this secret. */ export interface Schema$Topic { /** @@ -709,13 +709,13 @@ export namespace secretmanager_v1 { * * // Do the magic * const res = await secretmanager.projects.locations.list({ - * // The standard list 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). * filter: 'placeholder-value', * // The resource that owns the locations collection, if applicable. * name: 'projects/my-project', - * // The standard list page size. + * // The maximum number of results to return. If not set, the service will select a default. * pageSize: 'placeholder-value', - * // The standard list page token. + * // A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. * pageToken: 'placeholder-value', * }); * console.log(res.data); @@ -835,7 +835,7 @@ export namespace secretmanager_v1 { export interface Params$Resource$Projects$Locations$List extends StandardParameters { /** - * The standard list 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). */ filter?: string; /** @@ -843,11 +843,11 @@ export namespace secretmanager_v1 { */ name?: string; /** - * The standard list page size. + * The maximum number of results to return. If not set, the service will select a default. */ pageSize?: number; /** - * The standard list page token. + * A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. */ pageToken?: string; } diff --git a/src/apis/secretmanager/v1beta1.ts b/src/apis/secretmanager/v1beta1.ts index 89e4394c730..9877adce0f1 100644 --- a/src/apis/secretmanager/v1beta1.ts +++ b/src/apis/secretmanager/v1beta1.ts @@ -613,13 +613,13 @@ export namespace secretmanager_v1beta1 { * * // Do the magic * const res = await secretmanager.projects.locations.list({ - * // The standard list 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). * filter: 'placeholder-value', * // The resource that owns the locations collection, if applicable. * name: 'projects/my-project', - * // The standard list page size. + * // The maximum number of results to return. If not set, the service will select a default. * pageSize: 'placeholder-value', - * // The standard list page token. + * // A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. * pageToken: 'placeholder-value', * }); * console.log(res.data); @@ -739,7 +739,7 @@ export namespace secretmanager_v1beta1 { export interface Params$Resource$Projects$Locations$List extends StandardParameters { /** - * The standard list 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). */ filter?: string; /** @@ -747,11 +747,11 @@ export namespace secretmanager_v1beta1 { */ name?: string; /** - * The standard list page size. + * The maximum number of results to return. If not set, the service will select a default. */ pageSize?: number; /** - * The standard list page token. + * A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. */ pageToken?: string; } diff --git a/src/apis/servicecontrol/README.md b/src/apis/servicecontrol/README.md index 01f3ee6fec5..86a7f212a0d 100644 --- a/src/apis/servicecontrol/README.md +++ b/src/apis/servicecontrol/README.md @@ -4,6 +4,15 @@ > Provides admission control and telemetry reporting for services integrated with Service Infrastructure. +## Support status +**Note**: Google provides multiple libraries for this service. This library is in +maintenance mode, and will continue to be made available for users who have +existing applications. If you're building a new application, or modernizing a +legacy application, please use [](https://www.npmjs.com/package/) instead. +The [](https://www.npmjs.com/package/) library is faster, easier to use, and better maintained. + +To learn more, see [Client Libraries Explained](https://cloud.google.com/apis/docs/client-libraries-explained). + ## Installation ```sh diff --git a/src/apis/servicedirectory/v1.ts b/src/apis/servicedirectory/v1.ts index 8bb3cf5a23f..23421e8c8eb 100644 --- a/src/apis/servicedirectory/v1.ts +++ b/src/apis/servicedirectory/v1.ts @@ -337,7 +337,7 @@ export namespace servicedirectory_v1 { */ export interface Schema$Service { /** - * Optional. Annotations for the service. This data can be consumed by service clients. Restrictions: * The entire annotations dictionary may contain up to 512 characters, spread accoss all key-value pairs. Annotations that go beyond this limit are rejected * Valid annotation keys have two segments: an optional prefix and name, separated by a slash (/). The name segment is required and must be 63 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between. The prefix is optional. If specified, the prefix must be a DNS subdomain: a series of DNS labels separated by dots (.), not longer than 253 characters in total, followed by a slash (/). Annotations that fails to meet these requirements are rejected * The `(*.)google.com/` and `(*.)googleapis.com/` prefixes are reserved for system annotations managed by Service Directory. If the user tries to write to these keyspaces, those entries are silently ignored by the system Note: This field is equivalent to the `metadata` field in the v1beta1 API. They have the same syntax and read/write to the same location in Service Directory. + * Optional. Annotations for the service. This data can be consumed by service clients. Restrictions: * The entire annotations dictionary may contain up to 2000 characters, spread accoss all key-value pairs. Annotations that go beyond this limit are rejected * Valid annotation keys have two segments: an optional prefix and name, separated by a slash (/). The name segment is required and must be 63 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between. The prefix is optional. If specified, the prefix must be a DNS subdomain: a series of DNS labels separated by dots (.), not longer than 253 characters in total, followed by a slash (/). Annotations that fails to meet these requirements are rejected * The `(*.)google.com/` and `(*.)googleapis.com/` prefixes are reserved for system annotations managed by Service Directory. If the user tries to write to these keyspaces, those entries are silently ignored by the system Note: This field is equivalent to the `metadata` field in the v1beta1 API. They have the same syntax and read/write to the same location in Service Directory. */ annotations?: {[key: string]: string} | null; /** @@ -554,13 +554,13 @@ export namespace servicedirectory_v1 { * * // Do the magic * const res = await servicedirectory.projects.locations.list({ - * // The standard list 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). * filter: 'placeholder-value', * // The resource that owns the locations collection, if applicable. * name: 'projects/my-project', - * // The standard list page size. + * // The maximum number of results to return. If not set, the service will select a default. * pageSize: 'placeholder-value', - * // The standard list page token. + * // A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. * pageToken: 'placeholder-value', * }); * console.log(res.data); @@ -680,7 +680,7 @@ export namespace servicedirectory_v1 { export interface Params$Resource$Projects$Locations$List extends StandardParameters { /** - * The standard list 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). */ filter?: string; /** @@ -688,11 +688,11 @@ export namespace servicedirectory_v1 { */ name?: string; /** - * The standard list page size. + * The maximum number of results to return. If not set, the service will select a default. */ pageSize?: number; /** - * The standard list page token. + * A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. */ pageToken?: string; } diff --git a/src/apis/servicedirectory/v1beta1.ts b/src/apis/servicedirectory/v1beta1.ts index 5a2e5f56524..d72c7889047 100644 --- a/src/apis/servicedirectory/v1beta1.ts +++ b/src/apis/servicedirectory/v1beta1.ts @@ -341,7 +341,7 @@ export namespace servicedirectory_v1beta1 { */ endpoints?: Schema$Endpoint[]; /** - * Optional. Metadata for the service. This data can be consumed by service clients. Restrictions: * The entire metadata dictionary may contain up to 512 characters, spread accoss all key-value pairs. Metadata that goes beyond this limit are rejected * Valid metadata keys have two segments: an optional prefix and name, separated by a slash (/). The name segment is required and must be 63 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between. The prefix is optional. If specified, the prefix must be a DNS subdomain: a series of DNS labels separated by dots (.), not longer than 253 characters in total, followed by a slash (/). Metadata that fails to meet these requirements are rejected * The `(*.)google.com/` and `(*.)googleapis.com/` prefixes are reserved for system metadata managed by Service Directory. If the user tries to write to these keyspaces, those entries are silently ignored by the system Note: This field is equivalent to the `annotations` field in the v1 API. They have the same syntax and read/write to the same location in Service Directory. + * Optional. Metadata for the service. This data can be consumed by service clients. Restrictions: * The entire metadata dictionary may contain up to 2000 characters, spread accoss all key-value pairs. Metadata that goes beyond this limit are rejected * Valid metadata keys have two segments: an optional prefix and name, separated by a slash (/). The name segment is required and must be 63 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between. The prefix is optional. If specified, the prefix must be a DNS subdomain: a series of DNS labels separated by dots (.), not longer than 253 characters in total, followed by a slash (/). Metadata that fails to meet these requirements are rejected * The `(*.)google.com/` and `(*.)googleapis.com/` prefixes are reserved for system metadata managed by Service Directory. If the user tries to write to these keyspaces, those entries are silently ignored by the system Note: This field is equivalent to the `annotations` field in the v1 API. They have the same syntax and read/write to the same location in Service Directory. */ metadata?: {[key: string]: string} | null; /** @@ -554,13 +554,13 @@ export namespace servicedirectory_v1beta1 { * * // Do the magic * const res = await servicedirectory.projects.locations.list({ - * // The standard list 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). * filter: 'placeholder-value', * // The resource that owns the locations collection, if applicable. * name: 'projects/my-project', - * // The standard list page size. + * // The maximum number of results to return. If not set, the service will select a default. * pageSize: 'placeholder-value', - * // The standard list page token. + * // A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. * pageToken: 'placeholder-value', * }); * console.log(res.data); @@ -680,7 +680,7 @@ export namespace servicedirectory_v1beta1 { export interface Params$Resource$Projects$Locations$List extends StandardParameters { /** - * The standard list 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). */ filter?: string; /** @@ -688,11 +688,11 @@ export namespace servicedirectory_v1beta1 { */ name?: string; /** - * The standard list page size. + * The maximum number of results to return. If not set, the service will select a default. */ pageSize?: number; /** - * The standard list page token. + * A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. */ pageToken?: string; } diff --git a/src/apis/servicemanagement/README.md b/src/apis/servicemanagement/README.md index 956657be676..955f5b8a05a 100644 --- a/src/apis/servicemanagement/README.md +++ b/src/apis/servicemanagement/README.md @@ -4,6 +4,15 @@ > Google Service Management allows service producers to publish their services on Google Cloud Platform so that they can be discovered and used by service consumers. +## Support status +**Note**: Google provides multiple libraries for this service. This library is in +maintenance mode, and will continue to be made available for users who have +existing applications. If you're building a new application, or modernizing a +legacy application, please use [](https://www.npmjs.com/package/) instead. +The [](https://www.npmjs.com/package/) library is faster, easier to use, and better maintained. + +To learn more, see [Client Libraries Explained](https://cloud.google.com/apis/docs/client-libraries-explained). + ## Installation ```sh diff --git a/src/apis/servicemanagement/v1.ts b/src/apis/servicemanagement/v1.ts index ed6c7f4fc88..bec499e05a6 100644 --- a/src/apis/servicemanagement/v1.ts +++ b/src/apis/servicemanagement/v1.ts @@ -533,10 +533,6 @@ export namespace servicemanagement_v1 { */ message?: string | null; } - /** - * Operation payload for DisableService method. - */ - export interface Schema$DisableServiceResponse {} /** * `Documentation` provides the information for describing a service. Example: documentation: summary: \> The Google Calendar API gives access to most calendar features. pages: - name: Overview content: (== include google/foo/overview.md ==) - name: Tutorial content: (== include google/foo/tutorial.md ==) subpages; - name: Java content: (== include google/foo/tutorial_java.md ==) rules: - selector: google.calendar.Calendar.Get description: \> ... - selector: google.calendar.Calendar.Put description: \> ... Documentation is provided in markdown syntax. In addition to standard markdown features, definition lists, tables and fenced code blocks are supported. Section headers can be provided and are interpreted relative to the section nesting of the context where a documentation fragment is embedded. Documentation from the IDL is merged with documentation defined via the config at normalization time, where documentation provided by config rules overrides IDL provided. A number of constructs specific to the API platform are supported in documentation text. In order to reference a proto element, the following notation can be used: [fully.qualified.proto.name][] To override the display text used for the link, this can be used: [display text][fully.qualified.proto.name] Text can be excluded from doc using the following notation: (-- internal comment --) A few directives are available in documentation. Note that directives must appear on a single line to be properly identified. The `include` directive includes a markdown file from an external source: (== include path/to/file ==) The `resource_for` directive marks a message to be the resource of a collection in REST view. If it is not specified, tools attempt to infer the resource from the operations in a collection: (== resource_for v1.shelves.books ==) The directive `suppress_warning` does not directly affect documentation and is documented together with service config validation. */ @@ -583,15 +579,6 @@ export namespace servicemanagement_v1 { */ selector?: string | null; } - /** - * Request message for EnableService method. - */ - export interface Schema$EnableServiceRequest { - /** - * Required. The identity of consumer resource which service enablement will be applied to. The Google Service Management implementation accepts the following forms: - "project:" Note: this is made compatible with google.api.servicecontrol.v1.Operation.consumer_id. - */ - consumerId?: string | null; - } /** * Operation payload for EnableService method. */ @@ -2312,150 +2299,6 @@ export namespace servicemanagement_v1 { } } - /** - * Enables a service for a project, so it can be used for the project. See [Cloud Auth Guide](https://cloud.google.com/docs/authentication) for more information. Operation - * @example - * ```js - * // Before running the sample: - * // - Enable the API at: - * // https://console.developers.google.com/apis/api/servicemanagement.googleapis.com - * // - Login into gcloud by running: - * // `$ gcloud auth application-default login` - * // - Install the npm module by running: - * // `$ npm install googleapis` - * - * const {google} = require('googleapis'); - * const servicemanagement = google.servicemanagement('v1'); - * - * async function main() { - * const auth = new google.auth.GoogleAuth({ - * // Scopes can be specified either as an array or as a single, space-delimited string. - * scopes: [ - * 'https://www.googleapis.com/auth/cloud-platform', - * 'https://www.googleapis.com/auth/service.management', - * ], - * }); - * - * // Acquire an auth client, and bind it to all future calls - * const authClient = await auth.getClient(); - * google.options({auth: authClient}); - * - * // Do the magic - * const res = await servicemanagement.services.enable({ - * // Required. Name of the service to enable. Specifying an unknown service name will cause the request to fail. - * serviceName: 'placeholder-value', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "consumerId": "my_consumerId" - * // } - * }, - * }); - * console.log(res.data); - * - * // Example response - * // { - * // "done": false, - * // "error": {}, - * // "metadata": {}, - * // "name": "my_name", - * // "response": {} - * // } - * } - * - * main().catch(e => { - * console.error(e); - * throw e; - * }); - * - * ``` - * - * @param params - Parameters for request - * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. - * @param callback - Optional callback that handles the response. - * @returns A promise if used with async/await, or void if used with a callback. - */ - enable( - params: Params$Resource$Services$Enable, - options: StreamMethodOptions - ): GaxiosPromise; - enable( - params?: Params$Resource$Services$Enable, - options?: MethodOptions - ): GaxiosPromise; - enable( - params: Params$Resource$Services$Enable, - options: StreamMethodOptions | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - enable( - params: Params$Resource$Services$Enable, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback - ): void; - enable( - params: Params$Resource$Services$Enable, - callback: BodyResponseCallback - ): void; - enable(callback: BodyResponseCallback): void; - enable( - paramsOrCallback?: - | Params$Resource$Services$Enable - | BodyResponseCallback - | BodyResponseCallback, - optionsOrCallback?: - | MethodOptions - | StreamMethodOptions - | BodyResponseCallback - | BodyResponseCallback, - callback?: - | BodyResponseCallback - | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Services$Enable; - let options = (optionsOrCallback || {}) as MethodOptions; - - if (typeof paramsOrCallback === 'function') { - callback = paramsOrCallback; - params = {} as Params$Resource$Services$Enable; - options = {}; - } - - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - options = {}; - } - - const rootUrl = - options.rootUrl || 'https://servicemanagement.googleapis.com/'; - const parameters = { - options: Object.assign( - { - url: (rootUrl + '/v1/services/{serviceName}:enable').replace( - /([^:]\/)\/+/g, - '$1' - ), - method: 'POST', - }, - options - ), - params, - requiredParams: ['serviceName'], - pathParams: ['serviceName'], - context: this.context, - }; - if (callback) { - createAPIRequest( - parameters, - callback as BodyResponseCallback - ); - } else { - return createAPIRequest(parameters); - } - } - /** * Generates and returns a report (errors, warnings and changes from existing configurations) associated with GenerateConfigReportRequest.new_value If GenerateConfigReportRequest.old_value is specified, GenerateConfigReportRequest will contain a single ChangeReport based on the comparison between GenerateConfigReportRequest.new_value and GenerateConfigReportRequest.old_value. If GenerateConfigReportRequest.old_value is not specified, this method will compare GenerateConfigReportRequest.new_value with the last pushed service configuration. * @example @@ -3641,17 +3484,6 @@ export namespace servicemanagement_v1 { */ serviceName?: string; } - export interface Params$Resource$Services$Enable extends StandardParameters { - /** - * Required. Name of the service to enable. Specifying an unknown service name will cause the request to fail. - */ - serviceName?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$EnableServiceRequest; - } export interface Params$Resource$Services$Generateconfigreport extends StandardParameters { /** diff --git a/src/apis/sheets/v4.ts b/src/apis/sheets/v4.ts index a3dde14a25c..4b9c093e045 100644 --- a/src/apis/sheets/v4.ts +++ b/src/apis/sheets/v4.ts @@ -681,7 +681,7 @@ export namespace sheets_v4 { */ export interface Schema$BatchClearValuesRequest { /** - * The ranges to clear, in A1 notation. + * The ranges to clear, in A1 or R1C1 notation. */ ranges?: string[] | null; } @@ -1031,7 +1031,7 @@ export namespace sheets_v4 { */ bubbleOpacity?: number | null; /** - * The data contianing the bubble sizes. Bubble sizes are used to draw the bubbles at different sizes relative to each other. If specified, group_ids must also be specified. This field is optional. + * The data containing the bubble sizes. Bubble sizes are used to draw the bubbles at different sizes relative to each other. If specified, group_ids must also be specified. This field is optional. */ bubbleSizes?: Schema$ChartData; /** @@ -1051,7 +1051,7 @@ export namespace sheets_v4 { */ legendPosition?: string | null; /** - * The data contianing the bubble y-values. These values locate the bubbles in the chart vertically. + * The data containing the bubble y-values. These values locate the bubbles in the chart vertically. */ series?: Schema$ChartData; } @@ -1444,11 +1444,11 @@ export namespace sheets_v4 { spreadsheetId?: string | null; } /** - * Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to/from color representations in various languages over compactness; for example, the fields of this representation can be trivially provided to the constructor of "java.awt.Color" in Java; it can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" method in iOS; and, with just a little work, it can be easily formatted into a CSS "rgba()" string in JavaScript, as well. Note: this proto does not carry information about the absolute color space that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default, applications SHOULD assume the sRGB color space. Note: when color equality needs to be decided, implementations, unless documented otherwise, will treat two colors to be equal if all their red, green, blue and alpha values each differ by at most 1e-5. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); \} public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); \} return resultBuilder.build(); \} // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; \} return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; \} static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) { return nil; \} Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; \} [result autorelease]; return result; \} // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) { return rgbToCssColor_(red, green, blue); \} var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); \}; var rgbToCssColor_ = function(red, green, blue) { var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) { resultBuilder.push('0'); \} resultBuilder.push(hexString); return resultBuilder.join(''); \}; // ... + * Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to/from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn't carry information about the absolute color space that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most 1e-5. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); \} public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); \} return resultBuilder.build(); \} // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; \} return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; \} static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) { return nil; \} Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; \} [result autorelease]; return result; \} // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) { return rgbToCssColor(red, green, blue); \} var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); \}; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) { resultBuilder.push('0'); \} resultBuilder.push(hexString); return resultBuilder.join(''); \}; // ... */ export interface Schema$Color { /** - * The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: pixel color = alpha * (this color) + (1.0 - alpha) * (background color) This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is to be rendered as a solid color (as if the alpha value had been explicitly given with a value of 1.0). + * The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0). */ alpha?: number | null; /** @@ -3124,7 +3124,7 @@ export namespace sheets_v4 { */ label?: string | null; /** - * True if the headings in this pivot group should be repeated. This is only valid for row groupings and is ignored by columns. By default, we minimize repitition of headings by not showing higher level headings where they are the same. For example, even though the third row below corresponds to "Q1 Mar", "Q1" is not shown because it is redundant with previous rows. Setting repeat_headings to true would cause "Q1" to be repeated for "Feb" and "Mar". +--------------+ | Q1 | Jan | | | Feb | | | Mar | +--------+-----+ | Q1 Total | +--------------+ + * True if the headings in this pivot group should be repeated. This is only valid for row groupings and is ignored by columns. By default, we minimize repetition of headings by not showing higher level headings where they are the same. For example, even though the third row below corresponds to "Q1 Mar", "Q1" is not shown because it is redundant with previous rows. Setting repeat_headings to true would cause "Q1" to be repeated for "Feb" and "Mar". +--------------+ | Q1 | Jan | | | Feb | | | Mar | +--------+-----+ | Q1 Total | +--------------+ */ repeatHeadings?: boolean | null; /** @@ -6572,7 +6572,7 @@ export namespace sheets_v4 { * dateTimeRenderOption: 'placeholder-value', * // The major dimension that results should use. For example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`, then requesting `range=A1:B2,majorDimension=ROWS` returns `[[1,2],[3,4]]`, whereas requesting `range=A1:B2,majorDimension=COLUMNS` returns `[[1,3],[2,4]]`. * majorDimension: 'placeholder-value', - * // The A1 notation of the values to retrieve. + * // The A1 notation or R1C1 notation of the range to retrieve values from. * ranges: 'placeholder-value', * // The ID of the spreadsheet to retrieve data from. * spreadsheetId: 'placeholder-value', @@ -7185,7 +7185,7 @@ export namespace sheets_v4 { * * // Do the magic * const res = await sheets.spreadsheets.values.clear({ - * // The A1 notation of the values to clear. + * // The A1 notation or R1C1 notation of the values to clear. * range: 'placeholder-value', * // The ID of the spreadsheet to update. * spreadsheetId: 'placeholder-value', @@ -7335,7 +7335,7 @@ export namespace sheets_v4 { * dateTimeRenderOption: 'placeholder-value', * // The major dimension that results should use. For example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`, then requesting `range=A1:B2,majorDimension=ROWS` returns `[[1,2],[3,4]]`, whereas requesting `range=A1:B2,majorDimension=COLUMNS` returns `[[1,3],[2,4]]`. * majorDimension: 'placeholder-value', - * // The A1 notation of the values to retrieve. + * // The A1 notation or R1C1 notation of the range to retrieve values from. * range: 'placeholder-value', * // The ID of the spreadsheet to retrieve data from. * spreadsheetId: 'placeholder-value', @@ -7676,7 +7676,7 @@ export namespace sheets_v4 { */ majorDimension?: string; /** - * The A1 notation of the values to retrieve. + * The A1 notation or R1C1 notation of the range to retrieve values from. */ ranges?: string[]; /** @@ -7727,7 +7727,7 @@ export namespace sheets_v4 { export interface Params$Resource$Spreadsheets$Values$Clear extends StandardParameters { /** - * The A1 notation of the values to clear. + * The A1 notation or R1C1 notation of the values to clear. */ range?: string; /** @@ -7751,7 +7751,7 @@ export namespace sheets_v4 { */ majorDimension?: string; /** - * The A1 notation of the values to retrieve. + * The A1 notation or R1C1 notation of the range to retrieve values from. */ range?: string; /** diff --git a/src/apis/spanner/v1.ts b/src/apis/spanner/v1.ts index c3a67d8fc07..62bcbe5741b 100644 --- a/src/apis/spanner/v1.ts +++ b/src/apis/spanner/v1.ts @@ -1046,7 +1046,11 @@ export namespace spanner_v1 { */ export interface Schema$QueryOptions { /** - * An option to control the selection of optimizer version. This parameter allows individual queries to pick different query optimizer versions. Specifying "latest" as a value instructs Cloud Spanner to use the latest supported query optimizer version. If not specified, Cloud Spanner uses optimizer version set at the database level options. Any other positive integer (from the list of supported optimizer versions) overrides the default optimizer version for query execution. The list of supported optimizer versions can be queried from SPANNER_SYS.SUPPORTED_OPTIMIZER_VERSIONS. Executing a SQL statement with an invalid optimizer version will fail with a syntax error (`INVALID_ARGUMENT`) status. See https://cloud.google.com/spanner/docs/query-optimizer/manage-query-optimizer for more information on managing the query optimizer. The `optimizer_version` statement hint has precedence over this setting. + * Query optimizer statistics package to use. This parameter allows individual queries to use a different query optimizer statistics. Specifying `latest` as a value instructs Cloud Spanner to use the latest generated statistics package. If not specified, Cloud Spanner uses statistics package set at the database level options, or latest if the database option is not set. The statistics package requested by the query has to be exempt from garbage collection. This can be achieved with the following DDL statement: ``` ALTER STATISTICS SET OPTIONS (allow_gc=false) ``` The list of available statistics packages can be queried from `SPANNER_SYS.OPTIMIZER_STATISTICS_PACKAGES`. Executing a SQL statement with an invalid optimizer statistics package or with statistics package that allows garbage collection fails with an `INVALID_ARGUMENT` error. + */ + optimizerStatisticsPackage?: string | null; + /** + * An option to control the selection of optimizer version. This parameter allows individual queries to pick different query optimizer versions. Specifying `latest` as a value instructs Cloud Spanner to use the latest supported query optimizer version. If not specified, Cloud Spanner uses the optimizer version set at the database level options. Any other positive integer (from the list of supported optimizer versions) overrides the default optimizer version for query execution. The list of supported optimizer versions can be queried from SPANNER_SYS.SUPPORTED_OPTIMIZER_VERSIONS. Executing a SQL statement with an invalid optimizer version fails with an `INVALID_ARGUMENT` error. See https://cloud.google.com/spanner/docs/query-optimizer/manage-query-optimizer for more information on managing the query optimizer. The `optimizer_version` statement hint has precedence over this setting. */ optimizerVersion?: string | null; } diff --git a/src/apis/speech/v1p1beta1.ts b/src/apis/speech/v1p1beta1.ts index 69c56b525c0..283a4d25ffc 100644 --- a/src/apis/speech/v1p1beta1.ts +++ b/src/apis/speech/v1p1beta1.ts @@ -232,6 +232,10 @@ export namespace speech_v1p1beta1 { * Time of the most recent processing update. */ lastUpdateTime?: string | null; + /** + * Output only. A copy of the TranscriptOutputConfig if it was set in the request. + */ + outputConfig?: Schema$TranscriptOutputConfig; /** * Approximate percentage of audio processed thus far. Guaranteed to be 100 when the audio is fully processed and the results are available. */ @@ -257,11 +261,23 @@ export namespace speech_v1p1beta1 { * Required. Provides information to the recognizer that specifies how to process the request. */ config?: Schema$RecognitionConfig; + /** + * Optional. Specifies an optional destination for the recognition results. + */ + outputConfig?: Schema$TranscriptOutputConfig; } /** * The only message returned to the client by the `LongRunningRecognize` method. It contains the result as zero or more sequential `SpeechRecognitionResult` messages. It is included in the `result.response` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service. */ export interface Schema$LongRunningRecognizeResponse { + /** + * Original output config if present in the request. + */ + outputConfig?: Schema$TranscriptOutputConfig; + /** + * If the transcript output fails this field contains the relevant error. + */ + outputError?: Schema$Status; /** * Sequential list of transcription results corresponding to sequential portions of audio. */ @@ -581,6 +597,15 @@ export namespace speech_v1p1beta1 { */ message?: string | null; } + /** + * Specifies an optional destination for the recognition results. + */ + export interface Schema$TranscriptOutputConfig { + /** + * Specifies a Cloud Storage URI for the recognition results. Must be specified in the format: `gs://bucket_name/object_name`, and the bucket must already exist. + */ + gcsUri?: string | null; + } /** * Word-specific information for recognized words. */ @@ -2450,7 +2475,8 @@ export namespace speech_v1p1beta1 { * // request body parameters * // { * // "audio": {}, - * // "config": {} + * // "config": {}, + * // "outputConfig": {} * // } * }, * }); diff --git a/src/apis/sqladmin/v1beta4.ts b/src/apis/sqladmin/v1beta4.ts index c6de5353d98..854dd137fd2 100644 --- a/src/apis/sqladmin/v1beta4.ts +++ b/src/apis/sqladmin/v1beta4.ts @@ -546,7 +546,7 @@ export namespace sqladmin_v1beta4 { */ settings?: Schema$Settings; /** - * The current serving state of the Cloud SQL instance. This can be one of the following. *SQL_INSTANCE_STATE_UNSPECIFIED*: The state of the instance is unknown. *RUNNABLE*: The instance is running, or has been stopped by owner. *SUSPENDED*: The instance is not available, for example due to problems with billing. for example due to problems with billing. *PENDING_DELETE*: The instance is being deleted. *PENDING_CREATE*: The instance is being created. *MAINTENANCE*: The instance is down for maintenance. *FAILED*: The instance creation failed. + * The current serving state of the Cloud SQL instance. This can be one of the following. *SQL_INSTANCE_STATE_UNSPECIFIED*: The state of the instance is unknown. *RUNNABLE*: The instance is running, or has been stopped by owner. *SUSPENDED*: The instance is not available, for example due to problems with billing. *PENDING_DELETE*: The instance is being deleted. *PENDING_CREATE*: The instance is being created. *MAINTENANCE*: The instance is down for maintenance. *FAILED*: The instance creation failed. */ state?: string | null; /** @@ -829,7 +829,7 @@ export namespace sqladmin_v1beta4 { */ queryInsightsEnabled?: boolean | null; /** - * Maximum query length stored in bytes. Default value: 1024 bytes. Range: 256-4500 bytes. Query length more than this field value will be truncated to this value. When unset, query length will be the default value. + * Maximum query length stored in bytes. Default value: 1024 bytes. Range: 256-4500 bytes. Query length more than this field value will be truncated to this value. When unset, query length will be the default value. Changing query length will restart the database. */ queryStringLength?: number | null; /** diff --git a/src/apis/transcoder/v1beta1.ts b/src/apis/transcoder/v1beta1.ts index d671eeda30c..57b48a25f0e 100644 --- a/src/apis/transcoder/v1beta1.ts +++ b/src/apis/transcoder/v1beta1.ts @@ -894,11 +894,11 @@ export namespace transcoder_v1beta1 { */ rowCount?: number | null; /** - * Required. The height of sprite in pixels. Must be an even integer. + * Required. The height of sprite in pixels. Must be an even integer. To preserve the source aspect ratio, set the SpriteSheet.sprite_height_pixels field or the SpriteSheet.sprite_width_pixels field, but not both (the API will automatically calculate the missing field). */ spriteHeightPixels?: number | null; /** - * Required. The width of sprite in pixels. Must be an even integer. + * Required. The width of sprite in pixels. Must be an even integer. To preserve the source aspect ratio, set the SpriteSheet.sprite_width_pixels field or the SpriteSheet.sprite_height_pixels field, but not both (the API will automatically calculate the missing field). */ spriteWidthPixels?: number | null; /** diff --git a/src/apis/translate/v3.ts b/src/apis/translate/v3.ts index 495925f96e0..daa82160d74 100644 --- a/src/apis/translate/v3.ts +++ b/src/apis/translate/v3.ts @@ -1645,13 +1645,13 @@ export namespace translate_v3 { * * // Do the magic * const res = await translate.projects.locations.list({ - * // The standard list 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). * filter: 'placeholder-value', * // The resource that owns the locations collection, if applicable. * name: 'projects/my-project', - * // The standard list page size. + * // The maximum number of results to return. If not set, the service will select a default. * pageSize: 'placeholder-value', - * // The standard list page token. + * // A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. * pageToken: 'placeholder-value', * }); * console.log(res.data); @@ -1963,7 +1963,7 @@ export namespace translate_v3 { export interface Params$Resource$Projects$Locations$List extends StandardParameters { /** - * The standard list 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). */ filter?: string; /** @@ -1971,11 +1971,11 @@ export namespace translate_v3 { */ name?: string; /** - * The standard list page size. + * The maximum number of results to return. If not set, the service will select a default. */ pageSize?: number; /** - * The standard list page token. + * A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. */ pageToken?: string; } diff --git a/src/apis/translate/v3beta1.ts b/src/apis/translate/v3beta1.ts index de98318afaa..b4953fefff7 100644 --- a/src/apis/translate/v3beta1.ts +++ b/src/apis/translate/v3beta1.ts @@ -1645,13 +1645,13 @@ export namespace translate_v3beta1 { * * // Do the magic * const res = await translate.projects.locations.list({ - * // The standard list 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). * filter: 'placeholder-value', * // The resource that owns the locations collection, if applicable. * name: 'projects/my-project', - * // The standard list page size. + * // The maximum number of results to return. If not set, the service will select a default. * pageSize: 'placeholder-value', - * // The standard list page token. + * // A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. * pageToken: 'placeholder-value', * }); * console.log(res.data); @@ -1963,7 +1963,7 @@ export namespace translate_v3beta1 { export interface Params$Resource$Projects$Locations$List extends StandardParameters { /** - * The standard list 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). */ filter?: string; /** @@ -1971,11 +1971,11 @@ export namespace translate_v3beta1 { */ name?: string; /** - * The standard list page size. + * The maximum number of results to return. If not set, the service will select a default. */ pageSize?: number; /** - * The standard list page token. + * A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. */ pageToken?: string; } diff --git a/src/apis/vision/v1.ts b/src/apis/vision/v1.ts index 8e30edc0d31..9bc246b9104 100644 --- a/src/apis/vision/v1.ts +++ b/src/apis/vision/v1.ts @@ -444,11 +444,11 @@ export namespace vision_v1 { */ export interface Schema$CancelOperationRequest {} /** - * Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to/from color representations in various languages over compactness; for example, the fields of this representation can be trivially provided to the constructor of "java.awt.Color" in Java; it can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" method in iOS; and, with just a little work, it can be easily formatted into a CSS "rgba()" string in JavaScript, as well. Note: this proto does not carry information about the absolute color space that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default, applications SHOULD assume the sRGB color space. Note: when color equality needs to be decided, implementations, unless documented otherwise, will treat two colors to be equal if all their red, green, blue and alpha values each differ by at most 1e-5. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); \} public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); \} return resultBuilder.build(); \} // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; \} return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; \} static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) { return nil; \} Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; \} [result autorelease]; return result; \} // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) { return rgbToCssColor_(red, green, blue); \} var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); \}; var rgbToCssColor_ = function(red, green, blue) { var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) { resultBuilder.push('0'); \} resultBuilder.push(hexString); return resultBuilder.join(''); \}; // ... + * Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to/from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn't carry information about the absolute color space that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most 1e-5. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); \} public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); \} return resultBuilder.build(); \} // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; \} return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; \} static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) { return nil; \} Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; \} [result autorelease]; return result; \} // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) { return rgbToCssColor(red, green, blue); \} var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); \}; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) { resultBuilder.push('0'); \} resultBuilder.push(hexString); return resultBuilder.join(''); \}; // ... */ export interface Schema$Color { /** - * The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: pixel color = alpha * (this color) + (1.0 - alpha) * (background color) This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is to be rendered as a solid color (as if the alpha value had been explicitly given with a value of 1.0). + * The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0). */ alpha?: number | null; /** diff --git a/src/apis/vision/v1p1beta1.ts b/src/apis/vision/v1p1beta1.ts index e0060cd2f45..6a2582f90ec 100644 --- a/src/apis/vision/v1p1beta1.ts +++ b/src/apis/vision/v1p1beta1.ts @@ -303,11 +303,11 @@ export namespace vision_v1p1beta1 { vertices?: Schema$Vertex[]; } /** - * Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to/from color representations in various languages over compactness; for example, the fields of this representation can be trivially provided to the constructor of "java.awt.Color" in Java; it can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" method in iOS; and, with just a little work, it can be easily formatted into a CSS "rgba()" string in JavaScript, as well. Note: this proto does not carry information about the absolute color space that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default, applications SHOULD assume the sRGB color space. Note: when color equality needs to be decided, implementations, unless documented otherwise, will treat two colors to be equal if all their red, green, blue and alpha values each differ by at most 1e-5. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); \} public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); \} return resultBuilder.build(); \} // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; \} return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; \} static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) { return nil; \} Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; \} [result autorelease]; return result; \} // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) { return rgbToCssColor_(red, green, blue); \} var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); \}; var rgbToCssColor_ = function(red, green, blue) { var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) { resultBuilder.push('0'); \} resultBuilder.push(hexString); return resultBuilder.join(''); \}; // ... + * Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to/from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn't carry information about the absolute color space that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most 1e-5. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); \} public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); \} return resultBuilder.build(); \} // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; \} return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; \} static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) { return nil; \} Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; \} [result autorelease]; return result; \} // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) { return rgbToCssColor(red, green, blue); \} var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); \}; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) { resultBuilder.push('0'); \} resultBuilder.push(hexString); return resultBuilder.join(''); \}; // ... */ export interface Schema$Color { /** - * The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: pixel color = alpha * (this color) + (1.0 - alpha) * (background color) This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is to be rendered as a solid color (as if the alpha value had been explicitly given with a value of 1.0). + * The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0). */ alpha?: number | null; /** diff --git a/src/apis/vision/v1p2beta1.ts b/src/apis/vision/v1p2beta1.ts index 351229009fb..71ccd1f8859 100644 --- a/src/apis/vision/v1p2beta1.ts +++ b/src/apis/vision/v1p2beta1.ts @@ -303,11 +303,11 @@ export namespace vision_v1p2beta1 { vertices?: Schema$Vertex[]; } /** - * Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to/from color representations in various languages over compactness; for example, the fields of this representation can be trivially provided to the constructor of "java.awt.Color" in Java; it can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" method in iOS; and, with just a little work, it can be easily formatted into a CSS "rgba()" string in JavaScript, as well. Note: this proto does not carry information about the absolute color space that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default, applications SHOULD assume the sRGB color space. Note: when color equality needs to be decided, implementations, unless documented otherwise, will treat two colors to be equal if all their red, green, blue and alpha values each differ by at most 1e-5. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); \} public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); \} return resultBuilder.build(); \} // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; \} return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; \} static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) { return nil; \} Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; \} [result autorelease]; return result; \} // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) { return rgbToCssColor_(red, green, blue); \} var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); \}; var rgbToCssColor_ = function(red, green, blue) { var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) { resultBuilder.push('0'); \} resultBuilder.push(hexString); return resultBuilder.join(''); \}; // ... + * Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to/from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn't carry information about the absolute color space that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most 1e-5. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); \} public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); \} return resultBuilder.build(); \} // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; \} return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; \} static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) { return nil; \} Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; \} [result autorelease]; return result; \} // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) { return rgbToCssColor(red, green, blue); \} var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); \}; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) { resultBuilder.push('0'); \} resultBuilder.push(hexString); return resultBuilder.join(''); \}; // ... */ export interface Schema$Color { /** - * The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: pixel color = alpha * (this color) + (1.0 - alpha) * (background color) This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is to be rendered as a solid color (as if the alpha value had been explicitly given with a value of 1.0). + * The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0). */ alpha?: number | null; /** diff --git a/src/apis/webrisk/v1.ts b/src/apis/webrisk/v1.ts index 7c255037a0a..fbf2a42b182 100644 --- a/src/apis/webrisk/v1.ts +++ b/src/apis/webrisk/v1.ts @@ -114,7 +114,6 @@ export namespace webrisk_v1 { export class Webrisk { context: APIRequestContext; hashes: Resource$Hashes; - operations: Resource$Operations; projects: Resource$Projects; threatLists: Resource$Threatlists; uris: Resource$Uris; @@ -126,7 +125,6 @@ export namespace webrisk_v1 { }; this.hashes = new Resource$Hashes(this.context); - this.operations = new Resource$Operations(this.context); this.projects = new Resource$Projects(this.context); this.threatLists = new Resource$Threatlists(this.context); this.uris = new Resource$Uris(this.context); @@ -270,6 +268,23 @@ export namespace webrisk_v1 { */ uri?: string | null; } + /** + * Metadata for the Submit URI long-running operation. + */ + export interface Schema$GoogleCloudWebriskV1SubmitUriMetadata { + /** + * Creation time of the operation. + */ + createTime?: string | null; + /** + * The state of the operation. + */ + state?: string | null; + /** + * Latest update time of the operation. + */ + updateTime?: string | null; + } /** * Request to send a potentially malicious URI to WebRisk. */ @@ -524,7 +539,20 @@ export namespace webrisk_v1 { threatTypes?: string[]; } - export class Resource$Operations { + export class Resource$Projects { + context: APIRequestContext; + operations: Resource$Projects$Operations; + submissions: Resource$Projects$Submissions; + uris: Resource$Projects$Uris; + constructor(context: APIRequestContext) { + this.context = context; + this.operations = new Resource$Projects$Operations(this.context); + this.submissions = new Resource$Projects$Submissions(this.context); + this.uris = new Resource$Projects$Uris(this.context); + } + } + + export class Resource$Projects$Operations { context: APIRequestContext; constructor(context: APIRequestContext) { this.context = context; @@ -556,9 +584,9 @@ export namespace webrisk_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await webrisk.operations.cancel({ + * const res = await webrisk.projects.operations.cancel({ * // The name of the operation resource to be cancelled. - * name: 'operations/.*', + * name: 'projects/my-project/operations/my-operation', * * // Request body metadata * requestBody: { @@ -585,31 +613,31 @@ export namespace webrisk_v1 { * @returns A promise if used with async/await, or void if used with a callback. */ cancel( - params: Params$Resource$Operations$Cancel, + params: Params$Resource$Projects$Operations$Cancel, options: StreamMethodOptions ): GaxiosPromise; cancel( - params?: Params$Resource$Operations$Cancel, + params?: Params$Resource$Projects$Operations$Cancel, options?: MethodOptions ): GaxiosPromise; cancel( - params: Params$Resource$Operations$Cancel, + params: Params$Resource$Projects$Operations$Cancel, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; cancel( - params: Params$Resource$Operations$Cancel, + params: Params$Resource$Projects$Operations$Cancel, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; cancel( - params: Params$Resource$Operations$Cancel, + params: Params$Resource$Projects$Operations$Cancel, callback: BodyResponseCallback ): void; cancel(callback: BodyResponseCallback): void; cancel( paramsOrCallback?: - | Params$Resource$Operations$Cancel + | Params$Resource$Projects$Operations$Cancel | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -625,12 +653,12 @@ export namespace webrisk_v1 { | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Operations$Cancel; + {}) as Params$Resource$Projects$Operations$Cancel; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Operations$Cancel; + params = {} as Params$Resource$Projects$Operations$Cancel; options = {}; } @@ -689,9 +717,9 @@ export namespace webrisk_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await webrisk.operations.delete({ + * const res = await webrisk.projects.operations.delete({ * // The name of the operation resource to be deleted. - * name: 'operations/.*', + * name: 'projects/my-project/operations/my-operation', * }); * console.log(res.data); * @@ -712,31 +740,31 @@ export namespace webrisk_v1 { * @returns A promise if used with async/await, or void if used with a callback. */ delete( - params: Params$Resource$Operations$Delete, + params: Params$Resource$Projects$Operations$Delete, options: StreamMethodOptions ): GaxiosPromise; delete( - params?: Params$Resource$Operations$Delete, + params?: Params$Resource$Projects$Operations$Delete, options?: MethodOptions ): GaxiosPromise; delete( - params: Params$Resource$Operations$Delete, + params: Params$Resource$Projects$Operations$Delete, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; delete( - params: Params$Resource$Operations$Delete, + params: Params$Resource$Projects$Operations$Delete, options: MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; delete( - params: Params$Resource$Operations$Delete, + params: Params$Resource$Projects$Operations$Delete, callback: BodyResponseCallback ): void; delete(callback: BodyResponseCallback): void; delete( paramsOrCallback?: - | Params$Resource$Operations$Delete + | Params$Resource$Projects$Operations$Delete | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -752,12 +780,12 @@ export namespace webrisk_v1 { | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Operations$Delete; + {}) as Params$Resource$Projects$Operations$Delete; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Operations$Delete; + params = {} as Params$Resource$Projects$Operations$Delete; options = {}; } @@ -816,9 +844,9 @@ export namespace webrisk_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await webrisk.operations.get({ + * const res = await webrisk.projects.operations.get({ * // The name of the operation resource. - * name: 'operations/.*', + * name: 'projects/my-project/operations/my-operation', * }); * console.log(res.data); * @@ -845,27 +873,27 @@ export namespace webrisk_v1 { * @returns A promise if used with async/await, or void if used with a callback. */ get( - params: Params$Resource$Operations$Get, + params: Params$Resource$Projects$Operations$Get, options: StreamMethodOptions ): GaxiosPromise; get( - params?: Params$Resource$Operations$Get, + params?: Params$Resource$Projects$Operations$Get, options?: MethodOptions ): GaxiosPromise; get( - params: Params$Resource$Operations$Get, + params: Params$Resource$Projects$Operations$Get, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; get( - params: Params$Resource$Operations$Get, + params: Params$Resource$Projects$Operations$Get, options: | MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; get( - params: Params$Resource$Operations$Get, + params: Params$Resource$Projects$Operations$Get, callback: BodyResponseCallback ): void; get( @@ -873,7 +901,7 @@ export namespace webrisk_v1 { ): void; get( paramsOrCallback?: - | Params$Resource$Operations$Get + | Params$Resource$Projects$Operations$Get | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -888,12 +916,13 @@ export namespace webrisk_v1 { | void | GaxiosPromise | GaxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Operations$Get; + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Operations$Get; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Operations$Get; + params = {} as Params$Resource$Projects$Operations$Get; options = {}; } @@ -952,11 +981,11 @@ export namespace webrisk_v1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await webrisk.operations.list({ + * const res = await webrisk.projects.operations.list({ * // The standard list filter. * filter: 'placeholder-value', * // The name of the operation's parent resource. - * name: 'operations', + * name: 'projects/my-project', * // The standard list page size. * pageSize: 'placeholder-value', * // The standard list page token. @@ -984,27 +1013,27 @@ export namespace webrisk_v1 { * @returns A promise if used with async/await, or void if used with a callback. */ list( - params: Params$Resource$Operations$List, + params: Params$Resource$Projects$Operations$List, options: StreamMethodOptions ): GaxiosPromise; list( - params?: Params$Resource$Operations$List, + params?: Params$Resource$Projects$Operations$List, options?: MethodOptions ): GaxiosPromise; list( - params: Params$Resource$Operations$List, + params: Params$Resource$Projects$Operations$List, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; list( - params: Params$Resource$Operations$List, + params: Params$Resource$Projects$Operations$List, options: | MethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; list( - params: Params$Resource$Operations$List, + params: Params$Resource$Projects$Operations$List, callback: BodyResponseCallback ): void; list( @@ -1012,7 +1041,7 @@ export namespace webrisk_v1 { ): void; list( paramsOrCallback?: - | Params$Resource$Operations$List + | Params$Resource$Projects$Operations$List | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: @@ -1027,12 +1056,13 @@ export namespace webrisk_v1 { | void | GaxiosPromise | GaxiosPromise { - let params = (paramsOrCallback || {}) as Params$Resource$Operations$List; + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Operations$List; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Operations$List; + params = {} as Params$Resource$Projects$Operations$List; options = {}; } @@ -1045,7 +1075,10 @@ export namespace webrisk_v1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + url: (rootUrl + '/v1/{+name}/operations').replace( + /([^:]\/)\/+/g, + '$1' + ), method: 'GET', }, options @@ -1068,7 +1101,7 @@ export namespace webrisk_v1 { } } - export interface Params$Resource$Operations$Cancel + export interface Params$Resource$Projects$Operations$Cancel extends StandardParameters { /** * The name of the operation resource to be cancelled. @@ -1080,20 +1113,22 @@ export namespace webrisk_v1 { */ requestBody?: Schema$GoogleLongrunningCancelOperationRequest; } - export interface Params$Resource$Operations$Delete + export interface Params$Resource$Projects$Operations$Delete extends StandardParameters { /** * The name of the operation resource to be deleted. */ name?: string; } - export interface Params$Resource$Operations$Get extends StandardParameters { + export interface Params$Resource$Projects$Operations$Get + extends StandardParameters { /** * The name of the operation resource. */ name?: string; } - export interface Params$Resource$Operations$List extends StandardParameters { + export interface Params$Resource$Projects$Operations$List + extends StandardParameters { /** * The standard list filter. */ @@ -1112,17 +1147,6 @@ export namespace webrisk_v1 { pageToken?: string; } - export class Resource$Projects { - context: APIRequestContext; - submissions: Resource$Projects$Submissions; - uris: Resource$Projects$Uris; - constructor(context: APIRequestContext) { - this.context = context; - this.submissions = new Resource$Projects$Submissions(this.context); - this.uris = new Resource$Projects$Uris(this.context); - } - } - export class Resource$Projects$Submissions { context: APIRequestContext; constructor(context: APIRequestContext) { diff --git a/src/apis/workflowexecutions/v1.ts b/src/apis/workflowexecutions/v1.ts index 92248dac0a0..5db5bf24dba 100644 --- a/src/apis/workflowexecutions/v1.ts +++ b/src/apis/workflowexecutions/v1.ts @@ -134,13 +134,17 @@ export namespace workflowexecutions_v1 { */ export interface Schema$Error { /** - * Human readable error context, helpful for debugging purposes. + * Human readable stack trace string. */ context?: string | null; /** - * Error payload returned by the execution, represented as a JSON string. + * Error message and data returned represented as a JSON string. */ payload?: string | null; + /** + * Stack trace with detailed information of where error was generated. + */ + stackTrace?: Schema$StackTrace; } /** * A running instance of a [Workflow](/workflows/docs/reference/rest/v1/projects.locations.workflows). @@ -192,6 +196,49 @@ export namespace workflowexecutions_v1 { */ nextPageToken?: string | null; } + /** + * Position contains source position information about the stack trace element such as line number, column number and length of the code block in bytes. + */ + export interface Schema$Position { + /** + * The source code column position (of the line) the current instruction was generated from. + */ + column?: string | null; + /** + * The length in bytes of text in this character group, e.g. digits of a number, string length, or AST (abstract syntax tree) node. + */ + length?: string | null; + /** + * The source code line number the current instruction was generated from. + */ + line?: string | null; + } + /** + * A collection of stack elements (frames) where an error occurred. + */ + export interface Schema$StackTrace { + /** + * An array of Stack elements. + */ + elements?: Schema$StackTraceElement[]; + } + /** + * A single stack element (frame) where an error occurred. + */ + export interface Schema$StackTraceElement { + /** + * The source position information of the stacktrace element. + */ + position?: Schema$Position; + /** + * The routine where the error occurred. + */ + routine?: string | null; + /** + * The step the error occurred at. + */ + step?: string | null; + } export class Resource$Projects { context: APIRequestContext; diff --git a/src/apis/workflowexecutions/v1beta.ts b/src/apis/workflowexecutions/v1beta.ts index c5eef939321..e2000a9a6cb 100644 --- a/src/apis/workflowexecutions/v1beta.ts +++ b/src/apis/workflowexecutions/v1beta.ts @@ -223,7 +223,7 @@ export namespace workflowexecutions_v1beta { elements?: Schema$StackTraceElement[]; } /** - * A single stack element (frame) where an error occurred. This field currently only exists in v1Beta. We will need to roll this change out to V1 after the feature is thoroughly tested. TODO(b/178540475) + * A single stack element (frame) where an error occurred. */ export interface Schema$StackTraceElement { /** diff --git a/src/apis/workflows/v1.ts b/src/apis/workflows/v1.ts index b4f153c9534..3f21a39b4cb 100644 --- a/src/apis/workflows/v1.ts +++ b/src/apis/workflows/v1.ts @@ -297,7 +297,7 @@ export namespace workflows_v1 { */ serviceAccount?: string | null; /** - * Workflow code to be executed. The size limit is 32KB. + * Workflow code to be executed. The size limit is 128KB. */ sourceContents?: string | null; /** @@ -488,13 +488,13 @@ export namespace workflows_v1 { * * // Do the magic * const res = await workflows.projects.locations.list({ - * // The standard list 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). * filter: 'placeholder-value', * // The resource that owns the locations collection, if applicable. * name: 'projects/my-project', - * // The standard list page size. + * // The maximum number of results to return. If not set, the service will select a default. * pageSize: 'placeholder-value', - * // The standard list page token. + * // A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. * pageToken: 'placeholder-value', * }); * console.log(res.data); @@ -613,7 +613,7 @@ export namespace workflows_v1 { export interface Params$Resource$Projects$Locations$List extends StandardParameters { /** - * The standard list 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). */ filter?: string; /** @@ -621,11 +621,11 @@ export namespace workflows_v1 { */ name?: string; /** - * The standard list page size. + * The maximum number of results to return. If not set, the service will select a default. */ pageSize?: number; /** - * The standard list page token. + * A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. */ pageToken?: string; } diff --git a/src/apis/workflows/v1beta.ts b/src/apis/workflows/v1beta.ts index 60bcbbb455b..58b22b9d241 100644 --- a/src/apis/workflows/v1beta.ts +++ b/src/apis/workflows/v1beta.ts @@ -297,7 +297,7 @@ export namespace workflows_v1beta { */ serviceAccount?: string | null; /** - * Workflow code to be executed. The size limit is 32KB. + * Workflow code to be executed. The size limit is 128KB. */ sourceContents?: string | null; /** @@ -488,13 +488,13 @@ export namespace workflows_v1beta { * * // Do the magic * const res = await workflows.projects.locations.list({ - * // The standard list 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). * filter: 'placeholder-value', * // The resource that owns the locations collection, if applicable. * name: 'projects/my-project', - * // The standard list page size. + * // The maximum number of results to return. If not set, the service will select a default. * pageSize: 'placeholder-value', - * // The standard list page token. + * // A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. * pageToken: 'placeholder-value', * }); * console.log(res.data); @@ -613,7 +613,7 @@ export namespace workflows_v1beta { export interface Params$Resource$Projects$Locations$List extends StandardParameters { /** - * The standard list 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). */ filter?: string; /** @@ -621,11 +621,11 @@ export namespace workflows_v1beta { */ name?: string; /** - * The standard list page size. + * The maximum number of results to return. If not set, the service will select a default. */ pageSize?: number; /** - * The standard list page token. + * A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. */ pageToken?: string; } diff --git a/src/index.ts b/src/index.ts index d07734a8d27..320782cfe71 100644 --- a/src/index.ts +++ b/src/index.ts @@ -40,6 +40,7 @@ export {alertcenter_v1beta1} from './apis/alertcenter/v1beta1'; export {analytics_v3} from './apis/analytics/v3'; export {analyticsadmin_v1alpha} from './apis/analyticsadmin/v1alpha'; export {analyticsdata_v1alpha} from './apis/analyticsdata/v1alpha'; +export {analyticsdata_v1beta} from './apis/analyticsdata/v1beta'; export {analyticsreporting_v4} from './apis/analyticsreporting/v4'; export {androiddeviceprovisioning_v1} from './apis/androiddeviceprovisioning/v1'; export {androidenterprise_v1} from './apis/androidenterprise/v1'; @@ -92,6 +93,7 @@ export {cloudbilling_v1} from './apis/cloudbilling/v1'; export {cloudbuild_v1} from './apis/cloudbuild/v1'; export {cloudbuild_v1alpha1} from './apis/cloudbuild/v1alpha1'; export {cloudbuild_v1alpha2} from './apis/cloudbuild/v1alpha2'; +export {cloudbuild_v1beta1} from './apis/cloudbuild/v1beta1'; export {cloudchannel_v1} from './apis/cloudchannel/v1'; export {clouddebugger_v2} from './apis/clouddebugger/v2'; export {clouderrorreporting_v1beta1} from './apis/clouderrorreporting/v1beta1'; @@ -135,6 +137,7 @@ export {dataflow_v1b3} from './apis/dataflow/v1b3'; export {datafusion_v1} from './apis/datafusion/v1'; export {datafusion_v1beta1} from './apis/datafusion/v1beta1'; export {datalabeling_v1beta1} from './apis/datalabeling/v1beta1'; +export {datamigration_v1} from './apis/datamigration/v1'; export {datamigration_v1beta1} from './apis/datamigration/v1beta1'; export {dataproc_v1} from './apis/dataproc/v1'; export {dataproc_v1beta2} from './apis/dataproc/v1beta2'; @@ -186,6 +189,7 @@ export {firebasehosting_v1beta1} from './apis/firebasehosting/v1beta1'; export {firebaseml_v1} from './apis/firebaseml/v1'; export {firebaseml_v1beta2} from './apis/firebaseml/v1beta2'; export {firebaserules_v1} from './apis/firebaserules/v1'; +export {firebasestorage_v1beta} from './apis/firebasestorage/v1beta'; export {firestore_v1} from './apis/firestore/v1'; export {firestore_v1beta1} from './apis/firestore/v1beta1'; export {firestore_v1beta2} from './apis/firestore/v1beta2'; @@ -198,6 +202,11 @@ export {gameservices_v1beta} from './apis/gameservices/v1beta'; export {genomics_v1} from './apis/genomics/v1'; export {genomics_v1alpha2} from './apis/genomics/v1alpha2'; export {genomics_v2alpha1} from './apis/genomics/v2alpha1'; +export {gkehub_v1} from './apis/gkehub/v1'; +export {gkehub_v1alpha} from './apis/gkehub/v1alpha'; +export {gkehub_v1alpha2} from './apis/gkehub/v1alpha2'; +export {gkehub_v1beta} from './apis/gkehub/v1beta'; +export {gkehub_v1beta1} from './apis/gkehub/v1beta1'; export {gmail_v1} from './apis/gmail/v1'; export {gmailpostmastertools_v1} from './apis/gmailpostmastertools/v1'; export {gmailpostmastertools_v1beta1} from './apis/gmailpostmastertools/v1beta1'; @@ -243,6 +252,7 @@ export {networkmanagement_v1beta1} from './apis/networkmanagement/v1beta1'; export {notebooks_v1} from './apis/notebooks/v1'; export {oauth2_v2} from './apis/oauth2/v2'; export {ondemandscanning_v1beta1} from './apis/ondemandscanning/v1beta1'; +export {orgpolicy_v2} from './apis/orgpolicy/v2'; export {osconfig_v1} from './apis/osconfig/v1'; export {osconfig_v1beta} from './apis/osconfig/v1beta'; export {oslogin_v1} from './apis/oslogin/v1';